LCFitter.fit_position() currently fails with an LCEmpiricalFourier template for two reasons:
-
SciPy passes a one-element array to set_overall_phase(), causing NumPy 2.x to raise:
ValueError: setting an array element with a sequence
-
After converting the phase to a scalar, it fails because LCEmpiricalFourier does not implement the first- and second-order derivatives required by fit_position():
NotImplementedError: No derivative function found for this object.
Suggested fix:
- explicitly convert the optimizer phase to a scalar;
- implement analytic first- and second-order derivatives for
LCEmpiricalFourier;
- add a test running
LCFitter.fit_position() with an empirical Fourier template.
LCFitter.fit_position()currently fails with anLCEmpiricalFouriertemplate for two reasons:SciPy passes a one-element array to
set_overall_phase(), causing NumPy 2.x to raise:ValueError: setting an array element with a sequenceAfter converting the phase to a scalar, it fails because
LCEmpiricalFourierdoes not implement the first- and second-order derivatives required byfit_position():NotImplementedError: No derivative function found for this object.Suggested fix:
LCEmpiricalFourier;LCFitter.fit_position()with an empirical Fourier template.