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-27157: constructDark.py fails on LSSTCam with 'Image contains no Pixels' #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good; I just asked for some minor clarifications, especially in the part that seems to be doing the fix for this ticket ({{len(newRow)}}).
@@ -342,7 +346,10 @@ def collapseArrayMedian(self, maskedArray): | |||
fitType = afwMath.stringToStatisticsProperty('MEDIAN') | |||
for row in integerMI: | |||
newRow = row.compressed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this compressed
returning? How could it be empty? (which is what you check for in the next conditional)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compressed
returns all values of the maskedArray that are not masked. The case where len(newRow) == 0
is the case where all elements of this row's overscan are masked, and so the newRow
is empty.
@@ -523,6 +534,13 @@ def debugView(self, image, model): | |||
axes.plot(indices, plotModel, 'r-') | |||
plot.xlabel("centered/scaled position along overscan region") | |||
plot.ylabel("pixel value/fit value") | |||
if amp: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it's the {{amp}} only used to get information for the string in the title? (just confirming)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is code I pulled from DM-26281 before marking that invalid. Debugging overscan quickly becomes impossible without information about which amp you're looking at, which wasn't available before. Passing the optional amp
gives information to make the title informative.
This issue is a result of an overscan bug when
MEDIAN_BY_ROW
is active and an overscan row is completely masked. In addition, the DM-26281 overscan debug rework is added here, as it was necessary to diagnose the issue.