astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
170 stars 127 forks source link

Ensure arithmetic results preserve spectral axis shifts #1158

Closed rosteen closed 3 months ago

rosteen commented 3 months ago

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.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.