PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

read_spectrum as a wrapper around Spectrum1D.read #244

Closed drvdputt closed 1 year ago

drvdputt commented 1 year ago

I found that the specutils reader doesn't care if the columns are named 'sigma' or 'stddev'. So just by changing the reader to Spectrum1D, we can now read in all our included spectra.

I also added a test for this read-in step. It was already useful to iron out some bugs and convince myself that this will work for everything we need. Should be useful in the future too, when new example spectra get added.

drvdputt commented 1 year ago

Thanks to this test, I found another bug: the data files in the subdirectories of pahfit/data are not installed!

The solution is to put these in setup.cfg too (I don't think recursive glob syntax is supported by setup.cfg). Adding a commit that does this.

codecov-commenter commented 1 year ago

Codecov Report

Merging #244 (284dc03) into dev_yaml-scipack+api (fa7d296) will increase coverage by 0.03%. The diff coverage is 81.81%.

@@                   Coverage Diff                    @@
##           dev_yaml-scipack+api     #244      +/-   ##
========================================================
+ Coverage                 63.02%   63.06%   +0.03%     
========================================================
  Files                        14       14              
  Lines                      1025     1026       +1     
========================================================
+ Hits                        646      647       +1     
  Misses                      379      379              
Impacted Files Coverage Δ
pahfit/helpers.py 38.09% <81.81%> (+0.74%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

jdtsmith commented 1 year ago

This LG2M @drvdputt. For helpers.py are we just leaving the barest-bones things there now?