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-27157: constructDark.py fails on LSSTCam with 'Image contains no Pixels' #160

Merged
merged 2 commits into from Oct 19, 2020

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Oct 14, 2020

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.

@czwa czwa requested a review from plazas October 14, 2020 20:49
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.

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()
Copy link
Contributor

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)

Copy link
Contributor Author

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:
Copy link
Contributor

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)

Copy link
Contributor Author

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.

@czwa czwa changed the title DM-27147: constructDark.py fails on LSSTCam with 'Image contains no Pixels' DM-27157: constructDark.py fails on LSSTCam with 'Image contains no Pixels' Oct 19, 2020
@czwa czwa merged commit d245766 into master Oct 19, 2020
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