hello everyone iam asking about this error (All picks must be < n_channels (14), got 14), i want to filter it using FFT and when run code i got this error.
This is my code:
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
from scipy.fftpack import fft, ifft
fname = “C:\Users\hp\Desktop\data\Emotiv 30s EDF\S021\S021E04.edf”
raw = mne.io.read_raw_edf(fname,preload=True)
X = fft(raw)
You must not run fft() on raw, which is an MNE Raw object. fft() cannot work with this. It expects a NumPy array. You can get the raw’s data represented as a NumPy array by using the get_data() method. Here’s a working example:
from scipy.fftpack import fft
# Load sample data
sample_dir = mne.datasets.sample.data_path()
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'
raw = mne.io.read_raw_fif(sample_fname, preload=True)
# Run FFT
X = fft(raw.get_data())
I want to plot the difference between 2 edf signal (concetration and relax) ,pds does not show the difference , so i use fft then i want to plot the psd but it does not work.
Is there any other plots to show the difference?