<div dir="ltr"><div><div>Dear Fieldtrip developers/source localizing experts,</div><div><br></div><div>I get an error when running ft_sourceanalysis on two EEG conditions with the statistical testing (permutation) enabled (no issues with single condition and no statistics).<br></div><div>As far as I can see, I am doing everything right (as per  ft_sourceanalysis reference page; my fieldtrip version: fieldtrip-20161122). Please correct me where I am wrong or ask for more information in case what I paste/explain below is not sufficient.</div><div><br></div><div>CODE INPUT:</div><div><br></div><div><div>    cfg                            = [];</div><div>    cfg.method               = 'dics';</div><div>    cfg.frequency           = 10;</div><div>    cfg.grid                     = leadfield;</div><div>    cfg.keepleadfield      = 'no';</div><div>    cfg.headmodel          = vol;</div><div>    cfg.dics.keepfilter      = 'yes';</div><div>    cfg.dics.lambda         = '5%';</div><div>    cfg.dics.fixedori         = 'yes'; </div><div>    cfg.dics.keepmom      = 'yes'; </div><div>    cfg.dics.realfilter        = 'yes';     </div><div>    cfg.grid.filter              = source_cmb.avg.filter;</div><div>    cfg.permutation         = 'yes';</div><div>    cfg.numpermutation   = 500;</div><div>   </div><div>    sourceStatsAB = ft_sourceanalysis(cfg, condA, condB);</div></div><div><br></div><div>COMMAND WINDOW OUTPUT:</div><div><br></div><div>the input is freq data with 128 channels, 1 frequencybins and no timebins</div><div>the input is freq data with 128 channels, 1 frequencybins and no timebins</div><div>the call to "ft_selectdata" took 0 seconds</div><div>converting the linearly indexed channelcombinations into a square CSD-matrix</div><div>using electrodes specified in the data</div><div>converting units from 'cm' to 'mm'</div><div>determining source compartment (3)</div><div>projecting electrodes on skin surface</div><div>combining electrode transfer and system matrix</div><div>creating dipole grid based on user specified dipole positions</div><div>using gradiometers specified in the configuration</div><div>5124 dipoles inside, 0 dipoles outside brain</div><div>the call to "ft_prepare_sourcemodel" took 0 seconds</div><div>the call to "ft_selectdata" took 0 seconds</div><div>the call to "ft_selectdata" took 0 seconds</div><div>2 conditions, each with 3 data objects</div><div>averaging 182 replications for one condition</div><div>averaging 182 replications for one condition</div><div>2 conditions, each with 3 data objects                          <<<<<<<<<<<<<---------- what are the "3 data objects"?</div><div>creating 100 random permutations from total 6.129982e+54</div><div><br></div><div>HERE COMES THE ERROR:</div><div><br></div><div>Error using prepare_resampled_data (line 381)</div><div>the dimensions should be the same for every condition</div><div><br></div><div>Error in ft_sourceanalysis (line 561)</div><div>    [dum, rnd_aCf, rnd_aCr, rnd_aPr, rnd_bCf, rnd_bCr, rnd_bPr] = prepare_resampled_data(cfg, aCf, aCr, aPr, bCf, bCr, bPr);</div></div><div><br></div><div><br></div><div>When checking the function prepare_resampled_data, it turns out that it requires a cell named "datain" to have the same size matrices column-wise (whatever the columns may represent) : </div><div><br></div><div><div>datain = </div><div><br></div><div>    [182x128x128 double]    [182x128 double]    [182x1 double]</div><div>    [182x128x128 double]    [  1x128 double]    [         NaN]</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">My input data condA and condB have identical dimensions, so I have no idea what has gone wrong here:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">condA = </div><div class="gmail_extra"><br></div><div class="gmail_extra">           label: {128x1 cell}</div><div class="gmail_extra">       dimord: 'rpt_chan_freq'</div><div class="gmail_extra">           freq: 9.8462</div><div class="gmail_extra">powspctrm: [182x128 double]</div><div class="gmail_extra">   labelcmb: {8128x2 cell}</div><div class="gmail_extra">  crsspctrm: [182x8128 double]</div><div class="gmail_extra">cumsumcnt: [182x1 double]</div><div class="gmail_extra">  cumtapcnt: [182x1 double]</div><div class="gmail_extra">            elec: [1x1 struct]</div><div class="gmail_extra">       trialinfo: [182x22 double]</div><div class="gmail_extra">             cfg: [1x1 struct]</div><div class="gmail_extra"><br></div><div class="gmail_extra">condB = <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">          label: {128x1 cell}</div><div class="gmail_extra">       dimord: 'rpt_chan_freq'</div><div class="gmail_extra">            freq: 9.8462</div><div class="gmail_extra"> powspctrm: [182x128 double]</div><div class="gmail_extra">    labelcmb: {8128x2 cell}</div><div class="gmail_extra">   crsspctrm: [182x8128 double]</div><div class="gmail_extra"> cumsumcnt: [182x1 double]</div><div class="gmail_extra">  cumtapcnt: [182x1 double]</div><div class="gmail_extra">            elec: [1x1 struct]</div><div class="gmail_extra">       trialinfo: [182x22 double]</div><div class="gmail_extra">             cfg: [1x1 struct]</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for your input!</div><div class="gmail_extra"><br></div><div class="gmail_extra">Best wishes,</div><div class="gmail_extra">Maris</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 9, 2017 at 12:00 PM,  <span dir="ltr"><<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send fieldtrip mailing list submissions to<br>
        <a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.<wbr>nl</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:fieldtrip-owner@science.ru.nl">fieldtrip-owner@science.ru.nl</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of fieldtrip digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. error in source parcellation and source connectivity      analysis<br>
      (velmurugan jayabal)<br>
   2. Problem with Matlab system commands in OS X (XTerm, Logout,<br>
      crash, sleep mode) (Markus Gschwind)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Sat, 8 Apr 2017 17:54:43 -0700<br>
