[FieldTrip] Fwd: Beamformer confusion

Tyler Grummett tyler.grummett at flinders.edu.au
Mon Jun 30 04:17:53 CEST 2014

Hello all,

Thank you for the quick replies, I greatly appreciate it.

I recalculated vol using the following code:

mri = ft_read_mri( 'Subject01.mri');
mri = ft_volumenormalise( [], mri);
mri = ft_volumereslice([], mri);
cfg = [];
cfg.write      = 'no';
cfg.coordsys   = 'mni';
segmentedmri = ft_volumesegment(cfg, mri);

cfg = [];
cfg.method = 'openmeeg';
vol = ft_prepare_headmodel(cfg, segmentedmri);

However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg).

!!!!!!!!!!! WARNING !!!!!!!!!!! 
Mesh is self intersecting ! 
Mesh Info :  
	# points : 3000 
	# triangles : 5996 
	Euler characteristic : 2 
	Min Area : 2.44949 
	Max Area : 58.4166 
Self intersection for mesh number 0 
C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin  
om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 
| ------ om_minverser 
| ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin 
| ./tp844032d5_1439_4794_b28e_c554e265bca8.bin 
| ----------------------- 
Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... 
Error using fread
Invalid file identifier.  Use fopen to generate a valid file identifier.
the call to "ft_prepare_headmodel" took 21 seconds

I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better.

I just tried to prepare the leadfield and got the following error:


No system matrix is present, calling the Nemo Lab pipeline...
om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 
Not enough arguments  
Please try "om_assemble -h" or "om_assemble --help "  
Writing sensor coordinates...
Error using fprintf
Invalid file identifier.  Use fopen to generate a valid file identifier.

Error in ft_leadfield_openmeeg (line 113)
            fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:));

Error in ft_compute_leadfield (line 442)
        lf = ft_leadfield_openmeeg(pos, vol, sens);

Error in ft_prepare_leadfield (line 187)
      lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank',
      cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam);

So it looks like I need to sort this issue out before I can proceed.

Thank you for all your help again!



Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66124

From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of Matt Craddock <matt.craddock at uni-leipzig.de>
Sent: Friday, 27 June 2014 8:21 PM
To: fieldtrip at science.ru.nl
Subject: Re: [FieldTrip] Fwd:  Beamformer confusion

Hi Tyler,

 From the plot, it looks like the volume conductor is singlesphere but
the sourcemodel is derived from the standard boundary element model, and
the electrodes are then not aligned to either of them. First up, I'd
suggest using the standard BEM as your volume conductor and see if that
helps. The electrode positions may be the next thing to fix - they might
re-align automatically properly, in which case you won't need to do
anything. If they have standard 1020/1005 co-ordinates, they should be
aligned fine already, but if not you could try replacing the positions
in your dataset with the standard positions (i.e. if you have an Fp1,
take the Fp1 co-ordinates from the templates in the
fieldtrip\template\electrode directory).


On 27/06/2014 06:41, Eelke Spaak wrote:
> PS: Forwarding your figure to the list.
> ---------- Forwarded message ----------
> From: Eelke Spaak <eelke.spaak at donders.ru.nl>
> Date: 27 June 2014 07:40
> Subject: Re: [FieldTrip] Beamformer confusion
> To: Email discussion list for the FieldTrip project <fieldtrip at donders.ru.nl>
> Hi Tyler,
> First, please send your messages to the list, so that others may
> benefit (now or in the future through the archives).
> Then, regarding your plot, indeed I think there might be something
> wrong (though I am not sure). You are looking for a proper alignment
> between the sensors (I have colored them red to be able to better
> see), the source model (grid points for beamforming) and the volume
> conductor model (translucent mesh; sphere in your case). I have never
> used a single sphere model myself, so I cannot really comment on
> whether the sphere aligns properly. However, I would suspect not,
> since there are grid points located outside the sphere. Also, the
> sensors might not be properly located, some are intersecting the body
> of grid points.
> But I do seem to recall that sensors are automatically projected to
> the volume conductor surface in the case of EEG. Maybe someone who has
> EEG source modelling experience can comment on this (and your figure)?
> I usually only work with MEG, so I don't have the same intuition for
> your kind of plot as with an analogous plot for MEG.
> The following tutorial might be very helpful for you, by the way:
> http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg
> Best,
> Eelke
> On 27 June 2014 03:06, Tyler Grummett <tyler.grummett at flinders.edu.au> wrote:
>> Hello Eelke,
>> Thank you for replying to my email.
>> I have attached an image with the requested sourcemodel positions and sensor positions.
>> I dont really know how to interpret the figures to be honest.
>> I have attached a .fig figure so that you can have a play with it.
>> Tyler
>> *************************
>> Tyler Grummett ( BBSc, BSc(Hons I))
>> PhD Candidate
>> Brain Signals Laboratory
>> Flinders University
>> Rm 5A301
>> Ext 66124
>> ________________________________________
>> From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of Eelke Spaak <eelke.spaak at donders.ru.nl>
>> Sent: Thursday, 26 June 2014 11:17 PM
>> To: FieldTrip discussion list
>> Subject: Re: [FieldTrip] Beamformer confusion
>> Hi Tyler,
>> You write that you end up with the same result "whatever data you
>> process", so I suspect the raw EEG/MEG data is not to blame.
>> Rather, I suspect something is wrong with your leadfield or one of its
>> ingredients: the volume conductor model, source model, or
>> electrode/gradiometer definitions. It's probably a good idea to check
>> whether these three ingredients all line up. Could you plot them in
>> one set of axes, as described at the end of this section:
>> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel
>> ?
>> Best,
>> Eelke
>> On 26 June 2014 10:00, Tyler Grummett <tyler.grummett at flinders.edu.au> wrote:
>>> Hello Fieldtrip,
>>> I have been using the LCMV beamformer in fieldtrip for some time now, so I
>>> have experience with it.
>>> I am facing an issue where whatever data I process I get an image identical
>>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks,
>>> tactile tasks etc.
>>> Also, whatever I do with the data, the same issue occurs (filtering etc).
>>> Attachment 'original_data.png' shows the data before going into the
>>> beamformer, and 'virtual_data.png' shows the data after it has run through
>>> beamformer.
>>> We have tried filtering in every possible combination ie lowpass = 40/30/20,
>>> highpass = 1/10/20, we even did a highpass of 100 and it
>>> was still identical.
>>> We dont think this is a fault of the beamformer, but we cant work out how to
>>> get rid of the issue. It is overpowering the other data.
>>> We have also had a look at some spectra of the brain region with the high
>>> power and a brain region that doesnt have the high power and it appears
>>> as though there is higher power over all frequencies.
>>> Before asking:
>>> -There isnt any muscle, the data was recorded from a paralysed person.
>>> -We have tried it on CAR'd data and data that hasnt been CAR'd
>>> We are all out of ideas.
>>> Kind regards,
>>> Tyler

Dr. Matt Craddock
fieldtrip mailing list
fieldtrip at donders.ru.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensor positions_sourcemodel_new.fig
Type: application/octet-stream
Size: 47769 bytes
Desc: sensor positions_sourcemodel_new.fig
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140630/2db0e228/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensor positions_sourcemodel_new.png
Type: image/png
Size: 6055 bytes
Desc: sensor positions_sourcemodel_new.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140630/2db0e228/attachment-0002.png>

More information about the fieldtrip mailing list