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-13437: Stop calibration product generation from causing lots of warnings/errors due to inability to create pretty pictures #51

Merged
merged 2 commits into from Feb 5, 2018

Conversation

PaulPrice
Copy link
Contributor

No description provided.

return imageFactory(1, 1), detId
return self.images[detId], detId
image = imageFactory(detector.getBBox())
image.set(np.nan)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this use self.background?

This requires that the 'ccd name' is a tuple containing only the
detector ID. If that is not the case, change CalibConfig.ccdKeys
or set CalibConfig.doCameraImage=False to disable this.

@param camera Camera object
@param dataId Data identifier for output
Copy link
Contributor

Choose a reason for hiding this comment

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

With the change from tuple to dataId I think you should update this description

return self.images[detId], detId
image = imageFactory(detector.getBBox())
image.set(np.nan)
image = afwMath.binImage(image, binSize)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's wasteful to create a full-size image of NaNs then bin it down. Can't you create the binned image directly?

The dict of calibs has been indexed by the "ccdName" (a tuple of
CCD-specific dataId values), but our ImageSource doesn't know
how to construct one of those from the detector it's given.
Instead, index the calibs by the detector ID.
We have been returning 1x1 images if there's no image, and that generates
annoying warnings with cryptic messages. Instead, generate a full-size
fake image.
@PaulPrice PaulPrice merged commit 63528f3 into master Feb 5, 2018
@ktlim ktlim deleted the tickets/DM-13437 branch August 25, 2018 06:50
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