Skip to content
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

Ensure arithmetic results preserve spectral axis shifts #1158

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

rosteen
Copy link
Contributor

@rosteen rosteen commented Aug 8, 2024

Fixes #1131. We outsource most of the arithmetic logic to the inherited upstream handling, but it seems that wasn't preserving the outcome of shift_spectrum_to for some reason. I don't fully understand how the results were ending up with the original spectral axis, since that method updates self._spectral_axis, but this workaround is sufficient to give the expected behavior for now.

@rosteen rosteen added bug data objects Core data objects like Spectrum1D or SpectralCollection labels Aug 8, 2024
@rosteen rosteen added this to the v1.x milestone Aug 8, 2024
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.88%. Comparing base (d16d91a) to head (d2938eb).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1158      +/-   ##
==========================================
+ Coverage   86.83%   86.88%   +0.04%     
==========================================
  Files          63       63              
  Lines        4528     4544      +16     
==========================================
+ Hits         3932     3948      +16     
  Misses        596      596              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rosteen rosteen merged commit b59003e into astropy:main Aug 8, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug data objects Core data objects like Spectrum1D or SpectralCollection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dividing fluxes of a redshifted spectrum
1 participant