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-35496: Update coord columns per reevaluated WCS #698
Conversation
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.
I have a couple questions, but I'm not sure how valid they are.
@@ -673,6 +673,9 @@ def addCalibColumns(self, catalog, exposure, exposureIdInfo, **kwargs): | |||
newCat = afwTable.SourceCatalog(schema) | |||
newCat.extend(catalog, mapper=mapper) | |||
|
|||
if self.config.doReevaluateSkyWcs: |
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.
It took me a little while to track down the difference between doApplyExternalSkyWcs
and doReevaluateSkyWcs
--would it be worth clarifying in the docs that the former updates the wcs of the exposure while the latter updates the coordinates of the input catalog, if I am interpreting correctly?
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.
doReevaluateSkyWcs
tells it whether or not to update the WCS in the source table at all.- IFF that's true,
doApplyExternalSkyWcs
tells it whether to usecalexp.wcs
orjointcal
. - IFF that's that's true,
useGlobalExternalSkyWcs
tells it whether to use jointcal-global or jointcal-tract.
doApplyExternalSkyWcs
+useGlobalExternalSkyWcs
here means the thing as all the other Tasks that decide whether to get their WCS from the calexp, jointcal tract-mode, or jointcal global-mode (i.e. makeWarp
, ForcedPhotCcd
and faro). I find the control structure that you find in every __init__
of Configs that have a doApplyExternalSkyWcs
super confusing, hate it, and hope that one day when you make gbdes
an option that you find a good replacement for doApplyExternalSkyWcs
+useGlobalExternalSkyWcs
everywhere.
I opted for consistency.
to help, I'll add a line to the docstring of doApplyExternalSkyWcs
"Used if and only if doReevaluateSkyWcs"
@@ -673,6 +673,9 @@ def addCalibColumns(self, catalog, exposure, exposureIdInfo, **kwargs): | |||
newCat = afwTable.SourceCatalog(schema) | |||
newCat.extend(catalog, mapper=mapper) | |||
|
|||
if self.config.doReevaluateSkyWcs: | |||
afwTable.updateSourceCoords(exposure.wcs, newCat) |
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.
Do you need to have a corresponding statement for self.config.doReevaluatePhotoCalib
?
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.
No, and I'll drop an inline comment on why not.
92f5af8
to
99b8c19
Compare
No description provided.