Skip to content

Commit

Permalink
flux estimate needs the MC parameters and the doublet amplitude param…
Browse files Browse the repository at this point in the history
…eter corrected for the doublet ratio
  • Loading branch information
moustakas committed Mar 2, 2025
1 parent bdeb05e commit 5d6687d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions py/fastspecfit/emlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,8 @@ def get_continuum_pixels(emlinewave_s, linezwave, linesigma_ang_window):
linename = name.upper()
line_amp, line_vshift, line_sigma = self.line_table['params'][iline]

def get_fluxes(values, obsamps, emlineflux_s, specflux_nolines_s,
return_extras=False):
def get_fluxes(values, parameters, obsamps, emlineflux_s,
specflux_nolines_s, return_extras=False):
""" Get all the computed fluxes associated with the current line. Return the
fluxes along with some intermediate quantities if return_extras is True. (The
extras are needed only if we are not using this function in Monte Carlo iteration.)
Expand Down Expand Up @@ -969,8 +969,8 @@ def get_fluxes(values, obsamps, emlineflux_s, specflux_nolines_s,


(boxflux, flux, cont), extras = get_fluxes(
values, obsamps, emlineflux_s, specflux_nolines_s,
return_extras=True)
values, parameters, obsamps, emlineflux_s,
specflux_nolines_s, return_extras=True)

(linez, linesigma, linesigma_ang, patchindx, clipflux) = extras

Expand Down Expand Up @@ -1008,9 +1008,9 @@ def get_fluxes(values, obsamps, emlineflux_s, specflux_nolines_s,
raise ValueError(errmsg)

if results_monte is not None:
res = [get_fluxes(vv, oo, lf, sfnl) for vv, oo, lf, sfnl in
zip(values_monte, obsamps_monte, emlineflux_monte_s,
specflux_nolines_monte_s)]
res = [get_fluxes(vv, pp, oo, lf, sfnl) for vv, pp, oo, lf, sfnl in
zip(values_monte, parameters_monte, obsamps_monte,
emlineflux_monte_s, specflux_nolines_monte_s)]
boxflux_monte, flux_monte, cont_monte = tuple(zip(*res))
flux_monte = np.array(flux_monte)
cont_monte = np.array(cont_monte)
Expand Down

0 comments on commit 5d6687d

Please sign in to comment.