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

improved modeling of galaxies with broad+narrow line-emission #142

Closed moustakas closed 1 year ago

moustakas commented 1 year ago

[WIP]

Algorithmic improvements in order to address #118. Details to follow.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5738059619

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/fastspecfit/fastspecfit.py 0 2 0.0%
py/fastspecfit/emlines.py 71 97 73.2%
<!-- Total: 77 105 73.33% -->
Files with Coverage Reduction New Missed Lines %
py/fastspecfit/emlines.py 5 51.03%
<!-- Total: 5 -->
Totals Coverage Status
Change from base Build 5719900769: 0.1%
Covered Lines: 2378
Relevant Lines: 4595

💛 - Coveralls
moustakas commented 1 year ago

This PR implements some key improvements in the broad-line fitting based on conversations with @stephjuneau, @Ragadeepika-Pucha, @paulmartini, and others. The key developments / insights are:

The last two criteria are needed to prevent broad lines from over-fitting lines in (especially) low-mass dwarf galaxies or to capture unmodeled residuals in the stellar continuum.

Note that there is no longer any formal S/N cut on the broad-line amplitude. (Previously the two reddest broad Balmer lines, e.g., H-alpha and H-beta for lower-redshift objects, were required to be detected with >3-sigma significance, which threw out many bona fide Seyfert 1.5s highlighted in #118.)

Here's a quick comparison of the statistics for a single healpix, sv3/bright/9428 (where 2.1.2 is the version of the code used to build the fuji/v2.0 VAC):

Screenshot 2023-08-01 at 6 30 44 PM