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

Fix clipping logic in preview image scaling #1011

Merged

Conversation

bhilbert4
Copy link
Collaborator

Resolves #1009

This PR fixes a flaw in the logic of the pixel clipping when determining scaling limits for preview images. Previously the number of pixels to be clipped was the user-input percentage of the total number of non-science pixels. With this change, it is now the user-input percentage of the number of non-science pixels with finite signal.

@pep8speaks
Copy link

pep8speaks commented Jul 28, 2022

Hello @bhilbert4, Thank you for updating !

Line 50:1: E402 module level import not at top of file
Line 51:1: E402 module level import not at top of file
Line 52:1: E402 module level import not at top of file
Line 456:5: E303 too many blank lines (2)

Comment last updated at 2022-07-28 19:36:53 UTC

@bhilbert4 bhilbert4 added this to In progress in v1.2.0 via automation Jul 28, 2022
@bhilbert4
Copy link
Collaborator Author

I also just added in here a small tweak so that generate_preview_images only looks in visit-specific subdirectories (e.g. jw01234001001) for files to make preview images for. Some programs also have a "pre-image" subdirectory which contain files that we don't need to pay attention to (and which crash the filename parser), and others have an "L3" subdirectory, which contain level 3 products. For the moment we don't pay attention to these, although it might be nice in the future to make preview images for them.

@BradleySappington BradleySappington merged commit a2bad7a into spacetelescope:develop Jul 28, 2022
v1.2.0 automation moved this from In progress to Done Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Preview image generator crash
3 participants