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

Update preview image generator to handle new NaN pixels #1212

Merged
merged 3 commits into from
Mar 13, 2023

Conversation

bhilbert4
Copy link
Collaborator

Resolves #1207

A recent change in the cal pipeline now has pixels for which no slope is computed being set to NaN in the slope image. Previously these pixels had been set to zero. Setting these pixels to NaN means matplotlib now shows them as white in the preview images rather than black. This, combined with the way that matplotlib averages pixels together when producing the preview image/thumbnail jpgs was resulting in preview images that were full of white splotches. This PR updates the preview image generator such that NaN pixels are set to zero prior to creating jpgs. This means these pixels are back to being shown as black, and the matplotlib averaging seems not to creates big splotches when working with them.

@bhilbert4
Copy link
Collaborator Author

I've tested this on all the examples listed in #1207, and the resulting jpg files look much cleaner.
@mfixstsci this is ready for review.

Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

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

I've been tracking the conversation on slack about this, thanks for submitting the fix.

@mfixstsci mfixstsci merged commit 0f6bb40 into spacetelescope:develop Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mostly white pixels on preview image and thumbnail
2 participants