Skip to content

Commit

Permalink
Merge branch 'null_resolution' into doublet-ratio-bias
Browse files Browse the repository at this point in the history
  • Loading branch information
moustakas committed Nov 29, 2024
2 parents c8b8741 + 569ea11 commit ce6ada3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion py/fastspecfit/emlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ def get_line_profiles(values):
line_wavelengths = self.line_table['restwave'].value
return EMLine_MultiLines(
parameters, emlinewave, redshift, line_wavelengths,
resolution_matrices, camerapix)
resolution_matrices=None, camerapix=camerapix) # omit per-camera resolution matrix transformations

values = linemodel['value'].value
obsamps = linemodel.meta['obsamps']
Expand Down

0 comments on commit ce6ada3

Please sign in to comment.