Segmentation
arora.segmentation.get_segment
arora.segmentation.get_segment(index1, index2, signal)
Segments the data of a given file
- Parameters:
- index1int
Start of epoch.
- index2int
End of epoch.
- signalpd.DataFrame
A dataframe containing the epochs
- Returns:
A list of the segmented signals
Example:
arora.signals.segment_fs
arora.signals.segment_fs(signals, fs)
Segments the data with given frequency.
- Parameters:
- signalslist of int or float
List of signals.
- fsint
Frequency of the signals.
- Returns :
2D nested list with segmented signal.
For example:
>>> signals = [1, 2, 3, 4, 5, 6, 7, 8]
>>> arora.signals.segment_fs(signals, 2)
[[1, 2], [3, 4], [5, 6], [7, 8]]
>>> arora.signals.segment_fs(signals, 4)
[[1, 2, 3, 4], [5, 6, 7, 8]]