-
Notifications
You must be signed in to change notification settings - Fork 18
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-39227: rework (with deprecation) external-calibration connections. #812
Conversation
adf8e04
to
af2a9a6
Compare
af2a9a6
to
cf8c781
Compare
python/lsst/pipe/tasks/makeWarp.py
Outdated
if config.select.target != lsst.pipe.tasks.selectImages.PsfWcsSelectImagesTask: | ||
del self.visitSummary | ||
# We always drop the deprecated wcsList and bboxList connections, | ||
# since we can always equivalents from the visitSummary dataset. |
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.
"....since we can always use/get equivalents from..."
python/lsst/pipe/tasks/makeWarp.py
Outdated
deprecated=( | ||
"Deprecated in favor of the 'visitSummary' connection (and already ignored). " | ||
"Will be removed after v27." | ||
) | ||
) | ||
visitSummary = connectionTypes.Input( | ||
doc="Consolidated exposure metadata", |
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.
Update doc to match those in meas_base
(or vice-versa)?
doc="Input visit-summary catalog with updated calibration objects.",
python/lsst/pipe/tasks/makeWarp.py
Outdated
row = visitSummary.find(dataId["detector"]) | ||
if row is None: | ||
raise RuntimeError( | ||
f"Unexpectedly incomplete visitSummary provided to makeWarp: {dataId} missing." |
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.
"...{dataId} is missing"?
python/lsst/pipe/tasks/makeWarp.py
Outdated
"If True, use the PSF model and aperture corrections from the 'visitSummary' connection. " | ||
"If False, use the PSF model and aperture corrections from the 'exposure' connection. " | ||
# TODO: remove this next sentence on DM-39854. | ||
"The finalizedPsfApCorrCatalog connection (if enabled) takes precedence over either. " |
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.
Extra blank space after period.
python/lsst/pipe/tasks/makeWarp.py
Outdated
row = visitSummary.find(detectorId) | ||
if row is None: | ||
raise RuntimeError( | ||
f"Unexpectedly incomplete visitSummary: detector={detectorId} missing." |
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.
"...{dataId} is missing"?
) | ||
exposure = connectionTypes.Input( | ||
doc="Input exposure to perform photometry on.", | ||
name="calexp", | ||
storageClass="ExposureF", | ||
dimensions=["instrument", "visit", "detector"], | ||
) | ||
visitSummary = connectionTypes.Input( | ||
doc="Consolidated exposure metadata", |
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.
Update doc to match those in meas_base
(or vice-versa)?
doc="Input visit-summary catalog with updated calibration objects.",
@@ -528,10 +585,15 @@ def prepareCalibratedExposure(self, exposure, externalSkyWcsCatalog=None, extern | |||
Exposure catalog with external skyWcs to be applied | |||
if config.doApplyExternalSkyWcs=True. Catalog uses the detector id | |||
for the catalog id, sorted on id for fast lookup. | |||
Deprecated in favor of 'visitSummary`; will be removed after v27. |
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 the inconsistent ticks matter (here and below)?
) | ||
|
||
def __init__(self, *, config=None): | ||
super().__init__(config=config) | ||
# Same connection boilerplate as all other applications of | ||
# Global/Tract calibrations | ||
keepSkyMap = False |
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.
Should there be a TODO
in here?
@@ -532,6 +550,9 @@ def prepareCalibratedExposure(self, exposure, externalSkyWcsCatalog=None, extern | |||
Exposure catalog with external photoCalib to be applied | |||
if config.doApplyExternalPhotoCalib=True. Catalog uses the detector | |||
id for the catalog id, sorted on id for fast lookup. | |||
visitSummary : `lsst.afw.table.ExposureCatalog`, optional | |||
Exposure catalog with all calibration objects. WCS and PhotoCalib | |||
are always applied if provided and present. |
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 think I know what you mean, but "provided and present" sounds redundant.
I think visitSummary should provide anything any else a 'select' subtask implementation might need, and that's why the TODO code comments can be removed here as well.
Since only finalVisitSummary has PSF and ApCorrMap, this adds a new useVisitSummaryPsf config option that can be set to False to use the calexp for those instead. In all other cases we skip any detectors for which the visit summary doesn't provide what we want, because we expect that to represent our best calibrations and we don't want to include detectors without those in the coadd.
cf8c781
to
0b6a2b8
Compare
No description provided.