def test_notch_filter():
    rec, sort = se.example_datasets.toy_example(duration=10, num_channels=4)

    rec_n = notch_filter(rec, 3000, q=10)

    assert check_signal_power_signal1_below_signal2(
        rec_n.get_traces(),
        rec.get_traces(),
        freq_range=[2900, 3100],
        fs=rec.get_sampling_frequency())
Example #2
0
def test_notch_filter():
    rec, sort = se.example_datasets.toy_example(dump_folder='test', dumpable=True, duration=2, num_channels=4, seed=0)

    rec_n = notch_filter(rec, 3000, q=10)

    assert check_signal_power_signal1_below_signal2(rec_n.get_traces(), rec.get_traces(), freq_range=[2900, 3100],
                                                    fs=rec.get_sampling_frequency())
    assert check_signal_power_signal1_below_signal2(rec_n.get_traces(end_frame=30000),
                                                    rec.get_traces(end_frame=30000), freq_range=[2900, 3100],
                                                    fs=rec.get_sampling_frequency())

    check_dumping(rec_n)
    shutil.rmtree('test')
def test_notch_filter():
    rec, sort = se.example_datasets.create_dumpable_extractors(duration=10,
                                                               num_channels=4,
                                                               folder='test')

    rec_n = notch_filter(rec, 3000, q=10)

    assert check_signal_power_signal1_below_signal2(
        rec_n.get_traces(),
        rec.get_traces(),
        freq_range=[2900, 3100],
        fs=rec.get_sampling_frequency())

    check_dumping(rec_n)
    shutil.rmtree('test')