elephant.test.test_signal_processing module

Unit tests for the signal_processing module.

class elephant.test.test_signal_processing.ButterTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

test_butter_axis()[source]
test_butter_filter_function()[source]
test_butter_filter_type()[source]

Test if correct type of filtering is performed according to how cut-off frequencies are given

test_butter_input_types()[source]
test_butter_invalid_filter_function()[source]
test_butter_missing_cutoff_freqs()[source]
test_butter_multidim_input()[source]
class elephant.test.test_signal_processing.HilbertTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

setUp()[source]
test_hilbert_output_shape()[source]

Tests if the length of the output is identical to the original signal, and the dimension is dimensionless.

test_hilbert_pad_type_error()[source]

Tests if incorrect pad_type raises ValueError.

test_hilbert_theoretical_long_signals()[source]

Tests the output of the hilbert function with regard to amplitude and phase of long test signals

test_hilbert_theoretical_one_period()[source]

Tests the output of the hilbert function with regard to amplitude and phase of a short signal covering one cycle (more accurate estimate).

This unit test is adapted from the scipy library of the hilbert() function.

class elephant.test.test_signal_processing.ZscoreTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

setUp()[source]
test_zscore_list_dup()[source]

Test zscore on a list of AnalogSignal objects, asking to return a duplicate.

test_zscore_list_inplace()[source]

Test zscore on a list of AnalogSignal objects, asking for an inplace operation.

test_zscore_single_dup()[source]

Test z-score on a single AnalogSignal, asking to return a duplicate.

test_zscore_single_dup_int()[source]

Test if the z-score is correctly calculated even if the input is an AnalogSignal of type int, asking for a duplicate (duplicate should be of type float).

test_zscore_single_inplace()[source]

Test z-score on a single AnalogSignal, asking for an inplace operation.

test_zscore_single_inplace_int()[source]

Test if the z-score is correctly calculated even if the input is an AnalogSignal of type int, asking for an inplace operation.

test_zscore_single_multidim_dup()[source]

Test z-score on a single AnalogSignal with multiple dimensions, asking to return a duplicate.

test_zscore_single_multidim_inplace()[source]

Test z-score on a single AnalogSignal with multiple dimensions, asking for an inplace operation.