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-30738: Backport gen3 imSim BF-kernels for gen2 #187

Merged
merged 1 commit into from Jun 16, 2021
Merged

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Jun 15, 2021

Fix gen2 handling of detector level BF kernels.

@czwa czwa requested a review from laurenam June 15, 2021 20:26
@@ -1147,15 +1147,15 @@ def readIsrData(self, dataRef, rawExposure):
except NoResults:
try: # Fall back to the old-style numpy-ndarray style kernel if necessary.
brighterFatterKernel = dataRef.get("bfKernel")
self.log.info("Old style brighter-fatter kernel (np.array) loaded")
self.log.info("Old style brighter-fatter kernel (bfKernel) loaded")
except NoResults:
brighterFatterKernel = None
if brighterFatterKernel is not None and not isinstance(brighterFatterKernel, numpy.ndarray):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the changes (except for the log message above) is protected by this if check. This means if we received a numpy array (which is the case for HSC), then this section is skipped. All of the other changes to support new brighter-fatter kernels has been done in gen3, which uses the runQuantum method to check and restructure calibrations. When we switch fully to gen3, this method will be removed, as it's only called in gen2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, that's what I was missing...thanks for the explanation!

@czwa czwa merged commit 59c8028 into master Jun 16, 2021
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

3 participants