[Mne_analysis] Event file old vs. new format

Linda Moya lhmoya at cmu.edu
Wed Sep 28 23:53:08 EDT 2011
Search archives:

Hello Alex,

Thank you for your very quick response. I think my question can be
answered by looking at the code for mne_process_raw (which I gather is
written in C, since I see no associated Matlab code, and it is an
executable).

The mne_process_raw program while executing at some point puts out:
...
Data skip of 18000 samples in the beginning
...
Event file is in the old format. Taking into account offset of 18000 samples
Read 118 events from valid_lh_target_run1_inp.eve
...

where valid_lh_target_run1_inp.eve is one of the event files I created
(for the valid condition, left hemfield targets for the first run). So
yes, I do think I mean the raw.first_samp field.

The reason I want to know the exact answer to this question, is that I
both use mne_process_raw to average the MEG time-series data, AND I use
fiff_read_setup_read_raw and fiff_read_raw_segment to average the file
myself for the following reason:
1) I re-reference the EEG data and then average it myself
2) I conduct a wavelet analysis on each trial before averaging for both
the MEG and EEG data.

I want to be sure that I am averaging it the same way (taking the initial
skip into account) as mne_process_raw after I do these manipulations of
the data for EEG, and for the wavelet analysis for both MEG and EEG, when
I am doing the averaging myself. In all cases I use the same event files.

I have read the MNE manual for fiff_read_setup_read_raw and
fiff_read_raw_segment, but the info on these routines is cryptic and it is
unfortunately not clear to me exactly how to use these routines to
correctly account for the initial skip, in the same way as mne_browse_raw.
Again in both cases I use the same event files.

The answer to my question could probably be answered by looking at the C
code for mne_process_raw around the place where it outputs the statement
"Event file is in the old format. Taking into account offset ..." etc.
Somewhere in the vicinity would exist the code to take that into account.

If you don't want to read the code, would it be possible to send the C
code text file to me? I don't plan to do anything with it other than read
the code in the vicinity of that statement.

Please let me know how I can make my question more clear so that I can get
the answer that I need.

Thank you for your consideration.

Best Regards,

-- Linda Moya



On Wed, September 28, 2011 9:30 pm, Alexandre Gramfort wrote:
| Hello Linda,
|
| I've never had to deal with old event file format but I'll try to answer.
|
|> In using mne_process_raw to epoch and average across trials in a given
|> condition (output is a *.fif file for the given condition), the log output
|> states that my event file is in the the old format. So it says it is
|> taking into account the offset.
|
| by offset do you mean the raw.first_samp field?
|
|> First, how exactly does it take into account the offset? In other words
|> how does the sample start time ultimately used to index the raw fif file
|> differ from the sample start time specified in the event file?
|
| I guess in one case the first time point is 0 in the other it
corresponds to
| offset.
|
|> Second, how does the new format differ from the old format? The format I
|> am using is:
|> <sample>  <time>  <from> <to>
|>
|> where <sample> is a number, <time> turns out to always be sample/1000
|> <from> is 0 and <to> is the specific condition number.
|
| no clue.
|
|> I am creating my own event files, so that I can cut the data many
|> different ways not necessarily specified by the triggers in the raw fif
|> file, and want to make sure that the format is accurate.
|
| I would try with a simple dataset to see if the approach produces a
| nice evoked response.
|
| sorry for not being able to help more
|
| Alex
|
|
| 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.
|
|
|


-- 
Linda Moya, Ph.D.
Electrical and Computer Engineering
Center for the Neural Basis of Cognition
Carnegie Mellon University
http://www.andrew.cmu.edu/user/lhmoya/





More information about the Mne_analysis mailing list