ktk.TimeSeries.get_ts_after_index#
- TimeSeries.get_ts_after_index(index, *, inclusive=False)[source]#
Get a TimeSeries after the specified time index.
- Parameters:
index (int) – Time index
inclusive (bool) – Optional. True to include the given time index.
- Returns:
A new TimeSeries that fulfils the specified conditions.
- Return type:
- Raises:
TimeSeriesRangeError – If there is no data after the specified index.
See also
ktk.TimeSeries.get_ts_after_time
,ktk.TimeSeries.get_ts_after_event
,ktk.TimeSeries.get_ts_before_index
,ktk.TimeSeries.get_ts_between_indexes
Example
>>> ts = ktk.TimeSeries(time=np.arange(10)/10) >>> ts.time array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
>>> ts.get_ts_after_index(2).time array([0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
>>> ts.get_ts_after_index(2, inclusive=True).time array([0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])