-
-
Notifications
You must be signed in to change notification settings - Fork 54
Fix Errors in computation in ResampledLowLevelWCS #857
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Dan Ryan <[email protected]>
Co-authored-by: Dan Ryan <[email protected]>
Explains how the test cases work. Also use numpy.linspace instead of numpy.arange in formulating expected results to make it more easily read.
… cadair_fix_resampled
Also added a Notes section to that docstring with a graphical example
…WCS docstring for greater clarity.
The location on the underlying pixel grid which corresponds | ||
to zero on the top level pixel grid. If a scalar, the grid will be | ||
shifted by the same amount in all dimensions. |
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.
I think this might actually be the source of the "bug". We previously defined offset
to be the location of the centre of the 0th pixel after resampling. This means that the location of the left edge (-0.5) is not simply determined by offset
but by offset - factor/2
. Arguably this is a breaking behaviour change rather than a bugfix. But I also think the original behaviour is highly non-intuitive, so in practice feels like a bug.
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.
I think it's a bug fix in that we can define it like that as much as we want but that's not how we were using it in rebin 😆
@Cadair: This is now ready for review. (Hopefully someone can point out why the oldestdeps and figure tests are failing.) |
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.
Convert ascii art to use * and -
ae22d23
to
8de296d
Compare
@@ -0,0 +1 @@ | |||
Fix translations in `~ndcube.wcs.wrappers.resampled_wcs.ResampledLowLevelWCS` between original and resampled pixel grids. |
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.
I am assuming this was manifesting as errors in accuracy in rebin, we should probably call that out too?
To Do
test_scalar_factor
test.test_2d
test.test_rebin
test.ResampledLowLevelWCS
class.