Closed moustakas closed 9 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
py/fastspecfit/emlines.py | 19 | 29 | 65.52% | ||
<!-- | Total: | 19 | 29 | 65.52% | --> |
Totals | |
---|---|
Change from base Build 6523920591: | -0.05% |
Covered Lines: | 2492 |
Relevant Lines: | 4212 |
Fixes #156.
Also adds one more round of fitting if initial line-sigma doesn't change by more than 1 km/s, to help numerical convergence. E.g., consider
with this branch:
vs
main
:In this example with
main
, the initial line-sigma is 121.58 km/s. The Balmer line-width moves to 64 km/s after the initial round of fitting, but the forbidden line-width changes negligibly, to 121.57 km/s and then gets stuck there.With this branch, we identify the lack of "movement" on line-sigma and therefore multiply the initial value by 0.9 (another magic number, I know). However, that's enough to move things in the right direction, and the Balmer and forbidden line-widths converge on their final, correct values of 26 and 27 km/s, respectively.
I'll need to do more tests to make sure this latter change doesn't make things worse before merging.