-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add unit tests that use gwcs. Fix how the bounding box is handled. #167
Conversation
drizzle/utils.py
Outdated
@@ -61,6 +61,8 @@ def calc_pixmap(wcs_from, wcs_to, shape=None): | |||
shape = wcs_from.array_shape | |||
if shape is None: | |||
if (bbox := getattr(wcs_from, "bounding_box", None)) is not None: | |||
if not isinstance(bbox, tuple): | |||
bbox = bbox.bounding_box() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work only if bounding_box is an instance of modeling.bounding_box.ModelBoundingBox
, so a better check is that it is that instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, other than the one comment
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #167 +/- ##
==========================================
+ Coverage 97.27% 97.32% +0.04%
==========================================
Files 3 3
Lines 220 224 +4
==========================================
+ Hits 214 218 +4
Misses 6 6 ☔ View full report in Codecov by Sentry. |
Adds unit tests that utilize
gwcs
in addition to FITS WCS.