CBU-specific SPM5 parameters for MEG/EEG

Some further details for CBU MEG/EEG data...

Extracting data values from SPM5

   D = spm_eeg_ldata('yourfile')

   d = D.data(1,2,3)

   twin = [100 200];                 % Time window between 100ms and 200ms post-stimulus;
   swin = round(twin*D.Radc/1000);   % Convert from ms to samples (D.Radc = sampling rate)
   swin = swin + D.events.start + 1; % Adjust for any prestimulus baseline (D.events.start)
   d = mean(D.data(:,swin(1):swin(2),:),2);   % Average across 2nd dimension, ie samples

Note that the first three lines of the above can be reduced to

   swin = meg_t2s([100 200],D);

by using one of the common "meg_misc" functions that we have added (see http://imaging.mrc-cbu.cam.ac.uk/meg/MeegCodeCbuSvn). Conversely, meg_s2t(swin,D) will convert back from samples to peristimulus time. Finally note that the Matlab function repanova.m written by RikHenson (http://www.mrc-cbu.cam.ac.uk/people/rik.henson/personal/analysis.html) can do any NxMxOXP... repeated-measures ANOVA like that mentioned above in Matlab (using Greenhouse-Geisser correction).

Note: while you can happily move *.mat and *.dat files around, eg move both to a different directory, you should not move them into different directories from one another, or rename the filenames themselves (unless you also update the fields D.fname and D.fnamedat in D correspondingly (and know what you are doing), and then resave). Otherwise the memory-mapping will fail with a Matlab crash.

A note on downsampling

MEG/EEG montages (layout or CTF files)

For details about the old vs new caps, including the closest "standard" electrode sites, see http://imaging.mrc-cbu.cam.ac.uk/meg/EEGChannelNames

Concurrent EEG recording + digitisation

The CBU MEG changed its policy around May 2009 (contact Oleg Korzyukov for more details) on how EEG channels are recorded and digitised when more than 60 electrodes (eg the 70 channel montage).

For details about the old vs new caps, including the closest "standard" electrode sites, see http://imaging.mrc-cbu.cam.ac.uk/meg/EEGChannelNames

Previously, all EEG channels were "activated" in the Neuromag acquisition setup (and so saved into the FIF file), even though channels 61-64 were actually hardwired for EOG and/or ECG. Therefore, when digitising the electrode positions, when the operators came to electrode 61, they had to digitise, for example, the two VEOG and HEOG channels (or digitise random points), before returning to the 61st true EEG channel as the 65th digitisation point.

Now however, the operators should correctly indicate in the Neuromag setup that channels 61 and 62 are HEOG and VEOG respectively, channel 63 is either ECG or absent (ie not activated) and channel 64 is absent. So when they come to digitisation, the Neuromag software no longer asks them to digitise these special channels, and they can digitise contiguously the true EEG channels.

To tell spm_eeg_rdata_FIF.m (the function that reads the FIF files into SPM format) whether you used the old or new method, you need to set the flag S.dig_method = 1 (for new method) or S.dig_method = 0 for old method.