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-9953: Pixels rejected from coaddition and CCD are not masked on coadds #291

Merged
merged 3 commits into from Nov 21, 2017

Conversation

PaulPrice
Copy link
Contributor

No description provided.

img.getMask().set(0)
stack = afwMath.statisticsStack(images, afwMath.MEANCLIP, clipped=clipped)
self.assertFloatsAlmostEqual(stack.getImage().getArray(), 0.0, atol=0.0)
self.assertFloatsAlmostEqual(stack.getMask().getArray(), 0, atol=0.0) # Not floats, but that's OK
Copy link
Member

Choose a reason for hiding this comment

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

There's a forwarding method for exactly this: assertFloatsEqual.

We want to know the number of inputs that were clipped in the process of
measuring the clipped statistics (e.g., MEANCLIP).
It's helpful to know the number of inputs that were masked, and it's
inexpensive to calculate.
We want to know when a pixel is clipped or masked (because on coadds that
means the CoaddPsf won't be accurate), so have a bit set when this occurs.
Uses the new NCLIPPED and NMASKED statistics.

Some mask bits may be excused from triggering this, so as not to mask
as clipped/masked pixels that shouldn't ever be considered for inclusion
in the stack (e.g., NO_DATA; as opposed to pixels that are not being
included because the are in the imaged area but corrupted somehow).
@PaulPrice PaulPrice merged commit ae2985a into master Nov 21, 2017
@ktlim ktlim deleted the tickets/DM-9953 branch August 25, 2018 06:44
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