When I use tmax parameter in spectral_connctivity, I found it ignored the baseline’s data, is this normal?
Could you provide more information please? Ideally a minimal working example so we can try to reproduce the problem. Also please state the version of MNE-Python you’re using. Thanks!
The version is 0.22.0
import mne
from mne.connectivity import spectral_connectivity
import numpy as np
fpath = 'color_epoch.fif'
epoch = mne.read_epochs(fpath, preload=True)
sfreq = epoch.info['sfreq']
cwt_freq = np.linspace(3, 100, 8)
con_1, freqs, times, n_epochs, n_tapers = spectral_connectivity(
epoch['blue'], method='coh', mode='cwt_morlet', sfreq=sfreq, cwt_freqs=cwt_freq, cwt_n_cycles=cwt_freq/2,
faverage=True, tmin=0, indices=(np.array([0,0]), np.array([111,123,])))
con_2, freqs, times, n_epochs, n_tapers = spectral_connectivity(
epoch['blue'], method='coh', mode='cwt_morlet', sfreq=sfreq, cwt_freqs=cwt_freq, cwt_n_cycles=cwt_freq/2,
faverage=True, tmin=-0.5, tmax=2, indices=(np.array([0,0]), np.array([111,123])))
The data’s link is color_epoch.fif - Google Drive
And I’m not quite sure if I use cwt_freq correctly for the frequency interested is 3 to 100 Hz.
@richard