New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-30927: Set calexp WCS to None for failed astrometric fit #189
Conversation
9736412
to
c862146
Compare
c862146
to
2b33bad
Compare
2b33bad
to
d9739f0
Compare
d9739f0
to
6a0fae9
Compare
6a0fae9
to
cb51f12
Compare
python/lsst/jointcal/jointcal.py
Outdated
@@ -799,6 +802,8 @@ def _load_data(self, inputSourceTableVisit, inputVisitSummary, associations, | |||
visitCatalog = dataRef.get(parameters={'columns': columns}) | |||
|
|||
selected = self.sourceSelector.run(visitCatalog) | |||
if len(selected) == 0: | |||
raise RuntimeError("No data to process: the source selector removed all sources") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, should this actually raise if one of the visits has no sources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hhhmmm...good point. Do you think I should just log a message (INFO/WARNING?) and continue
?
c31acc6
to
53171bf
Compare
python/lsst/jointcal/jointcal.py
Outdated
@@ -799,6 +802,10 @@ def _load_data(self, inputSourceTableVisit, inputVisitSummary, associations, | |||
visitCatalog = dataRef.get(parameters={'columns': columns}) | |||
|
|||
selected = self.sourceSelector.run(visitCatalog) | |||
if len(selected) == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is incorrect, selected
is a struct. You need len(selected.sourceCat)
.
We are now persisting source catalogs even in light of an astrometric failure in single frame processing. Such catalogs will have their sky coordinate column (typically "coord_ra" and "coord_dec") values set to NaN. They are thus not suitable for inclusion in the jointcal calibration, so this config default ensures they are omited from the selection of "good" sources.
53171bf
to
b70a6be
Compare
No description provided.