ctf_read_meg4

ctf_read_meg4 - function [ctf] =

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
function [ctf] = ctf_read_meg4(folder,ctf,CHAN,TIME,TRIALS,COEFS); % ctf_read_meg4 - read meg4 format data from a CTF .ds folder % % [ctf] = ctf_read_meg4([folder],[ctf],[CHAN],[TIME],[TRIALS]); % % This function reads all or select portions of the raw meg data matrix in % the .meg4 file within any .ds folder. It may call the ctf_read_res4 % function to identify the relevant parameters of the dataset. % % The .meg4 file contains the raw numbers sampled from the electronics. In % this function, these raw analog2digial numbers are multiplied by the % appropriate sensor gains, which are read from the .res4 file. However, % note that the data values returned can be very small (10^-12 Tesla), % which may be a problem for some computations. % % INPUTS % % If you do not wish to specify an input option, use [], but keep the order % of the input options as above. Only specify as many input options as % required. With no input options, the function will prompt for a folder, % call ctf_read_res4 and then read all of the data matrix. % % folder - the directory of the .ds data set to read. By % default, a gui prompts for the folder. % % ctf - a struct with setup, sensor and data fields. If the setup field is % missing or empty, this function calls ctf_read_res4. % % CHAN - a integer array of channel numbers to read. % eg, [30:35] reads channels 30 to 35. Also % If CHAN = 'eeg', read only eeg channels/sensorIndices % If CHAN = 'meg', read only meg channels/sensorIndices % If CHAN = 'ref', read only reference channels/sensorIndices % If CHAN = 'other', read only the other channels/sensorIndices % If CHAN = 'megeeg', read meg and eeg channels/sensorIndices % If CHAN = 'eegmeg', read eeg and meg channels/sensorIndices % % TIME - eg. [0 5] - the desired time interval to read, in sec. % If TIME = 'all', all data is read (the default) % % TRIALS - If TRIALS = n, the nth trial will be read. % If TRIALS = [3,5,8], reads trials 3,5, and 8 such that % ctf.data(:,:,1) = data for trial 3, % ctf.data(:,:,2) = data for trial 5, and % ctf.data(:,:,3) = data for trial 8. % If TRIALS = [3:7], reads trials 3 to 7 % If TRIALS = 'all', reads all data (the default) % % OUTPUTS % % ctf.data - matrix of all the data read, such that data(x,y,z) % contains sample point x, channel y and trial z. The % input options, CHAN, TIME, TRIALS can be used to % select subsections of the .meg4 data matrix % % ctf.sensor - has the following fields: % .names - cell array of sensor names % .location - array of sensor locations for plotting
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
% .orientation - array of sensor orientations % % ctf.res4 - has the following fields % .file - the .res4 file path and file name % .header - the format of the .res4 file % % ctf.meg4 - has the following fields % .file - the .meg4 file path and file name % .header - the format of the .meg4 file % % % <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> % % < > % % < DISCLAIMER: > % % < > % % < THIS PROGRAM IS INTENDED FOR RESEARCH PURPOSES ONLY. > % % < THIS PROGRAM IS IN NO WAY INTENDED FOR CLINICAL OR
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/07/2010 for the course ENG 42336 taught by Professor Thomasholland during the Spring '10 term at UC Davis.

Page1 / 8

ctf_read_meg4 - function [ctf] =

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online