[FieldTrip] Is it normal to have NaNs in source analysis output?

Jane Tan Jane.Tan at murdoch.edu.au
Mon Feb 11 03:42:26 CET 2019


Dear Fieldtrippers,


My name is Jane, and this is my first time posting a question to this community. First and foremost, I would like to apologise if my question is extremely trivial.


I am trying to perform source analysis using the Beamformer DICS approach on EEG data. My data has been preprocessed using the EEGlab toolbox, and in this particular instance I am only interested in 20 Hz source space activity for time periods around event 'SS'.

My question is very simple: is it normal to get NaNs in the avg.pow output of the source analysis? It seems to make sense; positions in the grid that do not have 20 Hz reconstructed activity would be represented by NaNs.  However, I'm a novice (in all aspects: Matlab, EEG analysis, and Fieldtrip), and for a sanity check, would like to confirm that getting NaNs in my source output is normal.



Here is the code I executed:


%% Loading data
[EEG]          = pop_loadset('E:\preprocesseddata.set');
EEG             = pop_epoch( EEG, {  'SSstopDIN'  }, [-0.5         0.8]);     % Epoch to event of interest 'SS'
dataSS_epoched  = eeglab2fieldtrip(EEG, 'preprocessing');  % Convert eeglab dataset to fieldtrip data



%% Calculating the cross spectral density matrix

    cfg = [];
    cfg.method    = 'mtmfft';
    cfg.taper     = 'hanning';
    cfg.output    = 'powandcsd';
    cfg.foi       = 4:40;
    cfg.keeptrials = 'no';
    TFR_SS = ft_freqanalysis(cfg, dataSS_epoched);



%% Computing leadfield

cfg                 = [];
cfg.headmodel       = vol; %using BEM head model from FT template
cfg.reducerank      = 3; %default = 3 for EEG
cfg.elec            = elec_aligned
cfg.grid.resolution = 0.5;   % use a 3-D grid with a 0.5 cm resolution
cfg.grid.unit       = 'cm';
[grid] = ft_prepare_leadfield(cfg);


%% Source analysis (without contrasts; just testing source reconstruction for one condition first)

cfg              = [];
cfg.method       = 'dics';
cfg.frequency    = 20;
cfg.grid         = grid;
cfg.headmodel    = vol;
cfg.elec         = elec_aligned;
sourceSS_nocon = ft_sourceanalysis(cfg, TFR_SS);  % Here, sourceSS_nocon.avg.pow shows NaNs in some cells and not others




[cid:a458c15f-7cd8-4957-b19f-49686ec7517a]



My sincere thanks in advance!


Best regards,

Jane


Jane Tan, PhD Candidate
School of Psychology and Exercise Science | Murdoch University
Room 3.001 Social Science Building, 90 South Street, Murdoch WA 6150 | Email: Jane.Tan at murdoch.edu.au
[cid:95c33115-83df-4674-9c4c-28935742fc23]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190211/2ceb12d1/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 28967 bytes
Desc: pastedImage.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190211/2ceb12d1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-3jowpkkg.png
Type: image/png
Size: 7527 bytes
Desc: Outlook-3jowpkkg.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190211/2ceb12d1/attachment-0005.png>


More information about the fieldtrip mailing list