About inserting/writing triggers into MEG raw file (*.fif format)

Dear all, I am Beginner using MNE and once missed to input the triggers, I hereby sincerely ask how to add additional triggers(events) to the MEG fif files (obtained from Electa NeuroMag), so that i may continue the data analysis using the edited raw data.

I have tried events = mne.find_events (raw, stim_channel = ‘STI101’) and it returned right information of the triggers (markers), so that i want to go further and add/write more triggers (with known, regular time points) to the orginal ‘fif’ file.

Any suggestions are highly appreciated! Thanks in advance!

  • MNE version: e.g. [ MNE 1.0.0 ]
  • operating system: Windows 10

if you want to modify the raw files you can use raw.add_events

https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.add_events

Alex

It works, Many Thanks, Alex.