On 2 Dec 2010, at 06:23, MP wrote:
> Thanks Laurrence for a wonder tutorial, and thanks Vladimir for pointing to it. It works great for the most part.
I'm glad it is of some help.
> I say that because I am running into two problems:
> 1. I have version 4010 of spm8 but I don't have "view_spatial_confounds.m". Is there a more recent upgrade that should have this script?
This should be in the subdirectory spatconf_code, which should be added to the matlab path at the top of the walkthrough. It's a little script I wrote that uses old fieldtrip functionality to plot the scalp topography of each of the principle components, separately for each sensor type (gradiometers, magnetometers, eeg). The only trouble is that this is quite specifically set up for neuromag data at the moment - so if you wanted to adapt it for a different system, you'd have to adapt this script somewhat - perhaps based on the spm_eeg_plot_interactive script in the M/EEG toolbox?
Generally we've found that the first principle component almost always contains a blink topography (based on its spatial distribution and the component's correlation with the EOG timecourse) so you might just be able to use the first principle component for most subjects.
> 2. For some of the subject data, the 'remove_eyeblink_topography_walkthrough.m' script gives me the following error:
> ??? Index exceeds matrix dimensions.
> Error in ==> spm_eeg_spatial_confounds at 166
> sconf.coeff(sel1, :) = U(sel2, 1:S.ncomp);
> Error in ==> remove_eyeblink_topography_walkthrough at 87
> D = spm_eeg_spatial_confounds(S);
I'm not quite sure what the cause is here - perhaps the line above in which sel1 and sel2 are defined is going astray? Are there different numbers of badchannels in the two datasets perhaps? Hopefully you would be able to work this out looking at the size of the different matrices that are produced on these two lines.
Laurence Hunt, DPhil Student
Centre for Functional MRI of the Brain (FMRIB),
University of Oxford
[log in to unmask]