libtcspc.MapToDatapoints

final class libtcspc.MapToDatapoints(event_type, data_mapper, numeric_traits=None)[source]

Bases: Node

Processor that maps events to datapoint events using a data mapper.

Each event of event_type is mapped to a DatapointEvent by the data mapper; other events pass through.

Parameters:
  • event_type (EventType) – The event type to map.

  • data_mapper (DataMapper) – The data mapper extracting the datapoint value.

  • numeric_traits (NumericTraits or None) – Numeric traits for the emitted DatapointEvent. Defaults to NumericTraits().

Notes

Events handled:

  • Events matching event_type: emit a DatapointEvent.

  • All other event types: pass through unchanged.

  • End of input: pass through.

See also

tcspc::map_to_datapoints()

The underlying C++ factory function.