xdas.coordinates.SampledCoordinate.get_split_indices#

SampledCoordinate.get_split_indices(kind='discontinuities', tolerance=False)[source]#

Return integer indices where this coordinate should be split.

Each returned index i marks the start of a new segment: the boundary lies between element i - 1 and element i. The first segment always starts at index 0, so 0 is never included in the result.

Parameters:
  • kind ({"discontinuities", "gaps", "overlaps"}, optional) – Which boundary type to return. "gaps" returns only boundaries where the axis jumps forward by more than one sampling interval; "overlaps" returns only boundaries where the axis jumps backward. "discontinuities" (default) returns both.

  • tolerance (float, timedelta, None, or False, optional) – Minimum absolute magnitude of the jump to report. Boundaries smaller than tolerance are silently dropped. None removes only zero-magnitude jumps (i.e. consecutive equal values). False (default) disables magnitude filtering and returns all boundaries of the requested kind.

Returns:

Integer indices of the start of each new segment (excluding the first).

Return type:

numpy.ndarray