From: velmurugan jayabal <<a href="mailto:velmurugan.nimhans@gmail.com">velmurugan.nimhans@gmail.com</a>><br>
To: <a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br>
Subject: [FieldTrip] error in source parcellation and source<br>
        connectivity    analysis<br>
Message-ID:<br>
        <<a href="mailto:CAKmRZP1gp6W54S4aKPDXAU_4uZQa1LzWQiobxn7uDpR8MN-Wmw@mail.gmail.com">CAKmRZP1gp6W54S4aKPDXAU_<wbr>4uZQa1LzWQiobxn7uDpR8MN-Wmw@<wbr>mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Field-trip community,<br>
<br>
I am having the following errors when computing connectivity<br>
analysis. Please any help in this regard would be highly appreciated.<br>
Thanks in advance.<br>
<br>
1. How to compute atlas based source model grid, from MMP atlas?. Since MMP<br>
atlas doesn't contain the *dim *field, the ft_volumelookup function doesn't<br>
work prompting me the same error.<br>
<br>
<br>
2. Alternatively, I had created AAL atlas based source model grid and used<br>
to compute source connectivity (img.coh) from PCC beamformer source output.<br>
But, I am unable to compute the connectivity value for each parcel using<br>
ft_sourceparcellate. I am writing the codes used to derive the same.<br>
<br>
3. Is there any acronym or a clear explanation for the parcellation label?.<br>
I had read Glasser et al 2016 paper and their resource site. But, I<br>
couldn't get complete names or explanation for all the ROIs.<br>
<br>
<br>
CODE:<br>
%source is the output of pcc beamformer results.<br>
cfg         = [];<br>
cfg.method  ='coh';<br>
cfg.complex = 'absimag';<br>
source_conn_imcoh = ft_connectivityanalysis(cfg, source);<br>
<br>
atlas =ft_read_atlas ('ROI_MNI_V5.nii');<br>
atlas.pos =source_conn_imcoh.pos;<br>
cfg =[];<br>
cfg.method ='mean'<br>
cfg.parameter ='cohspctrm';<br>
cfg.parcellation = 'tissue';<br>
parc_conn= ft_sourceparcellate(cfg,<wbr>source_conn, atlas);<br>
<br>
I had even tried computing source connectivity interpolation on the atlas<br>
before parcellation. But, I am getting a huge array > 50 GB, which exceeds<br>
my MATLAB and system limit.<br>
<br>
<br>
--<br>
- sincerely,<br>
*Velmurugan Jayabal,*<br>
*Magnetoencephalography (MEG) research centre,*<br>
*Department of Clinical Neurosciences,*<br>
<br>
*National Institute of Mental Health and Neurosciences (NIMHANS),*<br>
*Bangalore - 560029, Karnataka, India*<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170408/ede3c3c1/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/<wbr>pipermail/fieldtrip/<wbr>attachments/20170408/ede3c3c1/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 9 Apr 2017 11:18:21 +0200<br>
From: Markus Gschwind <<a href="mailto:Markus.Gschwind@unige.ch">Markus.Gschwind@unige.ch</a>><br>
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
Subject: [FieldTrip] Problem with Matlab system commands in OS X<br>
        (XTerm, Logout, crash, sleep mode)<br>
