astropy / specutils

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

Add read, write, as_table, and from_qtable to SpectralRegion #1133

Closed rosteen closed 2 months ago

rosteen commented 2 months ago

Closes #917 by adding SpectralRegion.write and SpectralRegion.read methods that round trip SpectralRegion objects to/from ecsv files via astropy's QTable read/write. Also adds as_table object method and from_qtable class methods for convenience. I'll add test coverage shortly.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 96.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 72.35%. Comparing base (5ec4931) to head (6f0b3f8). Report is 3 commits behind head on main.

Files Patch % Lines
specutils/spectra/spectral_region.py 96.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1133 +/- ## ========================================== + Coverage 72.22% 72.35% +0.13% ========================================== Files 62 62 Lines 4432 4457 +25 ========================================== + Hits 3201 3225 +24 - Misses 1231 1232 +1 ```

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

rosteen commented 2 months ago

I solicited comments offline and there were no objections, merging.