Commit 6edf7b74 authored by Médéric Boquien's avatar Médéric Boquien

As we modify the sed object, make a deep copy so we do not accidentally alter...

As we modify the sed object, make a deep copy so we do not accidentally alter the model in the cache. These models should probably be made read-only, if it is not too costly in terms of performance.
parent 89401d95
...@@ -245,7 +245,7 @@ def bestfit(oidx, obs): ...@@ -245,7 +245,7 @@ def bestfit(oidx, obs):
else: # The model redshift is always exact in redhisfting mode else: # The model redshift is always exact in redhisfting mode
corr_scaling = 1. corr_scaling = 1.
sed = gbl_warehouse.get_sed(gbl_params.modules, params) sed = deepcopy(gbl_warehouse.get_sed(gbl_params.modules, params))
# Handle the case where the distance does not correspond to the redshift. # Handle the case where the distance does not correspond to the redshift.
if obs.redshift >= 0.: if obs.redshift >= 0.:
......
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