[Mne_analysis] missing event when importing .edf data

Alan leggitta3 at gmail.com
Fri Feb 14 18:03:01 EST 2014
Search archives:

Here is the code I use to generate the event textfiles

# Variables
# ------------
# bdf_filename - raw data file
# fif_filename - desired .fif output file
# hpts_filename - textfile in .hpts format specifying electrode locations
# rename_filename - textfile which specifies eog channels and miscellaneous
channels
# raw_filename - desired _raw.fif output file (pre-processed)
# event_filename - desired event text file name

# Convert bdf file to edf file, while importing channel locations
mne_edf2fiff --edf $bdf_filename --fif $fif_filename --hpts $hpts_filename

# Use rename to set EOG and MISC channels
mne_rename_channels --fif $fif_filename --alias $rename_filename

# Filter and downsample the data, this will also extract events
mne_process_raw --raw $fif_filename --decim 8 --filtersize 4192 --lowpass
30 --highpass 1 --eoglowpass 30 --eoghighpass 1 --save $raw_filename
--projoff --digtrig Status --digtrigmask 0xff --eventsout event_filename


On Fri, Feb 14, 2014 at 2:46 PM, dgw <dgwakeman at gmail.com> wrote:

> Can you provide what you are typing into the command line?
>
> On Feb 14, 2014, at 5:20 PM, Alan wrote:
>
> > Hi Teon,
> >
> > I haven't really been using mne.find_events on RawEDF objects, since
> I've been using the command line tools and exporting text files of the
> events. I just ran find_events on a sample RawEDF object and compared the
> output to one of the text files. Below is a table, giving the number of
> each event types across both methods. In this experiment, the events I'm
> interested in are 4, 8, and 128, so both methods produce the same
> 'relevant' output, but running find_events on the RawEDF produced more
> events. I'll have to double check to see which event ids are actually
> programmed into biosemi.
> >
> > ID        find_events    command line
> >     0:    0                    1
> >     1:    13                  13
> >     2:    22                  22
> >     3:    3                    0
> >     4:    556                556
> >     6:    9                    0
> >     7:    107                0
> >     8:    58                  58
> >   12:    530                23
> >   14:    213                0
> >   15:    51                  0
> > 128:    100                100
> > 129:    7                    0
> > Total:    1669            773
> >
> >
> >
> >
> > On Fri, Feb 14, 2014 at 12:15 PM, Teon Brooks <teon at nyu.edu> wrote:
> > Hi Alan,
> >
> > Are you currently experiencing any of the masking problems with
> mne-python? If so, I could take a look at it and see if that could be
> resolved.
> >
> >
> >
> > Best,
> > --
> > teon
> >
> >
> >
> > On Fri, Feb 14, 2014 at 1:49 PM, Alan <leggitta3 at gmail.com> wrote:
> > Hi Alexandra,
> >
> > I've also run into mis-labelled events in the past, and I've found that
> some errors could be resolved by using a "mask" in the mne command line
> tools. Do you have access to the command line tools? If so I would read
> this section of the manual, on importing from other systems. It sounds like
> you might need to apply a mask of 255, (0xff).
> >
> > Hope this helps.
> >
> > -Alan
> >
> >
> > On Thu, Feb 13, 2014 at 12:35 PM, Alexandre Gramfort <
> alexandre.gramfort at telecom-paristech.fr> wrote:
> > hi Alexandra,
> >
> > I have no experience with what you're trying to do.
> >
> > When you say "epocked" you mean multiple trials ? evoked / averaged data?
> >
> > read_raw_edf is meant to read continuous raw data.
> >
> > Also you can have a look at the channel STI014 to see what can go wrong.
> >
> > You may want to paste the commands you typed to do what you want. It
> > might clarify things on my side.
> >
> > Best,
> > Alex
> >
> >
> >
> > On Thu, Feb 13, 2014 at 5:28 PM,  <acorneyllie at olfac.univ-lyon1.fr>
> wrote:
> > > Hi mne users!
> > >
> > > I'm trying to import epocked data from EEGlab (already preprocessed) in
> > > mne. I used the .edf conversion and the read_raw_edf function to
> transform
> > > .set and .fdt to fif format.
> > > The data import appears good to me (channels  and samples are all here
> and
> > > correct) and events are syncronised.
> > > However, the number of event readen from raw data is less than the real
> > > number.
> > > (using events = mne.find_events(raw, stim_channel='STI 014'))
> > >
> > > Moreover, the event id are '255' instead of 1,2,3 and 4 (the triggers
> > > values). I changed it manualy and then realized that all the event
> > > associated to trigger '1' are missing.
> > >
> > > I tried on EEGlab to re-import the .edf file to look if all of the
> > > triggers are well exported, and it seems to be good.
> > >
> > > So, what could be the source of this miss of event readen from raw
> data ?
> > > Is there a way to add the missing events properly ?
> > > And finaly, is there a simplier process to import epocked data from
> EEGlab ?
> > >
> > > Thanks for your help,
> > > Best.
> > > --
> > > Alexandra Corneyllie
> > > Equipe Cognition Auditive et Psychoacoustique
> > > CNRS UMR 5292 - INSERM U1028
> > > Centre de Recherche en Neurosciences de Lyon
> > > Fixe : + 33 04.37.28.74.90
> > > Mobile : + 33 06.32.55.78.62
> > > e-mail : acorneyllie at olfac.univ-lyon1.fr
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> >
> >
> > _______________________________________________
> > 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
> >
> >
> > 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140214/dffe8770/attachment.html 


More information about the Mne_analysis mailing list