示例#1
0
 def test_properties(self):
     """Test Pac properties."""
     p = Pac()
     # Idpac :
     p.idpac
     p.idpac = (2, 1, 1)
     # Dcomplex :
     p.dcomplex
     p.dcomplex = 'wavelet'
     # Cycle :
     p.cycle
     p.cycle = (12, 24)
     # Width :
     p.width
     p.width = 12
示例#2
0
 def test_properties(self):
     """Test Pac properties."""
     p = Pac()
     # Idpac :
     p.idpac
     p.idpac = (2, 1, 1)
     # Filt :
     p.filt
     p.filt = 'butter'
     # Dcomplex :
     p.dcomplex
     p.dcomplex = 'wavelet'
     # Cycle :
     p.cycle
     p.cycle = (12, 24)
     # Filtorder :
     p.filtorder
     p.filtorder = 6
     # Width :
     p.width
     p.width = 12
示例#3
0
                                 noise=1.,
                                 n_epochs=n_epochs,
                                 n_times=n_times)

# First, let's use the MVL, without any further correction by surrogates :
p = Pac(idpac=(4, 0, 0),
        f_pha=(5, 14, 2, .3),
        f_amp=(80, 120, 2, 1),
        verbose=False)

plt.figure(figsize=(18, 9))
# Define several cycle options for the fir1 (eegfilt like) filter :
p.filt = 'fir1'
print('Filtering with fir1 filter')
for i, k in enumerate([(1, 3), (2, 4), (3, 6)]):
    p.cycle = k
    xpac = p.filterfit(1024, data)
    plt.subplot(2, 3, i + 1)
    p.comodulogram(xpac.mean(-1), title='Fir1 - cycle ' + str(k))

# Define several wavelet width :
p.dcomplex = 'wavelet'
print('Filtering with wavelets')
for i, k in enumerate([7, 9, 12]):
    p.width = k
    xpac = p.filterfit(1024, data)
    plt.subplot(2, 3, i + 4)
    p.comodulogram(xpac.mean(-1), title='Wavelet - width ' + str(k))

plt.show()