Skip to content

Conversation

Cadair
Copy link
Member

@Cadair Cadair commented Jun 18, 2025

To Do

  • Fix test_scalar_factor test.
  • Fix test_2d test.
  • Fix test_rebin test.
  • Consider whether to add a similar docstring example to docstring of ResampledLowLevelWCS class.

@Cadair Cadair added this to the 2.3.2 milestone Aug 6, 2025
Also added a Notes section to that docstring with a graphical example
@DanRyanIrish DanRyanIrish marked this pull request as ready for review August 13, 2025 12:23
Comment on lines -23 to -25
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.
Copy link
Member

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.

Copy link
Member Author

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 😆

@DanRyanIrish
Copy link
Member

DanRyanIrish commented Aug 13, 2025

@Cadair: This is now ready for review. (Hopefully someone can point out why the oldestdeps and figure tests are failing.)

@DanRyanIrish DanRyanIrish moved this from Todo to In Review in Map-NDCube Refactor Aug 13, 2025
Copy link
Member

@DanRyanIrish DanRyanIrish left a 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 -

@@ -0,0 +1 @@
Fix translations in `~ndcube.wcs.wrappers.resampled_wcs.ResampledLowLevelWCS` between original and resampled pixel grids.
Copy link
Member Author

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?

@Cadair Cadair changed the title resampled wcs hates us precious Fix Errors in computation in ResampledLowLevelWCS Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants