Closed atrettin closed 2 years ago
Rebased onto master. I discovered a bug after including the changes from the latest merge: When one of the fits in the staged fit is an octant-fit (fit_octants
), then it crashes at L1397 in analysis.py because the range of the angle parameter was not reset.
Finally, unit tests are working! This was a huge technical debt on my side, but now we can have at least a little bit of confidence in this thing. :)
Tiny addition: Exposing the tolerance setting for octant fits. In some cases where the likelihood at the inflection point is very flat and the truth is far away, I might want to offset a little more into the octant (or quadrant in this case, the pathological angle is the sterile CP phase with inflection point at 90 degrees).
Add a module to perform a staged fit, where a later fit starts from the best fit point of an earlier fit.
The use case for this is primarily to polish the result of a global search. For example, I can run NLOPT's CRS2 global search algorithm for up to 30h and then polish the best fit point using L-BFGS-B with the following kwargs to
fit_recursively()
:where
and
One issue that I hope won't cause problems is the fact that I set the nominal parameters of the hypo_maker to the best fit values of the previous fit. This is done to make sure that a subsidiary fit doesn't destroy all progress by calling
reset_free()
, which could easily happen by mistake since it is the default for some modules. We should test whether or not this creates problems with different param selections similar to what @ts4051 has found elsewhere.