ActivationFunction#
- class spidet.domain.ActivationFunction.ActivationFunction(label: str, unique_id: str, times: ndarray[dtype[float]], data_array: ndarray[dtype[float]], detected_events_on: ndarray[dtype[int]], detected_events_off: ndarray[dtype[int]], event_threshold: float)[source]#
This class represents the activation levels of a given EEG metapattern (i.e., a
BasisFunction) in the time domain and contains periods of abnormal EEG activity, represented as detected events (seeDetectedEvent).- Attributes:
- label: str
The label of the ActivationFunction; the label of a given ActivationFunction contains the row index in the \(H\) matrix prefixed by a capital H.
- unique_id: str
- times: numpy.ndarray[numpy.dtype[float]]
An array containing the timestamps of each data point
- data_array: numpy.ndarray[numpy.dtype[float]]
An array containing the activation level at each point in time
- detected_events_on: numpy.ndarray[numpy.dtype[int]]
An array with the indices in the data array corresponding to the onsets of the detected events.
- detected_events_off: numpy.ndarray[numpy.dtype[int]]
An array with the indices in the data array corresponding to the offsets of the detected events.
- event_threshold: float
the threshold used for the computation of the detected events.
- get_detected_events() List[DetectedEvent][source]#
Returns a list of
DetectedEventobjects representing the computed events detected on the givenActivationFunction.
- get_event_mask()[source]#
Returns a binary numpy array indicating the indices of all detected events of the given
ActivationFunction.
- get_sub_period(offset: float, duration: float) ndarray[dtype[float]][source]#
Computes a sub period of the
ActivationFunction.- Parameters:
- offset: float
Offset from the start of the recording in seconds.
- duration: float
Duration of the sub period in seconds.
- Returns:
- numpy.ndarray[numpy.dtype[float]]
Array containing the data points within the defined sub period.