[Mne_analysis] Combine epoched ave fif files?

Krieger, Donald N. kriegerd at upmc.edu
Thu Nov 7 18:00:51 EST 2013
Search archives:

Hi Linda,

mne_process_raw can handle this directly.
It can accept specification of multiple input raw files, an event file for each, and even an average file for each if needed.  I have used it for this.
You can find the documentation in the version 2.7.3.pdf manual on page 48 in the section 4.2.3 Batch-mode options and in the preceding section for the options which are common with mne_browse_raw.  Here are the key switches:

--raw <name>
Specifies the raw data file to be opened. This option is required for batch version, mne_process_raw. If a raw data file is not specified for the interactive version, mne_browse_raw, and empty interactive browser will open.  
--events <name>
Specifies the name of a fif or text format event file (see Section 4.10.5) to be associated with a raw data file to be processed. If multiple raw data files are specified, the number of --eventsoptions can be smaller or equal to the number of raw data files. If it is equal, the event filenames will be associated with the raw data files in the order given. If it is smaller, the remaining raw data files for which an event file is not specified will not have an event file associated with them. The event file format is recognized from the file name: if it ends with .fif, the file is assumed to be in fif format, otherwise a text file is expected.
--ave <name>
Specifies the name of an off-line averaging description file. For details of the format of this file, please consult Section 4.13. If multiple raw data files are specified, the number of --ave options can be smaller or equal to the number of raw data files. If it is equal, the averaging description file names will be associated with the raw data files in the order given. If it is smaller, the last description file will be used for the remaining raw data files.
--gave <name>
If multiple raw data files are specified as input and averaging is requested, the grand average over all data files will be saved to <name>.

You can double check its grand averaging operation including your setup by handing it 2 or more copies of the same raw data file and events file.  In that case, the grand average will be the same as the average of the one set of raw trials.

Don

Don Krieger, Ph.D.
Department of Neurological Surgery
University of Pittsburgh
(412)648-9654 Office
(412)521-4431 Cell/Text

________________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu [mne_analysis-bounces at nmr.mgh.harvard.edu] on behalf of Linda Moya [lhmoya at cmu.edu]
Sent: Thursday, November 07, 2013 4:57 PM
To: mne_analysis at nmr.mgh.harvard.edu
Subject: [Mne_analysis] Combine epoched ave fif files?

Dear MNE community,

I've collected data for a given subject across 6 runs, which after
pre-processing, result in 6 separate *.fif files. I can extract the events
of interest, epoched and averaged separate conditions using
mne_process_raw and the offline averaging mechanism. This results in 6
separate epoched data .fif files. I can view these atop of each other in
mne_browse_raw.

A) What I really want to do is to epoch and average the 6 input *.fif
files into ONE output *.fif file for each condition. So that instead of
say 6 epoched fif files with N=20 averages for a condition, I have one
epoched fif file with N=6*20 averages for that condition.

B) Alternatively I can read the 6 averaged epoch files into matlab, and
combine them there, so that I have this information in one structure in
matlab. But then I would like to convert that structure back into a fif
file that contains the average of all trials for a given condition for a
given subject.

Can I do either A) or B) above. Thank you very much for any help you can
provide.

Best Regards,

Linda Moya




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

_______________________________________________
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