Minimum norm estimates...

Suresh Muthukumaraswamy sdmuthu at CARDIFF.AC.UK
Tue May 13 16:57:12 CEST 2008

 I am trying to use sourceanalysis to create minimum norm estimates. The
software runs fine but the resulting images I get back are completely
dominated by the voxels at the edges of my grid near the sensors. So I am
wondering If I have either made a mistake somewhere or if there are some
parameters that can be tweaked to improve the reconstructions?
My data is 275Ch CTF data and for the purposes of trying out fieldtrip's MNE
I am just using a simple VEP dataset, with the headmodel created by
localSpheres. There is a simple field pattern in the data which I was hoping
to reconstruct.
  I have used the DICS (power) part of sourceanalysis before and get images
that look pretty similar to SAM images made outside of fieldtrip, so I think
my MRI/registration stuff in fieldtrip is ok.


Here is my code

Dataset = '/gpfs/home/sapsm7/Bristol/Day/DC/DC_VSM-VEF_20080409_01.ds';
hdmFile = [Dataset '/default.hdm'] ;%assumes localSpheres has been run
mrifile = '/gpfs/home/sapsm7/Bristol/Day/DC/DC080409.mri';
shapefilename = '/gpfs/home/sapsm7/Bristol/Day/DC/DC080409.shape';
OutImage = '/gpfs/home/sapsm7/Bristol/Day/DC/testminnorm';

cfg = [];
cfg.trialdef.prestim = 2; %How much of the prestim to load in (s)
cfg.trialdef.poststim = 2;
cfg.trialdef.eventtype = 'High';
cfg.dataset = Dataset = {'MEG'}; %Right V5 and Left V5 sensitive
cfg.bpfilter = [0.5 30];
cfg.lpfilter = 30
cfg.blc = 'yes';
cfg.blcwindow = [-0.2 0];
cfg = definetrial(cfg);
Data = preprocessing(cfg);

save DC_RawData

load DC_RawData

cfg = [];
cfg.latency = [-0.2 1];
DCERF = timelockanalysis(cfg, Data);

cfg = [];
cfg.baseline = [-0.2 0];
DCERF = timelockbaseline(cfg, DCERF);

%At this point the waveform plots and topos in fieldtrip look very nice

[XMax, XMin, YMax, YMin, ZMax, ZMin] = shapefilemaxmin (shapefilename) ;
%Extract the source reconstruction grid from the shapefile
Resolution = 1;
cfg = [];
cfg.method = 'mne';
cfg.hdmfile = hdmFile;
cfg.grid.xgrid = XMin : Resolution : XMax;
cfg.grid.ygrid = YMin : Resolution : YMax;
cfg.grid.zgrid = ZMin : Resolution : ZMax;
[sourcePre] = sourceanalysis(cfg, DCERF);

sourcePre.avg.coll = mean(sourcePre.avg.pow(:,169:183), 2); %Grab a time
window and put into a variable for sourceint

cfg = [];
cfg.downsample = 2;
sourceInt = sourceinterpolate(cfg, sourcePre, mrifile);

sourceInt.avg.coll = sourceInt.avg.coll * 1e10 %upscale to make it easy to
visualise in mri3dX

%Write the analyse files out
cfg = [];
cfg.parameter     = 'coll';
cfg.filename      = OutImage;
cfg.filetype      = 'spm';
cfg.coordinates   = [];
cfg.datatype = 'float';
cfg.coordinates = 'ctf';
volumewrite(cfg, sourceInt);

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also and

More information about the fieldtrip mailing list