[FieldTrip] Fwd: Source Analysis from EEG data

Cristiano Micheli michelic72 at gmail.com
Wed May 31 13:49:35 CEST 2017


Dear Kastouri,

My hunch is that either ft_prepare_headmodel or ft_prepare_leadfield fail
in generating a proper forward model for localization purposes.
I would check that ft_prepare_headmodel's vol structure contains sensible
data by plotting both the 'bnd' triangulated surface and the EEG electrodes
together (you should be able to find instructions on the wiki) in the same
image. Sometimes units (mm,cm) or coregistration (left/right swap) might
influence a good outcome.
Accordingly the grid.leadfield structure will not make sense because it
uses the incorrect outcome of the vol structure.

So if you manage to solve the 1st problem you'll kill two bird with a stone
Good luck!
Cris





On Wed, May 31, 2017 at 12:50 PM, Kasturi Barik <kash.kgp at gmail.com> wrote:

> *Dear all,
> **I am trying to perform source localization in the frequency domain *
>
> *from EEG data using 'DICS' . As I have no mri data of the participants, *
>
> *I am using **'Subject01.mri' to read the anatomical data with ft_read_mri. *
>
> *The **head model created with 'bemcp'.*
>
> *Code:*
>
> *%% **Read the anatomical data*
>
> *mri = ft_read_mri('Subject01.mri');*
>
> *%% **Segment the anatomical information & triangulate the surfaces*
>
> *load segmentedmri                                   % load from *ftp
> server
> <ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/headmodel_eeg/segmentedmri.mat>
>  (segmentedmri.mat).
> *load bnd*
>
> *%% **Create the headmodel*
>
>
>
>
>
>
>
>
>
> *cfg        = [];cfg.method = 'bemcp'; vol        =
> ft_prepare_headmodel(cfg, bnd);%% Position of the
> electrodesload('Face_sub.mat');                                   % data of
> participants' electrode positions electrodes = Face_sub.elec;%% Interactive
> alignmentcfg           = [];cfg.method    = 'interactive';cfg.elec      =
> electrodes;cfg.headshape = vol.bnd(3);                          %
> scalpelec_aligned  = ft_electroderealign(cfg);%% Compute leadfield:cfg
>             = [];cfg.elec            = elec_aligned;cfg.vol             =
> vol;cfg.channel         = {'EEG'};[grid] = ft_prepare_leadfield(cfg);%%
> Source Analysiscfg              = []; cfg.method       =
> 'dics';cfg.frequency    = 10; cfg.grid         = grid;cfg.vol          =
> vol;cfg.dics.projectnoise = 'yes';cfg.dics.lambda       = 0;sourceFace =
> ft_sourceanalysis(cfg, face_data);   % face_data is obtained from the
> FT_FREQANALYSIS %   [%%  time frequency analysis
>     ||    cfg = [];
>    ||     cfg.channel    = 'EEG';                                     ||
>  cfg.method     = 'mtmfft';                                   ||
>  cfg.output     = 'powandcsd';                              ||
>  cfg.tapsmofrq  = 4;                                           ||
>  cfg.foi        =  1:1:40;                                        ||
>  face_data = ft_freqanalysis(cfg, Face_sub);       ]*
>
> *When running DICS with these settings **I am getting the following error message:*
>
>
> *Error using svd
> Input to SVD must not contain NaN or Inf.
>
> Error in beamformer_dics>pinv (line 650)
>   [U,S,V] = svd(A,0);
>
> Error in beamformer_dics (line 339)
>         filt = pinv(lf' * invCf * lf) * lf' * invCf;
>         % Gross eqn. 3, use PINV/SVD to cover rank
>         deficient leadfield
>
> Error in ft_sourceanalysis (line 568)
>       dip(i) = beamformer_dics(grid, sens, vol, [],
>       squeeze(Cf(i,:,:)), optarg{:});
>
> Error in SourceAnalysis (line 133)
> sourceFace = ft_sourceanalysis(cfg, face_data);*
>
>
> * I am not able to detect, where is the problem. Another issue I have found that 'vol.mat' or 'grid.leadfield' are all NaN value. I cannot understand how to solve it. I would be very thankful if you can help me in this regard.  *
>
>
>
>
>
> --
> Thanks & Regards
>
> *Kasturi Barik*
>
> MS Research Scholar
> Audio and Bio-signal Processing Lab
> Department of Electronics and Electrical Engineering
> Indian Institute of Technology Kharagpur
> Mob: +91-8902400644 <+91%2089024%2000644>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170531/e7a8c9a8/attachment-0002.html>


More information about the fieldtrip mailing list