spacetelescope / stcal

https://stcal.readthedocs.io/en/latest/
Other
10 stars 32 forks source link

[WIP] HLA-1096: Added Reproject function #191

Closed s-goldman closed 1 year ago

s-goldman commented 1 year ago

Resolves HLA-1096

This PR adds the reproject function to the codebase. This code was based on a similar function for JWST. A main difference between the two is that this code assumes that we are using the high-level WCS API. Several unit tests are also added for the case of inputted strings, array, as well as an expected failure.

Checklist

nden commented 1 year ago

@s-goldman Please make the PR against the stcal-alignment branch, not main. We ahven't merged that into main yet.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 64.30% and project coverage change: +7.18% :tada:

Comparison is base (e0c6f69) 74.46% compared to head (3ba2456) 81.64%. Report is 35 commits behind head on stcal-alignment.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## stcal-alignment #191 +/- ## =================================================== + Coverage 74.46% 81.64% +7.18% =================================================== Files 29 31 +2 Lines 5937 5607 -330 =================================================== + Hits 4421 4578 +157 + Misses 1516 1029 -487 ``` | [Files Changed](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | Coverage Δ | | |---|---|---| | [setup.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c2V0dXAucHk=) | `0.00% <0.00%> (ø)` | | | [tests/test\_twopoint\_difference.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF90d29wb2ludF9kaWZmZXJlbmNlLnB5) | `100.00% <ø> (+8.56%)` | :arrow_up: | | [src/stcal/alignment/reproject.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL2FsaWdubWVudC9yZXByb2plY3QucHk=) | `2.70% <2.70%> (ø)` | | | [src/stcal/alignment/tests/test\_reproject.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL2FsaWdubWVudC90ZXN0cy90ZXN0X3JlcHJvamVjdC5weQ==) | `31.25% <31.25%> (ø)` | | | [src/stcal/ramp\_fitting/ols\_cas22\_fit.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL3JhbXBfZml0dGluZy9vbHNfY2FzMjJfZml0LnB5) | `40.47% <40.47%> (ø)` | | | [src/stcal/jump/jump.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL2p1bXAvanVtcC5weQ==) | `66.33% <70.00%> (+2.54%)` | :arrow_up: | | [src/stcal/ramp\_fitting/gls\_fit.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL3JhbXBfZml0dGluZy9nbHNfZml0LnB5) | `64.39% <100.00%> (+0.16%)` | :arrow_up: | | [src/stcal/ramp\_fitting/ols\_cas22\_util.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL3JhbXBfZml0dGluZy9vbHNfY2FzMjJfdXRpbC5weQ==) | `100.00% <100.00%> (ø)` | | | [src/stcal/ramp\_fitting/ols\_fit.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL3JhbXBfZml0dGluZy9vbHNfZml0LnB5) | `80.17% <100.00%> (+0.03%)` | :arrow_up: | | [src/stcal/ramp\_fitting/utils.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL3JhbXBfZml0dGluZy91dGlscy5weQ==) | `91.03% <100.00%> (+0.41%)` | :arrow_up: | | ... and [5 more](https://app.codecov.io/gh/spacetelescope/stcal/pull/191?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

s-goldman commented 1 year ago

@s-goldman Please make the PR against the stcal-alignment branch, not main. We ahven't merged that into main yet.

Thanks. Switch made. I still need to add documentation and possibly a regression test.