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

Use astropy pixel_to_pixel in calc_pixmap #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcara
Copy link
Member

@mcara mcara commented Oct 25, 2024

Closes #51

@mcara mcara self-assigned this Oct 25, 2024
@mcara mcara requested a review from a team as a code owner October 25, 2024 03:13
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.28%. Comparing base (0104065) to head (8affa48).
Report is 19 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #161       +/-   ##
===========================================
+ Coverage   75.29%   97.28%   +21.99%     
===========================================
  Files           7        3        -4     
  Lines         344      221      -123     
===========================================
- Hits          259      215       -44     
+ Misses         85        6       -79     

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

@mcara mcara force-pushed the use-p2p-in-calc-pixmap branch from 99d15a7 to 6f81c3c Compare October 25, 2024 03:16
@mcara mcara marked this pull request as draft October 25, 2024 03:19
@mcara mcara force-pushed the use-p2p-in-calc-pixmap branch from 6f81c3c to 8affa48 Compare October 25, 2024 03:25
@mcara mcara marked this pull request as ready for review October 25, 2024 03:28
Copy link
Collaborator

@jdavies-st jdavies-st left a comment

Choose a reason for hiding this comment

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

Looks good. I guess I had the thought when I opened the issue that it would completely replace calc_pixmap, but I see that one still needs to bundle it into a pixmap that the drizzle C code can use. Bummer.

Anyway, looks good. Hopefully jwst.resample can now use the calc_pixmap function here. I recall it had been copied over to jwst.resample because for along time the one here did not support gwcs and APE 14 did not exist.

👍

@nden
Copy link
Contributor

nden commented Oct 25, 2024

This will need careful consideration, and as a minimum a regression test run. Looking at the astropy pixel_to_pixel function, it uses the high level API pixel_to_world which generates SkyCoord objects. It's supposed to be efficient with views of arrays. All I'm saying is it needs some more testing specifically for the use in drizzle.

@mcara
Copy link
Member Author

mcara commented Oct 25, 2024

There are unit tests testing calc_pixmap in drizzle. calc_pixmap is not used in the pipelines and so running regression tests would not test this helper function.

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.

Use astropy pixel_to_pixel instead of internal calc_pixmap function
3 participants