Filter

arora.filter.bandpass()

arora.filter.bandpass(raw_signal, sampling_frequency, lower_cutoff, upper_cutoff, filter_order)

Parameters:
raw_signallist of int or array like object

An array with different stages annotated as integers

sampling_frequencyint, default 30

The frequency in which the raw_signal was sampled in

lower_cutoffint or float

The lower frequency boundary for the bandpass filter

upper_cutoffint or float

The higher frequency boundary for the bandpass filter

filter_orderint, default is 5

The order of the filter

Returns:

The array contains the values of signal after having been passed through the bandpass filter as ``numpy.ndarray``or array like object

For example:

>>> x = [random.randint(5, 10) for _ in range(1200)]
>>> a = arora.filter.bandpass(x, 2, 5, 120, 5)
>>> a
>>> array([ 1.87279319e-05,  1.87031147e-04,  9.27910295e-04, ...,
       -2.73488140e-01, -3.13090143e-01, -3.45810500e-01])

arora.filter.eeg_freqbands

arora.filter.eeg_freqbands(eeg_signal, sampling_frequency, filter_order)

Parameters:
eeg_signallist of int or array like object

An array that represents the signal

sampling_frequencyint or float

The sampling frequency of the signal

filter_orderint

The order of the filter

Returns:

For example:

>>> x = [random.randint(5, 10) for _ in range(1200)]
>>> a = arora.filter.eeg_freq_bands(x, 120, 5)
>>> a
>>> (array([2.43356013e-05, 2.62370593e-04, 1.42366481e-03, ...,
        3.60195148e-01, 3.11541830e-01, 2.53516271e-01]),
 array([4.56629089e-05, 4.71019935e-04, 2.41144885e-03, ...,
        3.29991666e-01, 2.70459811e-01, 1.53823639e-01]),
 array([ 0.00029898,  0.00269948,  0.01152751, ...,  0.22772076,
        -0.00854377, -0.1753367 ]),
 array([ 0.54186851,  0.37175027, -1.47761323, ...,  0.86513084,
         0.1325269 ,  0.50221443]))

arora.filter.filtering.high_pass_filter

arora.filter.filtering.high_pass_filter(data, sampling_frequency, cutoff, filter_order = 5)

Parameters:
signalslist of int or array like object

The data, in this case the array of signal that are meant to be processed

sampling_frequencyint

The frequency of the signal

cutoffint

The frequency that shall be the threshold of the filtering

filter_orderint

The maximum number of delay elements used in the filter circuit

Returns: numpy array of the processed signal

For example:

>>> x = [random.randint(5, 10) for _ in range(1200)]
>>> arora.filter.filtering.high_pass_filter(x, 4)
>>> array([-0.11814938, -1.11153319, -2.10221407, ..., -0.92814383,
       -1.38241869,  0.13895829])

arora.filter.filtering.low_pass_filter

arora.filter.filtering.low_pass_filter(data, sampling_frequency, cutoff, filter_order = 5)

Parameters:
signalslist of int or array like object

The data, in this case the array of signal that are meant to be processed

sampling_frequencyint

The frequency of the signal.

cutoffint

The frequency that shall be the threshold of the filtering

filter_orderint

The maximum number of delay elements used in the filter circuit.

Returns:

numpy.ndarray of the processed signal

>>> x = [random.randint(5, 10) for _ in range(1200)]
>>> arora.filter.filtering.high_pass_filter(x, 4)
>>> array([6.43388514e-06, 6.73526209e-05, 3.52292243e-04, ...,
       7.06434828e+00, 7.01476848e+00, 6.96585273e+00])

arora.filter.filtering.cheby2_highpass_filtfilt

arora.filter.filtering.cheby2_highpass_filtfilt(signals, sampling_frequency, cutoff, filter_oder)

Parameters:
signalslist of int or array like object

The data, in this case the array of signal that are meant to be processed

sampling_frequencyint

The frequency of the signal

cutoffint

The frequency that shall be the threshold of the filtering

filter_orderint

The maximum number of delay elements used in the filter circuit

Returns:

numpy array of the processed signal

arora.filter.filtering.standardize

arora.filter.filtering.standardize(epoch)

Parameters:
epochlist of int or array like object

The data, in this case the array of signal that are meant to be processed

Returns:

Z-score normalized array as list

arora.filter.filtering.upper_lower_signal_envelopes

arora.filter.upper_lower_signal_envelopes(epoch)

Parameters:
epochlist of int or array like object

The data, in this case the array of signal that are meant to be processed

Returns:

numpy.ndarray of the processed signal

For example:

>>>