[Mne_analysis] BioSemi Trigger IDs in MNE

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Fri Jun 29 01:36:37 EDT 2018
Search archives:

        External Email - Use Caution        

Hi!

Try setting the arguments consecutive, shortest_events, and min_duration to different values. I get 61 events with this call:

events = mne.find_events(raw, consecutive=True, shortest_event=0, min_duration=1)

You can also plot the stim channel to get an idea how to best extract events. To this end, you need to set preload=True when loading the data, and then you can use Matplotlib as follows:

plt.plot(raw._data[-1])

HTH,
Clemens


> On Jun 28, 2018, at 20:45, Neelesh Kumar <neelesh314 at gmail.com> wrote:
> 
>         External Email - Use Caution        
> 
> 
> Hi, 
> 
> I am trying to send trigger from a linux system to the Biosemi ActiveOne system using NI USB-6501 encased in Biosemi TCPUA. Since there is no National Instrument driver for the linux distro that I have, I am using the following third party driver to send 8 bit triggers:
> 
> https://github.com/orlof/NI_USB-6501
> 
> like so: 
> 
> dev.write_port(0, 0b00000001)
> 
> The trigger ID received in EMSE editor is the decimal equivalent of the binary string sent above- R1, R3, ... (which is what I want). However when I try to read the triggers using MNE, the trigger IDs are different and incomprehensible. 
> 
> Example:
> 
> import mne
> raw = mne.io.read_raw_edf('test_run2.bdf')
> raw_events = mne.find_events(raw, stim_channel='Status')
> print(raw_events[:3])
> 
> results in the following output:
> 
> Extracting edf Parameters from test_run2.bdf...
> BDF file detected
> Setting channel info structure...
> Created Raw.info structure...
> Ready.
> [[    144 7797761 7863297]
>  [   9199 7860737 7862273]
>  [  13558 7859713 7860737]
>  [  21770 7860225 7863297]
> 
> The values in the third column are the trigger IDs: 7863297, 7862273, ...
> 
> Also, the number of events detected are less than what they should be (44 as compared to around 60).
> 
> Can anyone help me with this? Following is the google drive link of the bdf file, if it helps:
> 
> https://drive.google.com/file/d/1eXKZ3YQIp-FH_WP4rVi954iQvhGJ5L8m/view?usp=sharing
> 
> Thanks, 
> Neelesh
> 
> 
> _______________________________________________
> 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.





More information about the Mne_analysis mailing list