[FieldTrip] Fwd: Source Analysis from EEG data

Kasturi Barik kash.kgp at gmail.com
Wed May 31 12:50:41 CEST 2017


*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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170531/f7bff80e/attachment-0001.html>


More information about the fieldtrip mailing list