Message-ID:<br>
        <<wbr>CABaUQnyQcLUwAyxxyEfaVYw73Ryxc<wbr>t=<a href="mailto:sLxe_rV%2B%2BQr-zdDgz9w@mail.gmail.com">sLxe_rV++Qr-zdDgz9w@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear all,<br>
<br>
I hope to find here an expert who knows an answer to the following problem:<br>
<br>
I am running Matlab on OSX 10.9.5 started from the Xterm, and I am not able<br>
to run big and lengthy matlab jobs because at each logout (which occurs<br>
after 2h), Matlab crashes, all results are gone (if they are not save to<br>
the HD and XTerm closes.<br>
<br>
I start Matlab form the XTerm (and not by clicking the App Icon) in order<br>
to be able to run system (unix) commands within Matlab.<br>
<br>
I guess, this behaviour is proper to XTerm, and in case I could find an<br>
other way to run system commands from Matlab, probably this could be<br>
resolved.<br>
<br>
Could it be that the running matlab job is not visible to the system which<br>
goes to sleep??<br>
<br>
For info here the power management info:<br>
<br>
$ pmset -g custom<br>
Battery Power:<br>
 lidwake              1<br>
 autopoweroff         1<br>
 autopoweroffdelay    14400<br>
 standbydelay         18000<br>
 standby              1<br>
 ttyskeepawake        0<br>
 hibernatemode        3<br>
 gpuswitch            2<br>
 hibernatefile        /var/vm/sleepimage<br>
 displaysleep         2<br>
 sleep                0<br>
 acwake               1<br>
 halfdim              1<br>
 sms                  1<br>
 lessbright           1<br>
 disksleep            10<br>
AC Power:<br>
 lidwake              1<br>
 autopoweroff         1<br>
 autopoweroffdelay    14400<br>
 standbydelay         18000<br>
 standby              0<br>
 ttyskeepawake        1<br>
 hibernatemode        3<br>
 gpuswitch            2<br>
 hibernatefile        /var/vm/sleepimage<br>
 womp                 1<br>
 displaysleep         3<br>
 networkoversleep     0<br>
 sleep                0<br>
 acwake               0<br>
 halfdim              1<br>
 sms                  1<br>
 disksleep            60<br>
<br>
<br>
Many thanks for help!<br>
Markus<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170409/ce9b8000/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/<wbr>pipermail/fieldtrip/<wbr>attachments/20170409/ce9b8000/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br>
<br>
End of fieldtrip Digest, Vol 77, Issue 6<br>
******************************<wbr>**********<br>
</blockquote></div><br></div></div>