seismometer.data.cohorts.find_bin_edges

seismometer.data.cohorts.find_bin_edges(series, thresholds=None)

Creates list of bin edges from a series of continuous numeric data and list of inner thresholds. Contains lower bound but does not need upper bound due to numpy handling already understanding greater than max.

Parameters:
  • series (SeriesOrArray) – pandas series of data to bin.

  • thresholds (Optional[list], optional) – List of thresholds indicating inner bin edges (default: None-> series.mean()).

Returns:

Sorted list of bin edges.

Return type:

list[float]