Skip to content

Added unit tests that mimics a dynamic spectra#931

Open
nabobalis wants to merge 6 commits into
sunpy:mainfrom
nabobalis:tests
Open

Added unit tests that mimics a dynamic spectra#931
nabobalis wants to merge 6 commits into
sunpy:mainfrom
nabobalis:tests

Conversation

@nabobalis
Copy link
Copy Markdown
Member

@nabobalis nabobalis commented May 20, 2026

Comes with a bugfix(?).

SPOILER: AI WAS USED but code was human reviewed and edited.

@nabobalis nabobalis marked this pull request as ready for review May 20, 2026 14:15
Comment thread ndcube/utils/cube.py
# Use the to_pixel methods to preserve fractional indices for future rounding.
point_pixel_indices = (sliced_wcs.world_to_pixel_values(*sliced_point) if crop_by_values
else HighLevelWCSWrapper(sliced_wcs).world_to_pixel(*sliced_point))
if crop_by_values:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is quite true but it did break a unit test.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a real regression in the oldest deps, gwcs looks like it used to handle this internally?!

@nabobalis nabobalis force-pushed the tests branch 2 times, most recently from 988196d to 356f99f Compare May 20, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant