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

Make copies of border pixel arrays when building L2 image. #1098

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

schlafly
Copy link
Collaborator

@schlafly schlafly commented Feb 9, 2024

romancal produces larger L2 files than one would expect given the sizes of the arrays in rad; typical L2 file sizes are ~1.1 GB but one would estimate ~400 MB from the different planes. The issue turns out to be that the border pixels are views into the larger full L1 image rather than copies just of the side 4 pixels. asdf is saving the full array, rather than just the small subset representing the view, leading to the large files.

Changing these to copies addresses the issue. After this change, file sizes reduce to ~400 MB.

Checklist

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ce2631b) 76.81% compared to head (2e15ec8) 76.81%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1098   +/-   ##
=======================================
  Coverage   76.81%   76.81%           
=======================================
  Files         105      105           
  Lines        7048     7048           
=======================================
  Hits         5414     5414           
  Misses       1634     1634           
Flag Coverage Δ *Carryforward flag
nightly 62.99% <ø> (ø) Carriedforward from 0a7eb64

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@schlafly schlafly marked this pull request as ready for review February 9, 2024 16:09
@schlafly schlafly requested a review from a team as a code owner February 9, 2024 16:09
@schlafly
Copy link
Collaborator Author

schlafly commented Feb 9, 2024

@ddavis-stsci , we could conceivably include this. This makes the L2 files we make 3x smaller but doesn't affect any regression tests in my run. It addresses @wlim-ipac 's issue from the call yesterday.

Copy link
Collaborator

@ddavis-stsci ddavis-stsci left a comment

Choose a reason for hiding this comment

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

Looks clean to me.

@schlafly schlafly merged commit 1d21026 into spacetelescope:main Feb 9, 2024
30 checks passed
@schlafly schlafly deleted the make-arrays-smaller branch February 9, 2024 17:56
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.

3 participants