Data load
data=mne.io.read_raw_cnt('data.cnt',preload=True)
data.drop_channels(['A1','A2','NC', 'X1', 'X2', 'X3', 'X4'])
data.set_montage('standard_1005',match_case=False)
data.set_eeg_reference()
Power spectral density
data.plot_psd(fmin=0.2, fmax=45);
When i try to get alpha band like this
from mne.time_frequency import psd_welch
psds, freqs = psd_welch(data, fmin=0.2, fmax=45)
psds /= np.sum(psds, axis=-1, keepdims=True)
psds_band = psds[ :, (freqs >= 8.5) & (freqs < 11.5)].mean(axis=-1)
psds_band
I got NaNs. Though there is no NaNs in other frequency bands. Any idea