Commit d57cab17 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Do not compute the χ² for upper limits. This is dealt with separately.

parent 8b8d95cd
......@@ -340,7 +340,7 @@ def compute_chi2(model_fluxes, obs_fluxes, obs_errors, lim_flag):
# χ² of the comparison of each model to each observation.
chi2 = np.zeros(model_fluxes.shape[0])
for i in range(obs_fluxes.size):
if np.isfinite(obs_fluxes[i]):
if np.isfinite(obs_fluxes[i]) and obs_errors[i] > 0.:
chi2 += np.square(
(obs_fluxes[i] - model_fluxes[:, i] * scaling) / obs_errors[i])
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