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

Adds option for cutout output to asdf file #116

Merged
merged 4 commits into from Feb 6, 2024
Merged

Adds option for cutout output to asdf file #116

merged 4 commits into from Feb 6, 2024

Conversation

havok2063
Copy link
Contributor

This PR adds the option to output the cutout as an asdf file, instead of a fits file. The asdf cutout file is a minimal tree structure, mirroring the format of the original roman image, i.e.

asdf tree:
 - "roman":
   - "meta":
     - "wcs" - the gwcs of the cutout 
   - "data" - the cutout data

The included wcs is a sliced gwcs object from the original input to the cutout shape. This option was chosen to try to preserve as much as possible the original image transformations. It's a bit of a hack as there's no built-in way of slicing a gwcs yet, nor does astropy.Cutout2D support gwcs input yet.

It also adds a test for the RA=0 edge case.

@havok2063 havok2063 added the enhancement New feature or request label Feb 2, 2024
@havok2063 havok2063 self-assigned this Feb 2, 2024
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d31a3cf) 94.59% compared to head (78fcfce) 94.71%.

❗ Current head 78fcfce differs from pull request most recent head 3ab1490. Consider uploading reports for the commit 3ab1490 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   94.59%   94.71%   +0.11%     
==========================================
  Files           9        9              
  Lines        1481     1513      +32     
==========================================
+ Hits         1401     1433      +32     
  Misses         80       80              

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

astrocut/asdf_cutouts.py Outdated Show resolved Hide resolved
Co-authored-by: Brett Graham <brettgraham@gmail.com>
@braingram
Copy link
Contributor

Thanks for the review request! At the moment I can only comment on the asdf usage which looks great to me!

@havok2063 havok2063 merged commit 5d0d3e0 into main Feb 6, 2024
7 checks passed
@havok2063 havok2063 deleted the asdfout branch February 6, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants