Skip to content

← markers package

TrimMarkerSegment

Trim data before and after specified begin/end markers.

The incoming data must have a time axis and a marker stream with an instance axis. Data is trimmed along the time axis based on the timestamps of the given markers. Version 1.6.1

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: INOUT

stream

Name of event stream containing the markers to trim by. Wildcards are supported.

  • verbose name: Stream
  • default value: markers
  • port type: StringPort
  • value type: str (can be None)

stream_name

  • verbose name: Stream Name
  • default value: None
  • port type: AliasPort
  • value type: str (can be None)

event_start

Name of starting event marker. If empty, data will be retained from the start of the data until the event_end marker. Special case: use '*' to indicate any marker.

  • verbose name: Event Start
  • default value: start
  • port type: StringPort
  • value type: str (can be None)

start_occurrence

In case of multiple 'event_start' markers, index of desired marker occurrence (0 is first ooccurrence, -1 is last ooccurrence, -2 is second to last, etc.) .

  • verbose name: Start Occurrence
  • default value: 0
  • port type: IntPort
  • value type: int (can be None)

before_start_time

Time in seconds before the starting event marker at which to trim. A value of

  • verbose name: Before Start Time
  • default value: 0
  • port type: FloatPort
  • value type: float (can be None)

event_end

Name of ending event marker. If empty, data will be retained " from the event_start marker to the end of the data. Special case: use '*' to indicate any marker.

  • verbose name: Event End
  • default value: end
  • port type: StringPort
  • value type: str (can be None)

end_occurrence

In case of multiple 'event_end' markers, index of desired marker occurrence (0 is first ooccurrence, -1 is last ooccurrence, -2 is second to last, etc.) .

  • verbose name: End Occurrence
  • default value: -1
  • port type: IntPort
  • value type: int (can be None)

after_end_time

Time in seconds to after the named event marker when at which to trim. A value of 0 will trim at the event marker.

  • verbose name: After End Time
  • default value: 0
  • port type: FloatPort
  • value type: float (can be None)

trim_marker_streams

Also trim all marker streams to the same time range.

  • verbose name: Trim Marker Streams
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

drop_markers_in_trimmed_span

Deprecated (does nothing); use trim_marker_streams instead.

  • verbose name: Drop Markers In Trimmed Span
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

on_missing_events

Determines how to handle cases whether either the start or the end marker, or both, cannot be found. If 'raise-error', an Exception is raised and the pipeline stops. If 'return-none', the node passes on None as its data output. If 'one-sided' a one-sided trim is allowed, meaning that if the start marker is missing, data will be selected from the start of the data, and if the end marker is missing, data will be selected to the end of the data, without raising an error. Lastly, 'return-all' will return all the data if both markers are missing. The latter replaces the previous functionality of the ignore_errors param, which is deprecated. A log message warning of the missing marker(s) will be printed in any case.

  • verbose name: On Missing Events
  • default value: raise-error
  • port type: EnumPort
  • value type: str (can be None)

ignore_errors

Continue operation if no data is found between the given markers. If True, a warning message will be printed. If False, an exception will be raised.

  • verbose name: Ignore Errors
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

verbose

Show informational messages.

  • verbose name: Verbose
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)