Commit ade0bd9d authored by Médéric Boquien's avatar Médéric Boquien

Handle the case where some bands do not have a best fit (e.g., in case the...

Handle the case where some bands do not have a best fit (e.g., in case the flux was not calculated because no object has a flux and the user did not add this band to the "band" parameter in pdf_analysis).
parent 9d450690
......@@ -123,7 +123,9 @@ def _sed_worker(obs, mod, filters, sed_type, logo, xrange, yrange, series,
obs_fluxes = np.array([obs[filt] for filt in filters.keys()])
obs_fluxes_err = np.array([obs[filt+'_err']
for filt in filters.keys()])
mod_fluxes = np.array([mod["best."+filt] for filt in filters.keys()])
mod_fluxes = np.array([mod["best."+filt]
if "best."+filt in mod.colnames else np.nan
for filt in filters.keys()])
if obs['redshift'] >= 0:
z = obs['redshift']
else: # Redshift mode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment