I have been trying to extract events from my raw data with the mne_process_raw command. I have changed the STI channel from STI 014 to STI101 per Matti's instructions:
and 0 events are extracted. I receive the following message:
0 events found in /autofs/space/.../raw_data/MVS1_12_B8_raw-eve.fif
Trigger channel : STI 101 max_event : 0
--- Saving events (leading edge) in text format to /autofs/space/.../triggers/MVS1_12_B8.eve ---
No events to save
I have looked into the raw fif files to check to see whether or not the triggers were recorded and they were. Is there something else that I need to do/define in order to extract the events successfully?
We also use STI101. Depending on how the channel is actually named,
you might not need that underscore and should use
--digtrig 'STI101'
That's what works for us---single quotes on each side, no spaces---but
you might need to adjust with/without spaces and/or underscores based
on how your system actually names that channel.
Thanks for all your responses. I have tried with/without spaces, and/or underscores, and with single quotes and none of these options allows me to get the channels. I still get this readout:
0 events found in /autofs/space/.../raw_data/MVS1_12_B8_raw-eve.fif
Trigger channel : STI101 max_event : 0
I'd suggest loading up MATLAB (or Python, the code will be very
similar) and trying something like this:
inFile = fullfile('raw_dir','MVS1_12_B8_raw.fif');
raw = fiff_setup_read_raw(inFile,true)
STIInd = find(~cellfun(@isempty,strfind(raw.info.ch_names,'STI101')));
picks = fiff_pick_channels(raw.info.ch_names,[],[]);
data = fiff_read_raw_segment(raw,raw.first_samp,raw.last_samp,picks);
trigData = data(STIInd,:);
Then your trigger channel data should be in "trigData". This way you
can also manually examine raw.info.ch_names to see what it's called,
and once you find it, you can look at the raw data to see what's going
on. I had a problem at one point where a high bit (32 I think?) was
stuck on, so no lower-value events (1/2/4/8) were detected, so I had
to pull them out of the raw data myself with a script. Hopefully
that's not your issue, but it could be.
Did you have both STI101 and STI102 on in your acquisition. If so, STI101 is the trigger box in the stimulus cabinet next to the electronics and STI102 is the one next to the console. Otherwise, the two trigger boxes work in parallel and the triggers will be on STI101.
I was able to perform your code in Matlab on my dataset and it showed me where exactly STI101 was located, STIInd = 379. We are hoping to not have to create a separate matlab script to extract the events since we are mid-way through a project that has used the mne commands and want to use the same processing stream.
Hari:
I have tried STI102 as well and still receive the 0 events message that I've reported in earlier messages.
Matti:
We only had STI101 on in our acquisition since we do not have many triggers and do not need the parallel trigger box. Using Eric's script, I can see the triggers are in STI101 and that STI102 is not even listed in raw.info.ch_names . In addition to this, I have checked in mne_browse_raw and I can see the triggers under STI101; though, I need to go to Adjust, then Selection in the menu and manually add the STI101 channel to view it. Perhaps this is associated with the mnw_process_raw problem that I also have: while marking bad channels I can visually see the channels in mne_browse_raw, but when I try to mark the bad channels using mne_mark_bad_channels it prints out that in the raw-eve.fif file there is no insertion point and that in the raw.fif file no channel called <> [is] in the data file.