Skip to main content
  • Description
  • Conversion function for Elan EP files (.p) obtained from CTF MEG data to SPM.

  • Usage
  • D = epmeg2spm(OutFileSPM, PathSPM, CTFres4, varargin)
    with :

    • OutFileSPM : output SPM filename (with path, no extension .mat).
    • PathSPM : path to output SPM files.
    • CTFres4 : CTF res4 resource file (with path) corresponding to Elan files.
    • option varargin :
      PFileList : Elan .p file(s) (from CTF MEG).

    output :

    • D : SPM structure.


  • Fields of parameter file and example

  • Examples
    • Read /data/Elan/suj001.cond1.p and /data/Elan/suj001.cond2.p files and convert to a single SPM structure with 2 conditions

      D =epmeg2spm('suj001', '/data/SPM/work/', '/data/CTF/suj001.ds/suj001.res4', '/data/Elan/suj001.cond1.p', '/data/Elan/suj001.cond2.p');

    • Open a window for Elan .p file(s) selection
      D =epmeg2spm('suj001', '/data/SPM/work/', '/data/CTF/suj001.ds/suj001.res4');
    • Read /data/Elan/suj001.cond1.p and /data/Elan/suj001.cond2.p files and convert to a single SPM structure with 2 conditions (use a vector of names)
      filelist{1}='/data/Elan/suj001.cond1.p';
      filelist{2}='/data/Elan/suj001.cond2.p';
      D =epmeg2spm('suj001', '/data/SPM/work/', '/data/CTF/suj001.ds/suj001.res4', file_list);


  • Comments
    • This function uses SPM. You need to change the path according to your SPM installation (see lines 37 to 41 of epmeg2spm.m).
    • Fiducial coordinates are read in CTF res4 file.


  • Current version
  • 1.04 10-08-2010

  • History
    • 1.00 26-04-2010 (PEA) : first version.
    • 1.01 22-07-2010 (PEA) : correction for multiple input files.
    • 1.02 22-07-2010 (PEA) : bug fixe for multiple input files.
    • 1.03 10-08-2010 (PEA) : change in variable names.
    • 1.04 10-08-2010 (PEA) : accept PFileList as cell array.


  • Files
  • $ELANPATH/misc/matlab/epmeg2spm.m
    $ELANPATH/misc/matlab/ep2mat.m

  • See also
  • epeeg2spm