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

The best fit could not be computed in photo-z mode because the redshift was negative.

parent a7b9c4a7
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
### Added ### Added
### Changed ### Changed
### Fixed ### Fixed
- The best fit could not be computed in photo-z mode because the redshift was negative. (Médéric Boquien)
### Optimised ### Optimised
## 0.12.0 (2018-02-19) ## 0.12.0 (2018-02-19)
......
...@@ -239,7 +239,8 @@ def bestfit(oidx, obs): ...@@ -239,7 +239,8 @@ def bestfit(oidx, obs):
# We compute the model at the exact redshift not to have to correct for the # We compute the model at the exact redshift not to have to correct for the
# difference between the object and the grid redshifts. # difference between the object and the grid redshifts.
params = deepcopy(gbl_params.from_index(best_index)) params = deepcopy(gbl_params.from_index(best_index))
params[-1]['redshift'] = obs['redshift'] if obs['redshift'] >= 0.:
params[-1]['redshift'] = obs['redshift']
sed = gbl_warehouse.get_sed(gbl_params.modules, params) sed = gbl_warehouse.get_sed(gbl_params.modules, params)
fluxes = np.array([sed.compute_fnu(filt) for filt in gbl_obs.bands]) fluxes = np.array([sed.compute_fnu(filt) for filt in gbl_obs.bands])
......
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