desihub / fastspecfit

Fast spectral synthesis and emission-line fitting of DESI spectra.
https://fastspecfit.readthedocs.org
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

fix for stellar mass bias; more constrained broad+narrow fitting; and higher possible stellar vdisp #166

Closed moustakas closed 7 months ago

moustakas commented 7 months ago

This PR should address #159, #160, and #164.

Understanding the stellar mass bias required doing a deep dive into the choice of SPS models and priors used. I have large parts of a notebook written to show the results, but here are the main changes:

With the preceding in mind, I've opted for a new template set (1.3.0; see here) which has just 40 models consisting of:

I tested these choices fairly extensively, including against doing the SPS inference "the slow way" using Prospector, and I'm pretty happy with the results. The FastSpecFit stellar masses will still be 0.1-0.25 dex higher than other existing catalogs (e.g., from Hu, Mar, and probably SDSS), but this is consistent with my choice of stellar library, ischrones, and priors and is also not inconsistent with published work by Leja et al. and others.

I also fixed a silly bug in how the light-weighted ages, dust attenuations, and SFRs were being computed.

Finally, to go along for the ride, I have an incorporated more constraints on the narrow Balmer+helium lines when fitting objects with broad lines (#160) and a velocity dispersion grid which extends all the way up to 500 km/s (#164).

github-actions[bot] commented 7 months ago

Pull Request Test Coverage Report for Build 7503270119


Totals Coverage Status
Change from base Build 7385494922: 0.1%
Covered Lines: 2495
Relevant Lines: 4208

💛 - Coveralls
github-actions[bot] commented 7 months ago

Pull Request Test Coverage Report for Build 7512491094


Totals Coverage Status
Change from base Build 7385494922: -0.1%
Covered Lines: 2503
Relevant Lines: 4242

💛 - Coveralls
coveralls commented 7 months ago

Pull Request Test Coverage Report for Build 7512800046


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/fastspecfit/continuum.py 23 24 95.83%
py/fastspecfit/io.py 5 7 71.43%
py/fastspecfit/emlines.py 27 51 52.94%
<!-- Total: 60 87 68.97% -->
Files with Coverage Reduction New Missed Lines %
py/fastspecfit/io.py 1 52.74%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 7385494922: -0.1%
Covered Lines: 2503
Relevant Lines: 4242

💛 - Coveralls
moustakas commented 7 months ago

One coveralls test is failing due to some problem that I don't understand, but I need to merge and tag, so I'm going to continue debugging this at a later point if it persists. If anyone has encountered this error before, your input is more than welcome.