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

Make sure that the best fit can be computed when the redshift is estimated...

Make sure that the best fit can be computed when the redshift is estimated rather than given as an input.
parent 50794ba4
......@@ -236,9 +236,10 @@ def bestfit(oidx, obs):
params = deepcopy(gbl_params.from_index(best_index))
if obs.redshift >= 0.:
params[gbl_params.modules.index('redshifting')]['redshift'] = obs.redshift
corr_dz = compute_corr_dz(obs.redshift, obs.distance)
else: # The model redshift is always exact in redhisfting mode
corr_dz = 1.
sed = gbl_warehouse.get_sed(gbl_params.modules, params)
corr_dz = compute_corr_dz(obs.redshift, obs.distance)
scaling = gbl_results.best.scaling[oidx]
for band in gbl_results.best.flux:
......
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