bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
157 stars 73 forks source link

Add another exception for defining info #257

Closed gbrammer closed 1 year ago

gbrammer commented 1 year ago

Handle exception when SPS_HOME env variable not set.

The info = np.genfromtxt(os.path.join(SPS_HOME, 'data', 'emlines_info.dat') line raises a TypeError when the $SPS_HOME variable is not set and thus SPS_HOME = os.getenv('SPS_HOME') = None.

gbrammer commented 1 year ago

Note that this comes up when I'm trying to just use the nice functions in prospect.utils.smoothing without requiring a full working prospector + fsps environment.

bd-j commented 1 year ago

Thanks @gbrammer! Note that the smoothing module has also been included in the somewhat more lightweight sedpy package in v0.3 (https://sedpy.readthedocs.io/en/latest/) and it will eventually be removed from prospector.

gbrammer commented 1 year ago

Great, good to know!