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

Give the redshift of the model rather than the list of redshifts to correct...

Give the redshift of the model rather than the list of redshifts to correct for the redshift difference between the model and the observation.
parent 9440c959
...@@ -161,7 +161,7 @@ def analysis(idx, obs): ...@@ -161,7 +161,7 @@ def analysis(idx, obs):
# work on views of the arrays and not on copies to save on RAM. # work on views of the arrays and not on copies to save on RAM.
z = np.array(gbl_models.conf['sed_modules_params']['redshifting']['redshift']) z = np.array(gbl_models.conf['sed_modules_params']['redshifting']['redshift'])
wz = slice(np.abs(obs['redshift']-z).argmin(), None, z.size) wz = slice(np.abs(obs['redshift']-z).argmin(), None, z.size)
corr_dz = compute_corr_dz(z, obs['redshift']) corr_dz = compute_corr_dz(z[wz.start], obs['redshift'])
else: # We do not know the redshift so we use the full grid else: # We do not know the redshift so we use the full grid
wz = slice(0, None, 1) wz = slice(0, None, 1)
corr_dz = 1. corr_dz = 1.
......
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