virtual electrodes in fieldtrip

Jan Mathijs Schoffelen jan.schoffelen at FCDONDERS.RU.NL
Thu Dec 13 12:10:58 CET 2007


Dear Christine,

I forward your question to the rest of the mailing-list, so that other people can participate in the discussion as well.

> I saw in the fieldtrip-mailinglist that you had been working on
> virtualelectrodes; since I'm trying to do this analysis with
> fieldtrip, I would be
> glad if you could give me some advice on how to implement the
> analysis best.
> It seemed that you had found a good solution using SAM weights
> files created
> in CTF and reading them in into fieldtrip. Is there a way to create
> theweights directly in fieldtrip?

Yes, it is possible to do it in fieldtrip. If you are planning to do a 'SAM'-like analysis, the lcvm-beamformer is the thing you should use. The weights are outputted in the output of sourceanalysis, when you specify cfg.keepfilter = 'yes';

> I'm using the dics beamforming
> method right
> now but I think you proposed to use lcmv instead and use timelock
> data as
> input? Is there a routine for this type of analysis? Please let me
> know if
> you any idea on this!

It completely depends on what you exactly want to do, whether you should use DICS, or the time-domain lcmv-beamformer (DICS is just the frequency domain analogue of the traditional 'lcmv'-beamformer).
If it is your purpose to create TFRs on virtual channels (such as what is facilitated by the CTF-software in the context of a SAM-analysis) you should use 'lcmv' as a method in your sourceanalysis. There is no ready-made script which concatenates all the analysis steps, but I would approach it as follows:

Perform timelockanalysis on your data, because you have to compute the sensor-level covariance for a particular time-window of interest. This might also involve some bandpass-filtering of the data.
Then perform sourceanalysis (using the result of timelockanalysis), and specify the locations of your virtual channel(s) in cfg.grid.pos, and cfg.keepfilter='yes'.
The output of sourceanalysis will contain the filter weights in source.avg.filter, and the virtual channel data in source.avg.mom. However, this will be the average across all trials. If you would want to effectively compute the single-trial virtual channel data, you can easily recover this by pre-multiplying the single trial representations, as present in your timelocked data-structure: source.avg.filter{x}*squeeze(timelock.trial(y,:,:))

Good luck,

Jan-Mathijs

----------------------------------
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 http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.



More information about the fieldtrip mailing list