dominosee.eventorize.cut_single_threshold

dominosee.eventorize.cut_single_threshold(ts, th, extreme='above', select=None, select_period=None)[source]

Apply cut_single_threshold to an xarray DataArray.

Parameters:
  • ts (xarray.DataArray) – DataArray containing data with dimension ‘time’

  • th (float) – Threshold value

  • extreme ({‘above’, ‘below’}, optional) – Whether to select values above or below the threshold, by default “above”

  • select ({‘burst’, ‘wane’, ‘start’, ‘end’}, optional) – Type of event selection, by default None

  • select_period (int, optional) – Number of time steps to select from the beginning or end of each event, by default None

Returns:

xarray.DataArray – DataArray with the events in datatype bool