elephant.test.test_signal_processing module — Elephant 0.5.0 documentation

# elephant.test.test_signal_processing module

Unit tests for the signal_processing module.

class `elephant.test.test_signal_processing.` `ButterTestCase`(methodName='runTest')

  Bases: `unittest.case.TestCase`

  Methods

  `test_butter_axis`()
  `test_butter_filter_function`()
  `test_butter_filter_type`()

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

  `test_butter_input_types`()
  `test_butter_invalid_filter_function`()
  `test_butter_missing_cutoff_freqs`()
  `test_butter_multidim_input`()

class `elephant.test.test_signal_processing.` `HilbertTestCase`(methodName='runTest')

  Bases: `unittest.case.TestCase`

  Methods

  `setUp`()
  `test_hilbert_output_shape`()

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

  `test_hilbert_pad_type_error`()

    Tests if incorrect pad_type raises ValueError.

  `test_hilbert_theoretical_long_signals`()

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

  `test_hilbert_theoretical_one_period`()

    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')

  Bases: `unittest.case.TestCase`

  Methods

  `setUp`()
  `test_zscore_list_dup`()

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

  `test_zscore_list_inplace`()

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

  `test_zscore_single_dup`()

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

  `test_zscore_single_dup_int`()

    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`()

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

  `test_zscore_single_inplace_int`()

    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`()

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

  `test_zscore_single_multidim_inplace`()

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