Do I have to use the annotation file?

Hi guys :wave:t2:,

I have a file in edf format with containing eeg records and also annotations in csv format. I only used ica when preprocessing the eeg file because real spikes other than artifact will help me when estimating. Do I have to import the Annotation file into raw file ? :smiling_face:

hi,

I have a file in edf format with containing eeg records and also annotations in csv format. I only used ica when preprocessing the eeg file because real spikes other than artifact will help me when estimating. Do I have to import the Annotation file into raw file ? :smiling_face:

yes with:

annotations = mne.read_annotations(‘file.csv’)
raw.set_annotations(annotations)

1 Like

thanx a lot @agramfort but now ı m getting error
KeyError: ‘onset’ :sweat_smile:

omg annot, maps the time and what happen in this time. ı have to combine with raw file
I am enlightened :face_holding_back_tears:

“they provide a mapping between times during an EEG/MEG recording and a description of what happened at those times. In other words, they associate a when with a what”
-Mne tutorials

raw.annotations.onset → gives
array([], dtype=float64)

so your annotations are not aligned with the time of the EEG data?

A

nope I am using A dataset of neonatal EEG recordings with seizures annotations | Zenodo this open dataset for my project there are 3 annotations file in csv format and also patients eeg records :smiling_face_with_tear:

have you understood how the annotations are stored? basically you need to know the
onsets, durations of each annotation and potential a text description

Alex

1 Like

Thanx Mr. Alexandre for your comment. I am researching at the topics you mentioned now :star_struck: :blush: