Check parameters limits during fit
@@ -100,6 +100,9 @@ class Fit:
fit_result : `FitResult`
Results
"""
+
+ self.check_limits(strict=True)
+
if optimize_opts is None:
optimize_opts = {}
optimize_result = self.optimize(backend, **optimize_opts)
@@ -116,8 +119,15 @@ class Fit:
# back or how to form the FitResult object.
optimize_result._success = optimize_result.success and covariance_result.success
+ self.check_limits()
+
return optimize_result
+ def check_limits(self, strict=False):
+ "Check that all parameters are within their min/max range"""
+ for par in self._parameters:
+ par.check_limits(strict=strict)
+
def optimize(self, backend="minuit", **kwargs):
"""Run the optimization.
