spacetelescope / astrocut

Tools for making image cutouts from sets of TESS full frame images
https://astrocut.readthedocs.io
25 stars 12 forks source link

Error handling for `CubeFactory` and `TicaCubeFactory` #85

Closed jaymedina closed 1 year ago

jaymedina commented 1 year ago

Summary

Currently the errors that get returned when SPOC FFIs are fed into TicaCubeFactory and vice versa are vague and not helpful to the user. This PR updates the error handling by raising an error when the wrong type of FFI is fed into either CubeFactory or TicaCubeFactory to make TESS cubes.


Task List


Screenshots (as of July 14, 2023)

The following two screenshots show the error that gets thrown when feeding the wrong type of FFI to CubeFactory and TicaCubeFactory:

image image
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.61 :tada:

Comparison is base (311488d) 93.78% compared to head (fe01032) 94.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #85 +/- ## ========================================== + Coverage 93.78% 94.40% +0.61% ========================================== Files 8 8 Lines 1416 1429 +13 ========================================== + Hits 1328 1349 +21 + Misses 88 80 -8 ``` | [Impacted Files](https://app.codecov.io/gh/spacetelescope/astrocut/pull/85?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | Coverage Δ | | |---|---|---| | [astrocut/cube\_cut.py](https://app.codecov.io/gh/spacetelescope/astrocut/pull/85?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-YXN0cm9jdXQvY3ViZV9jdXQucHk=) | `98.93% <100.00%> (+0.28%)` | :arrow_up: | | [astrocut/make\_cube.py](https://app.codecov.io/gh/spacetelescope/astrocut/pull/85?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-YXN0cm9jdXQvbWFrZV9jdWJlLnB5) | `94.15% <100.00%> (+1.75%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/spacetelescope/astrocut/pull/85/indirect-changes?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: Do you have feedback about the report comment? Let us know in this issue.