Skip to content

Commit

Permalink
Update spectra.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JarronL committed Sep 5, 2024
1 parent dd7dc9b commit 42e5ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webbpsf_ext/spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ def model_IRexcess(self, x, sp=None):

bb_flux = x[0] * self.bb_jy(wave/1e4, x[1]) * (wave/1e4)**x[2] / 1e17
sp_bb = s_ext.ArraySpectrum(wave, bb_flux, fluxunits='Jy')
sp_bb.convert('photlam')
sp_bb.convert(sp.fluxunits)

return sp + sp_bb

Expand Down Expand Up @@ -1222,7 +1222,7 @@ def func_resid(self, x, IR_excess=False, wlim=[0.1, 30], use_err=True):
mod_interp = np.interp(wvals, sp_star.wave, sp_model.flux)

# Normalize values so the residuals aren't super small/large
norm = np.mean(yvals)
norm = np.nanmedian(yvals)

resid = (mod_interp - yvals)
if use_err: resid /= evals
Expand Down

0 comments on commit 42e5ab9

Please sign in to comment.