diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index b03627e82..fc9b20135 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -24,5 +24,6 @@ the released changes. - Make `get_prefix_timeranges` work for SWX. - Some of the `gridutils` functions had improper logging behavior - Fixed bug in changing epoch for ELL1k model +- Fixed `gridutils` behavior for 1 CPU - Fixed bug in `GaussianRV_gen`, where the probability distribution function was not normalized correctly. Changed to use `scipy.stats.truncnorm` instead of the custom `GaussianRV_gen`. ### Removed diff --git a/src/pint/gridutils.py b/src/pint/gridutils.py index e1f90d5e1..7b155ca5e 100644 --- a/src/pint/gridutils.py +++ b/src/pint/gridutils.py @@ -769,7 +769,11 @@ def tuple_chisq( for i in indices: for parnum, parname in enumerate(parnames): - getattr(ftr.model, parname).quantity = parvalues[i[0]][parnum] + if parvalues[i[0]][parnum] is not None: + getattr(ftr.model, parname).quantity = parvalues[i[0]][parnum] + getattr(ftr.model, parname).frozen = True + else: + getattr(ftr.model, parname).frozen = False ftr.fit_toas(**fitargs) chi2[i[0]] = ftr.resids.chi2 dof[i[0]] = ftr.resids.dof