Skip to content

← deprecated package

CreateSlice

This node is deprecated use Create Selection Interval instead.

Define a selection interval (slice) that can be used to select items from a collection, e.g., using SelectRange. Slices consist of a start index, a stop index, and a step size, and the end value is by convention not included in the range unless the inclusive option is set to True. Note that, when the endpoints are data values along a real-valued domain (i.e., when they represent "coordinate" values along a continuous axis such as time or frequency), it is necessary to specify the domain explicitly as 'float' for the inclusive option to work as expected correctly. Both the start and end value are optional, and if not given, range from/to the respective end of the data. When specifying integer-valued slices, note that slices use 0-based indexing, and negative integers count from the end of the collection that they are used with, where -1 is the last element, -2 the second-to-last etc. Also, negative steps run in reverse. Alterantively, one may also provide a start index and a length (leaving the other parameters at their default); then, stop is derived as start+length and the inclusive option does not apply. Note that, for real-valued endpoints, negative values do NOT count from the "end" of the range; these are merely treated as negative values along the domain. Version 1.0.1

Ports/Properties

selection

Selection range.

  • verbose name: Selection
  • default value: None
  • port type: DataPort
  • value type: slice (can be None)
  • data direction: OUT

start

Start value of the range.

  • verbose name: Start
  • default value: None
  • port type: Port
  • value type: object (can be None)

stop

End value of the range. Not included in the range unless the inclusive option is set to True.

  • verbose name: Stop
  • default value: None
  • port type: Port
  • value type: object (can be None)

step

Step size of the range, in terms of generated indices (defaults to 1). If set to a negative value, the range runs in reverse, and if set to, e.g., 2, will yield every other element.

  • verbose name: Step
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

length

Alternative way to specify the range in terms of the number of elements to retain, beginning with the start value.

  • verbose name: Length
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

inclusive

Whether the stop value is inclusive or exclusive. The start value is always inclusive. Remember to set the domain to a value other than unspecified to avoid warnings.

  • verbose name: Stop Included In Range
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

domain

The domain of the interval endpoints. This is necessary for the inclusive option to work correctly.

  • verbose name: Endpoint Domain
  • default value: unspecified
  • port type: EnumPort
  • value type: str (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)