Source code for epyt_control.signal_processing.event_detection.event_detector

 1"""
 2Module provides a base class for event detectors.
 3"""
 4from abc import abstractmethod, ABC
 5from epyt_flow.simulation import ScadaData
 6
 7
[docs] 8class EventDetector(ABC): 9 """ 10 Base class for event detectors. 11 """ 12 def __init__(self, **kwds): 13 super().__init__(**kwds) 14
[docs] 15 @abstractmethod 16 def apply(self, scada_data: ScadaData) -> list[int]: 17 """ 18 Applies this detector to given SCADA data and returns suspicious time points. 19 20 Parameters 21 ---------- 22 scada_data : `ScadaData <https://epyt-flow.readthedocs.io/en/stable/epyt_flow.simulation.scada.html#epyt_flow.simulation.scada.scada_data.ScadaData>`_ 23 SCADA data in which to look for events (i.e. anomalies). 24 25 Returns 26 ------- 27 `list[int]` 28 List of suspicious time points. 29 """ 30 raise NotImplementedError()