libtcspc.FitPeriodicSequences¶
- final class libtcspc.FitPeriodicSequences(event_type, length, min_interval, max_interval, max_mse, numeric_traits=None)[source]¶
Bases:
NodeProcessor that fits fixed-length periodic sequences and estimates timing.
Every
lengthevents ofevent_typeare fit to a periodic model; aPeriodicSequenceModelEventis emitted with the estimated start time and interval. Other events pass through.- Parameters:
event_type (EventType) – The event type to accumulate and fit. Must have an
abstimefield.length (int or Param[int]) – Number of events per sequence (at least 3).
min_interval (float or Param[float]) – Minimum acceptable estimated interval.
max_interval (float or Param[float]) – Maximum acceptable estimated interval.
max_mse (float or Param[float]) – Maximum acceptable mean squared error of the fit.
numeric_traits (NumericTraits or None) – Numeric traits for the emitted event. Defaults to
NumericTraits().
Notes
Events handled:
event_type: accumulated; everylengthevents emit aPeriodicSequenceModelEventwith the fitted timing.All other event types: pass through unchanged.
End of input: pass through; a partial accumulation (fewer than
lengthevents) is discarded.
See also
- tcspc::fit_periodic_sequences()
The underlying C++ factory function.