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
Fix wcs.array_shape definition in WcsGeom.create #4677
Conversation
1cec329
to
bd42a50
Compare
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.
Thanks @QRemy.
Are the tests failing because of the known CI issue, or because this reverses the order where we have no implemented that before?
Thanks @QRemy . I am afraid the problems run deeper. For instance, the See:
but:
EDIT: actually, this is probably the intended behaviour, because lists can define different bin size along non-spatial axes. I think this should be better protected since here there is no non-spatial axis. |
According to https://astropy-astrofrog.readthedocs.io/en/latest/api/astropy.wcs.WCS.html#astropy.wcs.WCS.array_shape the expected order is (rows, columns). It should then be reversed as you propose. |
Signed-off-by: <quentin.remy@live.fr>
bd42a50
to
8171c3b
Compare
Signed-off-by: <quentin.remy@live.fr>
Signed-off-by: <quentin.remy@live.fr>
The previous tests failures were related to a mismatch between the width of the region geom and their wcs array_shape, I added a fix to have this consistent. |
Signed-off-by: <quentin.remy@live.fr>
1e5003f
to
86e20cb
Compare
Signed-off-by: <quentin.remy@live.fr> adapt test Signed-off-by: <quentin.remy@live.fr> adapt test Signed-off-by: <quentin.remy@live.fr>
86e20cb
to
78fa8d1
Compare
Codecov Report
@@ Coverage Diff @@
## main #4677 +/- ##
=======================================
Coverage 75.95% 75.96%
=======================================
Files 223 223
Lines 31959 31969 +10
=======================================
+ Hits 24275 24284 +9
- Misses 7684 7685 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Thanks @QRemy. Looks good. See few inline comments.
# TODO : can we get the width before defining the wcs ? | ||
wcs = WcsGeom.create( | ||
binsz=binsz_wcs, | ||
width=tuple(self.width), |
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.
Is this needed here? Why does it need to be re-created?
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.
Thanks @QRemy . Merging now.
…7-on-v1.0.x Backport PR #4677 on branch v1.0.x (Fix wcs.array_shape definition in WcsGeom.create)
…7-on-v1.1.x Backport PR #4677 on branch v1.1.x (Fix wcs.array_shape definition in WcsGeom.create)
Fix wcs.array_shape definition in WcsGeom.create to fix the bug described in :
#4652 (comment)