libtcspc.FitPeriodicSequences

final class libtcspc.FitPeriodicSequences(event_type, length, min_interval, max_interval, max_mse, numeric_traits=None)[source]

Bases: Node

Processor that fits fixed-length periodic sequences and estimates timing.

Every length events of event_type are fit to a periodic model; a PeriodicSequenceModelEvent is 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 abstime field.

  • 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; every length events emit a PeriodicSequenceModelEvent with the fitted timing.

  • All other event types: pass through unchanged.

  • End of input: pass through; a partial accumulation (fewer than length events) is discarded.

See also

tcspc::fit_periodic_sequences()

The underlying C++ factory function.