Skip to content
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-21308: Replace doApplyUberCal with doApplyExternal configs #340

Merged
merged 1 commit into from Jan 25, 2020

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Jan 17, 2020

No description provided.

retrieved from the `calexp`. When `config.doApplyExternalSkyWcs` is `True`,
the astrometric calibration is taken from `config.externalSkyWcsName` with
the `name_wcs` dataset. Otherwise, the astrometric calibration is taken
from the `calexp`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can take a moment to numpydoc-ify this along the way, I would give you a gold star ⭐️

else:
photoCalib = exposure.getPhotoCalib()

if self.config.doApplyExternalSkyWcs:
skyWcs = dataRef.get(f"{self.config.externalSkyWcsName}_wcs")
exposure.setWcs(skyWcs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am belatedly seeing the comment in the obs_subaru HSC makeCoaddTempExp.py which states "This was copy-pasted from MakeCoaddTempExpTask, and extra step added to check whether an additional mask is needed." BOOO. The docstring further admits it is a hack.

This explains why I was confusing myself thinking I had already reviewed this code 😠

Anyway, assuming this code duplication is an independent problem I cannot control, and will be fixed in DM-20074 per the comment in obs_subaru, please see my review comments in obs_subaru, where I suggest changes in literally identical code.

# a "jointcal_photoCalib" calibration to return
self.jointcalPhotoCalib = lsst.afw.image.PhotoCalib(1e-6, 1e-8)
# An ubercalibrated photoCalib calibration to return
self.uberPhotoCalib = lsst.afw.image.PhotoCalib(1e-6, 1e-8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please call this external rather than uber throughout the tests

@mrawls
Copy link
Contributor

mrawls commented Jan 23, 2020

Please also consider squashing some of the commits here.

The doApplyUberCal config has been deprecated in favor of
doApplyExternalPhotoCalib and doApplyExternalSkyWcs.  These names are
consistent with the updates to validate_drp in DM-21950, and allow different
external calibrations (jointcal, fgcmcal, fgcmcal_tract) to be used, and for
external photometric and astrometric calibrations to be applied separately.
Finally, useMeasMosaic has been properly deprecated.
@erykoff erykoff merged commit dc00984 into master Jan 25, 2020
@timj timj deleted the tickets/DM-21308 branch February 18, 2021 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants