Commit 21ab56ce authored by Médéric Boquien's avatar Médéric Boquien

Correct two issues that caused plots to display an offset spectrum when...

Correct two issues that caused plots to display an offset spectrum when redshifts were given with more than 2 decimals. First round the redshift to two decimals. Then, rather than recomputing the luminosity distance, let's just take the one from the best models file.
parent 6f98312e
......@@ -122,8 +122,8 @@ def _sed_worker(obs, mod, filters, sed_type, nologo):
obs_fluxes_err = np.array([obs[filt+'_err']
for filt in filters.keys()])
mod_fluxes = np.array([mod[filt] for filt in filters.keys()])
z = obs['redshift']
DL = max(10, cosmology.luminosity_distance(z).value * 1e6) * parsec
z = np.around(obs['redshift'], decimals=2)
DL = mod['universe.luminosity_distance']
if sed_type == 'lum':
xmin = PLOT_L_MIN
......
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