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-35569: ip_isr doEmpiricalReadNoise fails if an amplifier is fully masked #229

Merged
merged 2 commits into from Sep 15, 2022

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Sep 9, 2022

Move countMaskedPixels from cp_pipe, and use it to check that the amplifier is fully masked.

@czwa czwa requested a review from plazas September 9, 2022 20:36
Copy link
Contributor

@plazas plazas left a comment

Choose a reason for hiding this comment

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

LGTM. A small comment about the unit test.

self.assertEqual(ipIsr.countMaskedPixels(mi, 'BAD'), 0)

mi.mask[noDataBox] ^= NODATABIT # XOR to reset what we did
self.assertEqual(ipIsr.countMaskedPixels(mi, 'NO_DATA'), 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly is happening in this unit test? I see all comparisons to zero. Are these null tests always? Shouldn't there be tests for when the number of masked pixels is different from zero? Maybe I misunderstood the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test above this line applies a mask bit (NO_DATA) to a region, and then checks that the count of those pixels in that mask is equal to the area of that region. The check for BAD is checking that it's correctly respecting mask planes and only measuring what it's told.

@czwa czwa merged commit d9f5940 into main Sep 15, 2022
@czwa czwa deleted the tickets/DM-35569 branch September 15, 2022 23:06
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