Exemplo n.º 1
0
def test_extract_channels(signal):
    two_sig = signal.extract_channels(['chan0', 'chan1'])
    assert two_sig.shape == (2, 200)
    one_sig = signal.extract_channels(['chan2'])
    assert one_sig.shape == (1, 200)
    recombined = RasterizedSignal.concatenate_channels([two_sig, one_sig])
    before = signal.as_continuous()
    after = recombined.as_continuous()
    assert np.array_equal(before, after)
Exemplo n.º 2
0
def test_concatenate_channels(signal):
    sig1 = signal
    sig2 = sig1.jackknife_by_time(20, 2)
    sig3 = RasterizedSignal.concatenate_channels([sig1, sig2])
    assert sig1.as_continuous().shape == (3, 200)
    assert sig3.as_continuous().shape == (6, 200)