Diff for "ReadingDataInMatlab" - Meg Wiki
location: Diff for "ReadingDataInMatlab"
Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2007-03-09 10:29:48
Size: 1850
Comment:
Revision 6 as of 2007-06-06 10:36:06
Size: 2012
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
This can be done using the !FiffAccess toolbox. The toolbox and the manual can be downloaded from here: http://www.kolumbus.fi/~w132276/programs/meg-pd.
Line 3: Line 4:
This is done using the Fiff Access toolbox. The toolbox and the manual can be downloaded from here: http://www.kolumbus.fi/~w132276/programs/meg-pd.

The commands are already installed on the CBU network on the path: /neuro/mce/meg_1.2/
The functions are installed on the CBU network on the path: `/neuro/mce/meg_1.2/`
Line 9: Line 8:
Some particularly useful commands include: [[BR]]Some particularly useful commands include: [[BR]] [[BR]]• To get information about all the channels in a fif-file: `[NAME, TYPE, NUMBER, COILTYPE, TRANSFORM] = CHANNAMES (FILENAME)`
Line 11: Line 10:
• To get information about all the channels in a fif-file: [[BR]]• To load evoked responses: [[BR]]`[NSETS, COMMENTS] = LOADFIF (FILENAME, ‘sets’)` `[[BR]][DATA, SAMPFREQ, T0] = LOADFIF (FILENAME, SET)`
Line 13: Line 12:
[NAME, TYPE, NUMBER, COILTYPE, TRANSFORM ]= CHANNAMES (FILENAME) [[BR]]• To load continuous data from specified channels: `[DATA, SAMPFREQ, T0] = RAWCHANNELS (FILENAME, CHANNELNAMES, TIMERANGE)`
Line 15: Line 14:
• To load an evoked response: [[BR]]For more information on any command, type: `help <command>` at the Matlab prompt.[[BR]]
Line 17: Line 16:
[NSETS, COMMENTS ]= LOADFIF (FILENAME, ‘sets’) [[BR]]To load raw data, there is one extra initial step required. The !FiffAccess toolbox does not (yet) understand data in the 32-bit integer format that our MEG machine produces, but only supports 16-bit integers and 32-bit floating point numbers. Fortunately, you can convert your data into floating point format using the !MaxFilter program (you do not need to actually filter the data if you don't want to). The command:
Line 19: Line 18:
[DATA, SAMPFREQ, T0 ]= LOADFIF (FILENAME, SET)  . `/neuro/bin/util/maxfilter -f infile.fif -nosss -format float`
should do it (and if you leave out the -nosss it of course filters the data as well). You can achieve the same result using the !MaxFilter GUI.
Line 21: Line 21:
• To load continuous data from specified channels: [[BR]]Some examples of scripts which use these commands to save evoked responses and continuous data to .mat files, and then plot summary graphs of the evoked time-courses and signal variance per channel can be found [attachment:ExampleScriptsUsingFiffAccess.zip here].
Line 23: Line 23:
[DATA, SAMPFREQ, T0 ]= RAWCHANNELS (FILENAME, CHANNELNAMES, TIMERANGE)

For more information on any command, type: help <command> at the Matlab prompt.

To load raw data, there is one extra initial step required. The Fiff Access toolbox does not (yet) understand data in the 32-bit integer format that our MEG machine produces, but only supports 16-bit integers and 32-bit floating point numbers. Fortunately, you can convert your data into floating point format using the maxfilter program (you do not need to actually filter the data if you don't want to). The command:

    /neuro/bin/util/maxfilter -f infile.fif -nosss -format float

should do it (and if you leave out the -nosss it of course filters the data as well). You can achieve the same result using the maxfilter GUI.

Some examples of scripts which use these commands to save evoked responses and continuous channel data to .mat files, and then plot summary graphs of the evoked time-courses and signal variance per channel can be found here.
-- CbuBaseWiki:DannyMitchell [[DateTime(2007-03-09T11:22:36Z)]]

Opening fif-files in Matlab

This can be done using the FiffAccess toolbox. The toolbox and the manual can be downloaded from here: http://www.kolumbus.fi/~w132276/programs/meg-pd.

The functions are installed on the CBU network on the path: /neuro/mce/meg_1.2/

Since l21 (a Red Hat Enterprise 4 machine) is the only machine that currently contains the software, you will probably need to ssh to l21 before launching your Matlab session.

BRSome particularly useful commands include: BR BR• To get information about all the channels in a fif-file: [NAME, TYPE, NUMBER, COILTYPE, TRANSFORM] = CHANNAMES (FILENAME)

BR• To load evoked responses: BR[NSETS, COMMENTS] = LOADFIF (FILENAME, ‘sets’) [[BR]][DATA, SAMPFREQ, T0] = LOADFIF (FILENAME, SET)

BR• To load continuous data from specified channels: [DATA, SAMPFREQ, T0] = RAWCHANNELS (FILENAME, CHANNELNAMES, TIMERANGE)

BRFor more information on any command, type: help <command> at the Matlab prompt.BR

BRTo load raw data, there is one extra initial step required. The FiffAccess toolbox does not (yet) understand data in the 32-bit integer format that our MEG machine produces, but only supports 16-bit integers and 32-bit floating point numbers. Fortunately, you can convert your data into floating point format using the MaxFilter program (you do not need to actually filter the data if you don't want to). The command:

  • /neuro/bin/util/maxfilter -f infile.fif -nosss -format float

should do it (and if you leave out the -nosss it of course filters the data as well). You can achieve the same result using the MaxFilter GUI.

BRSome examples of scripts which use these commands to save evoked responses and continuous data to .mat files, and then plot summary graphs of the evoked time-courses and signal variance per channel can be found [attachment:ExampleScriptsUsingFiffAccess.zip here].

-- DannyMitchell DateTime(2007-03-09T11:22:36Z)

CbuMeg: ReadingDataInMatlab (last edited 2013-03-08 10:02:51 by localhost)