Skip to content

Commit

Permalink
Merge pull request #198 from desihub/doublet-ratio-bias
Browse files Browse the repository at this point in the history
fix doublet bias
  • Loading branch information
moustakas authored Dec 4, 2024
2 parents 51d851e + 34c1a91 commit e046107
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 154 deletions.
4 changes: 3 additions & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Change Log
3.1.1 (not released yet)
------------------------

*
* Fix <1% bias in fluxes and EWs of tied and free doublet ratios [`PR #198`_].

.. _`PR #198`: https://github.com/desihub/fastspecfit/pull/198

3.1.0 (2024-11-21)
------------------
Expand Down
8 changes: 7 additions & 1 deletion py/fastspecfit/emline_fit/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from numba import jit

from fastspecfit.resolution import Resolution

from .params_mapping import ParamsMapping
from .sparse_rep import EMLineJacobian

Expand Down Expand Up @@ -330,6 +332,11 @@ def _suppress_negative_fluxes(endpts, M):
for j in range(e-s):
M[i,j] = np.maximum(M[i,j], 0.)

if resolution_matrices is None:
# create trivial diagonal resolution matrices
rm = [ Resolution(np.ones((1, e - s))) for (s, e) in camerapix ]
resolution_matrices = tuple(rm)

self.line_models = []
_build_multimodel_core(line_parameters,
obs_bin_centers,
Expand All @@ -345,7 +352,6 @@ def _suppress_negative_fluxes(endpts, M):
_suppress_negative_fluxes(endpts, M)



def getLine(self, line):
"""
Return a model for one emission line.
Expand Down
Loading

0 comments on commit e046107

Please sign in to comment.