Skip to content

Merge 2.0 dev branch into main #1220

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Merge 2.0 dev branch into main #1220

wants to merge 8 commits into from

Conversation

rosteen
Copy link
Contributor

@rosteen rosteen commented Mar 18, 2025

Not to be merged yet, this is just to have an easy reference for the full diff between current main and the v2.0-dev branch.

rosteen and others added 5 commits March 18, 2025 11:32
…1033)

* Starting to work on flexible spectral axis location

Debugging initial spectrum creation

Set private attribute here

Working on debugging failing tests

More things are temporarily broken, but I don't want to lose this work so I'm committing here

Set spectral axis index to 0 if flux is None

Working through test failures

Fix codestyle

Allow passing spectral_axis_index to wcs_fits loader

Require specification of spectral_axis_index if WCS is 1D and flux is multi-D

Decrement spectral_axis_index when slicing with integers

Propagate spectral_axis_index through resampling

Fix last test to account for spectral axis staying first

Fix codestyle

Specify spectral_axis_index in SDSS plate loader

Greatly simply extract_bounding_spectral_region

Account for variable spectral axis location in moment calculation, fix doc example

Working on SpectrumCollection moment handling...not sure this is the way

Need to add one to the axis index here

Update narrative docs to reflect updates

* Add back in the option to move the spectral axis to last, for back-compatibility

Work around pixel unit slicing failure

Change order on crop example

Fix spectral slice handling in tuple input case (e.g. crop)

Update output of crop example

* Apply suggestions from code review

Co-authored-by: Adam Ginsburg <[email protected]>

Apply suggestion from code review

Add helpful comment

* Address review comment about move_spectral_axis, more docs

* Add suggested line to docstring

Co-authored-by: Erik Tollerud <[email protected]>

* Add convenience method

Make this a docstring

* Add v2.0.0 changelog section

---------

Co-authored-by: Erik Tollerud <[email protected]>
* Allow spectral axis to be anywhere, instead of forcing it to be last (#1033)

* Starting to work on flexible spectral axis location

Debugging initial spectrum creation

Set private attribute here

Working on debugging failing tests

More things are temporarily broken, but I don't want to lose this work so I'm committing here

Set spectral axis index to 0 if flux is None

Working through test failures

Fix codestyle

Allow passing spectral_axis_index to wcs_fits loader

Require specification of spectral_axis_index if WCS is 1D and flux is multi-D

Decrement spectral_axis_index when slicing with integers

Propagate spectral_axis_index through resampling

Fix last test to account for spectral axis staying first

Fix codestyle

Specify spectral_axis_index in SDSS plate loader

Greatly simply extract_bounding_spectral_region

Account for variable spectral axis location in moment calculation, fix doc example

Working on SpectrumCollection moment handling...not sure this is the way

Need to add one to the axis index here

Update narrative docs to reflect updates

* Add back in the option to move the spectral axis to last, for back-compatibility

Work around pixel unit slicing failure

Change order on crop example

Fix spectral slice handling in tuple input case (e.g. crop)

Update output of crop example

* Apply suggestions from code review

Co-authored-by: Adam Ginsburg <[email protected]>

Apply suggestion from code review

Add helpful comment

* Address review comment about move_spectral_axis, more docs

* Add suggested line to docstring

Co-authored-by: Erik Tollerud <[email protected]>

* Add convenience method

Make this a docstring

* Add v2.0.0 changelog section

---------

Co-authored-by: Erik Tollerud <[email protected]>

* Prepare changelog for 1.10.0 release

* Fix Changelog

* Fixed issues with ndcube 2.1 docs

* Fix incorrect fluxes and uncertainties returned by FluxConservingResampler, increase computation speed  (#1060)

* new implementation of flux conserving resample

* removed unused method

* handle multi dimensional flux inputs

* .

* Update CHANGES.rst

Co-authored-by: Erik Tollerud <[email protected]>

* omit removing units

* added test to compare output to output from running SpectRes

---------

Co-authored-by: Erik Tollerud <[email protected]>

* Update changelog for 1.11.0 release

* Changelog back to unreleased

* Working on retaining full GWCS information in Spectrum1D rather than just spectral coords

* Handle getting the spectral axis out of a GWCS

Add changelog heading

Remove debugging prints

Fix changelog

Fix codestyle

* Add changelog entry

* Delete the commented-out old wavelength parsing code

* More accurate changelog

---------

Co-authored-by: Erik Tollerud <[email protected]>
Co-authored-by: Nabil Freij <[email protected]>
Co-authored-by: Clare Shanahan <[email protected]>
* Rename Spectrum1D to Spectrum

* Update name in analysis

* Update name in fitting and manipulation

* Update name in tests

* Update name in io

* Update name in io tests

* Add changelog entry

* Update class name in docs

* Update schema ref in spectrum_list asdf

* Replace instances of 'spectrum1d'

* Properly (I think) version change to asdf schema

* Add PR number to changelog entry

* Remove unused import

* Fix doc example output

* Fix failing remote data test

* Update url to MANGA data for tests

* Fix RSS filename
Update SAMI test expected shape

Fix moment 0 calculation for spectral axis that isn't last, and change non-spectral axis moments to use pixel values

Raise error for invalid order, add note to docs

Clean up instances of Spectrum1D after rebase to main

Fix failing tests
* Working on constructing N dimensional GWCS for ND flux with only spectral axis provided

* Get forward transform working for ND case

* Convert other operator to Spectrum if needed in specutils where we have more control, rather than in astropy ndarithmetic

* Don't pass extra arg to ndarithmetic

* Use dimensionless instead of pix, remove unit conversion code that I think was unneeded and was causing errors

* Fix two tests for multidimensional GWCS, remove debugging print

* Working on debugging SpectrumCollection

* Check for Spectrum specifically before arithmetic

* Remove incorrect index from spectrum collection slice, cast operand as Spectrum even in 1D case

* Don't pass multi-d WCS to collapsed spectrum

* Fixing more test failures

* Revamp arithmetic

* Add changelog

* remove debugging print

* Handle creating dummy WCS and spectral axis when neither are provided, fix order of WCS

* Codestyle

* Remove debugging prints

* Fixes for compatibility with up to date gwcs

* Bump min version pins

Bump min asdf

Bump min astropy

Bump min scipy

Bump min asdf-astropy

* Need gwcs 0.24

* Add note about arithmetic to changelog

* Fix Spectrum1D references in doc page

Fix skips in doc file
@rosteen rosteen added this to the v2.0 milestone Mar 18, 2025
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.93%. Comparing base (6dcc1ad) to head (beb4698).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1220      +/-   ##
==========================================
+ Coverage   86.89%   86.93%   +0.03%     
==========================================
  Files          63       63              
  Lines        4572     4683     +111     
==========================================
+ Hits         3973     4071      +98     
- Misses        599      612      +13     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

rosteen added 3 commits March 28, 2025 16:40
* Handle pixel units correctly in gwcs_from_array, subtract fluxes as NDDataArrays

* Update __add__ to be similar to new __sub__

* Consolidate arithmetic code
* Make WCS have unit of pixels to be consistent with spectral axis in this case, handle a couple bugs

* Fix assumption that spectral axis is last in convolution smoothing

* Make a couple reasonable assumptions in spectrum class

* Keep original WCS in meta after _copy with spectral axis

* Codestyle

* Don't unnecessarily pass spectral axis in smoothing _copy, back to default None bin specification
* Allow -1 as spectral_axis_index

* Add short note about 2.0 to README

* Minor doc tweaks

* Changelog
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