how to represent EEG data in .csv file as Ntrail x N channel x sample for pyriemann package ?
In .csv
files you cannot represent 3 dimensions, because you only have rows and columns. If you want to save the EEG data as it is, you could save it as npy (see numpy.lib.format β NumPy v1.23.dev0 Manual and also numpy.save β NumPy v1.22 Manual):
import numpy as np
arr = epochs.get_data() # assuming you have an mne Epochs object
fname = "my_data.npy"
np.save(fname, arr)
I donot have epoch object. I tried to construct epoch but it requires event and eventid information. Kindly help me
to get those information from .hdf5 or .csv file.
@MBhuvi in order to receive help you will need to supply a lot more context and background information. What data do you have, in which formats (and where does the data come from), and what you want to do with it. Furthermore: If you donβt have information about events, why do you want to make epochs, etc.
Thank you for your response @sappelhoff. I am working on EEG signal acquired from g.tec nautilus equipment. the acquired data is in hdf5 format without any annotations. the data has been acquired for visual stimuli of varying frequencies for SSVEP related application for which I need epochs and events to find the evoked signal. But I was unable to fetch the event and event id related information from the data. is it possible to fetch those info. externally. kindly help me out.
I donβt know anything about the g.tec format unfortunately. Youβll have to dig into the specifics of that dataset to obtain the EEG data as well as the events. Perhaps contacting the g.tec customer support or the people who provided you with the data. Then you can follow this tutorial to create an MNE Epochs structure: Creating MNE-Python data structures from scratch β MNE 1.0.dev0 documentation
from there, you can follow my steps from Pyriemann Package Input representation - #2 by sappelhoff
good luck, there is nothing more I can do