bletl.heuristics
Signal analysis based on simple, deterministic heuristics.
- bletl.heuristics.find_do_peak(x: ndarray, y: ndarray, *, delay_a: float, threshold_a: float, delay_b: float, threshold_b: float, initial_delay: float = 1) int | None
Finds the index of a DO peak in the inputs [x] and [y].
- Parameters:
- xnumpy.ndarray
Time vector.
- ynumpy.ndarray
DO vector.
- initial_delayfloat
Hours in the beginning that are not considered.
- delay_afloat
Hours for which condition A must be fulfilled.
- threshold_afloat
DO threshold that must be UNDERshot for at least <delay_a> hours.
- delay_bfloat
Hours for which condition B must be fulfilled.
- threshold_bfloat
DO threshold that must be OVERshot for at least <delay_b> hours.
- Returns:
- i_overshootint
Index (w.r.t. inputs [x] and [y]) at which the DO peak was detected. None is returned if no peak was detected according to the given conditions.