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

Possible duplicate reproject() function #347

Open
emolter opened this issue Feb 25, 2025 · 3 comments
Open

Possible duplicate reproject() function #347

emolter opened this issue Feb 25, 2025 · 3 comments

Comments

@emolter
Copy link
Collaborator

emolter commented Feb 25, 2025

Is there any meaningful difference between stcal.alignment.util.reproject() and stcal.outlier_detection.utils.reproject()? Could the one in outlier detection be removed? @mcara @nden @braingram

@mcara
Copy link
Member

mcara commented Feb 25, 2025

is it used anywhere?

@mcara
Copy link
Member

mcara commented Feb 25, 2025

calc_gwcs_pixmap and calc_pixmap are no longer used. these were the main clients. All those utils modules need a clean-up based on what is used.

@emolter
Copy link
Collaborator Author

emolter commented Feb 25, 2025

calc_gwcs_pixmap is used inside gwcs_blot, which is called from the outlier detection step in both jwst and romancal. That function currently uses the reproject version that is in stcal.outlier_detection.utils.

I agree RE calc_pixmap and the reproject version that is in stcal.alignment.util - these appear unused.

There is also a calc_gwcs_pixmap and reproject in Romancal: https://github.com/spacetelescope/romancal/blob/7484c3870708e5b00ab389e5ade94150373fd9fe/romancal/resample/resample_utils.py#L253, and that version of calc_gwcs_pixmap is currently used in two places in Romancal's resample step. It appears that those will be removed by spacetelescope/romancal#1634, and Romancal will start calling gwcs_blot from stcal.outlier_detection.utils.

None of the three reproject functions (Romancal, alignment, outlier_detection) are identical, although it looks to me like they accomplish the same thing.

I would suggest that we decide which of these is the "best" and then remove the others. Do you have any opinion on which implementation is preferred?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants