<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Jane,
<div class=""><br class="">
</div>
<div class="">Yes, it is not a problem (and expected) for the outside-of-the-head dipole positions to be represented by NaNs.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes and keep up the good work,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
J.M.Schoffelen, MD PhD<br class="">
Senior Researcher, VIDI-fellow - PI, language in interaction<br class="">
Telephone: +31-24-3614793</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Physical location: room 00.028</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
</div>
<div class=""><br class="webkit-block-placeholder">
</div>
<div>
<blockquote type="cite" class="">
<div class="">On 11 Feb 2019, at 03:42, Jane Tan <<a href="mailto:Jane.Tan@murdoch.edu.au" class="">Jane.Tan@murdoch.edu.au</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear Fieldtrippers,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">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.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">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'.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">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.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Here is the code I executed:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class="">%% Loading data</div>
<div class="">
<div class="">[EEG]          = pop_loadset('E:\preprocesseddata.set');   </div>
<div class="">EEG             = pop_epoch( EEG, {  'SSstopDIN'  }, [-0.5         0.8]);     % Epoch to event of interest 'SS'</div>
<div class="">dataSS_epoched  = eeglab2fieldtrip(EEG, 'preprocessing');  % Convert eeglab dataset to fieldtrip data</div>
<div class=""><br class="">
</div>
</div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class="">%% Calculating the cross spectral density matrix</div>
<div class=""><br class="">
</div>
<div class="">    cfg = [];</div>
<div class="">    cfg.method    = 'mtmfft';</div>
<div class="">    cfg.taper     = 'hanning';</div>
<div class="">    cfg.output    = 'powandcsd';</div>
<div class="">    cfg.foi       = 4:40;</div>
<div class="">    cfg.keeptrials = 'no';</div>
<div class="">    TFR_SS = ft_freqanalysis(cfg, dataSS_epoched);</div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class="">%% Computing leadfield </div>
<div class=""><br class="">
</div>
<div class="">cfg                 = [];</div>
<div class="">cfg.headmodel       = vol; %using BEM head model from FT template</div>
<div class="">cfg.reducerank      = 3; %default = 3 for EEG</div>
<div class="">cfg.elec            = elec_aligned  </div>
<div class="">cfg.grid.resolution = 0.5;   % use a 3-D grid with a 0.5 cm resolution</div>
<div class="">cfg.grid.unit       = 'cm';</div>
<div class="">[grid] = ft_prepare_leadfield(cfg);</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">%% Source analysis (without contrasts; just testing source reconstruction for one condition first)</div>
<div class=""><br class="">
</div>
<div class="">cfg              = [];</div>
<div class="">cfg.method       = 'dics';</div>
<div class="">cfg.frequency    = 20;  </div>
<div class="">cfg.grid         = grid;</div>
<div class="">cfg.headmodel    = vol;</div>
<div class="">cfg.elec         = elec_aligned;</div>
<div class="">sourceSS_nocon = ft_sourceanalysis(cfg, TFR_SS);  % Here, <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;" class="">sourceSS_nocon.avg.pow
 shows NaNs in some cells and not others</span></div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span id="cid:a458c15f-7cd8-4957-b19f-49686ec7517a"><pastedImage.png></span><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">My sincere thanks in advance!</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div id="Signature" class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols;" class="">
<div style="font-family: Tahoma; font-size: 13px;" class="">
<div class=""></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span lang="EN-SG" class="">Best regards,</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span lang="EN-SG" class=""><br class="">
</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span lang="EN-SG" class="">Jane</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span lang="EN-SG" class=""><br class="">
</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span lang="EN-SG" class=""><br class="">
</span></div>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 5pt; line-height: normal; background-color: white; background-position: initial initial; background-repeat: initial initial;">
<b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif;" class="">Jane Tan, PhD Candidate</span></b><span style="font-size: 11.5pt; font-family: 'Segoe UI', sans-serif; color: rgb(33, 33, 33);" class=""></span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 5pt; line-height: normal; background-color: white; background-position: initial initial; background-repeat: initial initial;">
<b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif;" class="">School of Psychology and Exercise Science | Murdoch University</span></b><span style="font-size: 11.5pt; font-family: 'Segoe UI', sans-serif; color: rgb(33, 33, 33);" class=""></span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 5pt; line-height: normal; background-color: white; background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9pt; font-family: Verdana, sans-serif;" class="">Room 3.001 Social Science Building, 90 South Street, Murdoch WA 6150 <b class="">| </b>Email:<span class="Apple-converted-space"> </span><a href="mailto:Jane.Tan@murdoch.edu.au" class="">Jane.Tan@murdoch.edu.au</a></span><span style="font-size: 11.5pt; font-family: 'Segoe UI', sans-serif; color: rgb(33, 33, 33);" class=""></span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 5pt; line-height: normal; background-color: white; background-position: initial initial; background-repeat: initial initial;">
<span id="cid:95c33115-83df-4674-9c4c-28935742fc23"><Outlook-3jowpkkg.png></span><br class="">
</p>
<div class=""></div>
</div>
</div>
</div>
</div>
<span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</div>
<br class="">
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>