Corrected. The original report claimed sequence prediction was ~100x slower than the fit. That measurement was invalid: the fit it was compared against had returned an all-NaN state, so the prediction code was being asked to integrate relative to an undefined epoch. Predicting on valid fits is fine -- 288 objects went through _predict without trouble. There is no performance bug here. Apologies for the noise.
The real problem is what produced that state.
Fitting 4,172 optical observations of (13377) over a 1989-2026 arc, seeded from its MPCORB elements, returns:
flag 2, csq 1.65e9, ndof 8338 (reduced chi-square ~197,000)
epochMJD_TDB nan
x, y, z nan
xdot,ydot,zdot nan
cov_0_0 nan
Flag 2 is FLAG_CSQ_TOO_LARGE, "converged; reduced chi-square above threshold", and it is a member of CONVERGED_FLAGS. So a fit whose entire state vector is NaN is reported to callers as converged. Anything that branches on CONVERGED_FLAGS -- or that reads the state without testing it -- consumes it silently. Feeding it to predict is what sent the integrator off, which is how I found it.
Two things worth separating: whether the fit should diverge here at all (a catalogue seed on a well-observed numbered object), and whether a NaN state should ever leave the fitter wearing a converged flag. The second seems worth a guard regardless of the first.
Corrected. The original report claimed sequence prediction was ~100x slower than the fit. That measurement was invalid: the fit it was compared against had returned an all-NaN state, so the prediction code was being asked to integrate relative to an undefined epoch. Predicting on valid fits is fine -- 288 objects went through
_predictwithout trouble. There is no performance bug here. Apologies for the noise.The real problem is what produced that state.
Fitting 4,172 optical observations of (13377) over a 1989-2026 arc, seeded from its MPCORB elements, returns:
Flag 2 is
FLAG_CSQ_TOO_LARGE, "converged; reduced chi-square above threshold", and it is a member ofCONVERGED_FLAGS. So a fit whose entire state vector is NaN is reported to callers as converged. Anything that branches onCONVERGED_FLAGS-- or that reads the state without testing it -- consumes it silently. Feeding it topredictis what sent the integrator off, which is how I found it.Two things worth separating: whether the fit should diverge here at all (a catalogue seed on a well-observed numbered object), and whether a NaN state should ever leave the fitter wearing a converged flag. The second seems worth a guard regardless of the first.