diff --git a/py/fastspecfit/emline_fit/interface.py b/py/fastspecfit/emline_fit/interface.py index 9c271fe7..dc6f037f 100644 --- a/py/fastspecfit/emline_fit/interface.py +++ b/py/fastspecfit/emline_fit/interface.py @@ -3,6 +3,8 @@ from numba import jit +from fastspecfit.resolution import Resolution + from .params_mapping import ParamsMapping from .sparse_rep import EMLineJacobian @@ -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, @@ -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. diff --git a/py/fastspecfit/emlines.py b/py/fastspecfit/emlines.py index 7094d510..02976fc6 100644 --- a/py/fastspecfit/emlines.py +++ b/py/fastspecfit/emlines.py @@ -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']