This is a sample of my dataset.
sampling frequency - 128 Hz
- operating system: Windows 10
When plotted getting an distorted image like the below one. How to rectify it and get a proper signal.
In the csv folder of the dataset I have events also. Have created a channel for the events also. But getting error.
ValueError: No stim channels found. Consider specifying them manually using the ‘stim_channel’ parameter.
events = mne.find_events(raw)
How to process the events col. of the csv file and process the eeg signals and predict which event based on the 14 channels?
the data values seem to be in µV, but MNE requires SI units, i.e., Volts. Multiply the values by 1e-6 and things should already look much better.
As for the other question, can you please open a separate topic?
dataframe = pd.read_csv('eeg.csv')
eeg_data = dataframe.transpose().to_numpy()
n_channels = len(dataframe.columns)
sampling_freq = 128
info = mne.create_info(n_channels, sfreq=sampling_freq)
info = mne.create_info(ch_names, ch_types=ch_types, sfreq=sampling_freq)
raw = mne.io.RawArray(eeg_data, info)
I’m converting it from .csv to .fif and plotting, so then how do I convert the data unit from µV to V.
Just multiply the dataframe by 1e-6 before creating the RawArray, that should do the trick.
Hello @Star, great to see it’s working!
Can you please post your other question into a new topic? Thank you!
Thanks, Have posted it separately.
Sorry but now the event column in the data frame also gets multiplied with 1e-6. That why I asked the Event’s based classification question (Event's based Classification) with this also.
Could you help me with this @richard .
You can exclude the last column from the multiplication by doing something like:
:, # all rows
dataframe.columns[:-1] # omit last column (events)
] *= 1e-6