[Mne_analysis] mne_process_raw: event extraction

Vancelette, Reid Vincent RVANCELETTE at partners.org
Tue Sep 25 13:28:14 EDT 2012
Search archives:

Eric:

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. 

Thanks all for your responses,

-Reid

-----Original Message-----
From: Matti Hamalainen [mailto:msh at nmr.mgh.harvard.edu] 
Sent: Tuesday, September 25, 2012 12:59 PM
To: Hari Bharadwaj
Cc: Eric Larson; Vancelette, Reid Vincent; mne_analysis at nmr.mgh.harvard.edu
Subject: Re: [Mne_analysis] mne_process_raw: event extraction
Importance: High


Hi Reid,

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.

- Matti


On Sep 25, 2012, at 12:22 PM, Hari Bharadwaj wrote:

> Hi Reid,
>  If you recorded at the Martinos center, try STI102 instead of STI101 
> to see if your triggers are there..
> 
> Regards,
> Hari
> 
> 
> 
> On Tue, September 25, 2012 11:52 am, Eric Larson wrote:
>> 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.
>> 
>> Eric
>> 
>> 
>> 
>> On Tue, Sep 25, 2012 at 8:41 AM, Vancelette, Reid Vincent 
>> <RVANCELETTE at partners.org> wrote:
>>> Hi all again,
>>> 
>>> 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
>>> 
>>> -Reid
>>> 
>>> -----Original Message-----
>>> From: Eric Larson [mailto:larson.eric.d at gmail.com]
>>> Sent: Tuesday, September 25, 2012 11:17 AM
>>> To: Vancelette, Reid Vincent
>>> Cc: mne_analysis at nmr.mgh.harvard.edu
>>> Subject: Re: [Mne_analysis] mne_process_raw: event extraction
>>> 
>>> Hey Reid,
>>> 
>>> 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.
>>> 
>>> Cheers,
>>> Eric
>>> 
>>> 
>>> On Tue, Sep 25, 2012 at 7:50 AM, Vancelette, Reid Vincent 
>>> <RVANCELETTE at partners.org> wrote:
>>>> Hi group,
>>>> 
>>>> 
>>>> 
>>>> 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:
>>>> 
>>>> 
>>>> 
>>>> 'mne_process_raw --raw %s/raw_data/%s_%s_raw.fif --eventsout 
>>>> %s/triggers/%s_%s.eve --digtrig STI_101'
>>>> 
>>>> 
>>>> 
>>>> 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?
>>>> 
>>>> 
>>>> 
>>>> Thanks in advance again,
>>>> 
>>>> 
>>>> 
>>>> Reid
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Mne_analysis mailing list
>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>> 
>>>> 
>>>> The information in this e-mail is intended only for the person to 
>>>> whom it is addressed. If you believe this e-mail was sent to you in 
>>>> error and the e-mail contains patient information, please contact 
>>>> the Partners Compliance HelpLine at 
>>>> http://www.partners.org/complianceline
>>>> . If the e-mail was sent to you in error but does not contain 
>>>> patient information, please contact the sender and properly dispose 
>>>> of the e-mail.
>>>> 
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> 
>> 
>> 
> 
> 
> --
> Hari Bharadwaj
> PhD Candidate, Biomedical Engineering, Boston University
> 677 Beacon St.,
> Boston, MA 02215
> 
> Martinos Center for Biomedical Imaging, Massachusetts General Hospital
> 149 Thirteenth Street,
> Charlestown, MA 02129
> 
> hari at nmr.mgh.harvard.edu
> Ph: 734-883-5954
> 
> 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> 
> 





More information about the Mne_analysis mailing list