From eelke.spaak at donders.ru.nl Sun Jun 1 09:11:10 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 1 Jun 2014 09:11:10 +0200 Subject: [FieldTrip] source resampling In-Reply-To: References: Message-ID: Dear Azeez, After source analysis, if you interpolate (using ft_sourceinterpolate) the source results (at 8 mm resolution) onto another volume that has a 1 mm resolution, it will be upsampled. Best, Eelke On 28 May 2014 17:36, Azeez Adebimpe wrote: > Dear all > > > I calculated my leadfield or grid with 8 mm resolution. > Please is there anyway after or before source interpolation or before to > resample the source to 1 mm resolution. > > merci! > > > > Azeez A. Adebimpe > > > "Knowledge and good manner, the beauty of a man" > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rikkert.hindriks at upf.edu Sun Jun 1 13:06:29 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Sun, 1 Jun 2014 13:06:29 +0200 Subject: [FieldTrip] (no subject) Message-ID: Dear all, I'm having trouble installing openMEEG under Windows for use in ft_prepare_headmodel. After running the installation, the comment system(om_assemble) returns non-zero value, meaning that the installation has not been succesfull. FYI I installed openMEEG inside the Fieldtrip folder. Does anyone has encountered the same problem and help me out? Much appreciated! Rikkert -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sun Jun 1 13:21:40 2014 From: roeysc at gmail.com (Roey) Date: Sun, 1 Jun 2014 14:21:40 +0300 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Rikkert, From my experience it is not possible yet to prepare a head model using OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not mistaken, this is also documented in the ft_prepare_headmodel code. Hopefully some more optimistic answers will be given here :) Best, Roey ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" כתב/ה: > Dear all, > > I'm having trouble installing openMEEG under Windows for use in ft_prepare_headmodel. After running the installation, > the comment system(om_assemble) returns non-zero value, meaning that the installation has not been succesfull. FYI I installed openMEEG inside the Fieldtrip folder. Does anyone has encountered the same problem and help me out? > > Much appreciated! > Rikkert > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Sun Jun 1 13:29:01 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Sun, 1 Jun 2014 13:29:01 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Hi Roey, Ok, thats clear! Thanks Rikkert On Sun, Jun 1, 2014 at 1:21 PM, Roey wrote: > Dear Rikkert, > From my experience it is not possible yet to prepare a head model using > OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not > mistaken, this is also documented in the ft_prepare_headmodel code. > Hopefully some more optimistic answers will be given here :) > Best, > Roey > > > > ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" > כתב/ה: > > Dear all, > > I'm having trouble installing openMEEG under Windows for use in > ft_prepare_headmodel. After running the installation, > the comment system(om_assemble) returns non-zero value, meaning that the > installation has not been succesfull. FYI I installed openMEEG inside the > Fieldtrip folder. Does anyone has encountered the same problem and help me > out? > > Much appreciated! > Rikkert > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Sun Jun 1 23:58:35 2014 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Sun, 1 Jun 2014 23:58:35 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: hi, OpenMEEG runs on windows and Brainstorm makes it work from Matlab. So I guess it should be doable from Fieldtrip too. Alex On Sun, Jun 1, 2014 at 1:29 PM, HINDRIKS, RIKKERT wrote: > Hi Roey, > > Ok, thats clear! > > Thanks > Rikkert > > > On Sun, Jun 1, 2014 at 1:21 PM, Roey wrote: >> >> Dear Rikkert, >> From my experience it is not possible yet to prepare a head model using >> OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not >> mistaken, this is also documented in the ft_prepare_headmodel code. >> Hopefully some more optimistic answers will be given here :) >> Best, >> Roey >> >> >> >> ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" >> כתב/ה: >> >> Dear all, >> >> I'm having trouble installing openMEEG under Windows for use in >> ft_prepare_headmodel. After running the installation, >> the comment system(om_assemble) returns non-zero value, meaning that the >> installation has not been succesfull. FYI I installed openMEEG inside the >> Fieldtrip folder. Does anyone has encountered the same problem and help me >> out? >> >> Much appreciated! >> Rikkert >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From spa268 at nyu.edu Mon Jun 2 09:39:57 2014 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Mon, 2 Jun 2014 08:39:57 +0100 Subject: [FieldTrip] Defining a custom statfun for cluster statistics Message-ID: Hello all, Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki. I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it. Thanks! Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 2 10:01:15 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 2 Jun 2014 10:01:15 +0200 (CEST) Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: Message-ID: <69733282.7184003.1401696075987.JavaMail.root@sculptor.zimbra.ru.nl> Hi Stephen, You can take a look to ft_statfun_diff.m function: it's a good example to start with. You might also want to take a look here: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests Regarding the abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)), I'm not sure what the output of your statistic would mean. best, Diego ----- Original Message ----- > From: "Stephen Politzer-Ahles" > To: fieldtrip at donders.ru.nl > Sent: Monday, 2 June, 2014 9:39:57 AM > Subject: [FieldTrip] Defining a custom statfun for cluster statistics > Hello all, > Are there any examples for defining a new statfun to use in > ft_timelockstatistics? I thought there were, but can't currently find > them on the wiki. > I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, > and IIb), and I an only interested in a certain kind of interaction, > one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an > effect of the second factor at just one level of the first factor, and > not the other level). So rather than using F as my test statistic for > defining clusters, I would like to use something like > abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define > the function to do this; if anyone could point me in the right > direction I would greatly appreciate it. > Thanks! > Steve > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.leszczynski.m at gmail.com Mon Jun 2 10:01:34 2014 From: m.leszczynski.m at gmail.com (Marcin) Date: Mon, 2 Jun 2014 10:01:34 +0200 Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: References: Message-ID: Hey Steve, this might give you a hint: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html Best, Marcin 2014-06-02 9:39 GMT+02:00 Stephen Politzer-Ahles : > Hello all, > > Are there any examples for defining a new statfun to use in > ft_timelockstatistics? I thought there were, but can't currently find them > on the wiki. > > I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and > IIb), and I an only interested in a certain kind of interaction, one where > abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the > second factor at just one level of the first factor, and not the other > level). So rather than using F as my test statistic for defining clusters, > I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I > just don't know how to define the function to do this; if anyone could > point me in the right direction I would greatly appreciate it. > > Thanks! > Steve > > > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Mon Jun 2 10:51:38 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 2 Jun 2014 10:51:38 +0200 (CEST) Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: References: Message-ID: <010d01cf7e3f$dd9654d0$98c2fe70$@herring@fcdonders.ru.nl> Hi Steve, If I understand you correctly you basically want to test a one-sided interaction effect, which boils down to doing a one-sided dependent samples t-test between the difference scores of condition I vs the difference scores of condition II. So, first you would have to calculate the difference timeseries diff_I(Ia – Ib) and diff_II(IIa-IIb). Then you run ft_timelockstatistics using statfun_depsamplesT on diff_I vs diff_II testing one-sided only looking at positive clusters (If you expect that diff_I > diff_II ). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Stephen Politzer-Ahles Sent: maandag 2 juni 2014 9:40 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Defining a custom statfun for cluster statistics Hello all, Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki. I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it. Thanks! Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 03:04:50 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 01:04:50 +0000 Subject: [FieldTrip] convert mri headmodel from ctf to mni Message-ID: <1401757472326.35223@flinders.edu.au> hello fieldtrippers, I recently worked out how to create virtual channels using beamformer and an atlas. However, now i have the problem of plotting the data using ft_sourceplot. The atlas has mni coordinates, but the mri headmodel has ctf coordinates. atlas = dim: [91 109 91] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' tissue: [91x109x91 double] tissuelabel: {116x1 cell} coordsys: 'mni' mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Is there a way to change either so that I can plot the data? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 03:39:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 01:39:17 +0000 Subject: [FieldTrip] ft_mvaranalysis Message-ID: <1401759539185.62016@flinders.edu.au> Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 07:29:55 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 05:29:55 +0000 Subject: [FieldTrip] averaging over frequency Message-ID: <1401773376603.4016@flinders.edu.au> ?Hello fieldtrippers, Is there any way to average over frequency after using the function ft_freqanalysis? I am trying to separate my data into bands, rather than individual frequencies. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:19:07 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:19:07 +0200 Subject: [FieldTrip] convert mri headmodel from ctf to mni In-Reply-To: <1401757472326.35223@flinders.edu.au> References: <1401757472326.35223@flinders.edu.au> Message-ID: <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> Hi Tyler, Try using ft_volumenormalise on your variabl mri. JM On Jun 3, 2014, at 3:04 AM, Tyler Grummett wrote: > hello fieldtrippers, > > I recently worked out how to create virtual channels using beamformer and an atlas. > > However, now i have the problem of plotting the data using ft_sourceplot. > > The atlas has mni coordinates, but the mri headmodel has ctf coordinates. > > atlas = > > dim: [91 109 91] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' > tissue: [91x109x91 double] > tissuelabel: {116x1 cell} > coordsys: 'mni' > > mri = > > anatomy: [256x256x256 double] > dim: [256 256 256] > transform: [4x4 double] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > Is there a way to change either so that I can plot the data? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:19:55 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:19:55 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401759539185.62016@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au> Message-ID: <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> Hi Tyler, Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett wrote: > Hello fieldtrippers, > > Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); > > The error message is: > > Undefined function 'mvar' for input arguments of type 'double'. > > ​Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? > > I swear this has worked before on old data, and I didnt update the toolbox between trying it > with the old data and with the new data. I have now updated the fieldtrip toolbox and I have > tried running the code again, but no luck. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:20:44 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:20:44 +0200 Subject: [FieldTrip] averaging over frequency In-Reply-To: <1401773376603.4016@flinders.edu.au> References: <1401773376603.4016@flinders.edu.au> Message-ID: Hi Tyler, Try using ft_selectdata with the option cfg.avgoverfreq. Best, Jan-Mathijs On Jun 3, 2014, at 7:29 AM, Tyler Grummett wrote: > ​Hello fieldtrippers, > > Is there any way to average over frequency after using the function ft_freqanalysis? > > I am trying to separate my data into bands, rather than individual frequencies. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:32:44 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:32:44 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> Message-ID: <1401780746302.15342@flinders.edu.au> Using the same code it generates the error: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, Try using ft_hastoolbox('bsmart',1) and then in the cfg for ft_mvaranalysis cfg.toolbox = 'bsmart' Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:36:13 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:36:13 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401780746302.15342@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au> Message-ID: This is a low level matlab error and suggests a problem with your data. On Jun 3, 2014, at 9:32 AM, Tyler Grummett wrote: > Using the same code it generates the error: > > Error using chol > Matrix must be positive definite. > > Error in armorf (line 40) > ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); > > Error in ft_mvaranalysis (line 395) > [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), > cfg.order); > > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen > Sent: Tuesday, 3 June 2014 4:49 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ > > Best, > Jan-Mathijs > > On Jun 3, 2014, at 3:39 AM, Tyler Grummett wrote: > >> Hello fieldtrippers, >> >> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); >> >> The error message is: >> >> Undefined function 'mvar' for input arguments of type 'double'. >> >> ​Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? >> >> I swear this has worked before on old data, and I didnt update the toolbox between trying it >> with the old data and with the new data. I have now updated the fieldtrip toolbox and I have >> tried running the code again, but no luck. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:36:05 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:36:05 +0000 Subject: [FieldTrip] averaging over frequency In-Reply-To: References: <1401773376603.4016@flinders.edu.au>, Message-ID: <1401780946595.70725@flinders.edu.au> ?Excellent, thank you!! Now I know this function exists, I hopefully wont ask more of these questions. ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:50 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] averaging over frequency Hi Tyler, Try using ft_selectdata with the option cfg.avgoverfreq. Best, Jan-Mathijs On Jun 3, 2014, at 7:29 AM, Tyler Grummett > wrote: ?Hello fieldtrippers, Is there any way to average over frequency after using the function ft_freqanalysis? I am trying to separate my data into bands, rather than individual frequencies. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:43:06 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:43:06 +0000 Subject: [FieldTrip] convert mri headmodel from ctf to mni In-Reply-To: <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> References: <1401757472326.35223@flinders.edu.au>, <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> Message-ID: <1401781368318.8277@flinders.edu.au> ?JM, This worked well. I have used it in this order: ft_read_mri ft_volumenormalise ft_volumereslice Is that the correct order? Or doesnt it matter as such? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] convert mri headmodel from ctf to mni Hi Tyler, Try using ft_volumenormalise on your variabl mri. JM On Jun 3, 2014, at 3:04 AM, Tyler Grummett > wrote: hello fieldtrippers, I recently worked out how to create virtual channels using beamformer and an atlas. However, now i have the problem of plotting the data using ft_sourceplot. The atlas has mni coordinates, but the mri headmodel has ctf coordinates. atlas = dim: [91 109 91] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' tissue: [91x109x91 double] tissuelabel: {116x1 cell} coordsys: 'mni' mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Is there a way to change either so that I can plot the data? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:50:56 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:50:56 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, Message-ID: <1401781837723.25460@flinders.edu.au> JM, My data has the following format: data = fsample: 500 sampleinfo: [14x2 double] trial: {1x14 cell} time: {1x14 cell} label: {1x116 cell} cfg: [1x1 struct] I had a look and there are no NaNs or anything. I have tried running using the coherence method for connectivity analysis (hence I didnt need to use mvaranalysis) and it seemed to work fine. Can you give me any suggestions as to what the problems with my data could be? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 5:06 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis This is a low level matlab error and suggests a problem with your data. On Jun 3, 2014, at 9:32 AM, Tyler Grummett > wrote: Using the same code it generates the error: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, Try using ft_hastoolbox('bsmart',1) and then in the cfg for ft_mvaranalysis cfg.toolbox = 'bsmart' Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Jun 3 10:28:12 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 3 Jun 2014 08:28:12 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Dear Kousik, The solution that you propose requires the use of Freesurfer to create the sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, how could I constrain it to calculate leadfields for points inside the brain? I tried to restrict the ft_sourceanalysis by including only the points of the grid that are inside the brain, but I still get the SVD error. I checked the NaN values of vol.mat and all the elements on this matrix are NaN. I suppose that’s where the error is, however I don’t know how to correct for it, because I just generate the volume structure from the mesh (see first message). Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 18:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Oh. Yes. FT puts NaN's into sourcespace points outside the brain. You can constrain FT to only calculate leadfields for sourcespace points inside the brain. I generally do this. I don't know how FT handles those outside the brain source points really. You could give this a try. Check this tutorial/code: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. There are none. However, I checked for NaN values in grid.leadfield and it has some. I thought that these were NaN values in the points of the grid outside a brain region, but I might be mistaken. grid = xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] dim: [17 13 14] pos: [3094x3 double] unit: 'mm' inside: [1x1516 double] outside: [1x1578 double] cfg: [1x1 struct] leadfield: {1x3094 cell} Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Ah. Interesting. Good that error changes. So that was the problem before. Now, can you check if your Freq matrices contain any NaN's (isnan(freqAll))? It can happen sometimes. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked the labels and they were the same, except for whether they were in capital letters. So I added the following before ft_sourceanalysis: freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); This way the labels of the elec structure and freqAll are in capital letters. And now I get a different error (although still within the function beamformer_dics): 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); What could it be? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I too had the same suggestion as Johanna's. Another thing to check would be if the labels that you used for the leadfield estimation are the same as the freq data. I guess FT at some point would also check this to extract the indices. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > wrote: Dear Johanna, Thank you for your suggestion. On step 2 in the code, I select from the elec structure the channels that are included in the frequency data. So the elec structure used for preparing the leadfield has 128 electrodes, the same as the data (data_rs, data 4, and therefore freqAll). I checked this precisely because I read a previous thread discussing that issue. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: woensdag 28 mei 2014 16:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, Does your data have the same channels as the leadfield (as the electrodes that went in to compute the leadfield)? I often see that error when there is a mismatch of channels in that way. Best, Johanna 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado >: Dear Fieldtrip users, I’m following the tutorial of beamformers (Source Analysis: Contrast activity to another interval) to estimate oscillatory sources using DICS. I’ve checked the surface created after segmentation and the grid generated from the electrode positions and the headmodel. That seems to work ok. However, at the step of source analysis, I get the following error: Error using * Inner matrix dimensions must agree. 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Does anybody have an idea of what I’m doing wrong? Thank you in advance for any help or suggestion! ----------------------------------------------------------------- This is my code: %% 1 - Preparation of MRI- source space % Read MRI mrifile = 'Subject01\Subject01.mri'; mri = ft_read_mri(mrifile); % Reslice to reorient images cfg = []; cfg.dim = [256 256 256]; mri = ft_volumereslice(cfg,mri); % Segment compartments cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); % Prepare mesh cfg=[]; cfg.tissue={'brain', 'skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); % Prepare headmodel cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); %% 2- Prepare leadfield - Creating grid load elec_aligned2 % Obtained after adjusting electrodes on scalp surface interactively % Three fiducial markers were added to the electrode file, and now they're % removed so that the electrode structure has the same number of channels as the data elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); elec_aligned2.label = elec_aligned2.label(1:128, :); cfg =[]; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.grid.resolution = 10; cfg.grid.unit = 'mm'; [grid] = ft_prepare_leadfield(cfg); %% 3- Join rest and task data % data_rs: resting state data % data4: data during task dataAll = ft_appenddata([], data_rs, data4); cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [18 18]; freqAll = ft_freqanalysis(cfg, dataAll); %---------------------------------- % all seems normal until here %---------------------------------- %% 4- Estimate source of all data cfg = []; cfg.method = 'dics'; cfg.frequency = 18; cfg.grid = grid; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); Cheers, Laura Rueda Delgado _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 3 10:46:09 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 03 Jun 2014 10:46:09 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401781837723.25460@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au> Message-ID: <538D8B51.6040508@donders.ru.nl> Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Tue Jun 3 11:07:09 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 09:07:09 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538D8B51.6040508@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>,<538D8B51.6040508@donders.ru.nl> Message-ID: <443925E6-ABED-48F6-AEA0-CD0696F78685@flinders.edu.au> That is very helpful, I'll look into that. Tyler > On 3 Jun 2014, at 6:18 pm, "Jörn M. Horschig" wrote: > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running using the coherence method for connectivity analysis (hence I didnt need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett > wrote: >>> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: >>>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the toolbox between trying it >>>> with the old data and with the new data. I have now updated the fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From zriouil.imane at gmail.com Tue Jun 3 11:41:58 2014 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 3 Jun 2014 09:41:58 +0000 Subject: [FieldTrip] convert data .mat to .ds Message-ID: hi i want to convert my data .mat to .ds or another format. if you help me please -- Zriouil Imane -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Tue Jun 3 14:47:13 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Tue, 3 Jun 2014 14:47:13 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Hey Laura, I'm not very familiar with BEM's. I assumed the problem to be more superficial and it is not. So I re-ran some codes and I too have a vol.vol that has only NaN's. I think the problem has been previously raised here. http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html Let's wait to see if someone more experienced has something to say. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado < Laura.Rueda at faber.kuleuven.be> wrote: > Dear Kousik, > > > > The solution that you propose requires the use of Freesurfer to create the > sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, > how could I constrain it to calculate leadfields for points inside the > brain? I tried to restrict the ft_sourceanalysis by including only the > points of the grid that are inside the brain, but I still get the SVD > error. > > > > I checked the NaN values of vol.mat and all the elements on this matrix > are NaN. I suppose that’s where the error is, however I don’t know how to > correct for it, because I just generate the volume structure from the mesh > (see first message). > > > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can constrain > FT to only calculate leadfields for sourcespace points inside the brain. I > generally do this. I don't know how FT handles those outside the brain > source points really. You could give this a try. > > > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. > There are none. However, I checked for NaN values in grid.leadfield and it > has some. I thought that these were NaN values in the points of the grid > outside a brain region, but I might be mistaken. > > > > > > grid = > > > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Ah. Interesting. Good that error changes. So that was the problem before. > > > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked the labels and they were the same, except for whether they were > in capital letters. So I added the following before ft_sourceanalysis: > > > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > > > This way the labels of the elec structure and freqAll are in capital > letters. > > > > And now I get a different error (although still within the function > beamformer_dics): > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > > > What could it be? > > > > Best regards, > > Laura > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I too had the same suggestion as Johanna's. > > > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Johanna, > > > > Thank you for your suggestion. > > > > On step 2 in the code, I select from the elec structure the channels that > are included in the frequency data. So the elec structure used for > preparing the leadfield has 128 electrodes, the same as the data (data_rs, > data 4, and therefore freqAll). I checked this precisely because I read a > previous thread discussing that issue. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hi Laura, > > > > Does your data have the same channels as the leadfield (as the electrodes > that went in to compute the leadfield)? I often see that error when there > is a mismatch of channels in that way. > > > > Best, > > Johanna > > > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be>: > > Dear Fieldtrip users, > > > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and the > headmodel. That seems to work ok. However, at the step of source analysis, > I get the following error: > > > > Error using * > > Inner matrix dimensions must agree. > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2 % Obtained after adjusting electrodes on scalp surface > interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of channels > as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > > > > > Cheers, > > > > Laura Rueda Delgado > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Jun 3 15:30:56 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 3 Jun 2014 13:30:56 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Dear Kousik, I found that thread and made some tests on my data as well. The solution that is proposed there (reject the vertices of C11st/C22st where the NaN values are present) is not feasible in my case because I would need to reject 2908 vertices from the 3000 ones present in the brain compartment. Also, the xyz coordinates of these critical vertices (vol.bnd(1).pnt) and their corresponding triangles (vol.bnd(1).tri) do not converge into a single point, which would be the reason to reject them in the first place. I’ve checked and re-checked the segmented volumes and meshes (errors at these steps seem to be the most common problem), but all the compartments are closed surfaces and do not intersect. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: dinsdag 3 juni 2014 14:47 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I'm not very familiar with BEM's. I assumed the problem to be more superficial and it is not. So I re-ran some codes and I too have a vol.vol that has only NaN's. I think the problem has been previously raised here. http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html Let's wait to see if someone more experienced has something to say. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > wrote: Dear Kousik, The solution that you propose requires the use of Freesurfer to create the sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, how could I constrain it to calculate leadfields for points inside the brain? I tried to restrict the ft_sourceanalysis by including only the points of the grid that are inside the brain, but I still get the SVD error. I checked the NaN values of vol.mat and all the elements on this matrix are NaN. I suppose that’s where the error is, however I don’t know how to correct for it, because I just generate the volume structure from the mesh (see first message). Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 18:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Oh. Yes. FT puts NaN's into sourcespace points outside the brain. You can constrain FT to only calculate leadfields for sourcespace points inside the brain. I generally do this. I don't know how FT handles those outside the brain source points really. You could give this a try. Check this tutorial/code: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. There are none. However, I checked for NaN values in grid.leadfield and it has some. I thought that these were NaN values in the points of the grid outside a brain region, but I might be mistaken. grid = xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] dim: [17 13 14] pos: [3094x3 double] unit: 'mm' inside: [1x1516 double] outside: [1x1578 double] cfg: [1x1 struct] leadfield: {1x3094 cell} Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Ah. Interesting. Good that error changes. So that was the problem before. Now, can you check if your Freq matrices contain any NaN's (isnan(freqAll))? It can happen sometimes. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked the labels and they were the same, except for whether they were in capital letters. So I added the following before ft_sourceanalysis: freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); This way the labels of the elec structure and freqAll are in capital letters. And now I get a different error (although still within the function beamformer_dics): 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); What could it be? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I too had the same suggestion as Johanna's. Another thing to check would be if the labels that you used for the leadfield estimation are the same as the freq data. I guess FT at some point would also check this to extract the indices. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > wrote: Dear Johanna, Thank you for your suggestion. On step 2 in the code, I select from the elec structure the channels that are included in the frequency data. So the elec structure used for preparing the leadfield has 128 electrodes, the same as the data (data_rs, data 4, and therefore freqAll). I checked this precisely because I read a previous thread discussing that issue. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: woensdag 28 mei 2014 16:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, Does your data have the same channels as the leadfield (as the electrodes that went in to compute the leadfield)? I often see that error when there is a mismatch of channels in that way. Best, Johanna 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado >: Dear Fieldtrip users, I’m following the tutorial of beamformers (Source Analysis: Contrast activity to another interval) to estimate oscillatory sources using DICS. I’ve checked the surface created after segmentation and the grid generated from the electrode positions and the headmodel. That seems to work ok. However, at the step of source analysis, I get the following error: Error using * Inner matrix dimensions must agree. 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Does anybody have an idea of what I’m doing wrong? Thank you in advance for any help or suggestion! ----------------------------------------------------------------- This is my code: %% 1 - Preparation of MRI- source space % Read MRI mrifile = 'Subject01\Subject01.mri'; mri = ft_read_mri(mrifile); % Reslice to reorient images cfg = []; cfg.dim = [256 256 256]; mri = ft_volumereslice(cfg,mri); % Segment compartments cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); % Prepare mesh cfg=[]; cfg.tissue={'brain', 'skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); % Prepare headmodel cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); %% 2- Prepare leadfield - Creating grid load elec_aligned2 % Obtained after adjusting electrodes on scalp surface interactively % Three fiducial markers were added to the electrode file, and now they're % removed so that the electrode structure has the same number of channels as the data elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); elec_aligned2.label = elec_aligned2.label(1:128, :); cfg =[]; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.grid.resolution = 10; cfg.grid.unit = 'mm'; [grid] = ft_prepare_leadfield(cfg); %% 3- Join rest and task data % data_rs: resting state data % data4: data during task dataAll = ft_appenddata([], data_rs, data4); cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [18 18]; freqAll = ft_freqanalysis(cfg, dataAll); %---------------------------------- % all seems normal until here %---------------------------------- %% 4- Estimate source of all data cfg = []; cfg.method = 'dics'; cfg.frequency = 18; cfg.grid = grid; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); Cheers, Laura Rueda Delgado _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Tue Jun 3 15:56:08 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Tue, 3 Jun 2014 15:56:08 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Hey Laura, I'm out of suggestions now. :( I would suggest you wait on this thread for a few days and see if someone answers. If not you can start a new thread explaining the current problem you have. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 3:30 PM, Laura Rueda Delgado < Laura.Rueda at faber.kuleuven.be> wrote: > Dear Kousik, > > > > I found that thread and made some tests on my data as well. The solution > that is proposed there (reject the vertices of C11st/C22st where the NaN > values are present) is not feasible in my case because I would need to > reject 2908 vertices from the 3000 ones present in the brain compartment. > Also, the xyz coordinates of these critical vertices (vol.bnd(1).pnt) and > their corresponding triangles (vol.bnd(1).tri) do not converge into a > single point, which would be the reason to reject them in the first place. > > > > I’ve checked and re-checked the segmented volumes and meshes (errors at > these steps seem to be the most common problem), but all the compartments > are closed surfaces and do not intersect. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > The solution that you propose requires the use of Freesurfer to create the > sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, > how could I constrain it to calculate leadfields for points inside the > brain? I tried to restrict the ft_sourceanalysis by including only the > points of the grid that are inside the brain, but I still get the SVD > error. > > > > I checked the NaN values of vol.mat and all the elements on this matrix > are NaN. I suppose that’s where the error is, however I don’t know how to > correct for it, because I just generate the volume structure from the mesh > (see first message). > > > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can constrain > FT to only calculate leadfields for sourcespace points inside the brain. I > generally do this. I don't know how FT handles those outside the brain > source points really. You could give this a try. > > > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. > There are none. However, I checked for NaN values in grid.leadfield and it > has some. I thought that these were NaN values in the points of the grid > outside a brain region, but I might be mistaken. > > > > > > grid = > > > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Ah. Interesting. Good that error changes. So that was the problem before. > > > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked the labels and they were the same, except for whether they were > in capital letters. So I added the following before ft_sourceanalysis: > > > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > > > This way the labels of the elec structure and freqAll are in capital > letters. > > > > And now I get a different error (although still within the function > beamformer_dics): > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > > > What could it be? > > > > Best regards, > > Laura > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I too had the same suggestion as Johanna's. > > > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Johanna, > > > > Thank you for your suggestion. > > > > On step 2 in the code, I select from the elec structure the channels that > are included in the frequency data. So the elec structure used for > preparing the leadfield has 128 electrodes, the same as the data (data_rs, > data 4, and therefore freqAll). I checked this precisely because I read a > previous thread discussing that issue. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hi Laura, > > > > Does your data have the same channels as the leadfield (as the electrodes > that went in to compute the leadfield)? I often see that error when there > is a mismatch of channels in that way. > > > > Best, > > Johanna > > > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be>: > > Dear Fieldtrip users, > > > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and the > headmodel. That seems to work ok. However, at the step of source analysis, > I get the following error: > > > > Error using * > > Inner matrix dimensions must agree. > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2 % Obtained after adjusting electrodes on scalp surface > interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of channels > as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > > > > > Cheers, > > > > Laura Rueda Delgado > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 3 16:15:52 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 03 Jun 2014 16:15:52 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: <538DD898.8050801@donders.ru.nl> Hi Laura, the problem could be in the segmentation - you have to have closed boundaries of all tissues for the BEM model, otherwise the computation can result in only nans. It requires a bit more work to check for this, so I would first start with using the standard BEM model that is in the FieldTrip/template/headmodel directory to check whether (a) your code runs smoothly then and (b) your results make sense. Even though results are less optimal than when using individual MRs, you can get a first glimpse and it's a good sanity check for everything you are doing. If these two things work well, then I can help you with checking your segmentation (also on this mailinglist). Note though that that would be more hacking than real fieldtrippin'... ;) Best, Jörn On 6/3/2014 3:30 PM, Laura Rueda Delgado wrote: > > Dear Kousik, > > I found that thread and made some tests on my data as well. The > solution that is proposed there (reject the vertices of C11st/C22st > where the NaN values are present) is not feasible in my case because I > would need to reject 2908 vertices from the 3000 ones present in the > brain compartment. Also, the xyz coordinates of these critical > vertices (vol.bnd(1).pnt) and their corresponding triangles > (vol.bnd(1).tri) do not converge into a single point, which would be > the reason to reject them in the first place. > > I’ve checked and re-checked the segmented volumes and meshes (errors > at these steps seem to be the most common problem), but all the > compartments are closed surfaces and do not intersect. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > The solution that you propose requires the use of Freesurfer to create > the sourcespace. If I’d like to restrict to use Fieldtrip and its > toolboxes, how could I constrain it to calculate leadfields for points > inside the brain? I tried to restrict the ft_sourceanalysis by > including only the points of the grid that are inside the brain, but I > still get the SVD error. > > I checked the NaN values of vol.mat and all the elements on this > matrix are NaN. I suppose that’s where the error is, however I don’t > know how to correct for it, because I just generate the volume > structure from the mesh (see first message). > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can > constrain FT to only calculate leadfields for sourcespace points > inside the brain. I generally do this. I don't know how FT handles > those outside the brain source points really. You could give this a try. > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked for NaN and Inf values in powspctrm and crsspctrm of > freqAll. There are none. However, I checked for NaN values in > grid.leadfield and it has some. I thought that these were NaN values > in the points of the grid outside a brain region, but I might be > mistaken. > > grid = > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Ah. Interesting. Good that error changes. So that was the problem before. > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked the labels and they were the same, except for whether they > were in capital letters. So I added the following before > ft_sourceanalysis: > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > This way the labels of the elec structure and freqAll are in capital > letters. > > And now I get a different error (although still within the function > beamformer_dics): > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > What could it be? > > Best regards, > > Laura > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I too had the same suggestion as Johanna's. > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > > > wrote: > > Dear Johanna, > > Thank you for your suggestion. > > On step 2 in the code, I select from the elec structure the channels > that are included in the frequency data. So the elec structure used > for preparing the leadfield has 128 electrodes, the same as the data > (data_rs, data 4, and therefore freqAll). I checked this precisely > because I read a previous thread discussing that issue. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hi Laura, > > Does your data have the same channels as the leadfield (as the > electrodes that went in to compute the leadfield)? I often see that > error when there is a mismatch of channels in that way. > > Best, > > Johanna > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado > >: > > Dear Fieldtrip users, > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and > the headmodel. That seems to work ok. However, at the step of source > analysis, I get the following error: > > Error using * > > Inner matrix dimensions must agree. > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2% Obtained after adjusting electrodes on scalp > surface interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of > channels as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > Cheers, > > Laura Rueda Delgado > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From bankimchander at gmail.com Tue Jun 3 18:40:05 2014 From: bankimchander at gmail.com (Bankim Chander) Date: Tue, 3 Jun 2014 18:40:05 +0200 Subject: [FieldTrip] convert data .mat to .ds (z.imane) Message-ID: Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander Applied Neurotechnology Working Group Institute for Medical Psychology and Behavioural Neurobiology Department of Psychiatry and Psychotherapy Eberhard Karls Universität Tübingen Calwer Str. 14 D-72076 Tübingen -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Wed Jun 4 02:41:22 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 00:41:22 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538D8B51.6040508@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>,<538D8B51.6040508@donders.ru.nl> Message-ID: <1401842462961.53202@flinders.edu.au> Hey Jorn, You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. My code is as follows: (I used an atlas to get the grid coordinates) % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid.unit = 'mm'; cfg.dim = atlas_grid.dim; cfg.pos = pos; cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; source = ft_sourceanalysis( cfg, timelock); Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. Any suggestions? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Tuesday, 3 June 2014 6:16 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Wed Jun 4 03:15:46 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 01:15:46 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401842462961.53202@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> Message-ID: <1401844526765.83574@flinders.edu.au> Jorn, There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. I have hit a wall of issues haha Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Wednesday, 4 June 2014 10:11 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hey Jorn, You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. My code is as follows: (I used an atlas to get the grid coordinates) % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid.unit = 'mm'; cfg.dim = atlas_grid.dim; cfg.pos = pos; cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; source = ft_sourceanalysis( cfg, timelock); Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. Any suggestions? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Tuesday, 3 June 2014 6:16 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From karl.doron at gmail.com Wed Jun 4 03:28:36 2014 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 03 Jun 2014 18:28:36 -0700 Subject: [FieldTrip] emotiv2ft OSX? Message-ID: Hello, I’m wondering if anyone has been able to compile emotiv2ft on for OSX (64 bit) yet. From some other threads related to the subject, the issue seemed to be a conio.h file that was DOS only. However, this may have been corrected with newer versions of Xcode which have curses.h. The error I’m getting seems to be with the GDF writer (pasted below) Thanks, karl doron -> llvm-g++ -c -I/Applications/MATLAB_R2012b.app/extern/include -I/Applications/MATLAB_R2012b.app/simulink/include -DMATLAB_MEX_FILE -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ -mmacosx-version-min=10.5 -DMX_COMPAT_32 -O2 -DNDEBUG "emotiv2ft.cc" In file included from emotiv2ft.cc:7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/OnlineDataManager.h:5: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/GDF_BackgroundWriter.h:1: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/GdfWriter.h:103:10: error: cannot initialize return object of type 'GDF_Type' with an rvalue of type 'int' return 0; ^ emotiv2ft.cc:114:3: error: use of undeclared identifier 'Sleep'; did you mean 'sleep'? Sleep(10); ^~~~~ sleep /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/unistd.h:475:3: note: 'sleep' declared here sleep(unsigned int) __DARWIN_ALIAS_C(sleep); ^ 2 errors generated. mex: compile of ' "emotiv2ft.cc"' failed. --- Karl Doron, PhD University of California, San Diego -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 4 09:42:27 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 04 Jun 2014 09:42:27 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401844526765.83574@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au> Message-ID: <538ECDE3.90803@donders.ru.nl> Hi Tyler, I thought you are talking about mvaranalysis - why is the code you've pasted about leadfields and lcmv beamforming? Best, Jörn On 6/4/2014 3:15 AM, Tyler Grummett wrote: > Jorn, > > There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. > > I have hit a wall of issues haha > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett > Sent: Wednesday, 4 June 2014 10:11 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hey Jorn, > > You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. > > My code is as follows: (I used an atlas to get the grid coordinates) > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > cfg.grid.unit = 'mm'; > cfg.dim = atlas_grid.dim; > cfg.pos = pos; > cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > % Source Analysis: without contrasting condition > cfg = []; > cfg.channel = 'EEG'; > cfg.method = 'lcmv'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > source = ft_sourceanalysis( cfg, timelock); > > Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. > > Any suggestions? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Tuesday, 3 June 2014 6:16 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember > correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > > On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running >> using the coherence method for connectivity analysis (hence I didnt >> need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data >> could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl >> on behalf of jan-mathijs schoffelen >> >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >> > > wrote: >> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>> size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl >>> >> > on behalf of jan-mathijs >>> schoffelen >> > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>> likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the >>>> toolbox between trying it >>>> with the old data and with the new data. I have now updated the >>>> fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Wed Jun 4 09:53:05 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 07:53:05 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538ECDE3.90803@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>,<538ECDE3.90803@donders.ru.nl> Message-ID: <1401868365953.99873@flinders.edu.au> Hey Jorn, I was just checking to see if I was calculating the beamformer correctly. Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid and Zgrid as the atlas). I was trying to increase my rank (or decrease rank deficiency by changing my code). However, no matter what I have tried thus far, nothing has helped. Tyler. ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Wednesday, 4 June 2014 5:12 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, I thought you are talking about mvaranalysis - why is the code you've pasted about leadfields and lcmv beamforming? Best, Jörn On 6/4/2014 3:15 AM, Tyler Grummett wrote: > Jorn, > > There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. > > I have hit a wall of issues haha > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett > Sent: Wednesday, 4 June 2014 10:11 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hey Jorn, > > You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. > > My code is as follows: (I used an atlas to get the grid coordinates) > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > cfg.grid.unit = 'mm'; > cfg.dim = atlas_grid.dim; > cfg.pos = pos; > cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > % Source Analysis: without contrasting condition > cfg = []; > cfg.channel = 'EEG'; > cfg.method = 'lcmv'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > source = ft_sourceanalysis( cfg, timelock); > > Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. > > Any suggestions? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Tuesday, 3 June 2014 6:16 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember > correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > > On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running >> using the coherence method for connectivity analysis (hence I didnt >> need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data >> could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl >> on behalf of jan-mathijs schoffelen >> >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >> > > wrote: >> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>> size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl >>> >> > on behalf of jan-mathijs >>> schoffelen >> > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>> likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the >>>> toolbox between trying it >>>> with the old data and with the new data. I have now updated the >>>> fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Wed Jun 4 10:11:03 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 4 Jun 2014 10:11:03 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401868365953.99873@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au> Message-ID: <780D308F-F1DE-423F-A93B-0DDC59B02206@donders.ru.nl> Hi Tyler, It’s impossible to increase the rank of your data. The rank of your data will be limited by the number of independent channels in the data. I don’t know whether you have used a maxfilter or not, and whether you were doing the source reconstruction on the gradiometers alone, or on all channels etc. Irrespective of this, if you are ‘upsampling’ the number of ‘channels’ artificially by concatenating across reconstructed dipoles ---(aggravating the issue by appending the x/y/z directions per dipole, and even more aggravating it by using rank-reduced leadfields (but note that without rank reduced leadfields it will be problematic: not only due to the dimensionality, but also because of the fact that in MEG the most ‘radial’ component picks up a lot of noise, thus disturbing the quality of the estimates))—- the rank in the reconstructed data will never be more than the number of channels. Thus, if you want to have a meaningful multivariate decomposition, the ‘multi’ in multivariate should be less than the number of channels (where in addition I assume that you have recorded a sufficient amount of data in order for a somewhat robust estimation of the AR-coefficients). Would it make sense to start off with the computation of pairwise models? I.e. estimating the AR-model for each dipole pair? Best, Jan-Mathijs On Jun 4, 2014, at 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >>>> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 4 10:15:13 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 04 Jun 2014 10:15:13 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401868365953.99873@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au> Message-ID: <538ED591.8000108@donders.ru.nl> Hi Tyler, ah I see, so the 'source'-structure you get from the beamforming serves to create the 'data'-structure to run mvaranalysis. cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your data, it reduces the rank of leadfield dimensionality (a dipole has moments in 3 directions, x,y,z). The interpolation does not work for you, because you do not have a full 3D grid anymore but rather individual grid points. Of course one could interpolate, but it would be far from optimal, so FieldTrip refuses to do so (imagine you want to interpolate to a 2D grid, e.g. a square, but you only have a data point of the center of that 2D grid). Instead of using 116 gridpoints why not lump them together to regions of interest. That way you'd probably get only a handful of 'voxels', and you probably get rid of the rank deficiency. However, I am not quite sure what you want to achieve with this analysis, so I am not sure whether I give adequate help advise ;) Best, Jörn On 6/4/2014 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >> >> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From clara.scholl at gmail.com Wed Jun 4 17:51:59 2014 From: clara.scholl at gmail.com (Clara A. Scholl) Date: Wed, 4 Jun 2014 11:51:59 -0400 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis Message-ID: Dear FieldTrip Community, I have a question regarding the frequency axis of a fourier spectrum calculated using ft_freqanalysis. How do I specify the input for ft_freqanalysis to generate an evenly spaced frequency axis? I would like to calculate the fourier spectrum between 2 and 30 Hz in steps of 2 Hz (foi=2:2:30), full code here: >>>>ft_freqanalysis input specification<<<<< subj=598; load(['../subj' num2str(subj) 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat' ]); cfg=[]; cfg.channel={'E59' 'E19'}; data=ft_selectdata(cfg, dataSame); %data=dataSame; cfg = []; cfg.keeptrials = 'yes'; cfg.keepindividual = 'yes'; cfg.channel = {'all'}; cfg.method = 'mtmconvol'; cfg.output ='fourier'; cfg.toi = -0.2:0.01:1.0; cfg.foi = 2:2:30; %frequency steps of 2Hz cfg.taper = 'hanning'; cfg.t_ftimwin=ones(1,15).*.2; %cfg.t_ftimwin=1./[2:2:30]; TFR = ft_freqanalysis(cfg, data); >>>>end input specification<<<<< >>>>output<<<<< TFR = label: {2x1 cell} dimord: 'rpttap_chan_freq_time' freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] time: [1x121 double] fourierspctrm: [4-D double] cumtapcnt: [452x15 double] elec: [1x1 struct] cfg: [1x1 struct] >>>>end output<<<<< The output from this code has uneven spacing on the frequency axis. Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, see TFR.freq above. TFR.freq is the same (uneven) for different output choices (fourier, powandcsd) and whether the length of time windows are the same at each frequency or vary by frequency. How can I run ft_freqanalysis to generate an evenly spaced frequency axis? Downstream functions (ft_connectivityanalysis with method granger) check for an evenly spaced frequency axis. I am using fieldtrip version 20140603. Thanks immensely, Clara -------------- next part -------------- An HTML attachment was scrubbed... URL: From clara.scholl at gmail.com Wed Jun 4 18:03:12 2014 From: clara.scholl at gmail.com (Clara A. Scholl) Date: Wed, 4 Jun 2014 12:03:12 -0400 Subject: [FieldTrip] Time lag for granger with input freq data Message-ID: Dear FieldTrip Community, I have a question about ft_connectivityanalysis using method granger with input freq data: how do I specify the time lag? If no time lag is specified, is a time lag automatically selected? I get plausible results with the following inputs (only specifying channelcmb and method, data are freq structure) but I haven't specified a time lag… >>>>snip<<<<< cfg=[]; cfg.channelcmb={'E59' 'all'}; cfg.method='granger'; w=ft_connectivityanalysis(cfg, TFR) >>>>end snip<<<< Sincerely, Clara -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chiran.Doshi at childrens.harvard.edu Wed Jun 4 18:58:10 2014 From: Chiran.Doshi at childrens.harvard.edu (Doshi, Chiran) Date: Wed, 4 Jun 2014 16:58:10 +0000 Subject: [FieldTrip] Small error in dipole_fit.m function Message-ID: Hi All, I noticed a small bug in https://github.com/fieldtrip/fieldtrip/blob/master/inverse/dipole_fit.m On line 89, instead of str2fun it should be str2func. With str2fun it was not enabling use of an explicit optimization algorithm. Chiran Doshi, MS MEG system technologist Department of Newborn Medicine Boston Children's Hospital Phone: 781-216-1136 Fax: 781-216-1172 -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Wed Jun 4 19:26:22 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Wed, 4 Jun 2014 19:26:22 +0200 Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool Message-ID: Dear all, I again have some basic issues... Today I tried to replace some bad channels in my data. I used cfg = []; cfg.badchannel = {'E68', 'E94'}; cfg.neighbours = neighbours; cfg.method = 'spline'; obs90_1_data_int = ft_channelrepair(cfg,obs90_1_data_clean4); Unfortunately if I inspect my data afterwards the channel look as bad as before. As Output I get: interpolating channels for 72 trials ........................................................................ the call to "ft_channelrepair" took 3 seconds and required the additional allocation of an estimated 209 MB creating layout from electrode file GSN-HydroCel-129.sfp creating layout for egi128 system the call to "ft_layoutplot" took 0 seconds and required the additional allocation of an estimated 4 MB the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_prepare_neighbours at 138 there are on average 7.4 neighbours per channel Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_neighbourplot at 83 In ft_prepare_neighbours at 250 Any ideas? Furthermore I am struggling a bit with the manual rejection tool using data browser. My problem is that it does not show me the channelnames at the y axis (which is unhandy) My (simple) code is cfg = []; cfg.viewmode = 'vertical'; cfg.continuous = 'no'; cfg = ft_databrowser(cfg,obs90_data_ica_cleaned); obs90_4_data_clean4 = ft_rejectartifact (cfg,obs90_data_ica_cleaned); Any ideas how I can see the names? Thanks a lot again Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jun 5 02:20:44 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 00:20:44 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538ED591.8000108@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>,<538ED591.8000108@donders.ru.nl> Message-ID: <1401927624823.94563@flinders.edu.au> Hey Jorn, First off, thank you and you are a champ. I am trying to create a virtual channel for each area of the brain using an atlas. Originally I was doing the following to get my grid: % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution % cfg.grid.unit = 'mm'; cfg.grid.xgrid = atlas_grid.xgrid; cfg.grid.ygrid = atlas_grid.ygrid; cfg.grid.zgrid = atlas_grid.zgrid; % cfg.dim = atlas_grid.dim; % cfg.pos = pos; cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: parameter = 'avg.pow'; cfg = []; cfg.downsample = 2; cfg.parameter = parameter; sourceInt = ft_sourceinterpolate( cfg, source, mri); And it gives me a plot where the cross-hair is outside the brain ( see attached). Ive made sure each step is using the MNI coordinate system. I honestly dont know how to create voxels, and how that would translate into channels. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Wednesday, 4 June 2014 5:45 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, ah I see, so the 'source'-structure you get from the beamforming serves to create the 'data'-structure to run mvaranalysis. cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your data, it reduces the rank of leadfield dimensionality (a dipole has moments in 3 directions, x,y,z). The interpolation does not work for you, because you do not have a full 3D grid anymore but rather individual grid points. Of course one could interpolate, but it would be far from optimal, so FieldTrip refuses to do so (imagine you want to interpolate to a 2D grid, e.g. a square, but you only have a data point of the center of that 2D grid). Instead of using 116 gridpoints why not lump them together to regions of interest. That way you'd probably get only a handful of 'voxels', and you probably get rid of the rank deficiency. However, I am not quite sure what you want to achieve with this analysis, so I am not sure whether I give adequate help advise ;) Best, Jörn On 6/4/2014 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >> >> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sourceplot.png Type: image/png Size: 49483 bytes Desc: sourceplot.png URL: From eelke.spaak at donders.ru.nl Thu Jun 5 09:47:08 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 09:47:08 +0200 Subject: [FieldTrip] Time lag for granger with input freq data In-Reply-To: References: Message-ID: Dear Clara, The Granger causality in ft_connectivityanalysis is always frequency-domain Granger (time-domain Granger is not implemented in FieldTrip). Frequency-domain Granger is lag-free, i.e., the Granger causality is estimated as a function of frequency; no explicit specification of lag is required. In some sense the frequencies correspond to different time lags at which causality is estimated. That said, there are two ways of estimating the cross-spectral density (CSD) required for frequency-domain Granger computation: the parametric and the non-parametric way. The non-parametric way is I guess most typically used; it involves ft_freqanalysis with cfg.method = 'mtmfft' or 'mtmconvol'. The parametric way involves first estimating a multivariate autoregressive model (ft_mvaranalysis) and subsequently computing the CSD from the estimated model coefficients (ft_freqanalysis with cfg.method = 'mvar'). In the parametric way of estimating the CSD, a time lag specification *is* required, namely when invoking ft_mvaranalysis. If I'm not mistaken, the choice of time lag at that step determines the effective frequency resolution of the CSD. Best, Eelke On 4 June 2014 18:03, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question about ft_connectivityanalysis using method granger with > input freq data: how do I specify the time lag? If no time lag is > specified, is a time lag automatically selected? I get plausible results > with the following inputs (only specifying channelcmb and method, data are > freq structure) but I haven't specified a time lag… > >>>>>snip<<<<< > > cfg=[]; > > cfg.channelcmb={'E59' 'all'}; > > cfg.method='granger'; > > > > w=ft_connectivityanalysis(cfg, TFR) > > >>>>>end snip<<<< > > Sincerely, > Clara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 09:48:52 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 09:48:52 +0200 Subject: [FieldTrip] Small error in dipole_fit.m function In-Reply-To: References: Message-ID: Hi Chiran, Thanks for reporting this, I just fixed it. Best, Eelke On 4 June 2014 18:58, Doshi, Chiran wrote: > Hi All, > > I noticed a small bug in > https://github.com/fieldtrip/fieldtrip/blob/master/inverse/dipole_fit.m > > On line 89, instead of str2fun it should be str2func. With str2fun it was > not enabling use of an explicit optimization algorithm. > > > Chiran Doshi, MS > MEG system technologist > Department of Newborn Medicine > Boston Children's Hospital > Phone: 781-216-1136 > Fax: 781-216-1172 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 5 09:55:54 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jun 2014 09:55:54 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: References: Message-ID: <5390228A.80408@donders.ru.nl> Hi Clara, regarding the frequency resolution, you can best read this: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i If you still have trouble understanding, you can check out this: http://www.youtube.com/watch?v=6EIBh5lHNSc So to get an equally spaced frequency axis, you space the frequency in cfg.foi in steps of your frequency resolution. I hope above links help you to find out what this means and how to do that ;) Best, Jörn On 6/4/2014 5:51 PM, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question regarding the frequency axis of a fourier spectrum > calculated using ft_freqanalysis. How do I specify the input for > ft_freqanalysis to generate an evenly spaced frequency axis? > > I would like to calculate the fourier spectrum between 2 and 30 Hz in > steps of 2 Hz (foi=2:2:30), full code here: > > >>>>ft_freqanalysis input specification<<<<< > > subj=598; > > load(['../subj'num2str(subj) > 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); > > cfg=[]; > > cfg.channel={'E59' 'E19'}; > > data=ft_selectdata(cfg, dataSame); > > %data=dataSame; > > cfg = []; > > cfg.keeptrials = 'yes'; > > cfg.keepindividual = 'yes'; > > cfg.channel = {'all'}; > > cfg.method = 'mtmconvol'; > > cfg.output ='fourier'; > > cfg.toi = -0.2:0.01:1.0; > > cfg.foi = 2:2:30; %frequency steps of 2Hz > > cfg.taper = 'hanning'; > > cfg.t_ftimwin=ones(1,15).*.2; > > %cfg.t_ftimwin=1./[2:2:30]; > > TFR = ft_freqanalysis(cfg, data); > > >>>>end input specification<<<<< > > >>>>output<<<<< > TFR = > > label: {2x1 cell} > dimord: 'rpttap_chan_freq_time' > freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 > 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] > time: [1x121 double] > fourierspctrm: [4-D double] > cumtapcnt: [452x15 double] > elec: [1x1 struct] > cfg: [1x1 struct] > > >>>>end output<<<<< > > The output from this code has uneven spacing on the frequency axis. > Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, > see TFR.freq above. TFR.freq is the same (uneven) for different > output choices (fourier, powandcsd) and whether the length of time > windows are the same at each frequency or vary by frequency. > > How can I run ft_freqanalysis to generate an evenly spaced frequency > axis? Downstream functions (ft_connectivityanalysis with method > granger) check for an evenly spaced frequency axis. I am using > fieldtrip version 20140603. > > Thanks immensely, > Clara > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Thu Jun 5 10:45:41 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 08:45:41 +0000 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <5390228A.80408@donders.ru.nl> References: , <5390228A.80408@donders.ru.nl> Message-ID: <1401957920922.45510@flinders.edu.au> Hey jorn and clara, I am having the same issue, I use the following code: % compute spectral transfer function cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'; cfg.tapsmofrq = 5; cfg.foi = 5:1:7; freq = ft_freqanalysis(cfg, data); and I get: freq = label: {1x116 cell} dimord: 'rpttap_chan_freq' freq: [5.2000 6 7.2000] fourierspctrm: [336x116x3 double] cumsumcnt: [14x1 double] cumtapcnt: [14x1 double] cfg: [1x1 struct] I had a look at your links and it isnt clear as to what should be changed in the code. It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. However, there are lines in the code that do the following: padding = cfg.pad*data.fsample; if padding on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 5:25 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis Hi Clara, regarding the frequency resolution, you can best read this: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i If you still have trouble understanding, you can check out this: http://www.youtube.com/watch?v=6EIBh5lHNSc So to get an equally spaced frequency axis, you space the frequency in cfg.foi in steps of your frequency resolution. I hope above links help you to find out what this means and how to do that ;) Best, Jörn On 6/4/2014 5:51 PM, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question regarding the frequency axis of a fourier spectrum > calculated using ft_freqanalysis. How do I specify the input for > ft_freqanalysis to generate an evenly spaced frequency axis? > > I would like to calculate the fourier spectrum between 2 and 30 Hz in > steps of 2 Hz (foi=2:2:30), full code here: > > >>>>ft_freqanalysis input specification<<<<< > > subj=598; > > load(['../subj'num2str(subj) > 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); > > cfg=[]; > > cfg.channel={'E59' 'E19'}; > > data=ft_selectdata(cfg, dataSame); > > %data=dataSame; > > cfg = []; > > cfg.keeptrials = 'yes'; > > cfg.keepindividual = 'yes'; > > cfg.channel = {'all'}; > > cfg.method = 'mtmconvol'; > > cfg.output ='fourier'; > > cfg.toi = -0.2:0.01:1.0; > > cfg.foi = 2:2:30; %frequency steps of 2Hz > > cfg.taper = 'hanning'; > > cfg.t_ftimwin=ones(1,15).*.2; > > %cfg.t_ftimwin=1./[2:2:30]; > > TFR = ft_freqanalysis(cfg, data); > > >>>>end input specification<<<<< > > >>>>output<<<<< > TFR = > > label: {2x1 cell} > dimord: 'rpttap_chan_freq_time' > freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 > 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] > time: [1x121 double] > fourierspctrm: [4-D double] > cumtapcnt: [452x15 double] > elec: [1x1 struct] > cfg: [1x1 struct] > > >>>>end output<<<<< > > The output from this code has uneven spacing on the frequency axis. > Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, > see TFR.freq above. TFR.freq is the same (uneven) for different > output choices (fourier, powandcsd) and whether the length of time > windows are the same at each frequency or vary by frequency. > > How can I run ft_freqanalysis to generate an evenly spaced frequency > axis? Downstream functions (ft_connectivityanalysis with method > granger) check for an evenly spaced frequency axis. I am using > fieldtrip version 20140603. > > Thanks immensely, > Clara > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 10:52:32 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 10:52:32 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401957920922.45510@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au> Message-ID: See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis and http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. Best, Eelke On 5 June 2014 10:45, Tyler Grummett wrote: > Hey jorn and clara, > > I am having the same issue, I use the following code: > > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); > > and I get: > > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] > > I had a look at your links and it isnt clear as to what should be changed in the code. > > It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. > However, there are lines in the code that do the following: > > padding = cfg.pad*data.fsample; > if padding error('the specified padding is too short'); > end > > As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Thursday, 5 June 2014 5:25 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > Hi Clara, > > regarding the frequency resolution, you can best read this: > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i > If you still have trouble understanding, you can check out this: > http://www.youtube.com/watch?v=6EIBh5lHNSc > > So to get an equally spaced frequency axis, you space the frequency in > cfg.foi in steps of your frequency resolution. I hope above links help > you to find out what this means and how to do that ;) > > Best, > Jörn > > On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >> Dear FieldTrip Community, >> >> I have a question regarding the frequency axis of a fourier spectrum >> calculated using ft_freqanalysis. How do I specify the input for >> ft_freqanalysis to generate an evenly spaced frequency axis? >> >> I would like to calculate the fourier spectrum between 2 and 30 Hz in >> steps of 2 Hz (foi=2:2:30), full code here: >> >> >>>>ft_freqanalysis input specification<<<<< >> >> subj=598; >> >> load(['../subj'num2str(subj) >> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >> >> cfg=[]; >> >> cfg.channel={'E59' 'E19'}; >> >> data=ft_selectdata(cfg, dataSame); >> >> %data=dataSame; >> >> cfg = []; >> >> cfg.keeptrials = 'yes'; >> >> cfg.keepindividual = 'yes'; >> >> cfg.channel = {'all'}; >> >> cfg.method = 'mtmconvol'; >> >> cfg.output ='fourier'; >> >> cfg.toi = -0.2:0.01:1.0; >> >> cfg.foi = 2:2:30; %frequency steps of 2Hz >> >> cfg.taper = 'hanning'; >> >> cfg.t_ftimwin=ones(1,15).*.2; >> >> %cfg.t_ftimwin=1./[2:2:30]; >> >> TFR = ft_freqanalysis(cfg, data); >> >> >>>>end input specification<<<<< >> >> >>>>output<<<<< >> TFR = >> >> label: {2x1 cell} >> dimord: 'rpttap_chan_freq_time' >> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >> time: [1x121 double] >> fourierspctrm: [4-D double] >> cumtapcnt: [452x15 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> >> >>>>end output<<<<< >> >> The output from this code has uneven spacing on the frequency axis. >> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >> see TFR.freq above. TFR.freq is the same (uneven) for different >> output choices (fourier, powandcsd) and whether the length of time >> windows are the same at each frequency or vary by frequency. >> >> How can I run ft_freqanalysis to generate an evenly spaced frequency >> axis? Downstream functions (ft_connectivityanalysis with method >> granger) check for an evenly spaced frequency axis. I am using >> fieldtrip version 20140603. >> >> Thanks immensely, >> Clara >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Thu Jun 5 11:16:07 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 09:16:07 +0000 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au>, Message-ID: <1401959747282.95357@flinders.edu.au> Hello everyone, For the interest of using the output in granger causality. How bad would it be if you did run the code: > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); Then just rounded off the output frequencies. > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] freq.freq = round( freq.freq) I just ran it through ft_connectivityanalysis and it didnt crash. I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak Sent: Thursday, 5 June 2014 6:22 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis and http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. Best, Eelke On 5 June 2014 10:45, Tyler Grummett wrote: > Hey jorn and clara, > > I am having the same issue, I use the following code: > > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); > > and I get: > > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] > > I had a look at your links and it isnt clear as to what should be changed in the code. > > It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. > However, there are lines in the code that do the following: > > padding = cfg.pad*data.fsample; > if padding error('the specified padding is too short'); > end > > As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Thursday, 5 June 2014 5:25 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > Hi Clara, > > regarding the frequency resolution, you can best read this: > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i > If you still have trouble understanding, you can check out this: > http://www.youtube.com/watch?v=6EIBh5lHNSc > > So to get an equally spaced frequency axis, you space the frequency in > cfg.foi in steps of your frequency resolution. I hope above links help > you to find out what this means and how to do that ;) > > Best, > Jörn > > On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >> Dear FieldTrip Community, >> >> I have a question regarding the frequency axis of a fourier spectrum >> calculated using ft_freqanalysis. How do I specify the input for >> ft_freqanalysis to generate an evenly spaced frequency axis? >> >> I would like to calculate the fourier spectrum between 2 and 30 Hz in >> steps of 2 Hz (foi=2:2:30), full code here: >> >> >>>>ft_freqanalysis input specification<<<<< >> >> subj=598; >> >> load(['../subj'num2str(subj) >> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >> >> cfg=[]; >> >> cfg.channel={'E59' 'E19'}; >> >> data=ft_selectdata(cfg, dataSame); >> >> %data=dataSame; >> >> cfg = []; >> >> cfg.keeptrials = 'yes'; >> >> cfg.keepindividual = 'yes'; >> >> cfg.channel = {'all'}; >> >> cfg.method = 'mtmconvol'; >> >> cfg.output ='fourier'; >> >> cfg.toi = -0.2:0.01:1.0; >> >> cfg.foi = 2:2:30; %frequency steps of 2Hz >> >> cfg.taper = 'hanning'; >> >> cfg.t_ftimwin=ones(1,15).*.2; >> >> %cfg.t_ftimwin=1./[2:2:30]; >> >> TFR = ft_freqanalysis(cfg, data); >> >> >>>>end input specification<<<<< >> >> >>>>output<<<<< >> TFR = >> >> label: {2x1 cell} >> dimord: 'rpttap_chan_freq_time' >> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >> time: [1x121 double] >> fourierspctrm: [4-D double] >> cumtapcnt: [452x15 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> >> >>>>end output<<<<< >> >> The output from this code has uneven spacing on the frequency axis. >> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >> see TFR.freq above. TFR.freq is the same (uneven) for different >> output choices (fourier, powandcsd) and whether the length of time >> windows are the same at each frequency or vary by frequency. >> >> How can I run ft_freqanalysis to generate an evenly spaced frequency >> axis? Downstream functions (ft_connectivityanalysis with method >> granger) check for an evenly spaced frequency axis. I am using >> fieldtrip version 20140603. >> >> Thanks immensely, >> Clara >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 11:27:30 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 11:27:30 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401959747282.95357@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au> <1401959747282.95357@flinders.edu.au> Message-ID: Did you read the links I gave you on padding etc.? On 5 June 2014 11:16, Tyler Grummett wrote: > Hello everyone, > > For the interest of using the output in granger causality. > > How bad would it be if you did run the code: > >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); > > Then just rounded off the output frequencies. > >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] > > freq.freq = round( freq.freq) > > I just ran it through ft_connectivityanalysis and it didnt crash. > > I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 5 June 2014 6:22 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis > and > http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean > > Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. > > Best, > Eelke > > On 5 June 2014 10:45, Tyler Grummett wrote: >> Hey jorn and clara, >> >> I am having the same issue, I use the following code: >> >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); >> >> and I get: >> >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] >> >> I had a look at your links and it isnt clear as to what should be changed in the code. >> >> It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. >> However, there are lines in the code that do the following: >> >> padding = cfg.pad*data.fsample; >> if padding> error('the specified padding is too short'); >> end >> >> As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Thursday, 5 June 2014 5:25 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis >> >> Hi Clara, >> >> regarding the frequency resolution, you can best read this: >> http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i >> If you still have trouble understanding, you can check out this: >> http://www.youtube.com/watch?v=6EIBh5lHNSc >> >> So to get an equally spaced frequency axis, you space the frequency in >> cfg.foi in steps of your frequency resolution. I hope above links help >> you to find out what this means and how to do that ;) >> >> Best, >> Jörn >> >> On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >>> Dear FieldTrip Community, >>> >>> I have a question regarding the frequency axis of a fourier spectrum >>> calculated using ft_freqanalysis. How do I specify the input for >>> ft_freqanalysis to generate an evenly spaced frequency axis? >>> >>> I would like to calculate the fourier spectrum between 2 and 30 Hz in >>> steps of 2 Hz (foi=2:2:30), full code here: >>> >>> >>>>ft_freqanalysis input specification<<<<< >>> >>> subj=598; >>> >>> load(['../subj'num2str(subj) >>> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >>> >>> cfg=[]; >>> >>> cfg.channel={'E59' 'E19'}; >>> >>> data=ft_selectdata(cfg, dataSame); >>> >>> %data=dataSame; >>> >>> cfg = []; >>> >>> cfg.keeptrials = 'yes'; >>> >>> cfg.keepindividual = 'yes'; >>> >>> cfg.channel = {'all'}; >>> >>> cfg.method = 'mtmconvol'; >>> >>> cfg.output ='fourier'; >>> >>> cfg.toi = -0.2:0.01:1.0; >>> >>> cfg.foi = 2:2:30; %frequency steps of 2Hz >>> >>> cfg.taper = 'hanning'; >>> >>> cfg.t_ftimwin=ones(1,15).*.2; >>> >>> %cfg.t_ftimwin=1./[2:2:30]; >>> >>> TFR = ft_freqanalysis(cfg, data); >>> >>> >>>>end input specification<<<<< >>> >>> >>>>output<<<<< >>> TFR = >>> >>> label: {2x1 cell} >>> dimord: 'rpttap_chan_freq_time' >>> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >>> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >>> time: [1x121 double] >>> fourierspctrm: [4-D double] >>> cumtapcnt: [452x15 double] >>> elec: [1x1 struct] >>> cfg: [1x1 struct] >>> >>> >>>>end output<<<<< >>> >>> The output from this code has uneven spacing on the frequency axis. >>> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >>> see TFR.freq above. TFR.freq is the same (uneven) for different >>> output choices (fourier, powandcsd) and whether the length of time >>> windows are the same at each frequency or vary by frequency. >>> >>> How can I run ft_freqanalysis to generate an evenly spaced frequency >>> axis? Downstream functions (ft_connectivityanalysis with method >>> granger) check for an evenly spaced frequency axis. I am using >>> fieldtrip version 20140603. >>> >>> Thanks immensely, >>> Clara >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 5 11:29:08 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jun 2014 11:29:08 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401959747282.95357@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au>, <1401959747282.95357@flinders.edu.au> Message-ID: <53903864.3050206@donders.ru.nl> Hi Tyler, > How bad would it be if [...] it's wrong, don't do that. Best, Jörn On 6/5/2014 11:16 AM, Tyler Grummett wrote: > Hello everyone, > > For the interest of using the output in granger causality. > > How bad would it be if you did run the code: > >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); > Then just rounded off the output frequencies. > >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] > freq.freq = round( freq.freq) > > I just ran it through ft_connectivityanalysis and it didnt crash. > > I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 5 June 2014 6:22 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis > and > http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean > > Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. > > Best, > Eelke > > On 5 June 2014 10:45, Tyler Grummett wrote: >> Hey jorn and clara, >> >> I am having the same issue, I use the following code: >> >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); >> >> and I get: >> >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] >> >> I had a look at your links and it isnt clear as to what should be changed in the code. >> >> It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. >> However, there are lines in the code that do the following: >> >> padding = cfg.pad*data.fsample; >> if padding> error('the specified padding is too short'); >> end >> >> As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Thursday, 5 June 2014 5:25 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis >> >> Hi Clara, >> >> regarding the frequency resolution, you can best read this: >> http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i >> If you still have trouble understanding, you can check out this: >> http://www.youtube.com/watch?v=6EIBh5lHNSc >> >> So to get an equally spaced frequency axis, you space the frequency in >> cfg.foi in steps of your frequency resolution. I hope above links help >> you to find out what this means and how to do that ;) >> >> Best, >> Jörn >> >> On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >>> Dear FieldTrip Community, >>> >>> I have a question regarding the frequency axis of a fourier spectrum >>> calculated using ft_freqanalysis. How do I specify the input for >>> ft_freqanalysis to generate an evenly spaced frequency axis? >>> >>> I would like to calculate the fourier spectrum between 2 and 30 Hz in >>> steps of 2 Hz (foi=2:2:30), full code here: >>> >>>>>>> ft_freqanalysis input specification<<<<< >>> subj=598; >>> >>> load(['../subj'num2str(subj) >>> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >>> >>> cfg=[]; >>> >>> cfg.channel={'E59' 'E19'}; >>> >>> data=ft_selectdata(cfg, dataSame); >>> >>> %data=dataSame; >>> >>> cfg = []; >>> >>> cfg.keeptrials = 'yes'; >>> >>> cfg.keepindividual = 'yes'; >>> >>> cfg.channel = {'all'}; >>> >>> cfg.method = 'mtmconvol'; >>> >>> cfg.output ='fourier'; >>> >>> cfg.toi = -0.2:0.01:1.0; >>> >>> cfg.foi = 2:2:30; %frequency steps of 2Hz >>> >>> cfg.taper = 'hanning'; >>> >>> cfg.t_ftimwin=ones(1,15).*.2; >>> >>> %cfg.t_ftimwin=1./[2:2:30]; >>> >>> TFR = ft_freqanalysis(cfg, data); >>> >>>>>>> end input specification<<<<< >>>>>>> output<<<<< >>> TFR = >>> >>> label: {2x1 cell} >>> dimord: 'rpttap_chan_freq_time' >>> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >>> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >>> time: [1x121 double] >>> fourierspctrm: [4-D double] >>> cumtapcnt: [452x15 double] >>> elec: [1x1 struct] >>> cfg: [1x1 struct] >>> >>>>>>> end output<<<<< >>> The output from this code has uneven spacing on the frequency axis. >>> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >>> see TFR.freq above. TFR.freq is the same (uneven) for different >>> output choices (fourier, powandcsd) and whether the length of time >>> windows are the same at each frequency or vary by frequency. >>> >>> How can I run ft_freqanalysis to generate an evenly spaced frequency >>> axis? Downstream functions (ft_connectivityanalysis with method >>> granger) check for an evenly spaced frequency axis. I am using >>> fieldtrip version 20140603. >>> >>> Thanks immensely, >>> Clara >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Thu Jun 5 11:32:50 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Thu, 05 Jun 2014 11:32:50 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401927624823.94563@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au> Message-ID: <53903942.8010009@donders.ru.nl> Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From christoph.braun at uni-tuebingen.de Thu Jun 5 11:34:50 2014 From: christoph.braun at uni-tuebingen.de (Christoph Braun) Date: Thu, 05 Jun 2014 11:34:50 +0200 Subject: [FieldTrip] =?iso-8859-15?q?PhD_postion_at_the_University_of_T=FC?= =?iso-8859-15?q?bingen?= Message-ID: <539039BA.1090902@uni-tuebingen.de> *PhD Postion at the University of Tübingen in the EU-Initial Trainining Network "NeuroGut (www.neurogut.de)" *In the project effects of pro- and pre biotic coumpounds of nutrition on cognitive processing are studied using magnetoencephalography. Since the project is an EU funded project EU eligility and mobility rules apply. Candidates must be, at the time of recruitment by the host organization, in the first four years (full-time equivalent) of their research careers and not yet have been awarded a doctoral degree. This is measured from the date when they obtained the degree which would formally entitle them to embark on a doctorate, either in the country in which the degree was obtained or in the country in which the research training is provided, irrespective of whether or not a doctorate is envisaged. Researchers can be of any nationality, however, at the time of recruitment by the host organisation, researchers must not have resided or carried out their main activity (work, studies, etc) in the country of their host organisation for more than 12 months in the 3 years immediately prior to the reference date. If you are interested, please, find further details in the attached description of the position and send your application to: University Hospital Tübingen, Germany Department of Internal Medicine VI: Psychosomatic Medicine and Psychotherapy - Research Laboratories - Director of Research: Prof. Dr. Paul Enck Frondsbergstr. 23, 72076 Tübingen, Germany E-MAIL: paul.enck at uni-tuebingen.de PHONE office: +49 7071 29-89118; cell: +49 179 4986459, FAX: +49 7071 29-4382 WEBSITE: http://www.psychosomatik-tuebingen.de/de/index.php -- Prof. Christoph Braun MEG-Center University of Tübingen Otfried-Müller-Str. 47 72076 Tübingen Germany Tel: +49 (0)7071 29 87705 Fax: +49 (0)7071 29 5706 Email: christoph.braun at uni-tuebingen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: job-description_T?bingen Pos 2_HBM.pdf Type: application/pdf Size: 87846 bytes Desc: not available URL: From tyler.grummett at flinders.edu.au Thu Jun 5 11:36:57 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 09:36:57 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <53903942.8010009@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au>,<53903942.8010009@donders.ru.nl> Message-ID: <1401960997142.37788@flinders.edu.au> Hey jorn, Yeah I tried that, I entered in specific grid points into the leadfield. The rank was still 37 ( out of 116), I still cant really work it out haha. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 7:02 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From pia.destefano at studenti.unipr.it Thu Jun 5 12:15:45 2014 From: pia.destefano at studenti.unipr.it (PIA DE STEFANO) Date: Thu, 5 Jun 2014 12:15:45 +0200 Subject: [FieldTrip] Trouble with CHANNEL REPLACEMENT EEG Message-ID: Dear all, Dear Katrin, i have exactly the same trouble that you have with channel replacement!! I really hope somebody will help us to understand and solve this problem! Thank you all Pia -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Jun 5 12:21:16 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 5 Jun 2014 12:21:16 +0200 (CEST) Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool In-Reply-To: Message-ID: <2084370033.7272994.1401963676120.JavaMail.root@sculptor.zimbra.ru.nl> Dear Katrin, Regarding the interpolation question, the spline method, as far as I know, is based on the entire scalp instead of a small area. Then the interpolation output depends on the signals in all your scalp, not only the closest set of sensors to the bad channel you want to interpolate. You can recheck your data and/or choose other methods like 'nearest' or 'average' to compare your results and investigate what could it explain your output. To plot the channel labels with ft_databrowser, type cfg.plotlabels='yes'. To see other options check the help of the function. best, Diego ----- Original Message ----- From: "KatrinH Heimann" To: "FieldTrip discussion list" Sent: Wednesday, 4 June, 2014 7:26:22 PM Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool Dear all, I again have some basic issues... Today I tried to replace some bad channels in my data. I used cfg = []; cfg.badchannel = { 'E68' , 'E94' }; cfg.neighbours = neighbours; cfg.method = 'spline' ; obs90_1_data_int = ft_channelrepair(cfg,obs90_1_data_clean4); Unfortunately if I inspect my data afterwards the channel look as bad as before. As Output I get: interpolating channels for 72 trials ........................................................................ the call to "ft_channelrepair" took 3 seconds and required the additional allocation of an estimated 209 MB creating layout from electrode file GSN-HydroCel-129.sfp creating layout for egi128 system the call to "ft_layoutplot" took 0 seconds and required the additional allocation of an estimated 4 MB the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_prepare_neighbours at 138 there are on average 7.4 neighbours per channel Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_neighbourplot at 83 In ft_prepare_neighbours at 250 Any ideas? Furthermore I am struggling a bit with the manual rejection tool using data browser. My problem is that it does not show me the channelnames at the y axis (which is unhandy) My (simple) code is cfg = []; cfg.viewmode = 'vertical' ; cfg.continuous = 'no' ; cfg = ft_databrowser(cfg,obs90_data_ica_cleaned) ; obs90_4_data_clean4 = ft_rejectartifact (cfg,obs90_data_ica_cleaned); Any ideas how I can see the names? Thanks a lot again Katrin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From d.lozanosoldevilla at fcdonders.ru.nl Thu Jun 5 17:56:38 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 5 Jun 2014 17:56:38 +0200 (CEST) Subject: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW In-Reply-To: Message-ID: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ana, During our last fieldtrip meeting, we discussed about the triggering issues with the *RAW file format and here some thoughts: 1) What you reported is not a fieldtrip problem per se. The way NETSTATION is configured in your lab allow you to record the triggers in bits, not in decimal numbers. I don't know how but there should be a way to configure your acquisition device in such a way that triggers are not transform from decimal to binary representation. 2) Make your own trialfun to solve the conversion problem. I created a FAQ titled "How can I transform trigger values from bits to decimal representation with a trialfun?" on where you'll find code to make the transition from bits to decimals again. This FAQ could also be useful for other users having similar problems (binary to decimal conversion) with other acquisition systems. I hope this helps Diego ----- Original Message ----- > From: "Ana Laura Diez Martini" > To: "Diego Lozano" , "FieldTrip > discussion list" > Sent: Tuesday, 27 May, 2014 12:25:39 AM > Subject: Re: [FieldTrip] Cannot read the events of a .BDF file > exported from an EGI .RAW > Thank you Arjen, Diego and Chungki Lee! > I tried with the .RAW and it reads the event. The problem is that my > triggers have the following format "11,12,13,14,15,21,22...." . > Netstation instead of saving them as they are, returns them in this > way: say my trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + > DIN8 + DIN2. so I had to convert them into my original triggers. After > that I can either save the set (I tried this but it didn't work) or > export it to bdf. When I open the exported file in EEGlab, it reads > the events correctly, but fieldtrip doesn't. > Any ideas? Thanks!! > On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl > wrote: > > Dear Ana, > > Sorry for my file extension confusion: edf instead of bdf. However, > > I > > don't know a way to read events coded in BDF format exported by > > NETSTATION. I encounter this problem in the past but I had no > > problems > > with RAW file format > > Dear Chungki, > > Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but > > Ana > > was refering to a different eeg system that has the same fileformat > > extension. > > best, > > Diego > > > From: "Chungki Lee" < dr.chungki.lee at gmail.com > > > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Monday, 26 May, 2014 11:18:34 AM > > > Subject: Re: [FieldTrip] Cannot read the events of a .BDF file > > > exported from an EGI .RAW > > > Dear all > > > Fieldtrip can read events in BDF format ! > > > Hear simple examples > > > example #1 > > > %% > > > cfg = []; > > > cfg.dataset = '~~~ '; % your filename with file extension; > > > cfg.trialdef.eventtype = 'STATUS'; % Status notation maybe > > > Biosemi's > > > tigger name > > > cfg.trialdef.eventvalue = 1; % your event value > > > cfg.trialdef.prestim = 4; % before stimulation (sec), only use > > > positive value > > > cfg.trialdef.poststim = 8; % after stimulation (sec) , only use > > > positive value > > > cfg = ft_definetrial(cfg); > > > cfg.method = 'trial'; > > > data = ft_preprocessing(cfg); > > > %% > > > example #2 > > > %% > > > % if you executed these command lines > > > cfg = []; > > > cfg.dataset = '~~~ '; % your filename with file extension; > > > cfg.trialdef.eventtype = '?'; % Status notation maybe Biosemi's > > > tigger > > > name > > > cfg = ft_definetrial(cfg); > > > % result example #2 > > > the following events were found in the datafile > > > event type: 'CM_in_range' with event values: > > > event type: 'Epoch' with event values: > > > event type: 'STATUS' with event values: 1 2 3 4 255 <----------- > > > "this > > > indicate your file configuration for trigger information" > > > no trials have been defined yet, see FT_DEFINETRIAL for further > > > help > > > found 255 events > > > created 0 trials > > > the call to "ft_definetrial" took 8 seconds > > > have fun~!! > > > 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla < > > > d.lozanosoldevilla at fcdonders.ru.nl > : > > > > Hi Ana, > > > > Fieldtrip does not read events in BDF format. Take a look to our > > > > wiki: > > > > http://fieldtrip.fcdonders.nl/getting_started/egi > > > > • > > > > EDF+ (.edf) All channels, including PIB channels, are read in > > > > correctly, including channel labels. However, the events, which > > > > are > > > > stored on the annotation channel, are written in a way by Net > > > > Station > > > > that is not compatible with the edf+ reading implementation in > > > > FieldTrip. So, events do not come out properly. Also > > > > discontinuous > > > > epochs are “glued” together as one “continuous” data stream. > > > > As Arjen suggested, with *.RAW you shouldn't have any problem. > > > > event = ft_read_event('*.RAW') > > > > If you encounter it, please let us know. > > > > best, > > > > Diego > > > > On 26 May 2014 08:59, Arjen Stolk < a.stolk8 at gmail.com > wrote: > > > > > Hi Ana Laura, > > > > > Have you tried importing the .RAW file directly? That is, by > > > > > specifying cfg.dataset = 'XXX.raw'? > > > > > Best regards, > > > > > Arjen > > > > > 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini < > > > > > diezmartini at gmail.com > : > > > > > > Hi all! > > > > > > This is the .BDF file of one of my EEG subjects. For my last > > > > > > experiment I used a Biosemi system and now I'm using an EGI > > > > > > system > > > > > > which gives me .RAW files. I exported the .RAW file with > > > > > > EEGlab > > > > > > to > > > > > > .BDF format and I tried using the scripts I use to analise > > > > > > the > > > > > > data > > > > > > of > > > > > > my previous experiment but I realised that it was not > > > > > > reading > > > > > > the > > > > > > events: > > > > > > cfg = []; > > > > > > cfg.dataset = ' (location)'; > > > > > > cfg.trialdef.eventtype = '?'; > > > > > > definetrial(cfg); > > > > > > Warning: no trialfun was specified, using trialfun_general > > > > > > > In definetrial at 79 > > > > > > evaluating trialfunction 'trialfun_general' > > > > > > no events were found in the datafile > > > > > > no trials have been defined yet, see DEFINETRIAL for further > > > > > > help > > > > > > found 0 events > > > > > > created 0 trials > > > > > > EEGlab does read them. Any idea of what could be wrong? > > > > > > Thank you all!! > > > > > > _______________________________________________ > > > > > > fieldtrip mailing list > > > > > > fieldtrip at donders.ru.nl > > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > > > > > fieldtrip mailing list > > > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > > > ---------------------------------------------------------------- > > > Chungki Lee, Ph.D. > > > Post-doc > > > Biomedical Research Institute > > > Korea Institute of Science and Technology > > > E-mail: chungki at kist.re.kr > > > Tel: +82-2-958-5636 , C.P: +82-10-5223-7309 > > > ---------------------------------------------------------------- > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > PhD Student > > Neuronal Oscillations Group > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > NL-6525 EN Nijmegen > > The Netherlands > > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From diezmartini at gmail.com Fri Jun 6 00:00:02 2014 From: diezmartini at gmail.com (Ana Laura Diez Martini) Date: Fri, 6 Jun 2014 10:00:02 +1200 Subject: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW In-Reply-To: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> References: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thank you Diego! On Fri, Jun 6, 2014 at 3:56 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Ana, > > During our last fieldtrip meeting, we discussed about the triggering > issues with the *RAW file format and here some thoughts: > > 1) What you reported is not a fieldtrip problem per se. The way NETSTATION > is configured in your lab allow you to record the triggers in bits, not in > decimal numbers. I don't know how but there should be a way to configure > your acquisition device in such a way that triggers are not transform from > decimal to binary representation. > > 2) Make your own trialfun to solve the conversion problem. I created a FAQ > > titled "How can I transform trigger values from bits to decimal > representation with a trialfun?" on where you'll find code to make the > transition from bits to decimals again. This FAQ could also be useful for > other users having similar problems (binary to decimal conversion) with > other acquisition systems. > > I hope this helps > > Diego > > > ------------------------------ > > *From: *"Ana Laura Diez Martini" > *To: *"Diego Lozano" , "FieldTrip > discussion list" > *Sent: *Tuesday, 27 May, 2014 12:25:39 AM > > *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file exported > from an EGI .RAW > > Thank you Arjen, Diego and Chungki Lee! > > I tried with the .RAW and it reads the event. The problem is that my > triggers have the following format "11,12,13,14,15,21,22...." . Netstation > instead of saving them as they are, returns them in this way: say my > trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + DIN8 + DIN2. so I > had to convert them into my original triggers. After that I can either save > the set (I tried this > but it > didn't work) or export it to bdf. When I open the exported file in EEGlab, > it reads the events correctly, but fieldtrip doesn't. > > Any ideas? Thanks!! > > > On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > >> Dear Ana, >> >> Sorry for my file extension confusion: edf instead of bdf. However, I >> don't know a way to read events coded in BDF format exported by NETSTATION. >> I encounter this problem in the past but I had no problems with RAW file >> format >> >> Dear Chungki, >> >> Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but Ana >> was refering to a different eeg system that has the same fileformat >> extension. >> >> best, >> >> Diego >> >> ------------------------------ >> >> *From: *"Chungki Lee" >> *To: *"FieldTrip discussion list" >> *Sent: *Monday, 26 May, 2014 11:18:34 AM >> *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file >> exported from an EGI .RAW >> >> >> Dear all >> >> Fieldtrip can read events in BDF format ! >> >> Hear simple examples >> >> example #1 >> %% >> cfg = []; >> cfg.dataset = '~~~ '; % your filename with file extension; >> cfg.trialdef.eventtype = 'STATUS'; % Status notation maybe Biosemi's >> tigger name >> cfg.trialdef.eventvalue = 1; % your event value >> cfg.trialdef.prestim = 4; % before stimulation (sec), only use >> positive value >> cfg.trialdef.poststim = 8; % after stimulation (sec) , only use >> positive value >> cfg = ft_definetrial(cfg); >> cfg.method = 'trial'; >> data = ft_preprocessing(cfg); >> %% >> >> example #2 >> %% >> % if you executed these command lines >> cfg = []; >> cfg.dataset = '~~~ '; % your filename with file >> extension; >> cfg.trialdef.eventtype = '?'; % Status notation maybe Biosemi's >> tigger name >> cfg = ft_definetrial(cfg); >> >> % result example #2 >> the following events were found in the datafile >> event type: 'CM_in_range' with event values: >> event type: 'Epoch' with event values: >> event type: 'STATUS' with event values: 1 2 3 4 255 <----------- >> "this indicate your file configuration for trigger information" >> no trials have been defined yet, see FT_DEFINETRIAL for further help >> found 255 events >> created 0 trials >> the call to "ft_definetrial" took 8 seconds >> >> have fun~!! >> >> >> >> 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla < >> d.lozanosoldevilla at fcdonders.ru.nl>: >> >>> Hi Ana, >>> >>> Fieldtrip does not read events in BDF format. Take a look to our wiki: >>> >>> http://fieldtrip.fcdonders.nl/getting_started/egi >>> >>> >>> - *EDF+* (.edf) All channels, including PIB channels, are read in >>> correctly, including channel labels. However, the events, which are stored >>> on the annotation channel, are written in a way by Net Station that is not >>> compatible with the edf+ reading implementation in FieldTrip. So, events do >>> not come out properly. Also discontinuous epochs are “glued” together as >>> one “continuous” data stream. >>> >>> As Arjen suggested, with *.RAW you shouldn't have any problem. >>> >>> event = ft_read_event('*.RAW') >>> >>> If you encounter it, please let us know. >>> >>> best, >>> >>> Diego >>> >>> >>> On 26 May 2014 08:59, Arjen Stolk wrote: >>> >>>> Hi Ana Laura, >>>> >>>> Have you tried importing the .RAW file directly? That is, by specifying >>>> cfg.dataset = 'XXX.raw'? >>>> >>>> Best regards, >>>> Arjen >>>> >>>> >>>> 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini >>> >: >>>> >>>>> Hi all! >>>>> >>>>> This is the .BDF file >>>>> of one >>>>> of my EEG subjects. For my last experiment I used a Biosemi system and now >>>>> I'm using an EGI system which gives me .RAW files. I exported the .RAW file >>>>> with EEGlab to .BDF format and I tried using the scripts I use to analise >>>>> the data of my previous experiment but I realised that it was not reading >>>>> the events: >>>>> >>>>> cfg = []; >>>>> cfg.dataset = ' (location)'; >>>>> cfg.trialdef.eventtype = '?'; >>>>> definetrial(cfg); >>>>> Warning: no trialfun was specified, using trialfun_general >>>>> > In definetrial at 79 >>>>> evaluating trialfunction 'trialfun_general' >>>>> no events were found in the datafile >>>>> no trials have been defined yet, see DEFINETRIAL for further help >>>>> found 0 events >>>>> created 0 trials >>>>> >>>>> EEGlab does read them. Any idea of what could be wrong? >>>>> >>>>> Thank you all!! >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> ---------------------------------------------------------------- >> Chungki Lee, Ph.D. >> Post-doc >> Biomedical Research Institute >> Korea Institute of Science and Technology >> E-mail: chungki at kist.re.kr >> Tel:+82-2-958-5636, C.P: +82-10-5223-7309 >> ---------------------------------------------------------------- >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> PhD Student >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> NL-6525 EN Nijmegen >> The Netherlands >> http://www.ru.nl/people/donders/lozano-soldevilla-d/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From diezmartini at gmail.com Fri Jun 6 04:43:14 2014 From: diezmartini at gmail.com (Ana Laura Diez Martini) Date: Fri, 6 Jun 2014 14:43:14 +1200 Subject: [FieldTrip] Cluster-level permutation test problem Message-ID: Dear all, I'm trying to run a cluster-level permutation test with an old script in which I used the neighbourhood map of a Biosemi cap. The only thing I have changed there is the neighbourhood that is now for a GSN-HydroCel-129 one, so I just re wrote the neighbours for each channel the same way I did for the Biosemi one. I use an old version of Fieldtrip here which was working fine, but even with the newest versions and modifications, it doesn't work. What do you think I could be doing wrong? Thank you!! *This is the output I get:* Selecting and formatting the data. selected 128 channels selected 1000 time bins selected 1 frequency bins Calculating the neighbourhood structure of the channels. Running the statistics engine. Statistic-specific preprocessing (calculating critical values, initializing draws from the randomization distribution, ...). randomization 0 1000 Undefined function 'bwlabeln' for input arguments of type 'double'. Error in findcluster (line 73) [labelmat(spatdimlev, :, :), num] = bwlabeln(reshape(onoff(spatdimlev, :, :), nfreq, ntime), 4); Error in clusterrandstatistics (line 851) [posclusterslabelmat,nposclusters] = findcluster(onoff,data.channeighbstructmat,cfg.minnbchan); Error in clusterrandanalysis (line 462) [clusrand] = clusterrandstatistics(cfg, data); Error in clusterrand_stats_ERP_CW (line 347) [clusrand] = clusterrandanalysis(cfg,GavgI,GavgC); *And this is my script* function [clusrand] = clusterrand_stats_ERP_WC() S = load('4WC_1.avg','-MAT'); avgC41 = S.avgC; avgI41 = S.avgI; S = load('4WC_2.avg','-MAT'); avgC42 = S.avgC; avgI42 = S.avgI; etc... cfg =[]; cfg.keepindividual = 'yes'; GavgC = timelockgrandaverage(cfg,avgC41,avgC42,.....); GavgI = timelockgrandaverage(cfg,avgI41,avgI42.....); save('grand_averages','GavgC','GavgI'); cfg.latency = [0 1]; cfg.channel = {'all'}; cfg.avgovertime = 'no'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusterteststat = 'maxsum'; cfg.makeclusters = 'yes'; cfg.alphathresh = 0.05; cfg.minnbchan = 0; cfg.elecfile = 'GSN-HydroCel-129.sfp'; cfg.neighbours{1}.label = 'E1'; cfg.neighbours{1}.neighblabel = {'E125', 'E8', 'E2', 'E122','E121'}; cfg.neighbours{2}.label = 'E2'; cfg.neighbours{2}.neighblabel = {'E1', 'E8', 'E14', 'E9','E3','E123','122'}; cfg.neighbours{3}.label = 'E3'; cfg.neighbours{3}.neighblabel = {'E2', 'E123', 'E124','E4','E10','E9'}; etc... cfg.nranddraws = 1000; [clusrand] = clusterrandanalysis(cfg,GavgI,GavgC); save clusrand_WC clusrand; end -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jun 6 12:56:11 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 6 Jun 2014 10:56:11 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401960997142.37788@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au>, <53903942.8010009@donders.ru.nl>, <1401960997142.37788@flinders.edu.au> Message-ID: <1402052150162.56887@flinders.edu.au> Hey Jorn, I ended up getting it working because mvar wasnt actually in the fieldtrip toolbox, I updated and it came through. Which is great. However, now I am just getting NaNs in my adjacency matrix, is that because of the rank deficiency? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Thursday, 5 June 2014 7:06 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hey jorn, Yeah I tried that, I entered in specific grid points into the leadfield. The rank was still 37 ( out of 116), I still cant really work it out haha. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 7:02 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From giulia.rizza at tiscali.it Fri Jun 6 15:58:39 2014 From: giulia.rizza at tiscali.it (giulia.rizza at tiscali.it) Date: Fri, 06 Jun 2014 15:58:39 +0200 Subject: [FieldTrip] help for ICA on thermal signals Message-ID: <5c03e7ae27f2c24d84412d6cdd71f31a@tiscali.it> Dear FieldTrippers I know this is not a usual topic but maybe you can give me some advice, I would like to ask you some help for the correction of ocular artifacts on facial thermal imaging signals. The temperature of the periorbital areas is very informative about the sympathetic system activity, but we realized that blinks and saccades also influence the temperature in these regions Our signal is sampled at 10 Hz and the time course is extracted from 10 regions of interest, one of which is placed exactly on the right eye. Thus we have 10 channels (ROIs). We preprocessed the signal by using a band pass filter (Butt 0.01 - 4 Hz) and by demeaning it. Then we used ICA (runica or fastica) to detect the ocular components. A component was defined as "artefactual ocular" when its face distribution was mostly around the eye and the periorbital channels. After subtracting that component from the original signal, we saw that the signal was very well corrected on the eye channel itself but it got worst in the channel of interest (the periorbitals) by introducing some artefacts. Further we noticed that the unmixing matrix was close to singular (det(A) = 10^-13). We thought that this could be due to the number of channels so we also tried to export more (64) ROIs but nothing changed. Do you have any idea about why this would happen? We thought that ICA could work on any type of wave, but maybe there is something we are missing. Should we use another method? Do you have any suggestion? Any suggestion is pretty much appreciated Thanks in advance for any help. Giulia Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 [1] Links: ------ [1] http://www.istella.it?wtk=amc138614816829636 Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ncota at mrn.org Fri Jun 6 20:03:18 2014 From: ncota at mrn.org (Navin Cota) Date: Fri, 6 Jun 2014 12:03:18 -0600 Subject: [FieldTrip] IEEE 2014 Schizophrenia Classification Challenge Message-ID: Dear All: Good day !! The IEEE International Workshop on Machine Learning for Signal Processing is proud to announce. *2014 Schizophrenia Classification Challenge* Please visit the below website for full details about the competition and submission instructions.Competition flyer attached. *https://www.kaggle.com/c/mlsp-2014-mri * Have a nice week ahead. Thanks Navin Postdoctoral Fellow Medical Imaging Analysis(MIA) lab The Mind Research Network Albuquerque,New Mexico USA http://mialab.mrn.org/lab-members/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: flyer_mlsp2014.pdf Type: application/pdf Size: 430775 bytes Desc: not available URL: From Laura.Rueda at faber.kuleuven.be Mon Jun 9 16:44:29 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Mon, 9 Jun 2014 14:44:29 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: <538DD898.8050801@donders.ru.nl> References: , <538DD898.8050801@donders.ru.nl> Message-ID: Dear Jörn, Thank you for your suggestion. I used the template BEM model with the corresponding MRI template and the code works fine. In the end, the problem was the capital letters on the labels of the electrodes on the different structures. So at least for the sanity check, everything seems fine with the algorithm and the EEG data. Now I'm using an individual MRI from one of my subjects. I realigned according to the fiducials. I tried to reslice after this with a resolution of 1mm, and keeping the original dimensions, because the voxel size of my images is 1x1.1x1 mm, but this resulted in the head not being in the center of the box and the head tilted downwards, so I skipped this step to move on a bit (although I would kindly request some tip in this regard as well). Then I segmented the brain compartments (brain, skull and scalp) with tissue probability maps first, and I adjusted the size of the 3D shape used for dilating the brainmask (on strel_bol) to obtain the skull mask because the default value assigned points to the skull on the scalp, and they were clearly intersecting. After doing this, I checked the segmented compartments and the meshes. At least visually, these looked fine. When running ft_prepare_headmodel, I get a warning and the vol.mat is filled with NaNs. The warning is this one: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. > In ft_headmodel_bemcp at 184 In ft_prepare_headmodel at 253 I read in another thread that visual inspection does not guarantee the creation of a head model. So, I wonder, is there other way of checking that the meshes are correctly formed? Best regards, Laura Rueda ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: 03 June 2014 16:15 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, the problem could be in the segmentation - you have to have closed boundaries of all tissues for the BEM model, otherwise the computation can result in only nans. It requires a bit more work to check for this, so I would first start with using the standard BEM model that is in the FieldTrip/template/headmodel directory to check whether (a) your code runs smoothly then and (b) your results make sense. Even though results are less optimal than when using individual MRs, you can get a first glimpse and it's a good sanity check for everything you are doing. If these two things work well, then I can help you with checking your segmentation (also on this mailinglist). Note though that that would be more hacking than real fieldtrippin'... ;) Best, Jörn On 6/3/2014 3:30 PM, Laura Rueda Delgado wrote: > > Dear Kousik, > > I found that thread and made some tests on my data as well. The > solution that is proposed there (reject the vertices of C11st/C22st > where the NaN values are present) is not feasible in my case because I > would need to reject 2908 vertices from the 3000 ones present in the > brain compartment. Also, the xyz coordinates of these critical > vertices (vol.bnd(1).pnt) and their corresponding triangles > (vol.bnd(1).tri) do not converge into a single point, which would be > the reason to reject them in the first place. > > I’ve checked and re-checked the segmented volumes and meshes (errors > at these steps seem to be the most common problem), but all the > compartments are closed surfaces and do not intersect. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > The solution that you propose requires the use of Freesurfer to create > the sourcespace. If I’d like to restrict to use Fieldtrip and its > toolboxes, how could I constrain it to calculate leadfields for points > inside the brain? I tried to restrict the ft_sourceanalysis by > including only the points of the grid that are inside the brain, but I > still get the SVD error. > > I checked the NaN values of vol.mat and all the elements on this > matrix are NaN. I suppose that’s where the error is, however I don’t > know how to correct for it, because I just generate the volume > structure from the mesh (see first message). > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can > constrain FT to only calculate leadfields for sourcespace points > inside the brain. I generally do this. I don't know how FT handles > those outside the brain source points really. You could give this a try. > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked for NaN and Inf values in powspctrm and crsspctrm of > freqAll. There are none. However, I checked for NaN values in > grid.leadfield and it has some. I thought that these were NaN values > in the points of the grid outside a brain region, but I might be > mistaken. > > grid = > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Ah. Interesting. Good that error changes. So that was the problem before. > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked the labels and they were the same, except for whether they > were in capital letters. So I added the following before > ft_sourceanalysis: > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > This way the labels of the elec structure and freqAll are in capital > letters. > > And now I get a different error (although still within the function > beamformer_dics): > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > What could it be? > > Best regards, > > Laura > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I too had the same suggestion as Johanna's. > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > > > wrote: > > Dear Johanna, > > Thank you for your suggestion. > > On step 2 in the code, I select from the elec structure the channels > that are included in the frequency data. So the elec structure used > for preparing the leadfield has 128 electrodes, the same as the data > (data_rs, data 4, and therefore freqAll). I checked this precisely > because I read a previous thread discussing that issue. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hi Laura, > > Does your data have the same channels as the leadfield (as the > electrodes that went in to compute the leadfield)? I often see that > error when there is a mismatch of channels in that way. > > Best, > > Johanna > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado > >: > > Dear Fieldtrip users, > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and > the headmodel. That seems to work ok. However, at the step of source > analysis, I get the following error: > > Error using * > > Inner matrix dimensions must agree. > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2% Obtained after adjusting electrodes on scalp > surface interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of > channels as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > Cheers, > > Laura Rueda Delgado > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lysne at unm.edu Mon Jun 9 22:04:38 2014 From: lysne at unm.edu (Per Arnold Lysne) Date: Mon, 9 Jun 2014 20:04:38 +0000 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality Message-ID: <1402344273485.6601@unm.edu> Hello, I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) y(t) = 0.53*y(t-1) - 0.80*y(t-2) z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). Thank you for your help, Per A. Lysne University of New Mexico lysne at unm.edu The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. [cid:898dbd0d-1330-430a-8327-bd9a95f2b7fe] [cid:889457b8-d09d-4655-bac6-e3da92b8be20][cid:f640ae0e-d04f-451c-87ab-0f93aaa79870] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.NonCondGranger.jpg Type: image/jpeg Size: 24031 bytes Desc: MVAR2.NonCondGranger.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.Spectra.jpg Type: image/jpeg Size: 24742 bytes Desc: MVAR2.Spectra.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.CondGranger.jpg Type: image/jpeg Size: 23915 bytes Desc: MVAR2.CondGranger.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pal_test_ft_granger_cond.m URL: From gamaliel.ghu at gmail.com Tue Jun 10 03:16:11 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Mon, 9 Jun 2014 21:16:11 -0400 Subject: [FieldTrip] Question co-registration Message-ID: Greetings to all I read the tutorial to generate a forward model, however fiedltrip am beginner and I have some doubts: 1-If I have a patient IMRs but I have not scanned the electrodes, it is possible to use generic templates as shown in the tutorial (FieldTrip/template/electrode/standard_1020.elc.)? 2-If you can use these templates (FieldTrip/template/electrode/standard_1020.elc.), Can modify decreasing the number of electrodes that want to use? 3-I would do a head model for children, so the number of electrodes should be lower. 4-sources can be simulated fieldtrip? PD: sorry my English am Chilean, and I do not speak much English regards -- *Gamaliel Huerta* *Ingeniería Civil Biomédica* *Universidad de Valparaíso* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 10 10:15:57 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 10 Jun 2014 10:15:57 +0200 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality In-Reply-To: <1402344273485.6601@unm.edu> References: <1402344273485.6601@unm.edu> Message-ID: <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> Dear Per, Thanks for sending along the very clear code, makes it easy to run and verify ;-). I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values. Best wishes, Jan-Mathijs On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne wrote: > Hello, > > I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: > > x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) > y(t) = 0.53*y(t-1) - 0.80*y(t-2) > z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) > > This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). > > In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. > > The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. > > My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). > > Thank you for your help, > > Per A. Lysne > University of New Mexico > lysne at unm.edu > > > > > The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lysne at unm.edu Tue Jun 10 18:58:31 2014 From: lysne at unm.edu (Per Arnold Lysne) Date: Tue, 10 Jun 2014 16:58:31 +0000 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality In-Reply-To: <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> References: <1402344273485.6601@unm.edu>, <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> Message-ID: <1402419505182.71464@unm.edu> Hi Jan-Mathijs, Thank you for the quick response and for pointing out my problem with scaling the y-axis. Your suggestion pointed be to another issue: while the Granger spectra output from the non-conditional calculation is organized as 3x3xNFreqs (for a trivariate system), the conditional Granger output is a flat list of 6xNFreqs. I am now getting the correct, frequency resolved results in both cases. I will attach my code in case it can be of help in the future. If there is a convenient reference for the calculation in blockwise_conditionalgranger.m, I would still be interested in seeing it. Thanks again, -Per ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, June 10, 2014 2:15 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Non-Parametric Conditional Granger Causality Dear Per, Thanks for sending along the very clear code, makes it easy to run and verify ;-). I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values. Best wishes, Jan-Mathijs On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne > wrote: Hello, I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) y(t) = 0.53*y(t-1) - 0.80*y(t-2) z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). Thank you for your help, Per A. Lysne University of New Mexico lysne at unm.edu The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pal_test_ft_granger_cond.m URL: From tyler.grummett at flinders.edu.au Thu Jun 12 10:07:43 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 12 Jun 2014 08:07:43 +0000 Subject: [FieldTrip] error when running ft_timelockanalysis Message-ID: <1402560435810.17433@flinders.edu.au> Hello fieldtrippers, I got the following error when trying to run ft_timelockanalysis. Undefined function 'mxSerialize_cpp' for input arguments of type 'struct'. Error in mxSerialize (line 35) argout = mxSerialize_cpp(argin); Error in ft_preamble_provenance (line 74) cfg.callinfo.inputhash{iargin} = CalcMD5(mxSerialize(tmparg)); Error in ft_preamble (line 54) evalin('caller', ['ft_preamble_' cmd]); Error in ft_timelockanalysis (line 95) ft_preamble provenance data I have no idea what the problem is, I tried looking for the function in my fieldtrip folder. I have just recently installed matlab 2014a if that is any help. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Thu Jun 12 10:29:34 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Thu, 12 Jun 2014 10:29:34 +0200 Subject: [FieldTrip] error when running ft_timelockanalysis In-Reply-To: <1402560435810.17433@flinders.edu.au> References: <1402560435810.17433@flinders.edu.au> Message-ID: <20140612102934.7vrsaal80swsscg4@arco.cib.na.cnr.it> Hi Tyler this problem has already been solved by Jörn M. Horschig. I attach here the answer he gave to me some time ago Best regards Sara ----- Messaggio inoltrato da jm.horschig at donders.ru.nl ----- Data: Wed, 14 May 2014 10:35:03 +0200 Da: "Jörn M. Horschig" Rispondi-A:FieldTrip discussion list Oggetto: ***SPAM*** Re: [FieldTrip] problem occurs when using ft_timelockanalysis A: FieldTrip discussion list Hi Sara, I guess you are not using a mac. What you describe concerns bug 2452 on our Bugzilla page: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2452 which pertains to some undocumented change in Matlab. Therefore it is necessary to use a different mxserialize function that from matlab 2014a onwards than before. This is a c++ function, which requires to be compiled for each platform independently. In FieldTrip, this file exists e.g. in fileio/private but only for MacOS 64-bit platforms. Apparently, we still need to compile it for MacOS 32bit, Windows and Linux platforms. I guess we should do that quite soon ;) I'll bring it up in today's FT meeting so that hopefully from tomorrow onwards it should work. btw, for you it will help to go to the FieldTrip/src directory in Matlab and type >> mex mxSerialize_cpp.cpp Then Matlab will mex (~compile) the file for you. You can then copy that file to your matlab code directory and everything should work out fine for you. I'll keep you updated on this. Best, Jörn On 5/13/2014 4:15 PM, s.rombetto at cib.na.cnr.it wrote: > Any suggestion concerning this problem? > > it works finewith Matlab 2013 > > > Hello fieldtrippers, > > > I got the following error when trying to run ft_timelockanalysis. > > > Undefined function 'mxSerialize_cpp' for input arguments of type 'struct'. > > Error in mxSerialize (line 35) > argout = mxSerialize_cpp(argin); > > Error in ft_preamble_provenance (line 74) > cfg.callinfo.inputhash{iargin} = CalcMD5(mxSerialize(tmparg)); > > Error in ft_preamble (line 54) > evalin('caller', ['ft_preamble_' cmd]); > > Error in ft_timelockanalysis (line 95) > ft_preamble provenance data > > I have no idea what the problem is, I tried looking for the function > in my fieldtrip folder. > > I have just recently installed matlab 2014a if that is any help. > > Tyler > > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 Lab MEG 0817483511 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From mahjoory86 at gmail.com Thu Jun 12 13:10:14 2014 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Thu, 12 Jun 2014 13:10:14 +0200 Subject: [FieldTrip] Grey Matter Message-ID: I want to restrict the source reconstruction to the grey matter. I am using this template head model. (load 'standard_bem.mat') Also I used ft_volumesegment to segmente the template mri (single_subj_T1_1mm.nii), But I don't know how to use seg.gray for creating grid? How should I set the parameters to have the same resolotion? Best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jun 12 15:32:04 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 12 Jun 2014 15:32:04 +0200 (CEST) Subject: [FieldTrip] Grey Matter In-Reply-To: Message-ID: <45574063.3239152.1402579924719.JavaMail.root@draco.zimbra.ru.nl> Dear Keyvan, Please have a look at our Frequently Asked Questions , you might find this one particularly helpful: Can I restrict the source reconstruction to the grey matter? Best, Jim ----- Oorspronkelijk bericht ----- > Van: "Keyvan Mahjoory" > Aan: "FieldTrip discussion list" > Verzonden: Donderdag 12 juni 2014 13:10:14 > Onderwerp: [FieldTrip] Grey Matter > I want to restrict the source reconstruction to the grey matter. I am > using this template head model. (load 'standard_bem.mat' ) > Also I used ft_volumesegment to segmente the template mri > (single_subj_T1_1mm.nii), > But I don't know how to use seg.gray for creating grid? > How should I set the parameters to have the same resolotion? > Best, > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jim Herring, MSc. Neuronal Oscillations Group Centre for Cognitive Neuroimaging Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Fri Jun 13 13:08:30 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Fri, 13 Jun 2014 13:08:30 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? Message-ID: Hi, It seems that ft_resample applies to all of the channels in the data structure. During resampling fieldtrip applies a filter, which adds artifacts to the step function in the trigger channels. For downsampling at least it would be great if you could specify a subset of channels to be downsampled by simple decimation (i.e. skip the lowpass filter). Is there any built-in way to do this? Thanks! Aaron -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From jan.schoffelen at donders.ru.nl Fri Jun 13 13:33:54 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jun 2014 13:33:54 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: <224529F4-9E51-4ECB-BAE1-44A6727E3944@donders.ru.nl> Hi Aaron, You can use cfg.method = ‘nearest’ when downsampling the trigger channels. I suspect that in this case no filtering will be applied. Thus, call ft_resampledata twice (each time with a different method: once for the functional data, the other time for the trigger(s)), and call ft_appenddata afterwards. Best, Jan-Mathijs On Jun 13, 2014, at 1:08 PM, Aaron Schurger wrote: > Hi, > It seems that ft_resample applies to all of the channels in the data > structure. During resampling fieldtrip applies a filter, which adds > artifacts to the step function in the trigger channels. For > downsampling at least it would be great if you could specify a subset > of channels to be downsampled by simple decimation (i.e. skip the > lowpass filter). Is there any built-in way to do this? > Thanks! > Aaron > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Jun 13 16:36:11 2014 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 13 Jun 2014 10:36:11 -0400 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: Dear Aaron, Note that the decimation process is indeed the use of a low-pass filter and subsequent downsampling. As you may already know, this is to avoid aliasing. Otherwise is just an interpolation. "Decimation reduces the original sampling rate for a sequence to a lower rate, the opposite of interpolation. The decimation process filters the input data with a lowpass filter and then resamples the resulting smoothed signal at a lower rate." Best, Rodrigo On Fri, Jun 13, 2014 at 7:08 AM, Aaron Schurger wrote: > Hi, > It seems that ft_resample applies to all of the channels in the data > structure. During resampling fieldtrip applies a filter, which adds > artifacts to the step function in the trigger channels. For > downsampling at least it would be great if you could specify a subset > of channels to be downsampled by simple decimation (i.e. skip the > lowpass filter). Is there any built-in way to do this? > Thanks! > Aaron > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Sat Jun 14 01:35:44 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Sat, 14 Jun 2014 01:35:44 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: Hi, Rodrigo, You are right - in fact I meant downsampling instead of decimation. I get the two words confused sometimes. Anyway, what I mean was just taking every n-th sample. You want to avoid doing any kind of filtering on your trigger channels! Best wishes, Aaron On Fri, Jun 13, 2014 at 4:36 PM, Rodrigo Montefusco wrote: > Dear Aaron, > > Note that the decimation process is indeed the use of a low-pass filter and > subsequent downsampling. As you may already know, this is to avoid aliasing. > Otherwise is just an interpolation. > > "Decimation reduces the original sampling rate for a sequence to a lower > rate, the opposite of interpolation. The decimation process filters the > input data with a lowpass filter and then resamples the resulting smoothed > signal at a lower rate." > > > Best, > > Rodrigo > > > On Fri, Jun 13, 2014 at 7:08 AM, Aaron Schurger > wrote: >> >> Hi, >> It seems that ft_resample applies to all of the channels in the data >> structure. During resampling fieldtrip applies a filter, which adds >> artifacts to the step function in the trigger channels. For >> downsampling at least it would be great if you could specify a subset >> of channels to be downsampled by simple decimation (i.e. skip the >> lowpass filter). Is there any built-in way to do this? >> Thanks! >> Aaron >> >> -- >> Aaron Schurger, PhD >> Senior researcher >> Laboratory of Cognitive Neuroscience >> Brain-Mind Institute, Department of Life Sciences >> École Polytechnique Fédérale de Lausanne >> Station 19, AI 2101 >> 1015 Lausanne, Switzerland >> +41 21 693 1771 >> aaron.schurger at epfl.ch >> http://lnco.epfl.ch/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From sib_ozr at yahoo.com Mon Jun 16 08:23:17 2014 From: sib_ozr at yahoo.com (Sibel OZER) Date: Sun, 15 Jun 2014 23:23:17 -0700 Subject: [FieldTrip] ft_databrowser Message-ID: <1402899797.30216.YahooMailNeo@web120103.mail.ne1.yahoo.com> Dear Fieldtrippers, I have one question, one problem. Question is I would like to remove the trials which include eye-blinks just at the time of target presentation. How can I do that in fieldtrip? In ft_rejectvisual, is it possible to put time indices, at least to do that rejection visually? My problem is that I applied Dr Schouwenburg's solution to correct ft_databrowser Matlab error, it worked, however, it does not plot components, but raw data despite explicitly stating viewmode as component. Did anybody encounter the same problem? thank you, best Sibel -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.hipp at cin.uni-tuebingen.de Mon Jun 16 11:05:15 2014 From: joerg.hipp at cin.uni-tuebingen.de (Joerg Hipp) Date: Mon, 16 Jun 2014 11:05:15 +0200 Subject: [FieldTrip] =?iso-8859-15?q?2014_T=FCbingen_MEG_Symposium?= Message-ID: <539EB34B.80007@cin.uni-tuebingen.de> The MEG Center Tübingen is pleased to announce the: 2014 Tübingen MEG Symposium The symposium takes place on October 27 and 28, 2014. It brings together leading researchers in the field of MEG and related disciplines. Join us in Tübingen to learn about the latest advances in MEG research and beyond. For more information and registration, please visit http://meg.medizin.uni-tuebingen.de/2014/ -------------- next part -------------- A non-text attachment was scrubbed... Name: poster.pdf Type: application/pdf Size: 498360 bytes Desc: not available URL: From eijlers at rsm.nl Mon Jun 16 16:35:16 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Mon, 16 Jun 2014 14:35:16 +0000 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis Message-ID: Dear community, Although I’ve seen other questions related to this topic, I still have some questions regarding baseline correction when executing a time-frequency analysis: After time-frequency analysis, I want to use the trial output either to compare (within participants) trials from different conditions or to put the datapoints of different trials into a regression (also on participant level). The question for me is how to deal with a baseline correction in this situation? The data before each trial of interest is in reaction to viewing a fixation cross. 1. If I understand it correctly, with the default config setting for cfg.polyremoval the mean of the whole trial is subtracted (prior to spectral analysis) to get rid of the offset in oscillations. 2. Does it mean that since I’m doing analyses on a participant level first, I only need to do this kind of baseline correction (from stimulus onset on)? 3. I thought that I should not subtract the mean of a window prior to stimulus onset, from the raw trial data before doing time-frequency analysis (the kind of baseline correction you would do with ERP analyses), but I see this happening in some articles. Did I not get it right, or is this related to the distinction between evoked and induced power, or something else? 4. Or is it an option (and should I) subtract the mean of a window prior to stimulus onset only after decomposition of the data in the power spectrum, for all trials? Thanks a lot! Best, Esther Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 17 09:46:47 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 17 Jun 2014 09:46:47 +0200 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis In-Reply-To: References: Message-ID: <539FF267.3000803@donders.ru.nl> Hi Esther, > 1. If I understand it correctly, with the default config setting for > cfg.polyremoval the mean of the whole trial is subtracted (prior > to spectral analysis) to get rid of the offset in oscillations. > 'Getting rid of the offset in oscillations' is not the purpose of demeaning prior to doing a frequency analysis. See here: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > 1. Does it mean that since I’m doing analyses on a participant level > first, I only need to do this kind of baseline correction (from > stimulus onset on)? > No, this is not a baseline correction as you are thinking of here. Remember that a power spectrum is obtained by squaring the fourier coefficients, i.e. power is always positive. Also, you want to baseline correct per frequency, because of the 1/f characteristic. > 1. I thought that I should /not/subtract the mean of a window prior > to stimulus onset, from the raw trial data before doing > time-frequency analysis (the kind of baseline correction you would > do with ERP analyses), but I see this happening in some articles. > Did I not get it right, or is this related to the distinction > between evoked and induced power, or something else? > As mentioned in the link above, you should demean the whole trial in FieldTrip because of the way the mtmconvol method is implemented. Any other "baseline correction" in the time-domain will only affect the DC bin (ie 0Hz), but not the estimatoin at individual frequencies. This is because baseline correction in the time-domain is a mere subtraction of a your data by a single number. Hence, the frequency content of your data stays unchanged. > 1. Or is it an option (and should I) subtract the mean of a window > prior to stimulus onset only after decomposition of the data in > the power spectrum, for all trials? > Yes, in any plotting function, you can set cfg.baseline and cfg.baselinetype. You can also call ft_freqbaseline. Note baselining is also not a trivial thing here. You can serious harm (i.e. invalidate) your statistics if you're doing it wrong (but that depends on your experimental design and question). Usually, if you compare conditions you should not do a baseline correction at all (otherwise any statistical difference might show up due to a difference in baseline to start with). Best, Jörn On 6/16/2014 4:35 PM, Esther Eijlers wrote: > Dear community, > > Although I’ve seen other questions related to this topic, I still have > some questions regarding baseline correction when executing a > time-frequency analysis: > > After time-frequency analysis, I want to use the trial output either > to compare (within participants) trials from different conditions or > to put the datapoints of different trials into a regression (also on > participant level). > The question for me is how to deal with a baseline correction in this > situation? The data before each trial of interest is in reaction to > viewing a fixation cross. > > 1. If I understand it correctly, with the default config setting for > cfg.polyremoval the mean of the whole trial is subtracted (prior > to spectral analysis) to get rid of the offset in oscillations. > 2. Does it mean that since I’m doing analyses on a participant level > first, I only need to do this kind of baseline correction (from > stimulus onset on)? > 3. I thought that I should /not/subtract the mean of a window prior > to stimulus onset, from the raw trial data before doing > time-frequency analysis (the kind of baseline correction you would > do with ERP analyses), but I see this happening in some articles. > Did I not get it right, or is this related to the distinction > between evoked and induced power, or something else? > 4. Or is it an option (and should I) subtract the mean of a window > prior to stimulus onset only after decomposition of the data in > the power spectrum, for all trials? > > Thanks a lot! > > Best, > Esther > > > Disclaimer > ------------------------------------------------------------------------ > De informatie verzonden in dit e-mail bericht is vertrouwelijk en is > uitsluitend bestemd voor de geadresseerde van dit bericht. Lees > verder: www.eur.nl/email-disclaimer > The information in this e-mail message is confidential and may be > legally privileged. Read more: www.eur.nl/english/email-disclaimer > > ------------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eijlers at rsm.nl Tue Jun 17 13:44:57 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Tue, 17 Jun 2014 11:44:57 +0000 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis In-Reply-To: <539FF267.3000803@donders.ru.nl> References: <539FF267.3000803@donders.ru.nl> Message-ID: Dear Jorn, Thanks a lot for the clarification! Best, Esther On 17/06/14 09:46, ""Jörn M. Horschig"" wrote: >Hi Esther, > >> 1. If I understand it correctly, with the default config setting for >> cfg.polyremoval the mean of the whole trial is subtracted (prior >> to spectral analysis) to get rid of the offset in oscillations. >> >'Getting rid of the offset in oscillations' is not the purpose of >demeaning prior to doing a frequency analysis. See here: >http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > >> 1. Does it mean that since I¹m doing analyses on a participant level >> first, I only need to do this kind of baseline correction (from >> stimulus onset on)? >> > >No, this is not a baseline correction as you are thinking of here. >Remember that a power spectrum is obtained by squaring the fourier >coefficients, i.e. power is always positive. Also, you want to baseline >correct per frequency, because of the 1/f characteristic. > >> 1. I thought that I should /not/subtract the mean of a window prior >> to stimulus onset, from the raw trial data before doing >> time-frequency analysis (the kind of baseline correction you would >> do with ERP analyses), but I see this happening in some articles. >> Did I not get it right, or is this related to the distinction >> between evoked and induced power, or something else? >> >As mentioned in the link above, you should demean the whole trial in >FieldTrip because of the way the mtmconvol method is implemented. Any >other "baseline correction" in the time-domain will only affect the DC >bin (ie 0Hz), but not the estimatoin at individual frequencies. This is >because baseline correction in the time-domain is a mere subtraction of >a your data by a single number. Hence, the frequency content of your >data stays unchanged. > >> 1. Or is it an option (and should I) subtract the mean of a window >> prior to stimulus onset only after decomposition of the data in >> the power spectrum, for all trials? >> >Yes, in any plotting function, you can set cfg.baseline and >cfg.baselinetype. You can also call ft_freqbaseline. Note baselining is >also not a trivial thing here. You can serious harm (i.e. invalidate) >your statistics if you're doing it wrong (but that depends on your >experimental design and question). Usually, if you compare conditions >you should not do a baseline correction at all (otherwise any >statistical difference might show up due to a difference in baseline to >start with). > >Best, >Jörn > >On 6/16/2014 4:35 PM, Esther Eijlers wrote: >> Dear community, >> >> Although I¹ve seen other questions related to this topic, I still have >> some questions regarding baseline correction when executing a >> time-frequency analysis: >> >> After time-frequency analysis, I want to use the trial output either >> to compare (within participants) trials from different conditions or >> to put the datapoints of different trials into a regression (also on >> participant level). >> The question for me is how to deal with a baseline correction in this >> situation? The data before each trial of interest is in reaction to >> viewing a fixation cross. >> >> 1. If I understand it correctly, with the default config setting for >> cfg.polyremoval the mean of the whole trial is subtracted (prior >> to spectral analysis) to get rid of the offset in oscillations. >> 2. Does it mean that since I¹m doing analyses on a participant level >> first, I only need to do this kind of baseline correction (from >> stimulus onset on)? >> 3. I thought that I should /not/subtract the mean of a window prior >> to stimulus onset, from the raw trial data before doing >> time-frequency analysis (the kind of baseline correction you would >> do with ERP analyses), but I see this happening in some articles. >> Did I not get it right, or is this related to the distinction >> between evoked and induced power, or something else? >> 4. Or is it an option (and should I) subtract the mean of a window >> prior to stimulus onset only after decomposition of the data in >> the power spectrum, for all trials? >> >> Thanks a lot! >> >> Best, >> Esther >> >> >> Disclaimer >> ------------------------------------------------------------------------ >> De informatie verzonden in dit e-mail bericht is vertrouwelijk en is >> uitsluitend bestemd voor de geadresseerde van dit bericht. Lees >> verder: www.eur.nl/email-disclaimer >> The information in this e-mail message is confidential and may be >> legally privileged. Read more: www.eur.nl/english/email-disclaimer >> >> ------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >-- >Jörn M. Horschig >PhD Student >Donders Institute for Brain, Cognition and Behaviour >Centre for Cognitive Neuroimaging >Radboud University Nijmegen >Neuronal Oscillations Group >FieldTrip Development Team > >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Contact: >E-Mail: jm.horschig at donders.ru.nl >Tel: +31-(0)24-36-68493 >Web: http://www.ru.nl/donders > >Visiting address: >Trigon, room 2.30 >Kapittelweg 29 >NL-6525 EN Nijmegen >The Netherlands > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ From michelic72 at gmail.com Tue Jun 17 17:26:22 2014 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 17 Jun 2014 17:26:22 +0200 Subject: [FieldTrip] PhD Lyon, France Message-ID: Dear List, here's a PhD position I'd like to advertise. Please find a detailed description in attachment. Cristiano *Funded PhD position at the Lyon Neuroscience Research Center, Brain Dynamics and Cognition Team *starting in October 2014 *Supervisors: Aurélie Bidet-Caulet, Olivier Bertrand* *Title: Brain mechanisms of distractibility during normal ageing and after frontal damage* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BidetCaulet_Phdposting.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 12681 bytes Desc: not available URL: From k.kessler at aston.ac.uk Tue Jun 17 18:43:46 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Tue, 17 Jun 2014 16:43:46 +0000 Subject: [FieldTrip] PhD in Birmingham Message-ID: Dear Fieldtrippers, We would be grateful if you could disseminate information about a PhD scholarship supervised by Craig McAllister (Birmingham University) and Klaus Kessler (Aston University). The project will involve MEG and TMS/tES in the context of the action-observation-execution-matching system (mirroring). The scholarship includes fees (to university) a as well as a stipend (living costs) for UK and EU students. Further details can be found here: http://www.findaphd.com/search/ProjectDetails.aspx?PJID=54268 Many thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Wed Jun 18 14:22:16 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Wed, 18 Jun 2014 12:22:16 +0000 Subject: [FieldTrip] Psychology Lectureship at Aston University Message-ID: Dear All We would be grateful if you could disseminate information about a Lecturer post in Psychology at Aston University (permanent member of staff) to potential candidates. Application deadline is the 11/07/2014. Further information: http://jobs.aston.ac.uk/Vacancy.aspx?ref=R140149 Many thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominic.depke at rub.de Wed Jun 18 15:58:25 2014 From: dominic.depke at rub.de (Dominic Depke) Date: Wed, 18 Jun 2014 15:58:25 +0200 Subject: [FieldTrip] ft_freqanalysis using wavelets, problems with trialdef Message-ID: <53A19B01.9050201@rub.de> Dear all, Actually I am analyzing EEG data containing epileptic seizure-like activity in Fieldtrip. Data is read in continuous mode and segments of interest are visually identified using the databrowser and a trial-structure (cfg.trl) is made from the information in the 'cfg.artfctdef.visual.artifact' field. After the trial-definition ft_preprocessing is called a second time with the option 'cfg.continuous' set to 'no'. Now I tried to use ft_frequanalysis using wavelets to get information about power-spectral densities for every single trial and every single channel ( in terms of individual 'seizure' events) but the output structure is filled with NaNs. I read the tutorial documentations and changed the values for cfg.toi and width but the result remained the same. Further, my datastructure does not contain a .trialinfo field so how should the trialdefinition look like (e.g. if you create cfg.trials) for use with ft_freqanalysis? There is only a cfg.trl and a data.trial field in the datastructure. Moreover, my data does not contain any stimulus codes. Best, Dominic From sib_ozr at yahoo.com Wed Jun 18 20:44:23 2014 From: sib_ozr at yahoo.com (Sibel OZER) Date: Wed, 18 Jun 2014 11:44:23 -0700 Subject: [FieldTrip] binica ICA Message-ID: <1403117063.40565.YahooMailNeo@web120105.mail.ne1.yahoo.com> Hi all, How can I use binica ICA? When I run the function  ft_componentanalysis with cfg.method = 'binica';, I get the following error(my OS is Windows): Running ica from script file binica6324.sc The system cannot find the file specified. Error using floatread (line 168) floatread() fopen() error. Error in binica (line 325)     wts = floatread(weightsfile,[ncomps Inf],[],0); Error in ft_componentanalysis (line 486)     [weights, sphere] = binica(dat, optarg{:}); best, Sibel -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.fransen at donders.ru.nl Thu Jun 19 11:19:16 2014 From: a.fransen at donders.ru.nl (Anne Fransen) Date: Thu, 19 Jun 2014 11:19:16 +0200 Subject: [FieldTrip] ft_sourceplot is now forced to be interactive Message-ID: Hi, I use ft_sourceplots to make orthoplots, however, recently I cannot make multiple graphs anymore without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. Thank you, Best regards, Anne Fransen -- Anne M.M. Fransen Neurophysiology of Active Perception Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen E-mail: a.fransen at donders.ru.nl Phone: 0031 (0)24 36 55933 Visiting Address: Room B3.43 Montessorilaan 3 Mail address: Anne Fransen Dep. Bio- en NeuroPsychologie Postbus 9104 6500 HE Nijmegen the Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Thu Jun 19 11:58:03 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 19 Jun 2014 02:58:03 -0700 Subject: [FieldTrip] error in==> prepare_mesh_segmentation Message-ID: <1403171883.77499.YahooMailNeo@web124905.mail.ne1.yahoo.com> Hello, I was following the tutorial in page http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a head model for EEG, I've done the same steps explained in the tutorial but when I reach the meshing stage and use: bnd=ft_prepare_mesh(cfg,segmentedmri); I get the following error: ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. error in ==> triangulate_seg at 73 seg = myvolumefillholes(seg); error in ==> prepare_mesh_segmentation at 101 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); error in ==> ft_prepare_mesh at 178 bnd = prepare_mesh_segmentation(cfg, mri); ----------------------------------------------------------------------------- although I'm geting the same results for the data structure as in the tutorial: disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] skull: [256x256x256 logical] scalp: [256x256x256 logical] cfg: [1x1 struct] ---------------------------------------------------------- can any one help in this matter please? Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From emanuelvandenbroeke at hotmail.com Thu Jun 19 14:11:31 2014 From: emanuelvandenbroeke at hotmail.com (emanuel vandenbroeke) Date: Thu, 19 Jun 2014 14:11:31 +0200 Subject: [FieldTrip] Cluster-based permutation test Message-ID: Dear Eric Maris or other fieldtrippers, In my experiment (a 2x2x6 design) I want to test whether ERP waveforms are significant different between conditions. There is no a priori assumption about the effects.In this experiment I apply a somatosensory stimulus on both arms before and after an intervention on one arm. The somatosensory stimulus consists of 6 different intensities. So it is a within-subject design with 3 factors: Time (T0 and T1), Arm (intervention, control) and Intensity (6 different intensities). I'm interested in the MAIN effect of INTENSITY, and the INTERACTION effects (TIME x ARM) and (TIME x ARM x INTENSITY).For the Interaction effect TIME x ARM, I first calculated difference-waves (postcontrol - precontrol and postintervention - preintervention) in Matlab en then applied the permutation test on these difference-waves to test whether the two arms are different. I hope this is correct? But now my question, how to test the TIME x ARM x INTENSITY interaction? One possibility might be to calculate an ANOVA F statistic for this interaction effect (so perform a full factorial ANOVA) and perform the permutation test? Is this justified? Very much thanks,Best wishes,Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Thu Jun 19 15:29:50 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Thu, 19 Jun 2014 13:29:50 +0000 Subject: [FieldTrip] Marie-Curie Postdoctoral Fellowship at Aston University Message-ID: Dear Fieldtrippers Please disseminate to potential candidates the opportunity of a Marie-Curie Postroctoral Research Fellowship at Aston University to work with Prof Joel Talcott and Dr Caroline Witton. The fellowship offers an excellent salary (£53,765 per annum) for an early-career researcher who meets the Marie-Curie requirements (see below). Joel and Caroline are particularly looking for someone with experience in MEG data collection and analysis, and who is interested in becoming part of a vibrant EU-funded Initial Training Network which provides many opportunities for travel and networking. Prior experience with language research would be welcome but is not a requirement. To meet the Marie Curie requirements, you need to be within the first five years of your research career, and not resident in the UK for more than 12 months in the last 3 years. Further details can be found here: https://jobs.aston.ac.uk/Vacancy.aspx?id=1239&forced=1 Please contact Caroline (c.witton at aston.ac.uk) or Joel Talcott (j.b.talcott at aston.ac.uk) directly with any enquiries. Thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eijlers at rsm.nl Thu Jun 19 16:32:17 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Thu, 19 Jun 2014 14:32:17 +0000 Subject: [FieldTrip] Strange output for ft_freqanalysis using wavelets? Message-ID: Dear all, I recently started working on time-frequency analyses, and my code is working. However, it seems to me that something is going wrong; Using the code below to calculate TFRs using wavelets, the output in .powerspectrum is in the range of hundreds and sometimes even up to a thousand (can also be seen from the plot). Trying multitapers (also in the code below), the range seems to be more normal (maybe up to 20). I cannot find out what I’m doing wrong (I guess such outcomes are impossible?). I preprocessed the data in BVA and transferred it to FT structures, but that shouldn’t be a problem right? A final question considers NaNs, is it true that ft_freqanalysis can not handle them, so that the output for elektrode 16 e.g. is set to NaN when it contained artefacts (i.e. NaNs in my case) in just one trial? I would appreciate it a lot if anyone could help me out. Best, Esther Data from 1 participant (it was also the case with other participants), 1 condition can be found here: https://www.dropbox.com/s/8vjcfid5p1i0o2t/FTav.mat load('FTav.mat') cfg = []; %% wavelet %cfg.keeptrials = 'yes'; %not when you want to use ft_freqgrandaverage and permutation testing thereafter cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:2:100; cfg.toi = -0.5:0.05:2.0; %% OR multitapers %{ cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:100; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; %} TFRav = ft_freqanalysis(cfg, FTav); % plot the results cfg = []; cfg.baseline = [-0.5 0]; cfg.baselinetype = 'absolute'; cfg.zlim = 'maxabs'; cfg.showlabels = 'yes'; cfg.layout = 'biosemi64.lay'; cfg.interactive = 'yes'; cfg.colorbar = 'yes'; figure ft_multiplotTFR(cfg, TFRav); Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 19 17:23:07 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 19 Jun 2014 17:23:07 +0200 Subject: [FieldTrip] ft_sourceplot is now forced to be interactive In-Reply-To: References: Message-ID: <54A92888-F4F3-4807-A211-0E5D55E17605@donders.ru.nl> Hi Anne, Could you please file this as a bug on our bugzilla.fcdonders.nl page? Thanks, Jan-Mathijs On Jun 19, 2014, at 11:19 AM, Anne Fransen wrote: > Hi, > > I use ft_sourceplots to make orthoplots, however, recently I cannot make multiple graphs anymore without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. > This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. > > Thank you, > > Best regards, > Anne Fransen > -- > Anne M.M. Fransen > Neurophysiology of Active Perception > Donders Institute for Brain, Cognition and Behaviour > Radboud University Nijmegen > > E-mail: a.fransen at donders.ru.nl > Phone: 0031 (0)24 36 55933 > > Visiting Address: > Room B3.43 > Montessorilaan 3 > > Mail address: > Anne Fransen > Dep. Bio- en NeuroPsychologie > Postbus 9104 > 6500 HE Nijmegen > the Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jun 20 08:10:09 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 19 Jun 2014 23:10:09 -0700 Subject: [FieldTrip] error in (ft_prepare_mesh) Message-ID: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> Hello every one I was following the tutorial in page http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a head model for EEG, I've done the same steps explained in the tutorial but when I reach the meshing stage and use: bnd=ft_prepare_mesh(cfg,segmentedmri); I get the following error: ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. error in ==> triangulate_seg at 73 seg = myvolumefillholes(seg); error in ==> prepare_mesh_segmentation at 101 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); error in ==> ft_prepare_mesh at 178 bnd = prepare_mesh_segmentation(cfg, mri); ----------------------------------------------------------------------------- although I'm geting the same results for the data structure as in the tutorial: disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] skull: [256x256x256 logical] scalp: [256x256x256 logical] cfg: [1x1 struct] ---------------------------------------------------------- can any one help in this matter please? Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 20 08:45:11 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 20 Jun 2014 08:45:11 +0200 Subject: [FieldTrip] error in (ft_prepare_mesh) In-Reply-To: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> References: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> Message-ID: <53A3D877.7090200@donders.ru.nl> Hi Rasha, could you update to the latest FT version? The function should be called "volumefillholes" and is located in FieldTrip/private. "myvolumefillholes" does indeed not exist and it appears that you or someone else modified the file to call a different function at that location. Best, Jörn On 6/20/2014 8:10 AM, Rasha Haider wrote: > Hello every one > I was following the tutorial in page > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a > head model for EEG, I've done the same steps explained in the tutorial > but when I reach the meshing stage and use: > bnd=ft_prepare_mesh(cfg,segmentedmri); > > I get the following error: > > ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. > > > error in ==> triangulate_seg at 73 > seg = myvolumefillholes(seg); > > > > error in ==> prepare_mesh_segmentation at 101 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > > error in ==> ft_prepare_mesh at 178 > bnd = prepare_mesh_segmentation(cfg, mri); > ----------------------------------------------------------------------------- > although I'm geting the same results for the data structure as in the tutorial: > > disp(segmentedmri) > > dim: [256 256 256] > > transform: [4x4 double] > > coordsys: 'ctf' > > unit: 'mm' > > brain: [256x256x256 logical] > > skull: [256x256x256 logical] > > scalp: [256x256x256 logical] > > cfg: [1x1 struct] > ---------------------------------------------------------- > can any one help in this matter > please? > > Regards > Rasha > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From emanuelvandenbroeke at hotmail.com Fri Jun 20 11:17:21 2014 From: emanuelvandenbroeke at hotmail.com (emanuel vandenbroeke) Date: Fri, 20 Jun 2014 11:17:21 +0200 Subject: [FieldTrip] Cluster-based permutation test - Help please :-) In-Reply-To: References: Message-ID: Dear Eric Maris, On the website I found a solution for calculating the interaction effect with permutation testing!For my three way interaction I was thinking of the following solution and would like to know if this is statistically sound to do (perhaps also interesting for other people with the same design): First I calculated the differences as proposed by you for an interaction effect, for each intensity separately:Thus: T0 T1 Control arm A B Intervention arm C D B-A (with new variable difference_B-A) and C-D (with new variable difference_C-D). Instead of testing the interaction for these two new variables, I calculate the difference between variable difference_C-D and variable difference_B-A and use an F-statistic to express the differences across the 6 intensities and subsequently perform the permutation test. Does this sound valid to you?I'm really stuck, so hope that you will answer my question! Best wishes,Emanuel From: emanuelvandenbroeke at hotmail.com To: fieldtrip at science.ru.nl Subject: Cluster-based permutation test Date: Thu, 19 Jun 2014 14:11:31 +0200 Dear Eric Maris or other fieldtrippers, In my experiment (a 2x2x6 design) I want to test whether ERP waveforms are significant different between conditions. There is no a priori assumption about the effects.In this experiment I apply a somatosensory stimulus on both arms before and after an intervention on one arm. The somatosensory stimulus consists of 6 different intensities. So it is a within-subject design with 3 factors: Time (T0 and T1), Arm (intervention, control) and Intensity (6 different intensities). I'm interested in the MAIN effect of INTENSITY, and the INTERACTION effects (TIME x ARM) and (TIME x ARM x INTENSITY).For the Interaction effect TIME x ARM, I first calculated difference-waves (postcontrol - precontrol and postintervention - preintervention) in Matlab en then applied the permutation test on these difference-waves to test whether the two arms are different. I hope this is correct? But now my question, how to test the TIME x ARM x INTENSITY interaction? One possibility might be to calculate an ANOVA F statistic for this interaction effect (so perform a full factorial ANOVA) and perform the permutation test? Is this justified? Very much thanks,Best wishes,Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ma.bijanzadeh at gmail.com Sat Jun 21 00:42:08 2014 From: ma.bijanzadeh at gmail.com (Maryam Bijanzadeh) Date: Fri, 20 Jun 2014 16:42:08 -0600 Subject: [FieldTrip] LFP data Message-ID: Dear all, This is Maryam from University of Utah. I would like to test the time frequency script of Fieldtrip with a simple vector. I was wondering if you could help me for the data format to pass to the function as an input. in reality I analyzed my LFP data in a matrix format : Channel by time points . Best Regards, Maryam Bijanzadeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Sat Jun 21 09:47:37 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sat, 21 Jun 2014 09:47:37 +0200 Subject: [FieldTrip] LFP data In-Reply-To: References: Message-ID: Dear Maryam, This FAQ might be of relevance for you: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat Best, Eelke On 21 June 2014 00:42, Maryam Bijanzadeh wrote: > Dear all, > > This is Maryam from University of Utah. I would like to test the time > frequency script of Fieldtrip with a simple vector. I was wondering if you > could help me for the data format to pass to the function as an input. > > in reality I analyzed my LFP data in a matrix format : Channel by time > points . > > > Best Regards, > > Maryam Bijanzadeh > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gamaliel.ghu at gmail.com Mon Jun 23 02:15:20 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Sun, 22 Jun 2014 20:15:20 -0400 Subject: [FieldTrip] Simulation of eeg source Message-ID: Hi all I am beginner in brainstorm My question is this. I need to simulate an outbreak of electrical activity in a realistic head model, and acquire the EEG tracing the source (focus) dummy. The aim is to build different head models, and compare the error to locate the source you have simulated, but for this I need the layout or activity of the simulated source. Any information is helpful. Anyone know how to simulate a realistic source model?, And acquire their electrical activity? Thanks regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 23 11:45:44 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 23 Jun 2014 11:45:44 +0200 Subject: [FieldTrip] Simulation of eeg source In-Reply-To: References: Message-ID: <53A7F748.6080807@donders.ru.nl> Hi Gamaliel, are you aware that this is a fieldtrip and not brainstorm mailinglist? In case you want to use FieldTrip, have a look at ft_dipolesimulation. Otherwise I cannot be of help. Best, Jörn On 6/23/2014 2:15 AM, gamaliel huerta urrea wrote: > Hi all > > I am beginner in brainstorm > > My question is this. > I need to simulate an outbreak of electrical activity in a realistic > head model, and acquire the EEG tracing the source (focus) dummy. The > aim is to build different head models, and compare the error to locate > the source you have simulated, but for this I need the layout or > activity of the simulated source. > > Any information is helpful. > > Anyone know how to simulate a realistic source model?, And acquire > their electrical activity? > > Thanks regards > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From luke.bloy at gmail.com Mon Jun 23 14:56:51 2014 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 23 Jun 2014 08:56:51 -0400 Subject: [FieldTrip] ctf mri tools Message-ID: Hi list, I'm wondering if anyone knows of any tools for writing ctf .mri files that can be read by MRIViewer. Thanks, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.postorino at gmail.com Mon Jun 23 16:14:41 2014 From: martina.postorino at gmail.com (Martina Postorino) Date: Mon, 23 Jun 2014 16:14:41 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting Message-ID: Dear all, I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset. I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels. Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically? I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed. This is the code I use: [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); %plotting cfgp = []; cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; cfgp.avgoverchan = 'no'; cfgp.latency = [-1 1]; ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); % average data across subjects cfgp = []; cfgp.keepindividual = 'no'; ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red); % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); ERP_pain_bp_GA_avg.mask = stat.mask; ERP_buttonpress_GA_avg.mask = stat.mask; % ERP_pain_GA_avg.mask = stat.mask; % do the plotting cfgp = []; cfgp.maskparameter = 'mask'; cfgp.maskstyle = 'box'; cfgp.layout = layout_easycap_painlabmunich; ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); Thanks in advance! ___________________________________________ Martina Postorino, M.Sc Phd program in Medical Life Science and Technology Neuroimaging Center (TUM-NIC) Technische Universität München, Klinikum Rechts der Isar -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Mon Jun 23 16:53:55 2014 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Mon, 23 Jun 2014 16:53:55 +0200 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <1ADF28F5-5205-4B8F-8863-C36E0899567A@gmail.com> Dear All, here's a PhD position in Aachen, Germany I'd like to advertise. Please find a detailed description in the attachment. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. Please spread the word. Best Leo Zizlsperger -------------- next part -------------- A non-text attachment was scrubbed... Name: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE RWTH_TH_JF.doc Type: application/msword Size: 29696 bytes Desc: not available URL: From gamaliel.ghu at gmail.com Mon Jun 23 19:57:36 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Mon, 23 Jun 2014 13:57:36 -0400 Subject: [FieldTrip] Simulation of eeg source In-Reply-To: References: Message-ID: Sorry for my previous mistake, I understand that the above is fieldtrip was just wrong. Please, I would like more information about Hi all I am beginner in Fieldtrip My question is this. I need to simulate an outbreak of electrical activity in a realistic head model, and acquire the EEG tracing the source (focus) dummy. The aim is to build different head models, and compare the mistake to locate the source You have simulated, but for this I need the layout or activity of the simulated source. Any information is helpful. Anyone know how to simulate a realistic source model?, And Their acquire electrical activity? Thanks regards 2014-06-22 20:15 GMT-04:00 gamaliel huerta urrea : > Hi all > > I am beginner in brainstorm > > My question is this. > I need to simulate an outbreak of electrical activity in a realistic head > model, and acquire the EEG tracing the source (focus) dummy. The aim is to > build different head models, and compare the error to locate the source you > have simulated, but for this I need the layout or activity of the simulated > source. > > Any information is helpful. > > Anyone know how to simulate a realistic source model?, And acquire their > electrical activity? > > Thanks regards > -- *Gamaliel Huerta* *Ingeniería Civil Biomédica* *Universidad de Valparaíso* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Tue Jun 24 00:24:31 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 23 Jun 2014 18:24:31 -0400 Subject: [FieldTrip] using AAL atlas on sourcemodel Message-ID: Hi all, I am trying to use AAL atlas on cortical mesh generated for individual subjects using freesurfer. When I do it on standard (template) sourcemodel, it works fine. aal = ft_read_atlas( '/Users/gopalar/Documents/MATLAB/fieldtrip-20140430/template/atlas/aal/ROI_MNI_V4.nii' ); sourcemodel=ft_read_headshape('cortex_8196.surf.gii'); sourcemodel2=ft_sourceinterpolate(cfg,atlas,sourcemodel); sourcemodel2.tissue has all the parcellations numbered and indexed. when sourcemodel was generated for individual subjects, the above steps does not work well. ft_sourceinterpolate do not yield all parcellations and they are anatomically skewed. I guess some co-registration of individual cortical mesh with standard template needed. Or are grids are the only other option. I really would like to use the cortical mesh instead of grids in my analysis. Thanks for your help Raghavan -- *Raghavan Gopalakrishnan,* *Principal Research Engineer, * *Cleveland Clinic* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Tue Jun 24 00:46:13 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Mon, 23 Jun 2014 23:46:13 +0100 Subject: [FieldTrip] Phase Lag Index Message-ID: Hi everyone, I would like to compute a classic phase lag index between pairs of MEG time series. So far I only found a wieghted phase lag index method implemented in ft and as far as I understand it is a directed measure so it gives the values from -1 to 1. Has anyone have an idea how to transform it so it computes absolute values from 0 to 1??? Many thanks in advance. Regards, Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 24 09:05:49 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 24 Jun 2014 09:05:49 +0200 Subject: [FieldTrip] Phase Lag Index In-Reply-To: References: Message-ID: Hi Lidia, Transforming a number that is bounded between -1 and 1 into a number that has absolute value and is bounded between 0 and 1 can be achieved by taking the abs(). Alternatively, you could compute the classic PLI from a time series of complex-valued cross-spectral density estimates by abs(mean(sign(angle(x)))); Best, Jan-Mathijs On Jun 24, 2014, at 12:46 AM, Lidia Mijas wrote: > Hi everyone, > > I would like to compute a classic phase lag index between pairs of MEG time series. > > So far I only found a wieghted phase lag index method implemented in ft and as far as I understand it is a directed measure so it gives the values from -1 to 1. Has anyone have an idea how to transform it so it computes absolute values from 0 to 1??? > > Many thanks in advance. > > Regards, > Lidia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Tue Jun 24 11:44:32 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Tue, 24 Jun 2014 10:44:32 +0100 Subject: [FieldTrip] Phase Lag Index In-Reply-To: References: Message-ID: Thank you Jan-Mathijs, So abs(x) will give me absolute value of x. But how can I use it considering that my data is in spm/fieldtrip format? This is my code for wpli. 'fd' stores WPLI values so values from -1 to 1 but taking abs(fd) doesn't work. Also not sure how to use just matlab to compute pli in the same way as the code below. Any tips? listfiles=ls('C:\Users\Lid\Documents\a_project\Controls\sources [40 80]\both_m1s\BceRdfspm8_*.mat'); for j=1:size(listfiles,1) spmfilename=deblank(listfiles(j,:)); D= spm_eeg_load(spmfilename); data = D.ftraw(0); % % megchan1 = 'lm1'; megchan2 = 'rm1'; emgchan = 'EEG061'; % meg1 = ft_selectdata(data, 'channel', megchan1, 'toilim', [1 3], 'avgoverrpt', 'no'); % meg1.label{1} = 'LM1'; meg2 = ft_selectdata(data, 'channel', megchan2, 'toilim', [1 3], 'avgoverrpt', 'no'); meg2.label{1} = 'RM1'; emg = ft_selectdata(data, 'channel', emgchan, 'toilim', [1 3], 'avgoverrpt', 'no'); emg.label{1} = 'EMG'; %emg.time = meg.time; inp = ft_appenddata([],emg, meg2); % cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; %cfg.taper = 'hanning'; cfg.foilim = [5 100]; cfg.toi = [1 3]; cfg.tapsmofrq = 7; % was 2.5 cfg.keeptrials = 'yes'; cfg.channel = {'EMG', 'RM1'};%'EMG'; cfg.channelcmb = {'RM1','EMG'}; %'EMG' 'RM1'; 'LM1' 'RM1' }; freq = ft_freqanalysis(cfg, inp); % cfg = []; cfg.method = 'wpli'; cfg.channelcmb = {'RM1', 'EMG'}; fd = ft_connectivityanalysis(cfg, freq); % cfg = []; cfg.xparam = 'freq'; cfg.zparam = 'wplispctrm'; cfg.xlim = [5 100]; cfg.ylim = [-1 1]; cfg.channel = 'EMG'; cfg.refchannel = 'RM1'; cfg.showlabels = 'yes'; figure; ft_singleplotER(cfg,fd); L = 120; c95 = 1-0.05^(1/(L-1)); x = get(gca,'xlim'); xlabel('frequency'); ylabel('cortico-muscular PLI'); hold on, line(x,[c95,c95],'linestyle','--','color','k'), hold off % eval(['print -dpng beta_ppc_emg_rm1_patient_' LW240492 '.png']); eval(['print -dpng gamma_pli_emg_rm1_control_' num2str(spmfilename(12:19)) '.png']); close(gcf); % % mean(fd.ppcspctrm(fd.freq>=15 & fd.freq<=30)) % % ffreq = fd.freq(fd.freq>=15 & fd.freq<=30); % [m, ind] = max(fd.ppcspctrm(ismember(fd.freq, ffreq))); % disp(['Max ' num2str(m) ' at ' num2str(ffreq(ind)) ' Hz']); end %% Many thanks!! 2014-06-24 8:05 GMT+01:00 jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl>: > Hi Lidia, > > Transforming a number that is bounded between -1 and 1 into a number that > has absolute value and is bounded between 0 and 1 can be achieved by taking > the abs(). > Alternatively, you could compute the classic PLI from a time series of > complex-valued cross-spectral density estimates by > abs(mean(sign(angle(x)))); > > Best, > Jan-Mathijs > > > On Jun 24, 2014, at 12:46 AM, Lidia Mijas wrote: > > Hi everyone, > > I would like to compute a classic phase lag index between pairs of MEG > time series. > > So far I only found a wieghted phase lag index method implemented in ft > and as far as I understand it is a directed measure so it gives the values > from -1 to 1. Has anyone have an idea how to transform it so it computes > absolute values from 0 to 1??? > > Many thanks in advance. > > Regards, > Lidia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From taosong at ucsd.edu Tue Jun 24 22:19:07 2014 From: taosong at ucsd.edu (Song, Tao) Date: Tue, 24 Jun 2014 20:19:07 +0000 Subject: [FieldTrip] MEG Engineer Position Message-ID: Dear Colleagues: Elekta Inc is hiring a MEG service engineer in US. If you are interested and have the working permission in US, or you know someone might be interested, pls send me an email at: tao.song at elekta.com Thanks so much! Tao -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 08:37:12 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 24 Jun 2014 23:37:12 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 25 08:55:08 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jun 2014 08:55:08 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting In-Reply-To: References: Message-ID: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> Hi Martina, I agree that the sorting of the channels is somewhat annoying, and an unexpected feature in the coding. Presently we are looking into how to address this. Yet, the sorting that is applied to the list of channels is consistently applied to all fields that contain numeric data. In your case I don’t understand your statement that the mask stays unsorted. Is there any way you are able to verify that? If I run the following simple simulation everything is reordered, also the ‘mask’-field. stat.label={‘B’;’A’;’C’}; stat.stat=repmat([1:3]’,[1 2]); stat.mask=stat.stat; stat.prob=stat.stat; stat.time=[1 2]; stat.dimord=‘chan_time’; stat2=ft_selectdata([],stat); If I now do: stat2.label I get ans = ‘A’ ‘B’ ‘C’ and when I do: stat2.stat I get ans = 2 2 1 1 3 3 and when I do: stat2.mask I get ans = 2 2 1 1 3 3 Conslusion: the mask is also re-ordered. In other words, the rows in the numeric data fields are still consistent with respect to one another. If you want to stay informed about this issue, I suggest you to create an account on bugzilla.fcdonders.nl, and add yourself to the cc-list of bug #2597. Best wishes, Jan-Mathijs On Jun 23, 2014, at 4:14 PM, Martina Postorino wrote: > Dear all, > > I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset. > > I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels. > > Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically? > > I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed. > > This is the code I use: > > [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); > > %plotting > > cfgp = []; > cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; > cfgp.avgoverchan = 'no'; > cfgp.latency = [-1 1]; > ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); > ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); > > % average data across subjects > > cfgp = []; > cfgp.keepindividual = 'no'; > ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); > ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red); > % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); > > ERP_pain_bp_GA_avg.mask = stat.mask; > ERP_buttonpress_GA_avg.mask = stat.mask; > % ERP_pain_GA_avg.mask = stat.mask; > > % do the plotting > > cfgp = []; > cfgp.maskparameter = 'mask'; > cfgp.maskstyle = 'box'; > cfgp.layout = layout_easycap_painlabmunich; > > ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); > > Thanks in advance! > > ___________________________________________ > > Martina Postorino, M.Sc > Phd program in Medical Life Science and Technology > > Neuroimaging Center (TUM-NIC) > Technische Universität München, Klinikum Rechts der Isar > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 08:56:35 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 24 Jun 2014 23:56:35 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel In-Reply-To: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> References: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> Message-ID: <1403679395.95135.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From eijlers at rsm.nl Wed Jun 25 10:20:57 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Wed, 25 Jun 2014 08:20:57 +0000 Subject: [FieldTrip] Large values for output ft_freqanalysis using wavelets Message-ID: Dear all, Could someone please tell me whether the large values in my power spectrum (in the range of hundreds and sometimes even up to a thousand), can be correct values, or whether something must be going wrong? I am using the same settings as specified in the time frequency tutorial. Thanks a lot, Esther Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Wed Jun 25 10:38:24 2014 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Wed, 25 Jun 2014 10:38:24 +0200 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <1BB666E0-72F7-44DB-863F-6647EC7104E8@gmail.com> Dear All, here's a PhD position I'd like to advertise: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE, RWTH Aachen, GERMANY A research position (PhD student, 50% TV-L 13) is available to study the impact of stroke on visual perception using behavioral methodology combined with fMRI methods. In particular, the research aims to depict the plastic changes in the visual network that are induced by ischemic stroke. Experiments performed with healthy human subjects and directed at studying the neuronal mechanisms underlying sensory decision making will be combined with studies of patients suffering from circumscribed lesions in striate and extrastriate cortex. The project will be conducted at the Departments of Neurology and Neuroradiology and is part of an IZKF funded collaborative project within the Medical faculty of RWTH Aachen University. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. The successful candidate will work within an interdisciplinary team of young researchers at a well-known research institution (www.rwth-aachen.de). The candidate will design and conduct behavioral as well as functional imaging experiments, collect data, perform statistical data analysis (SPSS, Matlab, BrainVoyager and SPM), present the results at national and international meetings and publish research manuscripts. Candidates (Ph.D. students, Ph.D., or M.D.) interested in visual perception, cognitive psychology, or clinical psychology are particularly encouraged to apply. Very good English communication and writing skills are expected. The position requires a strong interest in research questions and experimental skills combined with a high level of motivation, team-orientation as well as the ability to solve problems independently. Programming skills in Matlab are considered a plus. Qualified women are explicitly invited to apply and handicapped candidates with equal qualification will be given preference. Please send your CV, publication record, and the names of two references (preferably by e-mail) to: Prof. Dr. Thomas Haarmeier Department of Neurology, University of Aachen Pauwelsstraße 30, 52074 Aachen, Germany Phone: +49 241 80-89603 Secr: +49 241 80-89601 Fax: +49 241 80-82582 e-mail: thaarmeier at web.de and Prof. Dr. Jessica Freiherr Diagnostic and Interventional Neuroradiology, University of Aachen Pauwelsstr. 30, 52074 Aachen, Germany Pager: +49 241 80 35688 Phone.: +49 241 80 80976 Fax: +49 241 80 3335688 eMail: jfreiherr at ukaachen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 11:39:30 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Wed, 25 Jun 2014 02:39:30 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403689170.25454.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 12:12:31 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Wed, 25 Jun 2014 03:12:31 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Wed Jun 25 13:41:21 2014 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Wed, 25 Jun 2014 13:41:21 +0200 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip Message-ID: Hello, I was checking the one of the Fieldtrip's pages to perform an have change the coordinate system of my electrodes position The page: http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel For doing an alignment, the fiducials positions should be given, I did not have them first, so I use the brainstorm toolbox to get them from the patient MRI. In brainstrom I found this equation for transforming from voxel to mm. (given the voxel size) Position_mm = Position_voxel .* Voxel_size. While in fieldtrip I found another statement which gives (given the transformation matrix) a different answer: warp_apply(vox2head, vox_Nas, 'homogenous'); For example using brainstorm equation I got: NAS = [117.1920 215.8287 118.9998] And using the fieldtrip function, I got: NAS = [14.3973 49.3926 49.6322] What is the difference between the two? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 25 16:10:11 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 25 Jun 2014 16:10:11 +0200 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip In-Reply-To: References: Message-ID: <53AAD843.80208@donders.ru.nl> Dear Hamzi, this might be related to different coordinate systems, see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined FieldTrip is using whatever coordinate system the data was spceified in, and it seems that brainstorm is using some fixed coordinate system and applied a transformation beforehands. you could e.g. notice that in Brainstorm the coordinates for the first and third dimension have about the same value, where in FieldTrip this happens for the second and third value. So I would assume the difference is due to a difference in coordinate systems. Best, Jörn On 6/25/2014 1:41 PM, Hamza Fawzi Altakroury (Alumni) wrote: > Hello, > > I was checking the one of the Fieldtrip's pages to perform an have > change the coordinate system of my electrodes position > > The page: > http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel > > For doing an alignment, the fiducials positions should be given, I did > not have them first, so I use the brainstorm toolbox to get them from > the patient MRI. > > In brainstrom I found this equation for transforming from voxel to mm. > (given the voxel size) > > Position_mm = Position_voxel .* Voxel_size. > > While in fieldtrip I found another statement which gives (given the > transformation matrix) a different answer: > > warp_apply(vox2head, vox_Nas, 'homogenous'); > > > For example using brainstorm equation I got: > > NAS = [117.1920215.8287118.9998] > > > And using the fieldtrip function, I got: > > NAS = [14.397349.392649.6322] > > > What is the difference between the two? > > > Thank you > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jun 25 16:11:49 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 25 Jun 2014 16:11:49 +0200 Subject: [FieldTrip] Large values for output ft_freqanalysis using wavelets In-Reply-To: References: Message-ID: <53AAD8A5.30508@donders.ru.nl> Hi Esther, yes, this can very well be. Note that the time frequency tutorial is on MEG data, where data is usually in the order of 10^-29. Best, Jörn On 6/25/2014 10:20 AM, Esther Eijlers wrote: > Dear all, > > Could someone please tell me whether the large values in my power > spectrum (in the range of hundreds and sometimes even up to a > thousand), can be correct values, or whether something must be going > wrong? > I am using the same settings as specified in the time frequency tutorial. > > Thanks a lot, > Esther > > Disclaimer > ------------------------------------------------------------------------ > De informatie verzonden in dit e-mail bericht is vertrouwelijk en is > uitsluitend bestemd voor de geadresseerde van dit bericht. Lees > verder: www.eur.nl/email-disclaimer > The information in this e-mail message is confidential and may be > legally privileged. Read more: www.eur.nl/english/email-disclaimer > > ------------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jun 25 16:13:38 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 25 Jun 2014 16:13:38 +0200 Subject: [FieldTrip] error in ft_prepare_headmodel In-Reply-To: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> References: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> Message-ID: <53AAD912.7010801@donders.ru.nl> Hi Rasha, could you paste a part of your script and the full error message? Then we would be better able to provide any assistance. Best, Jörn PS: the mail server can be a bit slow sometimes, so please be patient when a mail is not instantaneously delivered. On 6/25/2014 12:12 PM, Rasha Haider wrote: > Dear fieldtrip experts, > I'm trying to construct a head model following the tutorial, but when > I apply the function (ft_prepare_headmodel): > > vol = ft_prepare_headmodel (cfg, segmentedmri); > > I'm having this error: > > Error in ==> ft_prepare_headmodel>prepare_shells at 352 > tissue = ft_getopt(cfg,'tissue'); > > ??? Output argument "bnd" (and maybe others) not assigned during call > to "/Volumes/My Passport/my work/untitled > folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". > > Error in ==> ft_prepare_headmodel at 205 > geometry = prepare_shells(cfg,data); > > although I'm following the tutorial step be step, I think it could be > a bug in the function, can any one help pls. > > Regards > rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From gopalar.ccf at gmail.com Wed Jun 25 19:17:28 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Wed, 25 Jun 2014 13:17:28 -0400 Subject: [FieldTrip] problem with coordsys - neuromag data Message-ID: Dear all, My aim is to use MEG data collected on a neuromag system, perform MNE source analysis and use AAL atlas to extract time series of the anatomical areas. However there seems to be conflicting problems with the coordsys. I tried the following: 1. Kept everything (mri, headmodel, volume) in MNI/SPM coordinate. However, when computing leadfield the gradstruct seems to be in neuromag coordinate. There is no way to change the grad structure from neuromag to spm/mni 2. I tried keeping everything (mri, headmodel, volume) in Neuromag coordinate, and performed source resonstruction. However, to use AAL atlas and source interpolate I need the sources in MNI/SPM coordinates. However, ft_convert_coordsys only supports atlas and mri. I am not sure how to proceed. Any help would be appreciated. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jun 26 10:00:31 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 26 Jun 2014 08:00:31 +0000 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403766371589.36361@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> Message-ID: <1403769631013.86820@flinders.edu.au> ?Hello Fieldtrip, I have been using the LCMV beamformer in fieldtrip for some time now, so I have experience with it. I am facing an issue where whatever data I process I get an image identical to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, tactile tasks etc. Also, whatever I do with the data, the same issue occurs (filtering etc). Attachment 'original_data.png' shows the data before going into the beamformer, and 'virtual_data.png' shows the data after it has run through beamformer. We have tried filtering in every possible combination ie lowpass = 40/30/20, highpass = 1/10/20, we even did a highpass of 100 and it was still identical. We dont think this is a fault of the beamformer, but we cant work out how to get rid of the issue. It is overpowering the other data. We have also had a look at some spectra of the brain region with the high power and a brain region that doesnt have the high power and it appears as though there is higher power over all frequencies. Before asking: -There isnt any muscle, the data was recorded from a paralysed person. -We have tried it on CAR'd data and data that hasnt been CAR'd We are all out of ideas. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original_data.png Type: image/png Size: 341653 bytes Desc: original_data.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source_plot.png Type: image/png Size: 97370 bytes Desc: source_plot.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_data.png Type: image/png Size: 287260 bytes Desc: virtual_data.png URL: From hamzaf at sabanciuniv.edu Thu Jun 26 10:08:55 2014 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Thu, 26 Jun 2014 11:08:55 +0300 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip In-Reply-To: <53AAD843.80208@donders.ru.nl> References: <53AAD843.80208@donders.ru.nl> Message-ID: Thank you Dr. Horschig, I am sorry for writing the first line of my letter wrongly. Hamza On Wed, Jun 25, 2014 at 5:10 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Hamzi, > > this might be related to different coordinate systems, see > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_ > head_and_mri_coordinate_systems_defined > > FieldTrip is using whatever coordinate system the data was spceified in, > and it seems that brainstorm is using some fixed coordinate system and > applied a transformation beforehands. you could e.g. notice that in > Brainstorm the coordinates for the first and third dimension have about the > same value, where in FieldTrip this happens for the second and third value. > So I would assume the difference is due to a difference in coordinate > systems. > > Best, > Jörn > > > On 6/25/2014 1:41 PM, Hamza Fawzi Altakroury (Alumni) wrote: > >> Hello, >> >> I was checking the one of the Fieldtrip's pages to perform an have change >> the coordinate system of my electrodes position >> >> The page: >> http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_ >> positions_to_bem_headmodel >> >> For doing an alignment, the fiducials positions should be given, I did >> not have them first, so I use the brainstorm toolbox to get them from the >> patient MRI. >> >> In brainstrom I found this equation for transforming from voxel to mm. >> (given the voxel size) >> >> Position_mm = Position_voxel .* Voxel_size. >> >> While in fieldtrip I found another statement which gives (given the >> transformation matrix) a different answer: >> >> warp_apply(vox2head, vox_Nas, 'homogenous'); >> >> >> For example using brainstorm equation I got: >> >> NAS = [117.1920215.8287118.9998] >> >> >> And using the fieldtrip function, I got: >> >> NAS = [14.397349.392649.6322] >> >> >> What is the difference between the two? >> >> >> Thank you >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimparkinson at me.com Thu Jun 26 15:12:32 2014 From: jimparkinson at me.com (Jim Parkinson) Date: Thu, 26 Jun 2014 14:12:32 +0100 Subject: [FieldTrip] Possible bug with 'outline' option in ft_singleplotTFR Message-ID: Hi I have been using ft_singleplotTFR along with the 'outline' option to mask areas of the plot as given by an ft_freqstatistics output. I started to notice that the outline didn't match up with what (by eyeball!) should be outlined. So I checked the function by using ft_singleplotTFR cfg = []; cfg.parameter = 'mask'; cfg.channel = 'Cz'; cfg.zlim = [0 1]; % masks cfg.maskparameter = 'mask'; cfg.maskstyle = 'outline'; cfg.renderer = 'opengl'; ft_singleplotTFR(cfg,td); therefore I am plotting the mask data (zeros or ones) and also using that data as the outline parameter - so the outline should be EXACTLY around the RED area (ones), right? This doesn't happen (screencap here: https://www.dropbox.com/s/3lnu4f63wq0zdg2/OutlineDemo.png). However, the 'opacity' and 'saturation' methods work fine, and perfectly bounds the mask area. Has anyone else had this issue with 'outline', have any pointers, or alternatives that are easy to implement. p.s., I've replicated this with all rendering options, on both Mac and Linux Thanks for any help Jim -- Dr Jim Parkinson, D.Phil Postdoctoral Research Fellow Sackler Centre For Consciousness Science School of Psychology University of Sussex Brighton BN1 9QH jimparkinson at me.com j.m.parkinson at sussex.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 26 15:47:07 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 26 Jun 2014 15:47:07 +0200 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403769631013.86820@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> Message-ID: Hi Tyler, You write that you end up with the same result "whatever data you process", so I suspect the raw EEG/MEG data is not to blame. Rather, I suspect something is wrong with your leadfield or one of its ingredients: the volume conductor model, source model, or electrode/gradiometer definitions. It's probably a good idea to check whether these three ingredients all line up. Could you plot them in one set of axes, as described at the end of this section: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel ? Best, Eelke On 26 June 2014 10:00, Tyler Grummett wrote: > Hello Fieldtrip, > > > I have been using the LCMV beamformer in fieldtrip for some time now, so I > have experience with it. > > > I am facing an issue where whatever data I process I get an image identical > to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, > tactile tasks etc. > > Also, whatever I do with the data, the same issue occurs (filtering etc). > > > Attachment 'original_data.png' shows the data before going into the > beamformer, and 'virtual_data.png' shows the data after it has run through > beamformer. > > > We have tried filtering in every possible combination ie lowpass = 40/30/20, > highpass = 1/10/20, we even did a highpass of 100 and it > > was still identical. > > > We dont think this is a fault of the beamformer, but we cant work out how to > get rid of the issue. It is overpowering the other data. > > > We have also had a look at some spectra of the brain region with the high > power and a brain region that doesnt have the high power and it appears > > as though there is higher power over all frequencies. > > > Before asking: > > -There isnt any muscle, the data was recorded from a paralysed person. > > -We have tried it on CAR'd data and data that hasnt been CAR'd > > > We are all out of ideas. > > > Kind regards, > > > Tyler > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.vicente.grab at gmail.com Thu Jun 26 17:14:48 2014 From: a.vicente.grab at gmail.com (Alejandro Vicente Grabovetsky) Date: Thu, 26 Jun 2014 17:14:48 +0200 Subject: [FieldTrip] Realtime Buffer error from Matlab but not in terminal Message-ID: Dear FT, I'm attempting to test the realtime at the DCCN from within the simple tutorial at: http://fieldtrip.fcdonders.nl/faq/how_should_i_get_started_with_the_fieldtrip_realtime_buffer The tutorial works very well from within the terminal, but when I attempt to start an interactive matlab session and do while true hdr = ft_read_header('buffer://localhost:1972') pause(1) end it gives me an error from the "buffer" mex: ERROR: failed to create socket (1) Thanks in advance, Sasha -- Vicente Grabovetsky, Alejandro (Sasha) Postdoctoral researcher Donders Centre for Cognitive Neuroimaging http://www.doellerlab.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From evaladez at psych.udel.edu Thu Jun 26 19:41:15 2014 From: evaladez at psych.udel.edu (Emilio Valadez) Date: Thu, 26 Jun 2014 13:41:15 -0400 Subject: [FieldTrip] Outputting peak z-values from artifact detection Message-ID: <8DC1EA0EB7E3FD419D9B3BE76BD403862C545B6AFB@razor.psych.udel.edu> Hello fieldtrippers! I'm trying to create a simple plot showing the number of trials that will be retained in my data set at various artifact z-value thresholds. To do this, I'll need an output with the peak z-value of every trial. I've tried using ft_artifact_zvalue with the cfg setting "cfg.artfctdef.zvalue.artfctpeak='yes'" but this seems to fill cfg.artfctdef.zvalue.peaks with values that are much, much larger than the peak z-values I see in the interactive window. In fact, the values in cfg.artfctdef.zvalue.peaks look more like time or sample points than z-values, as they are in ascending order and range all the way up to the hundred thousands. I feel I must be missing something obvious. Any suggestions? Thanks in advance for any help! Best, Emilio -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Thu Jun 26 21:29:31 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Thu, 26 Jun 2014 21:29:31 +0200 (CEST) Subject: [FieldTrip] Realtime Buffer error from Matlab but not in terminal In-Reply-To: Message-ID: <2094728179.7647534.1403810971108.JavaMail.root@sculptor.zimbra.ru.nl> Hi Sasha, You are trying to read the header in realtime from the machine where you started the matlab session, i.e. localhost:1972. Is this the same machine where you wrote that header? Best, Arjen ----- Oorspronkelijk bericht ----- > Van: "Alejandro Vicente Grabovetsky" > Aan: fieldtrip at science.ru.nl > Verzonden: Donderdag 26 juni 2014 17:14:48 > Onderwerp: [FieldTrip] Realtime Buffer error from Matlab but not in > terminal > Dear FT, > I'm attempting to test the realtime at the DCCN from within the simple > tutorial at: > http://fieldtrip.fcdonders.nl/faq/how_should_i_get_started_with_the_fieldtrip_realtime_buffer > The tutorial works very well from within the terminal, but when I > attempt to start an interactive matlab session and do > while true > hdr = ft_read_header('buffer://localhost:1972') > pause(1) > end > it gives me an error from the "buffer" mex: > ERROR: failed to create socket (1) > Thanks in advance, > Sasha > -- > Vicente Grabovetsky, Alejandro (Sasha) > Postdoctoral researcher > Donders Centre for Cognitive Neuroimaging > http://www.doellerlab.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jun 27 07:40:51 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jun 2014 07:40:51 +0200 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403831209671.90701@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, so I >> have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image identical >> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >> tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run through >> beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = 40/30/20, >> highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out how to >> get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the high >> power and a brain region that doesnt have the high power and it appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jun 27 07:41:55 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jun 2014 07:41:55 +0200 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: PS: Forwarding your figure to the list. ---------- Forwarded message ---------- From: Eelke Spaak Date: 27 June 2014 07:40 Subject: Re: [FieldTrip] Beamformer confusion To: Email discussion list for the FieldTrip project Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, so I >> have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image identical >> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >> tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run through >> beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = 40/30/20, >> highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out how to >> get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the high >> power and a brain region that doesnt have the high power and it appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel.fig Type: application/octet-stream Size: 60726 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Fri Jun 27 09:16:30 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 27 Jun 2014 09:16:30 +0200 (CEST) Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: <023801cf91d7$b837e220$28a7a660$@herring@fcdonders.ru.nl> Hi Tyler, Although I cannot comment on whether or not something went wrong, as far as I know you shouldn't use single-sphere models in EEG as they do not take into account the difference in conductivity of the various tissue types. At least use a triple sphere model or preferably a BEM of FEM model. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: vrijdag 27 juni 2014 7:42 To: Email discussion list for the FieldTrip project Subject: [FieldTrip] Fwd: Beamformer confusion PS: Forwarding your figure to the list. ---------- Forwarded message ---------- From: Eelke Spaak Date: 27 June 2014 07:40 Subject: Re: [FieldTrip] Beamformer confusion To: Email discussion list for the FieldTrip project Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and > sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl > on behalf of Eelke Spaak > > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_t > he_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett > wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, >> so I have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image >> identical to attachment 'sourceplot.png'. We have tried visual SSR, >> memory tasks, tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run >> through beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = >> 40/30/20, highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out >> how to get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the >> high power and a brain region that doesnt have the high power and it >> appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lzizlsperger at ukaachen.de Fri Jun 27 12:09:16 2014 From: lzizlsperger at ukaachen.de (Zizlsperger, Leopold) Date: Fri, 27 Jun 2014 10:09:16 +0000 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <362E90FB-1198-4D7F-9E73-349E95B0672C@ukaachen.de> Dear All, here's a PhD position I'd like to advertise: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE, RWTH Aachen, GERMANY A research position (PhD student, 50% TV-L 13) is available to study the impact of stroke on visual perception using behavioral methodology combined with fMRI methods. In particular, the research aims to depict the plastic changes in the visual network that are induced by ischemic stroke. Experiments performed with healthy human subjects and directed at studying the neuronal mechanisms underlying sensory decision making will be combined with studies of patients suffering from circumscribed lesions in striate and extrastriate cortex. The project will be conducted at the Departments of Neurology and Neuroradiology and is part of an IZKF funded collaborative project within the Medical faculty of RWTH Aachen University. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. The successful candidate will work within an interdisciplinary team of young researchers at a well-known research institution (www.rwth-aachen.de). The candidate will design and conduct behavioral as well as functional imaging experiments, collect data, perform statistical data analysis (SPSS, Matlab, BrainVoyager and SPM), present the results at national and international meetings and publish research manuscripts. Candidates (Ph.D. students, Ph.D., or M.D.) interested in visual perception, cognitive psychology, or clinical psychology are particularly encouraged to apply. Very good English communication and writing skills are expected. The position requires a strong interest in research questions and experimental skills combined with a high level of motivation, team-orientation as well as the ability to solve problems independently. Programming skills in Matlab are considered a plus. Qualified women are explicitly invited to apply and handicapped candidates with equal qualification will be given preference. Please send your CV, publication record, and the names of two references (preferably by e-mail) to: Prof. Dr. Thomas Haarmeier Department of Neurology, University of Aachen Pauwelsstraße 30, 52074 Aachen, Germany Phone: +49 241 80-89603 Secr: +49 241 80-89601 Fax: +49 241 80-82582 e-mail: thaarmeier at web.de and Prof. Dr. Jessica Freiherr Diagnostic and Interventional Neuroradiology, University of Aachen Pauwelsstr. 30, 52074 Aachen, Germany Pager: +49 241 80 35688 Phone.: +49 241 80 80976 Fax: +49 241 80 3335688 eMail: jfreiherr at ukaachen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Fri Jun 27 12:51:11 2014 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Fri, 27 Jun 2014 11:51:11 +0100 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: <53AD4C9F.90809@uni-leipzig.de> Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock From tyler.grummett at flinders.edu.au Mon Jun 30 03:42:53 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 01:42:53 +0000 Subject: [FieldTrip] ft_sensorrealign Message-ID: <1404092572773.3933@flinders.edu.au> Hello fieldtrip, I dont know if this is a bug or not, but I am trying to use the electrode positions from a template file in fieldtrip using the following code: cfg = []; cfg.method = 'template'; cfg.target = 'fieldtrip\template\electrode\standard_1005.elec' ft_sensorrealign( cfg, data.elec) and I get the following error: Reference to non-existent field 'pnt'. Error in ft_sensorrealign (line 306) template(i).pnt = template(i).pnt(datsel,:); Am I using this wrong? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jun 30 04:17:53 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 02:17:53 +0000 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <53AD4C9F.90809@uni-leipzig.de> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> , <53AD4C9F.90809@uni-leipzig.de> Message-ID: <1404094672818.50881@flinders.edu.au> Hello all, Thank you for the quick replies, I greatly appreciate it. I recalculated vol using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); cfg = []; cfg.write = 'no'; cfg.coordsys = 'mni'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! Mesh Info : # points : 3000 # triangles : 5996 Euler characteristic : 2 Min Area : 2.44949 Max Area : 58.4166 Self intersection for mesh number 0 C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 | ------ om_minverser | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin | ----------------------- Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... Error using fread Invalid file identifier. Use fopen to generate a valid file identifier. the call to "ft_prepare_headmodel" took 21 seconds I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better. I just tried to prepare the leadfield and got the following error: ************************* No system matrix is present, calling the Nemo Lab pipeline... om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 Not enough arguments Please try "om_assemble -h" or "om_assemble --help " Writing sensor coordinates... Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 113) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Error in ft_compute_leadfield (line 442) lf = ft_leadfield_openmeeg(pos, vol, sens); Error in ft_prepare_leadfield (line 187) lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam); ************************* So it looks like I need to sort this issue out before I can proceed. Thank you for all your help again! Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Matt Craddock Sent: Friday, 27 June 2014 8:21 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.fig Type: application/octet-stream Size: 47769 bytes Desc: sensor positions_sourcemodel_new.fig URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.png Type: image/png Size: 6055 bytes Desc: sensor positions_sourcemodel_new.png URL: From roeysc at gmail.com Mon Jun 30 08:47:02 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 30 Jun 2014 09:47:02 +0300 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <1404094672818.50881@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> <53AD4C9F.90809@uni-leipzig.de> <1404094672818.50881@flinders.edu.au> Message-ID: Dear Tyler, Perhaps you'll find this old post helpful: http://mailman.science.ru.nl/pipermail/fieldtrip/2014-January/007437.html it holds a piece of code that uses the iso2mesh option added by Daniel Wong, Sarang Dalal, and Robert Oostenveld, that solves such cases of intersecting meshes. Hope this helps! Best, roey On Mon, Jun 30, 2014 at 5:17 AM, Tyler Grummett < tyler.grummett at flinders.edu.au> wrote: > Hello all, > > Thank you for the quick replies, I greatly appreciate it. > > I recalculated vol using the following code: > > mri = ft_read_mri( 'Subject01.mri'); > mri = ft_volumenormalise( [], mri); > mri = ft_volumereslice([], mri); > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'mni'; > segmentedmri = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.method = 'openmeeg'; > vol = ft_prepare_headmodel(cfg, segmentedmri); > > However I got the following error when using openmeeg (I followed the > instructions on how to install the binary files from openmeeg). > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > !!!!!!!!!!! WARNING !!!!!!!!!!! > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Mesh is self intersecting ! > Mesh Info : > # points : 3000 > # triangles : 5996 > Euler characteristic : 2 > Min Area : 2.44949 > Max Area : 58.4166 > Self intersection for mesh number 0 > > C:\Users\grum0003\AppData\Local\Temp>om_minverser > ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin > ./tp844032d5_1439_4794_b28e_c554e265bca8.bin > om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 > > > | ------ om_minverser > | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin > | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin > | ----------------------- > Exception: Unable to open the file > ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... > Error using fread > Invalid file identifier. Use fopen to generate a valid file identifier. > the call to "ft_prepare_headmodel" took 21 seconds > > > I am still able to generate a boundary element model (see attached). > Please inform me if they are correct. I had some issues with > ft_sensorrealign and using openmeeg. However it is looking a lot better. > > I just tried to prepare the leadfield and got the following error: > > ************************* > > No system matrix is present, calling the Nemo Lab pipeline... > om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 > > Not enough arguments > Please try "om_assemble -h" or "om_assemble --help " > > Writing sensor coordinates... > Error using fprintf > Invalid file identifier. Use fopen to generate a valid file identifier. > > Error in ft_leadfield_openmeeg (line 113) > fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, > sens.chanpos(ii,:)); > > Error in ft_compute_leadfield (line 442) > lf = ft_leadfield_openmeeg(pos, vol, sens); > > Error in ft_prepare_leadfield (line 187) > lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, > 'reducerank', > cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', > cfg.normalizeparam); > ************************* > > So it looks like I need to sort this issue out before I can proceed. > > Thank you for all your help again! > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl > on behalf of Matt Craddock > Sent: Friday, 27 June 2014 8:21 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Fwd: Beamformer confusion > > Hi Tyler, > > From the plot, it looks like the volume conductor is singlesphere but > the sourcemodel is derived from the standard boundary element model, and > the electrodes are then not aligned to either of them. First up, I'd > suggest using the standard BEM as your volume conductor and see if that > helps. The electrode positions may be the next thing to fix - they might > re-align automatically properly, in which case you won't need to do > anything. If they have standard 1020/1005 co-ordinates, they should be > aligned fine already, but if not you could try replacing the positions > in your dataset with the standard positions (i.e. if you have an Fp1, > take the Fp1 co-ordinates from the templates in the > fieldtrip\template\electrode directory). > > Cheers, > Matt > > On 27/06/2014 06:41, Eelke Spaak wrote: > > PS: Forwarding your figure to the list. > > > > > > ---------- Forwarded message ---------- > > From: Eelke Spaak > > Date: 27 June 2014 07:40 > > Subject: Re: [FieldTrip] Beamformer confusion > > To: Email discussion list for the FieldTrip project < > fieldtrip at donders.ru.nl> > > > > > > Hi Tyler, > > > > First, please send your messages to the list, so that others may > > benefit (now or in the future through the archives). > > > > Then, regarding your plot, indeed I think there might be something > > wrong (though I am not sure). You are looking for a proper alignment > > between the sensors (I have colored them red to be able to better > > see), the source model (grid points for beamforming) and the volume > > conductor model (translucent mesh; sphere in your case). I have never > > used a single sphere model myself, so I cannot really comment on > > whether the sphere aligns properly. However, I would suspect not, > > since there are grid points located outside the sphere. Also, the > > sensors might not be properly located, some are intersecting the body > > of grid points. > > > > But I do seem to recall that sensors are automatically projected to > > the volume conductor surface in the case of EEG. Maybe someone who has > > EEG source modelling experience can comment on this (and your figure)? > > I usually only work with MEG, so I don't have the same intuition for > > your kind of plot as with an analogous plot for MEG. > > > > The following tutorial might be very helpful for you, by the way: > > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > > > Best, > > Eelke > > > > On 27 June 2014 03:06, Tyler Grummett > wrote: > >> Hello Eelke, > >> > >> Thank you for replying to my email. > >> > >> I have attached an image with the requested sourcemodel positions and > sensor positions. > >> > >> I dont really know how to interpret the figures to be honest. > >> > >> I have attached a .fig figure so that you can have a play with it. > >> > >> Tyler > >> > >> ************************* > >> > >> Tyler Grummett ( BBSc, BSc(Hons I)) > >> PhD Candidate > >> Brain Signals Laboratory > >> Flinders University > >> Rm 5A301 > >> Ext 66124 > >> > >> ________________________________________ > >> From: fieldtrip-bounces at science.ru.nl > on behalf of Eelke Spaak > >> Sent: Thursday, 26 June 2014 11:17 PM > >> To: FieldTrip discussion list > >> Subject: Re: [FieldTrip] Beamformer confusion > >> > >> Hi Tyler, > >> > >> You write that you end up with the same result "whatever data you > >> process", so I suspect the raw EEG/MEG data is not to blame. > >> > >> Rather, I suspect something is wrong with your leadfield or one of its > >> ingredients: the volume conductor model, source model, or > >> electrode/gradiometer definitions. It's probably a good idea to check > >> whether these three ingredients all line up. Could you plot them in > >> one set of axes, as described at the end of this section: > >> > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > >> ? > >> > >> Best, > >> Eelke > >> > >> On 26 June 2014 10:00, Tyler Grummett > wrote: > >>> Hello Fieldtrip, > >>> > >>> > >>> I have been using the LCMV beamformer in fieldtrip for some time now, > so I > >>> have experience with it. > >>> > >>> > >>> I am facing an issue where whatever data I process I get an image > identical > >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, > >>> tactile tasks etc. > >>> > >>> Also, whatever I do with the data, the same issue occurs (filtering > etc). > >>> > >>> > >>> Attachment 'original_data.png' shows the data before going into the > >>> beamformer, and 'virtual_data.png' shows the data after it has run > through > >>> beamformer. > >>> > >>> > >>> We have tried filtering in every possible combination ie lowpass = > 40/30/20, > >>> highpass = 1/10/20, we even did a highpass of 100 and it > >>> > >>> was still identical. > >>> > >>> > >>> We dont think this is a fault of the beamformer, but we cant work out > how to > >>> get rid of the issue. It is overpowering the other data. > >>> > >>> > >>> We have also had a look at some spectra of the brain region with the > high > >>> power and a brain region that doesnt have the high power and it appears > >>> > >>> as though there is higher power over all frequencies. > >>> > >>> > >>> Before asking: > >>> > >>> -There isnt any muscle, the data was recorded from a paralysed person. > >>> > >>> -We have tried it on CAR'd data and data that hasnt been CAR'd > >>> > >>> > >>> We are all out of ideas. > >>> > >>> > >>> Kind regards, > >>> > >>> > >>> Tyler > > > > -- > Dr. Matt Craddock > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jun 30 08:54:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 06:54:17 +0000 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <1404094672818.50881@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> , <53AD4C9F.90809@uni-leipzig.de>,<1404094672818.50881@flinders.edu.au> Message-ID: <1404111256856.12754@flinders.edu.au> Hello all, An update on this is that the openmeeg download page in the fieldtrip page: http://fieldtrip.fcdonders.nl/faq/how_can_i_use_openmeeg_for_forward_modelling https://gforge.inria.fr/frs/?group_id=435 should be: http://openmeeg.gforge.inria.fr/download/ because I downloaded the latest version, which was more up to date relative to the first website. I have checked and everything is now running smoothly. See attached, my only concern is that the there are some inside positions that are clearly located outside of the headmodel. Could this be the cause of the noisy data? I calculate the sourcemodel using the following code: template = load( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', 'template', 'sourcemodel', 'standard_sourcemodel3d10mm.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; sourcemodel = ft_prepare_sourcemodel( cfg); I then calculate the headmodel using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); mri.coordsys = 'spm'; cfg = []; cfg.write = 'no'; segmentedmri = ft_volumesegment(cfg, mri); Just to check I am doing it right (as per the tutorial) segmentedmri.transform = mri.transform; segmentedmri.anatomy = mri.anatomy; figure cfg = []; ft_sourceplot(cfg,segmentedmri); %only mri figure cfg.funparameter = 'gray'; ft_sourceplot(cfg,segmentedmri); %segmented gray matter on top figure cfg.funparameter = 'white'; ft_sourceplot(cfg,segmentedmri); %segmented white matter on top figure cfg.funparameter = 'csf'; ft_sourceplot(cfg,segmentedmri); %segmented csf matter on top cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); vol = ft_convert_units( vol, 'cm'); And then I get the attached source plot Also attached is the data that comes out of it, I evidently still have a problem. I am all out of ideas. Thank you again. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Monday, 30 June 2014 11:47 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hello all, Thank you for the quick replies, I greatly appreciate it. I recalculated vol using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); cfg = []; cfg.write = 'no'; cfg.coordsys = 'mni'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! Mesh Info : # points : 3000 # triangles : 5996 Euler characteristic : 2 Min Area : 2.44949 Max Area : 58.4166 Self intersection for mesh number 0 C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 | ------ om_minverser | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin | ----------------------- Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... Error using fread Invalid file identifier. Use fopen to generate a valid file identifier. the call to "ft_prepare_headmodel" took 21 seconds I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better. I just tried to prepare the leadfield and got the following error: ************************* No system matrix is present, calling the Nemo Lab pipeline... om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 Not enough arguments Please try "om_assemble -h" or "om_assemble --help " Writing sensor coordinates... Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 113) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Error in ft_compute_leadfield (line 442) lf = ft_leadfield_openmeeg(pos, vol, sens); Error in ft_prepare_leadfield (line 187) lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam); ************************* So it looks like I need to sort this issue out before I can proceed. Thank you for all your help again! Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Matt Craddock Sent: Friday, 27 June 2014 8:21 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.fig Type: application/octet-stream Size: 193506 bytes Desc: sensor positions_sourcemodel_new.fig URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_data.png Type: image/png Size: 184000 bytes Desc: virtual_data.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source_plot_new.png Type: image/png Size: 45643 bytes Desc: source_plot_new.png URL: From eelke.spaak at donders.ru.nl Mon Jun 30 09:09:15 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 30 Jun 2014 09:09:15 +0200 Subject: [FieldTrip] Possible bug with 'outline' option in ft_singleplotTFR In-Reply-To: References: Message-ID: Hi Jim, That indeed sounds like a possible bug. I have filed it on our bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2627 I tried to add you as CC on the bug, but it seems to have failed. Please register an account there and add yourself as CC to keep up to date on the bug. Thanks for letting us know. Best, Eelke On 26 June 2014 15:12, Jim Parkinson wrote: > Hi > > I have been using ft_singleplotTFR along with the 'outline' option to mask > areas of the plot as given by an ft_freqstatistics output. I started to > notice that the outline didn't match up with what (by eyeball!) should be > outlined. > > So I checked the function by using ft_singleplotTFR > cfg = []; > cfg.parameter = 'mask'; > cfg.channel = 'Cz'; > cfg.zlim = [0 1]; > > % masks > cfg.maskparameter = 'mask'; > cfg.maskstyle = 'outline'; > > cfg.renderer = 'opengl'; > ft_singleplotTFR(cfg,td); > > therefore I am plotting the mask data (zeros or ones) and also using that > data as the outline parameter - so the outline should be EXACTLY around the > RED area (ones), right? This doesn't happen (screencap here: > https://www.dropbox.com/s/3lnu4f63wq0zdg2/OutlineDemo.png). > > However, the 'opacity' and 'saturation' methods work fine, and perfectly > bounds the mask area. Has anyone else had this issue with 'outline', have > any pointers, or alternatives that are easy to implement. > > p.s., I've replicated this with all rendering options, on both Mac and Linux > > Thanks for any help > > Jim > > > > -- > > Dr Jim Parkinson, D.Phil > > Postdoctoral Research Fellow > > Sackler Centre For Consciousness Science > > School of Psychology > > University of Sussex > > Brighton > > BN1 9QH > > > jimparkinson at me.com > > j.m.parkinson at sussex.ac.uk > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Mon Jun 30 11:19:25 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 30 Jun 2014 11:19:25 +0200 Subject: [FieldTrip] re-referencing EEG signals Message-ID: Dear all, I was wondering if re-referencing of EEG signals should be done before trial definition or after all the preprocessing have been done. Would it make a difference in terms of statistical analyses? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 30 15:26:37 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 30 Jun 2014 15:26:37 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: Message-ID: <53B1658D.40003@donders.ru.nl> Dear Hweeling, re-referencing is a linear step and can be done at any time preceding any non-linear transformation, e.g. computing a power spectrum. So it depends on what type of preprocessing you have planned, but for the most usual preprocessing steps the answer is that it would not make any difference when exactly you are doing this. Best, Jörn On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before > trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mcantor at umich.edu Mon Jun 30 15:02:16 2014 From: mcantor at umich.edu (Max Cantor) Date: Mon, 30 Jun 2014 09:02:16 -0400 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: Message-ID: Re-referencing is a linear operation, so it shouldn't matter if you do it in the preprocessing or epoching steps. Hope that helps, Max On Mon, Jun 30, 2014 at 5:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before > trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Mon Jun 30 17:15:52 2014 From: david.m.groppe at gmail.com (David Groppe) Date: Mon, 30 Jun 2014 11:15:52 -0400 Subject: [FieldTrip] Postdoc opening in multimodal human brain mapping/modulation & epilepsy Message-ID: Post doctoral position available for research using a multimodal approach to investigate brain organization and function at the Hofstra University-North Shore LIJ School of Medicine in partnership with the Feinstein Institute for Medical Research. Studies involve surgical epilepsy patients undergoing intracranial electrophysiological monitoring for seizure detection and functional electrical stimulation mapping. Ongoing research projects include: 1) Validation of task-based and resting state fMRI and DTI using electrical stimulation mapping, electrocorticography and corticocortical evoked potentials; 2) Investigation of the neuronal dynamics underlying selective attention and active sensing, language, object identification and auditory stream analysis; 3) Modulation of neuronal function by direct cortical stimulation and investigation of the mechanisms of TMS, tDCS and tACS; 4) Prediction of seizure spread using electrophysiological and MRI markers. Responsibilities will include designing fMRI, ECoG and neurostimulation experiments and data analysis and the coordination of access to patients for research studies. Located in Long Island, 10 miles from Manhattan, there is tremendous opportunity for involvement with collaborative effort with multiple research groups the area with similar interests. Candidates should have M.D. and/or Ph.D. degrees and have some background in fMRI, electrophysiology, and/or data analysis (Matlab). Ideal start date would be between 9/2014-1/2015. For more information about the lab see: http://www.feinsteininstitute.org/faculty/ashesh-mehta-md-phd/ If interested, please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Jun 30 22:57:06 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 30 Jun 2014 22:57:06 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: <53B1658D.40003@donders.ru.nl> References: <53B1658D.40003@donders.ru.nl> Message-ID: Hi, Thanks, Max and Joern. Another question, is there an easier way to re-reference the EEG signals to an averaged montage? Cheers, Hweeling On 30 June 2014 15:26, "Jörn M. Horschig" wrote: > Dear Hweeling, > > re-referencing is a linear step and can be done at any time preceding any > non-linear transformation, e.g. computing a power spectrum. So it depends > on what type of preprocessing you have planned, but for the most usual > preprocessing steps the answer is that it would not make any difference > when exactly you are doing this. > > Best, > Jörn > > > On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > >> Dear all, >> >> I was wondering if re-referencing of EEG signals should be done before >> trial definition or after all the preprocessing have been done. >> >> Would it make a difference in terms of statistical analyses? >> >> Thanks. >> >> Best regards, >> Hweeling >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Jun 30 23:13:06 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 30 Jun 2014 23:13:06 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: <53B1658D.40003@donders.ru.nl> Message-ID: <0875E786-4FAC-441F-91A2-099ACAE2443C@uni-konstanz.de> Hi Hweeling, > > > Another question, is there an easier way to re-reference the EEG signals to an averaged montage? yes quite easy. Just specify cfg.reref = ‘yes’; and cfg.refchannel = ‘all’; during the call to ft_preprocessing. best tzvetan > > Cheers, > Hweeling > > > > On 30 June 2014 15:26, "Jörn M. Horschig" wrote: > Dear Hweeling, > > re-referencing is a linear step and can be done at any time preceding any non-linear transformation, e.g. computing a power spectrum. So it depends on what type of preprocessing you have planned, but for the most usual preprocessing steps the answer is that it would not make any difference when exactly you are doing this. > > Best, > Jörn > > > On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Sun Jun 1 09:11:10 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 1 Jun 2014 09:11:10 +0200 Subject: [FieldTrip] source resampling In-Reply-To: References: Message-ID: Dear Azeez, After source analysis, if you interpolate (using ft_sourceinterpolate) the source results (at 8 mm resolution) onto another volume that has a 1 mm resolution, it will be upsampled. Best, Eelke On 28 May 2014 17:36, Azeez Adebimpe wrote: > Dear all > > > I calculated my leadfield or grid with 8 mm resolution. > Please is there anyway after or before source interpolation or before to > resample the source to 1 mm resolution. > > merci! > > > > Azeez A. Adebimpe > > > "Knowledge and good manner, the beauty of a man" > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rikkert.hindriks at upf.edu Sun Jun 1 13:06:29 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Sun, 1 Jun 2014 13:06:29 +0200 Subject: [FieldTrip] (no subject) Message-ID: Dear all, I'm having trouble installing openMEEG under Windows for use in ft_prepare_headmodel. After running the installation, the comment system(om_assemble) returns non-zero value, meaning that the installation has not been succesfull. FYI I installed openMEEG inside the Fieldtrip folder. Does anyone has encountered the same problem and help me out? Much appreciated! Rikkert -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sun Jun 1 13:21:40 2014 From: roeysc at gmail.com (Roey) Date: Sun, 1 Jun 2014 14:21:40 +0300 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Rikkert, From my experience it is not possible yet to prepare a head model using OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not mistaken, this is also documented in the ft_prepare_headmodel code. Hopefully some more optimistic answers will be given here :) Best, Roey ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" כתב/ה: > Dear all, > > I'm having trouble installing openMEEG under Windows for use in ft_prepare_headmodel. After running the installation, > the comment system(om_assemble) returns non-zero value, meaning that the installation has not been succesfull. FYI I installed openMEEG inside the Fieldtrip folder. Does anyone has encountered the same problem and help me out? > > Much appreciated! > Rikkert > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Sun Jun 1 13:29:01 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Sun, 1 Jun 2014 13:29:01 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Hi Roey, Ok, thats clear! Thanks Rikkert On Sun, Jun 1, 2014 at 1:21 PM, Roey wrote: > Dear Rikkert, > From my experience it is not possible yet to prepare a head model using > OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not > mistaken, this is also documented in the ft_prepare_headmodel code. > Hopefully some more optimistic answers will be given here :) > Best, > Roey > > > > ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" > כתב/ה: > > Dear all, > > I'm having trouble installing openMEEG under Windows for use in > ft_prepare_headmodel. After running the installation, > the comment system(om_assemble) returns non-zero value, meaning that the > installation has not been succesfull. FYI I installed openMEEG inside the > Fieldtrip folder. Does anyone has encountered the same problem and help me > out? > > Much appreciated! > Rikkert > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Sun Jun 1 23:58:35 2014 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Sun, 1 Jun 2014 23:58:35 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: hi, OpenMEEG runs on windows and Brainstorm makes it work from Matlab. So I guess it should be doable from Fieldtrip too. Alex On Sun, Jun 1, 2014 at 1:29 PM, HINDRIKS, RIKKERT wrote: > Hi Roey, > > Ok, thats clear! > > Thanks > Rikkert > > > On Sun, Jun 1, 2014 at 1:21 PM, Roey wrote: >> >> Dear Rikkert, >> From my experience it is not possible yet to prepare a head model using >> OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not >> mistaken, this is also documented in the ft_prepare_headmodel code. >> Hopefully some more optimistic answers will be given here :) >> Best, >> Roey >> >> >> >> ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" >> כתב/ה: >> >> Dear all, >> >> I'm having trouble installing openMEEG under Windows for use in >> ft_prepare_headmodel. After running the installation, >> the comment system(om_assemble) returns non-zero value, meaning that the >> installation has not been succesfull. FYI I installed openMEEG inside the >> Fieldtrip folder. Does anyone has encountered the same problem and help me >> out? >> >> Much appreciated! >> Rikkert >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From spa268 at nyu.edu Mon Jun 2 09:39:57 2014 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Mon, 2 Jun 2014 08:39:57 +0100 Subject: [FieldTrip] Defining a custom statfun for cluster statistics Message-ID: Hello all, Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki. I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it. Thanks! Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 2 10:01:15 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 2 Jun 2014 10:01:15 +0200 (CEST) Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: Message-ID: <69733282.7184003.1401696075987.JavaMail.root@sculptor.zimbra.ru.nl> Hi Stephen, You can take a look to ft_statfun_diff.m function: it's a good example to start with. You might also want to take a look here: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests Regarding the abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)), I'm not sure what the output of your statistic would mean. best, Diego ----- Original Message ----- > From: "Stephen Politzer-Ahles" > To: fieldtrip at donders.ru.nl > Sent: Monday, 2 June, 2014 9:39:57 AM > Subject: [FieldTrip] Defining a custom statfun for cluster statistics > Hello all, > Are there any examples for defining a new statfun to use in > ft_timelockstatistics? I thought there were, but can't currently find > them on the wiki. > I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, > and IIb), and I an only interested in a certain kind of interaction, > one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an > effect of the second factor at just one level of the first factor, and > not the other level). So rather than using F as my test statistic for > defining clusters, I would like to use something like > abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define > the function to do this; if anyone could point me in the right > direction I would greatly appreciate it. > Thanks! > Steve > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.leszczynski.m at gmail.com Mon Jun 2 10:01:34 2014 From: m.leszczynski.m at gmail.com (Marcin) Date: Mon, 2 Jun 2014 10:01:34 +0200 Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: References: Message-ID: Hey Steve, this might give you a hint: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html Best, Marcin 2014-06-02 9:39 GMT+02:00 Stephen Politzer-Ahles : > Hello all, > > Are there any examples for defining a new statfun to use in > ft_timelockstatistics? I thought there were, but can't currently find them > on the wiki. > > I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and > IIb), and I an only interested in a certain kind of interaction, one where > abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the > second factor at just one level of the first factor, and not the other > level). So rather than using F as my test statistic for defining clusters, > I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I > just don't know how to define the function to do this; if anyone could > point me in the right direction I would greatly appreciate it. > > Thanks! > Steve > > > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Mon Jun 2 10:51:38 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 2 Jun 2014 10:51:38 +0200 (CEST) Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: References: Message-ID: <010d01cf7e3f$dd9654d0$98c2fe70$@herring@fcdonders.ru.nl> Hi Steve, If I understand you correctly you basically want to test a one-sided interaction effect, which boils down to doing a one-sided dependent samples t-test between the difference scores of condition I vs the difference scores of condition II. So, first you would have to calculate the difference timeseries diff_I(Ia – Ib) and diff_II(IIa-IIb). Then you run ft_timelockstatistics using statfun_depsamplesT on diff_I vs diff_II testing one-sided only looking at positive clusters (If you expect that diff_I > diff_II ). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Stephen Politzer-Ahles Sent: maandag 2 juni 2014 9:40 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Defining a custom statfun for cluster statistics Hello all, Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki. I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it. Thanks! Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 03:04:50 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 01:04:50 +0000 Subject: [FieldTrip] convert mri headmodel from ctf to mni Message-ID: <1401757472326.35223@flinders.edu.au> hello fieldtrippers, I recently worked out how to create virtual channels using beamformer and an atlas. However, now i have the problem of plotting the data using ft_sourceplot. The atlas has mni coordinates, but the mri headmodel has ctf coordinates. atlas = dim: [91 109 91] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' tissue: [91x109x91 double] tissuelabel: {116x1 cell} coordsys: 'mni' mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Is there a way to change either so that I can plot the data? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 03:39:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 01:39:17 +0000 Subject: [FieldTrip] ft_mvaranalysis Message-ID: <1401759539185.62016@flinders.edu.au> Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 07:29:55 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 05:29:55 +0000 Subject: [FieldTrip] averaging over frequency Message-ID: <1401773376603.4016@flinders.edu.au> ?Hello fieldtrippers, Is there any way to average over frequency after using the function ft_freqanalysis? I am trying to separate my data into bands, rather than individual frequencies. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:19:07 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:19:07 +0200 Subject: [FieldTrip] convert mri headmodel from ctf to mni In-Reply-To: <1401757472326.35223@flinders.edu.au> References: <1401757472326.35223@flinders.edu.au> Message-ID: <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> Hi Tyler, Try using ft_volumenormalise on your variabl mri. JM On Jun 3, 2014, at 3:04 AM, Tyler Grummett wrote: > hello fieldtrippers, > > I recently worked out how to create virtual channels using beamformer and an atlas. > > However, now i have the problem of plotting the data using ft_sourceplot. > > The atlas has mni coordinates, but the mri headmodel has ctf coordinates. > > atlas = > > dim: [91 109 91] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' > tissue: [91x109x91 double] > tissuelabel: {116x1 cell} > coordsys: 'mni' > > mri = > > anatomy: [256x256x256 double] > dim: [256 256 256] > transform: [4x4 double] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > Is there a way to change either so that I can plot the data? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:19:55 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:19:55 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401759539185.62016@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au> Message-ID: <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> Hi Tyler, Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett wrote: > Hello fieldtrippers, > > Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); > > The error message is: > > Undefined function 'mvar' for input arguments of type 'double'. > > ​Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? > > I swear this has worked before on old data, and I didnt update the toolbox between trying it > with the old data and with the new data. I have now updated the fieldtrip toolbox and I have > tried running the code again, but no luck. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:20:44 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:20:44 +0200 Subject: [FieldTrip] averaging over frequency In-Reply-To: <1401773376603.4016@flinders.edu.au> References: <1401773376603.4016@flinders.edu.au> Message-ID: Hi Tyler, Try using ft_selectdata with the option cfg.avgoverfreq. Best, Jan-Mathijs On Jun 3, 2014, at 7:29 AM, Tyler Grummett wrote: > ​Hello fieldtrippers, > > Is there any way to average over frequency after using the function ft_freqanalysis? > > I am trying to separate my data into bands, rather than individual frequencies. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:32:44 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:32:44 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> Message-ID: <1401780746302.15342@flinders.edu.au> Using the same code it generates the error: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, Try using ft_hastoolbox('bsmart',1) and then in the cfg for ft_mvaranalysis cfg.toolbox = 'bsmart' Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:36:13 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:36:13 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401780746302.15342@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au> Message-ID: This is a low level matlab error and suggests a problem with your data. On Jun 3, 2014, at 9:32 AM, Tyler Grummett wrote: > Using the same code it generates the error: > > Error using chol > Matrix must be positive definite. > > Error in armorf (line 40) > ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); > > Error in ft_mvaranalysis (line 395) > [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), > cfg.order); > > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen > Sent: Tuesday, 3 June 2014 4:49 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ > > Best, > Jan-Mathijs > > On Jun 3, 2014, at 3:39 AM, Tyler Grummett wrote: > >> Hello fieldtrippers, >> >> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); >> >> The error message is: >> >> Undefined function 'mvar' for input arguments of type 'double'. >> >> ​Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? >> >> I swear this has worked before on old data, and I didnt update the toolbox between trying it >> with the old data and with the new data. I have now updated the fieldtrip toolbox and I have >> tried running the code again, but no luck. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:36:05 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:36:05 +0000 Subject: [FieldTrip] averaging over frequency In-Reply-To: References: <1401773376603.4016@flinders.edu.au>, Message-ID: <1401780946595.70725@flinders.edu.au> ?Excellent, thank you!! Now I know this function exists, I hopefully wont ask more of these questions. ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:50 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] averaging over frequency Hi Tyler, Try using ft_selectdata with the option cfg.avgoverfreq. Best, Jan-Mathijs On Jun 3, 2014, at 7:29 AM, Tyler Grummett > wrote: ?Hello fieldtrippers, Is there any way to average over frequency after using the function ft_freqanalysis? I am trying to separate my data into bands, rather than individual frequencies. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:43:06 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:43:06 +0000 Subject: [FieldTrip] convert mri headmodel from ctf to mni In-Reply-To: <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> References: <1401757472326.35223@flinders.edu.au>, <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> Message-ID: <1401781368318.8277@flinders.edu.au> ?JM, This worked well. I have used it in this order: ft_read_mri ft_volumenormalise ft_volumereslice Is that the correct order? Or doesnt it matter as such? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] convert mri headmodel from ctf to mni Hi Tyler, Try using ft_volumenormalise on your variabl mri. JM On Jun 3, 2014, at 3:04 AM, Tyler Grummett > wrote: hello fieldtrippers, I recently worked out how to create virtual channels using beamformer and an atlas. However, now i have the problem of plotting the data using ft_sourceplot. The atlas has mni coordinates, but the mri headmodel has ctf coordinates. atlas = dim: [91 109 91] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' tissue: [91x109x91 double] tissuelabel: {116x1 cell} coordsys: 'mni' mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Is there a way to change either so that I can plot the data? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:50:56 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:50:56 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, Message-ID: <1401781837723.25460@flinders.edu.au> JM, My data has the following format: data = fsample: 500 sampleinfo: [14x2 double] trial: {1x14 cell} time: {1x14 cell} label: {1x116 cell} cfg: [1x1 struct] I had a look and there are no NaNs or anything. I have tried running using the coherence method for connectivity analysis (hence I didnt need to use mvaranalysis) and it seemed to work fine. Can you give me any suggestions as to what the problems with my data could be? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 5:06 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis This is a low level matlab error and suggests a problem with your data. On Jun 3, 2014, at 9:32 AM, Tyler Grummett > wrote: Using the same code it generates the error: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, Try using ft_hastoolbox('bsmart',1) and then in the cfg for ft_mvaranalysis cfg.toolbox = 'bsmart' Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Jun 3 10:28:12 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 3 Jun 2014 08:28:12 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Dear Kousik, The solution that you propose requires the use of Freesurfer to create the sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, how could I constrain it to calculate leadfields for points inside the brain? I tried to restrict the ft_sourceanalysis by including only the points of the grid that are inside the brain, but I still get the SVD error. I checked the NaN values of vol.mat and all the elements on this matrix are NaN. I suppose that’s where the error is, however I don’t know how to correct for it, because I just generate the volume structure from the mesh (see first message). Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 18:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Oh. Yes. FT puts NaN's into sourcespace points outside the brain. You can constrain FT to only calculate leadfields for sourcespace points inside the brain. I generally do this. I don't know how FT handles those outside the brain source points really. You could give this a try. Check this tutorial/code: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. There are none. However, I checked for NaN values in grid.leadfield and it has some. I thought that these were NaN values in the points of the grid outside a brain region, but I might be mistaken. grid = xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] dim: [17 13 14] pos: [3094x3 double] unit: 'mm' inside: [1x1516 double] outside: [1x1578 double] cfg: [1x1 struct] leadfield: {1x3094 cell} Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Ah. Interesting. Good that error changes. So that was the problem before. Now, can you check if your Freq matrices contain any NaN's (isnan(freqAll))? It can happen sometimes. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked the labels and they were the same, except for whether they were in capital letters. So I added the following before ft_sourceanalysis: freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); This way the labels of the elec structure and freqAll are in capital letters. And now I get a different error (although still within the function beamformer_dics): 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); What could it be? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I too had the same suggestion as Johanna's. Another thing to check would be if the labels that you used for the leadfield estimation are the same as the freq data. I guess FT at some point would also check this to extract the indices. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > wrote: Dear Johanna, Thank you for your suggestion. On step 2 in the code, I select from the elec structure the channels that are included in the frequency data. So the elec structure used for preparing the leadfield has 128 electrodes, the same as the data (data_rs, data 4, and therefore freqAll). I checked this precisely because I read a previous thread discussing that issue. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: woensdag 28 mei 2014 16:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, Does your data have the same channels as the leadfield (as the electrodes that went in to compute the leadfield)? I often see that error when there is a mismatch of channels in that way. Best, Johanna 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado >: Dear Fieldtrip users, I’m following the tutorial of beamformers (Source Analysis: Contrast activity to another interval) to estimate oscillatory sources using DICS. I’ve checked the surface created after segmentation and the grid generated from the electrode positions and the headmodel. That seems to work ok. However, at the step of source analysis, I get the following error: Error using * Inner matrix dimensions must agree. 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Does anybody have an idea of what I’m doing wrong? Thank you in advance for any help or suggestion! ----------------------------------------------------------------- This is my code: %% 1 - Preparation of MRI- source space % Read MRI mrifile = 'Subject01\Subject01.mri'; mri = ft_read_mri(mrifile); % Reslice to reorient images cfg = []; cfg.dim = [256 256 256]; mri = ft_volumereslice(cfg,mri); % Segment compartments cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); % Prepare mesh cfg=[]; cfg.tissue={'brain', 'skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); % Prepare headmodel cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); %% 2- Prepare leadfield - Creating grid load elec_aligned2 % Obtained after adjusting electrodes on scalp surface interactively % Three fiducial markers were added to the electrode file, and now they're % removed so that the electrode structure has the same number of channels as the data elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); elec_aligned2.label = elec_aligned2.label(1:128, :); cfg =[]; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.grid.resolution = 10; cfg.grid.unit = 'mm'; [grid] = ft_prepare_leadfield(cfg); %% 3- Join rest and task data % data_rs: resting state data % data4: data during task dataAll = ft_appenddata([], data_rs, data4); cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [18 18]; freqAll = ft_freqanalysis(cfg, dataAll); %---------------------------------- % all seems normal until here %---------------------------------- %% 4- Estimate source of all data cfg = []; cfg.method = 'dics'; cfg.frequency = 18; cfg.grid = grid; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); Cheers, Laura Rueda Delgado _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 3 10:46:09 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 03 Jun 2014 10:46:09 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401781837723.25460@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au> Message-ID: <538D8B51.6040508@donders.ru.nl> Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Tue Jun 3 11:07:09 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 09:07:09 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538D8B51.6040508@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>,<538D8B51.6040508@donders.ru.nl> Message-ID: <443925E6-ABED-48F6-AEA0-CD0696F78685@flinders.edu.au> That is very helpful, I'll look into that. Tyler > On 3 Jun 2014, at 6:18 pm, "Jörn M. Horschig" wrote: > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running using the coherence method for connectivity analysis (hence I didnt need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett > wrote: >>> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: >>>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the toolbox between trying it >>>> with the old data and with the new data. I have now updated the fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From zriouil.imane at gmail.com Tue Jun 3 11:41:58 2014 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 3 Jun 2014 09:41:58 +0000 Subject: [FieldTrip] convert data .mat to .ds Message-ID: hi i want to convert my data .mat to .ds or another format. if you help me please -- Zriouil Imane -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Tue Jun 3 14:47:13 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Tue, 3 Jun 2014 14:47:13 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Hey Laura, I'm not very familiar with BEM's. I assumed the problem to be more superficial and it is not. So I re-ran some codes and I too have a vol.vol that has only NaN's. I think the problem has been previously raised here. http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html Let's wait to see if someone more experienced has something to say. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado < Laura.Rueda at faber.kuleuven.be> wrote: > Dear Kousik, > > > > The solution that you propose requires the use of Freesurfer to create the > sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, > how could I constrain it to calculate leadfields for points inside the > brain? I tried to restrict the ft_sourceanalysis by including only the > points of the grid that are inside the brain, but I still get the SVD > error. > > > > I checked the NaN values of vol.mat and all the elements on this matrix > are NaN. I suppose that’s where the error is, however I don’t know how to > correct for it, because I just generate the volume structure from the mesh > (see first message). > > > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can constrain > FT to only calculate leadfields for sourcespace points inside the brain. I > generally do this. I don't know how FT handles those outside the brain > source points really. You could give this a try. > > > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. > There are none. However, I checked for NaN values in grid.leadfield and it > has some. I thought that these were NaN values in the points of the grid > outside a brain region, but I might be mistaken. > > > > > > grid = > > > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Ah. Interesting. Good that error changes. So that was the problem before. > > > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked the labels and they were the same, except for whether they were > in capital letters. So I added the following before ft_sourceanalysis: > > > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > > > This way the labels of the elec structure and freqAll are in capital > letters. > > > > And now I get a different error (although still within the function > beamformer_dics): > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > > > What could it be? > > > > Best regards, > > Laura > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I too had the same suggestion as Johanna's. > > > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Johanna, > > > > Thank you for your suggestion. > > > > On step 2 in the code, I select from the elec structure the channels that > are included in the frequency data. So the elec structure used for > preparing the leadfield has 128 electrodes, the same as the data (data_rs, > data 4, and therefore freqAll). I checked this precisely because I read a > previous thread discussing that issue. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hi Laura, > > > > Does your data have the same channels as the leadfield (as the electrodes > that went in to compute the leadfield)? I often see that error when there > is a mismatch of channels in that way. > > > > Best, > > Johanna > > > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be>: > > Dear Fieldtrip users, > > > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and the > headmodel. That seems to work ok. However, at the step of source analysis, > I get the following error: > > > > Error using * > > Inner matrix dimensions must agree. > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2 % Obtained after adjusting electrodes on scalp surface > interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of channels > as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > > > > > Cheers, > > > > Laura Rueda Delgado > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Jun 3 15:30:56 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 3 Jun 2014 13:30:56 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Dear Kousik, I found that thread and made some tests on my data as well. The solution that is proposed there (reject the vertices of C11st/C22st where the NaN values are present) is not feasible in my case because I would need to reject 2908 vertices from the 3000 ones present in the brain compartment. Also, the xyz coordinates of these critical vertices (vol.bnd(1).pnt) and their corresponding triangles (vol.bnd(1).tri) do not converge into a single point, which would be the reason to reject them in the first place. I’ve checked and re-checked the segmented volumes and meshes (errors at these steps seem to be the most common problem), but all the compartments are closed surfaces and do not intersect. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: dinsdag 3 juni 2014 14:47 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I'm not very familiar with BEM's. I assumed the problem to be more superficial and it is not. So I re-ran some codes and I too have a vol.vol that has only NaN's. I think the problem has been previously raised here. http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html Let's wait to see if someone more experienced has something to say. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > wrote: Dear Kousik, The solution that you propose requires the use of Freesurfer to create the sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, how could I constrain it to calculate leadfields for points inside the brain? I tried to restrict the ft_sourceanalysis by including only the points of the grid that are inside the brain, but I still get the SVD error. I checked the NaN values of vol.mat and all the elements on this matrix are NaN. I suppose that’s where the error is, however I don’t know how to correct for it, because I just generate the volume structure from the mesh (see first message). Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 18:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Oh. Yes. FT puts NaN's into sourcespace points outside the brain. You can constrain FT to only calculate leadfields for sourcespace points inside the brain. I generally do this. I don't know how FT handles those outside the brain source points really. You could give this a try. Check this tutorial/code: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. There are none. However, I checked for NaN values in grid.leadfield and it has some. I thought that these were NaN values in the points of the grid outside a brain region, but I might be mistaken. grid = xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] dim: [17 13 14] pos: [3094x3 double] unit: 'mm' inside: [1x1516 double] outside: [1x1578 double] cfg: [1x1 struct] leadfield: {1x3094 cell} Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Ah. Interesting. Good that error changes. So that was the problem before. Now, can you check if your Freq matrices contain any NaN's (isnan(freqAll))? It can happen sometimes. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked the labels and they were the same, except for whether they were in capital letters. So I added the following before ft_sourceanalysis: freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); This way the labels of the elec structure and freqAll are in capital letters. And now I get a different error (although still within the function beamformer_dics): 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); What could it be? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I too had the same suggestion as Johanna's. Another thing to check would be if the labels that you used for the leadfield estimation are the same as the freq data. I guess FT at some point would also check this to extract the indices. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > wrote: Dear Johanna, Thank you for your suggestion. On step 2 in the code, I select from the elec structure the channels that are included in the frequency data. So the elec structure used for preparing the leadfield has 128 electrodes, the same as the data (data_rs, data 4, and therefore freqAll). I checked this precisely because I read a previous thread discussing that issue. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: woensdag 28 mei 2014 16:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, Does your data have the same channels as the leadfield (as the electrodes that went in to compute the leadfield)? I often see that error when there is a mismatch of channels in that way. Best, Johanna 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado >: Dear Fieldtrip users, I’m following the tutorial of beamformers (Source Analysis: Contrast activity to another interval) to estimate oscillatory sources using DICS. I’ve checked the surface created after segmentation and the grid generated from the electrode positions and the headmodel. That seems to work ok. However, at the step of source analysis, I get the following error: Error using * Inner matrix dimensions must agree. 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Does anybody have an idea of what I’m doing wrong? Thank you in advance for any help or suggestion! ----------------------------------------------------------------- This is my code: %% 1 - Preparation of MRI- source space % Read MRI mrifile = 'Subject01\Subject01.mri'; mri = ft_read_mri(mrifile); % Reslice to reorient images cfg = []; cfg.dim = [256 256 256]; mri = ft_volumereslice(cfg,mri); % Segment compartments cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); % Prepare mesh cfg=[]; cfg.tissue={'brain', 'skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); % Prepare headmodel cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); %% 2- Prepare leadfield - Creating grid load elec_aligned2 % Obtained after adjusting electrodes on scalp surface interactively % Three fiducial markers were added to the electrode file, and now they're % removed so that the electrode structure has the same number of channels as the data elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); elec_aligned2.label = elec_aligned2.label(1:128, :); cfg =[]; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.grid.resolution = 10; cfg.grid.unit = 'mm'; [grid] = ft_prepare_leadfield(cfg); %% 3- Join rest and task data % data_rs: resting state data % data4: data during task dataAll = ft_appenddata([], data_rs, data4); cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [18 18]; freqAll = ft_freqanalysis(cfg, dataAll); %---------------------------------- % all seems normal until here %---------------------------------- %% 4- Estimate source of all data cfg = []; cfg.method = 'dics'; cfg.frequency = 18; cfg.grid = grid; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); Cheers, Laura Rueda Delgado _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Tue Jun 3 15:56:08 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Tue, 3 Jun 2014 15:56:08 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Hey Laura, I'm out of suggestions now. :( I would suggest you wait on this thread for a few days and see if someone answers. If not you can start a new thread explaining the current problem you have. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 3:30 PM, Laura Rueda Delgado < Laura.Rueda at faber.kuleuven.be> wrote: > Dear Kousik, > > > > I found that thread and made some tests on my data as well. The solution > that is proposed there (reject the vertices of C11st/C22st where the NaN > values are present) is not feasible in my case because I would need to > reject 2908 vertices from the 3000 ones present in the brain compartment. > Also, the xyz coordinates of these critical vertices (vol.bnd(1).pnt) and > their corresponding triangles (vol.bnd(1).tri) do not converge into a > single point, which would be the reason to reject them in the first place. > > > > I’ve checked and re-checked the segmented volumes and meshes (errors at > these steps seem to be the most common problem), but all the compartments > are closed surfaces and do not intersect. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > The solution that you propose requires the use of Freesurfer to create the > sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, > how could I constrain it to calculate leadfields for points inside the > brain? I tried to restrict the ft_sourceanalysis by including only the > points of the grid that are inside the brain, but I still get the SVD > error. > > > > I checked the NaN values of vol.mat and all the elements on this matrix > are NaN. I suppose that’s where the error is, however I don’t know how to > correct for it, because I just generate the volume structure from the mesh > (see first message). > > > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can constrain > FT to only calculate leadfields for sourcespace points inside the brain. I > generally do this. I don't know how FT handles those outside the brain > source points really. You could give this a try. > > > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. > There are none. However, I checked for NaN values in grid.leadfield and it > has some. I thought that these were NaN values in the points of the grid > outside a brain region, but I might be mistaken. > > > > > > grid = > > > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Ah. Interesting. Good that error changes. So that was the problem before. > > > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked the labels and they were the same, except for whether they were > in capital letters. So I added the following before ft_sourceanalysis: > > > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > > > This way the labels of the elec structure and freqAll are in capital > letters. > > > > And now I get a different error (although still within the function > beamformer_dics): > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > > > What could it be? > > > > Best regards, > > Laura > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I too had the same suggestion as Johanna's. > > > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Johanna, > > > > Thank you for your suggestion. > > > > On step 2 in the code, I select from the elec structure the channels that > are included in the frequency data. So the elec structure used for > preparing the leadfield has 128 electrodes, the same as the data (data_rs, > data 4, and therefore freqAll). I checked this precisely because I read a > previous thread discussing that issue. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hi Laura, > > > > Does your data have the same channels as the leadfield (as the electrodes > that went in to compute the leadfield)? I often see that error when there > is a mismatch of channels in that way. > > > > Best, > > Johanna > > > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be>: > > Dear Fieldtrip users, > > > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and the > headmodel. That seems to work ok. However, at the step of source analysis, > I get the following error: > > > > Error using * > > Inner matrix dimensions must agree. > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2 % Obtained after adjusting electrodes on scalp surface > interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of channels > as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > > > > > Cheers, > > > > Laura Rueda Delgado > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 3 16:15:52 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 03 Jun 2014 16:15:52 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: <538DD898.8050801@donders.ru.nl> Hi Laura, the problem could be in the segmentation - you have to have closed boundaries of all tissues for the BEM model, otherwise the computation can result in only nans. It requires a bit more work to check for this, so I would first start with using the standard BEM model that is in the FieldTrip/template/headmodel directory to check whether (a) your code runs smoothly then and (b) your results make sense. Even though results are less optimal than when using individual MRs, you can get a first glimpse and it's a good sanity check for everything you are doing. If these two things work well, then I can help you with checking your segmentation (also on this mailinglist). Note though that that would be more hacking than real fieldtrippin'... ;) Best, Jörn On 6/3/2014 3:30 PM, Laura Rueda Delgado wrote: > > Dear Kousik, > > I found that thread and made some tests on my data as well. The > solution that is proposed there (reject the vertices of C11st/C22st > where the NaN values are present) is not feasible in my case because I > would need to reject 2908 vertices from the 3000 ones present in the > brain compartment. Also, the xyz coordinates of these critical > vertices (vol.bnd(1).pnt) and their corresponding triangles > (vol.bnd(1).tri) do not converge into a single point, which would be > the reason to reject them in the first place. > > I’ve checked and re-checked the segmented volumes and meshes (errors > at these steps seem to be the most common problem), but all the > compartments are closed surfaces and do not intersect. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > The solution that you propose requires the use of Freesurfer to create > the sourcespace. If I’d like to restrict to use Fieldtrip and its > toolboxes, how could I constrain it to calculate leadfields for points > inside the brain? I tried to restrict the ft_sourceanalysis by > including only the points of the grid that are inside the brain, but I > still get the SVD error. > > I checked the NaN values of vol.mat and all the elements on this > matrix are NaN. I suppose that’s where the error is, however I don’t > know how to correct for it, because I just generate the volume > structure from the mesh (see first message). > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can > constrain FT to only calculate leadfields for sourcespace points > inside the brain. I generally do this. I don't know how FT handles > those outside the brain source points really. You could give this a try. > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked for NaN and Inf values in powspctrm and crsspctrm of > freqAll. There are none. However, I checked for NaN values in > grid.leadfield and it has some. I thought that these were NaN values > in the points of the grid outside a brain region, but I might be > mistaken. > > grid = > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Ah. Interesting. Good that error changes. So that was the problem before. > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked the labels and they were the same, except for whether they > were in capital letters. So I added the following before > ft_sourceanalysis: > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > This way the labels of the elec structure and freqAll are in capital > letters. > > And now I get a different error (although still within the function > beamformer_dics): > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > What could it be? > > Best regards, > > Laura > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I too had the same suggestion as Johanna's. > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > > > wrote: > > Dear Johanna, > > Thank you for your suggestion. > > On step 2 in the code, I select from the elec structure the channels > that are included in the frequency data. So the elec structure used > for preparing the leadfield has 128 electrodes, the same as the data > (data_rs, data 4, and therefore freqAll). I checked this precisely > because I read a previous thread discussing that issue. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hi Laura, > > Does your data have the same channels as the leadfield (as the > electrodes that went in to compute the leadfield)? I often see that > error when there is a mismatch of channels in that way. > > Best, > > Johanna > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado > >: > > Dear Fieldtrip users, > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and > the headmodel. That seems to work ok. However, at the step of source > analysis, I get the following error: > > Error using * > > Inner matrix dimensions must agree. > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2% Obtained after adjusting electrodes on scalp > surface interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of > channels as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > Cheers, > > Laura Rueda Delgado > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From bankimchander at gmail.com Tue Jun 3 18:40:05 2014 From: bankimchander at gmail.com (Bankim Chander) Date: Tue, 3 Jun 2014 18:40:05 +0200 Subject: [FieldTrip] convert data .mat to .ds (z.imane) Message-ID: Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander Applied Neurotechnology Working Group Institute for Medical Psychology and Behavioural Neurobiology Department of Psychiatry and Psychotherapy Eberhard Karls Universität Tübingen Calwer Str. 14 D-72076 Tübingen -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Wed Jun 4 02:41:22 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 00:41:22 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538D8B51.6040508@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>,<538D8B51.6040508@donders.ru.nl> Message-ID: <1401842462961.53202@flinders.edu.au> Hey Jorn, You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. My code is as follows: (I used an atlas to get the grid coordinates) % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid.unit = 'mm'; cfg.dim = atlas_grid.dim; cfg.pos = pos; cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; source = ft_sourceanalysis( cfg, timelock); Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. Any suggestions? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Tuesday, 3 June 2014 6:16 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Wed Jun 4 03:15:46 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 01:15:46 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401842462961.53202@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> Message-ID: <1401844526765.83574@flinders.edu.au> Jorn, There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. I have hit a wall of issues haha Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Wednesday, 4 June 2014 10:11 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hey Jorn, You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. My code is as follows: (I used an atlas to get the grid coordinates) % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid.unit = 'mm'; cfg.dim = atlas_grid.dim; cfg.pos = pos; cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; source = ft_sourceanalysis( cfg, timelock); Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. Any suggestions? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Tuesday, 3 June 2014 6:16 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From karl.doron at gmail.com Wed Jun 4 03:28:36 2014 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 03 Jun 2014 18:28:36 -0700 Subject: [FieldTrip] emotiv2ft OSX? Message-ID: Hello, I’m wondering if anyone has been able to compile emotiv2ft on for OSX (64 bit) yet. From some other threads related to the subject, the issue seemed to be a conio.h file that was DOS only. However, this may have been corrected with newer versions of Xcode which have curses.h. The error I’m getting seems to be with the GDF writer (pasted below) Thanks, karl doron -> llvm-g++ -c -I/Applications/MATLAB_R2012b.app/extern/include -I/Applications/MATLAB_R2012b.app/simulink/include -DMATLAB_MEX_FILE -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ -mmacosx-version-min=10.5 -DMX_COMPAT_32 -O2 -DNDEBUG "emotiv2ft.cc" In file included from emotiv2ft.cc:7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/OnlineDataManager.h:5: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/GDF_BackgroundWriter.h:1: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/GdfWriter.h:103:10: error: cannot initialize return object of type 'GDF_Type' with an rvalue of type 'int' return 0; ^ emotiv2ft.cc:114:3: error: use of undeclared identifier 'Sleep'; did you mean 'sleep'? Sleep(10); ^~~~~ sleep /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/unistd.h:475:3: note: 'sleep' declared here sleep(unsigned int) __DARWIN_ALIAS_C(sleep); ^ 2 errors generated. mex: compile of ' "emotiv2ft.cc"' failed. --- Karl Doron, PhD University of California, San Diego -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 4 09:42:27 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 04 Jun 2014 09:42:27 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401844526765.83574@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au> Message-ID: <538ECDE3.90803@donders.ru.nl> Hi Tyler, I thought you are talking about mvaranalysis - why is the code you've pasted about leadfields and lcmv beamforming? Best, Jörn On 6/4/2014 3:15 AM, Tyler Grummett wrote: > Jorn, > > There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. > > I have hit a wall of issues haha > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett > Sent: Wednesday, 4 June 2014 10:11 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hey Jorn, > > You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. > > My code is as follows: (I used an atlas to get the grid coordinates) > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > cfg.grid.unit = 'mm'; > cfg.dim = atlas_grid.dim; > cfg.pos = pos; > cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > % Source Analysis: without contrasting condition > cfg = []; > cfg.channel = 'EEG'; > cfg.method = 'lcmv'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > source = ft_sourceanalysis( cfg, timelock); > > Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. > > Any suggestions? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Tuesday, 3 June 2014 6:16 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember > correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > > On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running >> using the coherence method for connectivity analysis (hence I didnt >> need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data >> could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl >> on behalf of jan-mathijs schoffelen >> >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >> > > wrote: >> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>> size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl >>> >> > on behalf of jan-mathijs >>> schoffelen >> > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>> likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the >>>> toolbox between trying it >>>> with the old data and with the new data. I have now updated the >>>> fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Wed Jun 4 09:53:05 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 07:53:05 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538ECDE3.90803@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>,<538ECDE3.90803@donders.ru.nl> Message-ID: <1401868365953.99873@flinders.edu.au> Hey Jorn, I was just checking to see if I was calculating the beamformer correctly. Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid and Zgrid as the atlas). I was trying to increase my rank (or decrease rank deficiency by changing my code). However, no matter what I have tried thus far, nothing has helped. Tyler. ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Wednesday, 4 June 2014 5:12 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, I thought you are talking about mvaranalysis - why is the code you've pasted about leadfields and lcmv beamforming? Best, Jörn On 6/4/2014 3:15 AM, Tyler Grummett wrote: > Jorn, > > There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. > > I have hit a wall of issues haha > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett > Sent: Wednesday, 4 June 2014 10:11 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hey Jorn, > > You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. > > My code is as follows: (I used an atlas to get the grid coordinates) > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > cfg.grid.unit = 'mm'; > cfg.dim = atlas_grid.dim; > cfg.pos = pos; > cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > % Source Analysis: without contrasting condition > cfg = []; > cfg.channel = 'EEG'; > cfg.method = 'lcmv'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > source = ft_sourceanalysis( cfg, timelock); > > Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. > > Any suggestions? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Tuesday, 3 June 2014 6:16 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember > correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > > On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running >> using the coherence method for connectivity analysis (hence I didnt >> need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data >> could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl >> on behalf of jan-mathijs schoffelen >> >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >> > > wrote: >> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>> size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl >>> >> > on behalf of jan-mathijs >>> schoffelen >> > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>> likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the >>>> toolbox between trying it >>>> with the old data and with the new data. I have now updated the >>>> fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Wed Jun 4 10:11:03 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 4 Jun 2014 10:11:03 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401868365953.99873@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au> Message-ID: <780D308F-F1DE-423F-A93B-0DDC59B02206@donders.ru.nl> Hi Tyler, It’s impossible to increase the rank of your data. The rank of your data will be limited by the number of independent channels in the data. I don’t know whether you have used a maxfilter or not, and whether you were doing the source reconstruction on the gradiometers alone, or on all channels etc. Irrespective of this, if you are ‘upsampling’ the number of ‘channels’ artificially by concatenating across reconstructed dipoles ---(aggravating the issue by appending the x/y/z directions per dipole, and even more aggravating it by using rank-reduced leadfields (but note that without rank reduced leadfields it will be problematic: not only due to the dimensionality, but also because of the fact that in MEG the most ‘radial’ component picks up a lot of noise, thus disturbing the quality of the estimates))—- the rank in the reconstructed data will never be more than the number of channels. Thus, if you want to have a meaningful multivariate decomposition, the ‘multi’ in multivariate should be less than the number of channels (where in addition I assume that you have recorded a sufficient amount of data in order for a somewhat robust estimation of the AR-coefficients). Would it make sense to start off with the computation of pairwise models? I.e. estimating the AR-model for each dipole pair? Best, Jan-Mathijs On Jun 4, 2014, at 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >>>> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 4 10:15:13 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 04 Jun 2014 10:15:13 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401868365953.99873@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au> Message-ID: <538ED591.8000108@donders.ru.nl> Hi Tyler, ah I see, so the 'source'-structure you get from the beamforming serves to create the 'data'-structure to run mvaranalysis. cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your data, it reduces the rank of leadfield dimensionality (a dipole has moments in 3 directions, x,y,z). The interpolation does not work for you, because you do not have a full 3D grid anymore but rather individual grid points. Of course one could interpolate, but it would be far from optimal, so FieldTrip refuses to do so (imagine you want to interpolate to a 2D grid, e.g. a square, but you only have a data point of the center of that 2D grid). Instead of using 116 gridpoints why not lump them together to regions of interest. That way you'd probably get only a handful of 'voxels', and you probably get rid of the rank deficiency. However, I am not quite sure what you want to achieve with this analysis, so I am not sure whether I give adequate help advise ;) Best, Jörn On 6/4/2014 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >> >> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From clara.scholl at gmail.com Wed Jun 4 17:51:59 2014 From: clara.scholl at gmail.com (Clara A. Scholl) Date: Wed, 4 Jun 2014 11:51:59 -0400 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis Message-ID: Dear FieldTrip Community, I have a question regarding the frequency axis of a fourier spectrum calculated using ft_freqanalysis. How do I specify the input for ft_freqanalysis to generate an evenly spaced frequency axis? I would like to calculate the fourier spectrum between 2 and 30 Hz in steps of 2 Hz (foi=2:2:30), full code here: >>>>ft_freqanalysis input specification<<<<< subj=598; load(['../subj' num2str(subj) 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat' ]); cfg=[]; cfg.channel={'E59' 'E19'}; data=ft_selectdata(cfg, dataSame); %data=dataSame; cfg = []; cfg.keeptrials = 'yes'; cfg.keepindividual = 'yes'; cfg.channel = {'all'}; cfg.method = 'mtmconvol'; cfg.output ='fourier'; cfg.toi = -0.2:0.01:1.0; cfg.foi = 2:2:30; %frequency steps of 2Hz cfg.taper = 'hanning'; cfg.t_ftimwin=ones(1,15).*.2; %cfg.t_ftimwin=1./[2:2:30]; TFR = ft_freqanalysis(cfg, data); >>>>end input specification<<<<< >>>>output<<<<< TFR = label: {2x1 cell} dimord: 'rpttap_chan_freq_time' freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] time: [1x121 double] fourierspctrm: [4-D double] cumtapcnt: [452x15 double] elec: [1x1 struct] cfg: [1x1 struct] >>>>end output<<<<< The output from this code has uneven spacing on the frequency axis. Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, see TFR.freq above. TFR.freq is the same (uneven) for different output choices (fourier, powandcsd) and whether the length of time windows are the same at each frequency or vary by frequency. How can I run ft_freqanalysis to generate an evenly spaced frequency axis? Downstream functions (ft_connectivityanalysis with method granger) check for an evenly spaced frequency axis. I am using fieldtrip version 20140603. Thanks immensely, Clara -------------- next part -------------- An HTML attachment was scrubbed... URL: From clara.scholl at gmail.com Wed Jun 4 18:03:12 2014 From: clara.scholl at gmail.com (Clara A. Scholl) Date: Wed, 4 Jun 2014 12:03:12 -0400 Subject: [FieldTrip] Time lag for granger with input freq data Message-ID: Dear FieldTrip Community, I have a question about ft_connectivityanalysis using method granger with input freq data: how do I specify the time lag? If no time lag is specified, is a time lag automatically selected? I get plausible results with the following inputs (only specifying channelcmb and method, data are freq structure) but I haven't specified a time lag… >>>>snip<<<<< cfg=[]; cfg.channelcmb={'E59' 'all'}; cfg.method='granger'; w=ft_connectivityanalysis(cfg, TFR) >>>>end snip<<<< Sincerely, Clara -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chiran.Doshi at childrens.harvard.edu Wed Jun 4 18:58:10 2014 From: Chiran.Doshi at childrens.harvard.edu (Doshi, Chiran) Date: Wed, 4 Jun 2014 16:58:10 +0000 Subject: [FieldTrip] Small error in dipole_fit.m function Message-ID: Hi All, I noticed a small bug in https://github.com/fieldtrip/fieldtrip/blob/master/inverse/dipole_fit.m On line 89, instead of str2fun it should be str2func. With str2fun it was not enabling use of an explicit optimization algorithm. Chiran Doshi, MS MEG system technologist Department of Newborn Medicine Boston Children's Hospital Phone: 781-216-1136 Fax: 781-216-1172 -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Wed Jun 4 19:26:22 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Wed, 4 Jun 2014 19:26:22 +0200 Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool Message-ID: Dear all, I again have some basic issues... Today I tried to replace some bad channels in my data. I used cfg = []; cfg.badchannel = {'E68', 'E94'}; cfg.neighbours = neighbours; cfg.method = 'spline'; obs90_1_data_int = ft_channelrepair(cfg,obs90_1_data_clean4); Unfortunately if I inspect my data afterwards the channel look as bad as before. As Output I get: interpolating channels for 72 trials ........................................................................ the call to "ft_channelrepair" took 3 seconds and required the additional allocation of an estimated 209 MB creating layout from electrode file GSN-HydroCel-129.sfp creating layout for egi128 system the call to "ft_layoutplot" took 0 seconds and required the additional allocation of an estimated 4 MB the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_prepare_neighbours at 138 there are on average 7.4 neighbours per channel Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_neighbourplot at 83 In ft_prepare_neighbours at 250 Any ideas? Furthermore I am struggling a bit with the manual rejection tool using data browser. My problem is that it does not show me the channelnames at the y axis (which is unhandy) My (simple) code is cfg = []; cfg.viewmode = 'vertical'; cfg.continuous = 'no'; cfg = ft_databrowser(cfg,obs90_data_ica_cleaned); obs90_4_data_clean4 = ft_rejectartifact (cfg,obs90_data_ica_cleaned); Any ideas how I can see the names? Thanks a lot again Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jun 5 02:20:44 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 00:20:44 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538ED591.8000108@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>,<538ED591.8000108@donders.ru.nl> Message-ID: <1401927624823.94563@flinders.edu.au> Hey Jorn, First off, thank you and you are a champ. I am trying to create a virtual channel for each area of the brain using an atlas. Originally I was doing the following to get my grid: % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution % cfg.grid.unit = 'mm'; cfg.grid.xgrid = atlas_grid.xgrid; cfg.grid.ygrid = atlas_grid.ygrid; cfg.grid.zgrid = atlas_grid.zgrid; % cfg.dim = atlas_grid.dim; % cfg.pos = pos; cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: parameter = 'avg.pow'; cfg = []; cfg.downsample = 2; cfg.parameter = parameter; sourceInt = ft_sourceinterpolate( cfg, source, mri); And it gives me a plot where the cross-hair is outside the brain ( see attached). Ive made sure each step is using the MNI coordinate system. I honestly dont know how to create voxels, and how that would translate into channels. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Wednesday, 4 June 2014 5:45 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, ah I see, so the 'source'-structure you get from the beamforming serves to create the 'data'-structure to run mvaranalysis. cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your data, it reduces the rank of leadfield dimensionality (a dipole has moments in 3 directions, x,y,z). The interpolation does not work for you, because you do not have a full 3D grid anymore but rather individual grid points. Of course one could interpolate, but it would be far from optimal, so FieldTrip refuses to do so (imagine you want to interpolate to a 2D grid, e.g. a square, but you only have a data point of the center of that 2D grid). Instead of using 116 gridpoints why not lump them together to regions of interest. That way you'd probably get only a handful of 'voxels', and you probably get rid of the rank deficiency. However, I am not quite sure what you want to achieve with this analysis, so I am not sure whether I give adequate help advise ;) Best, Jörn On 6/4/2014 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >> >> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sourceplot.png Type: image/png Size: 49483 bytes Desc: sourceplot.png URL: From eelke.spaak at donders.ru.nl Thu Jun 5 09:47:08 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 09:47:08 +0200 Subject: [FieldTrip] Time lag for granger with input freq data In-Reply-To: References: Message-ID: Dear Clara, The Granger causality in ft_connectivityanalysis is always frequency-domain Granger (time-domain Granger is not implemented in FieldTrip). Frequency-domain Granger is lag-free, i.e., the Granger causality is estimated as a function of frequency; no explicit specification of lag is required. In some sense the frequencies correspond to different time lags at which causality is estimated. That said, there are two ways of estimating the cross-spectral density (CSD) required for frequency-domain Granger computation: the parametric and the non-parametric way. The non-parametric way is I guess most typically used; it involves ft_freqanalysis with cfg.method = 'mtmfft' or 'mtmconvol'. The parametric way involves first estimating a multivariate autoregressive model (ft_mvaranalysis) and subsequently computing the CSD from the estimated model coefficients (ft_freqanalysis with cfg.method = 'mvar'). In the parametric way of estimating the CSD, a time lag specification *is* required, namely when invoking ft_mvaranalysis. If I'm not mistaken, the choice of time lag at that step determines the effective frequency resolution of the CSD. Best, Eelke On 4 June 2014 18:03, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question about ft_connectivityanalysis using method granger with > input freq data: how do I specify the time lag? If no time lag is > specified, is a time lag automatically selected? I get plausible results > with the following inputs (only specifying channelcmb and method, data are > freq structure) but I haven't specified a time lag… > >>>>>snip<<<<< > > cfg=[]; > > cfg.channelcmb={'E59' 'all'}; > > cfg.method='granger'; > > > > w=ft_connectivityanalysis(cfg, TFR) > > >>>>>end snip<<<< > > Sincerely, > Clara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 09:48:52 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 09:48:52 +0200 Subject: [FieldTrip] Small error in dipole_fit.m function In-Reply-To: References: Message-ID: Hi Chiran, Thanks for reporting this, I just fixed it. Best, Eelke On 4 June 2014 18:58, Doshi, Chiran wrote: > Hi All, > > I noticed a small bug in > https://github.com/fieldtrip/fieldtrip/blob/master/inverse/dipole_fit.m > > On line 89, instead of str2fun it should be str2func. With str2fun it was > not enabling use of an explicit optimization algorithm. > > > Chiran Doshi, MS > MEG system technologist > Department of Newborn Medicine > Boston Children's Hospital > Phone: 781-216-1136 > Fax: 781-216-1172 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 5 09:55:54 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jun 2014 09:55:54 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: References: Message-ID: <5390228A.80408@donders.ru.nl> Hi Clara, regarding the frequency resolution, you can best read this: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i If you still have trouble understanding, you can check out this: http://www.youtube.com/watch?v=6EIBh5lHNSc So to get an equally spaced frequency axis, you space the frequency in cfg.foi in steps of your frequency resolution. I hope above links help you to find out what this means and how to do that ;) Best, Jörn On 6/4/2014 5:51 PM, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question regarding the frequency axis of a fourier spectrum > calculated using ft_freqanalysis. How do I specify the input for > ft_freqanalysis to generate an evenly spaced frequency axis? > > I would like to calculate the fourier spectrum between 2 and 30 Hz in > steps of 2 Hz (foi=2:2:30), full code here: > > >>>>ft_freqanalysis input specification<<<<< > > subj=598; > > load(['../subj'num2str(subj) > 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); > > cfg=[]; > > cfg.channel={'E59' 'E19'}; > > data=ft_selectdata(cfg, dataSame); > > %data=dataSame; > > cfg = []; > > cfg.keeptrials = 'yes'; > > cfg.keepindividual = 'yes'; > > cfg.channel = {'all'}; > > cfg.method = 'mtmconvol'; > > cfg.output ='fourier'; > > cfg.toi = -0.2:0.01:1.0; > > cfg.foi = 2:2:30; %frequency steps of 2Hz > > cfg.taper = 'hanning'; > > cfg.t_ftimwin=ones(1,15).*.2; > > %cfg.t_ftimwin=1./[2:2:30]; > > TFR = ft_freqanalysis(cfg, data); > > >>>>end input specification<<<<< > > >>>>output<<<<< > TFR = > > label: {2x1 cell} > dimord: 'rpttap_chan_freq_time' > freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 > 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] > time: [1x121 double] > fourierspctrm: [4-D double] > cumtapcnt: [452x15 double] > elec: [1x1 struct] > cfg: [1x1 struct] > > >>>>end output<<<<< > > The output from this code has uneven spacing on the frequency axis. > Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, > see TFR.freq above. TFR.freq is the same (uneven) for different > output choices (fourier, powandcsd) and whether the length of time > windows are the same at each frequency or vary by frequency. > > How can I run ft_freqanalysis to generate an evenly spaced frequency > axis? Downstream functions (ft_connectivityanalysis with method > granger) check for an evenly spaced frequency axis. I am using > fieldtrip version 20140603. > > Thanks immensely, > Clara > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Thu Jun 5 10:45:41 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 08:45:41 +0000 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <5390228A.80408@donders.ru.nl> References: , <5390228A.80408@donders.ru.nl> Message-ID: <1401957920922.45510@flinders.edu.au> Hey jorn and clara, I am having the same issue, I use the following code: % compute spectral transfer function cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'; cfg.tapsmofrq = 5; cfg.foi = 5:1:7; freq = ft_freqanalysis(cfg, data); and I get: freq = label: {1x116 cell} dimord: 'rpttap_chan_freq' freq: [5.2000 6 7.2000] fourierspctrm: [336x116x3 double] cumsumcnt: [14x1 double] cumtapcnt: [14x1 double] cfg: [1x1 struct] I had a look at your links and it isnt clear as to what should be changed in the code. It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. However, there are lines in the code that do the following: padding = cfg.pad*data.fsample; if padding on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 5:25 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis Hi Clara, regarding the frequency resolution, you can best read this: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i If you still have trouble understanding, you can check out this: http://www.youtube.com/watch?v=6EIBh5lHNSc So to get an equally spaced frequency axis, you space the frequency in cfg.foi in steps of your frequency resolution. I hope above links help you to find out what this means and how to do that ;) Best, Jörn On 6/4/2014 5:51 PM, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question regarding the frequency axis of a fourier spectrum > calculated using ft_freqanalysis. How do I specify the input for > ft_freqanalysis to generate an evenly spaced frequency axis? > > I would like to calculate the fourier spectrum between 2 and 30 Hz in > steps of 2 Hz (foi=2:2:30), full code here: > > >>>>ft_freqanalysis input specification<<<<< > > subj=598; > > load(['../subj'num2str(subj) > 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); > > cfg=[]; > > cfg.channel={'E59' 'E19'}; > > data=ft_selectdata(cfg, dataSame); > > %data=dataSame; > > cfg = []; > > cfg.keeptrials = 'yes'; > > cfg.keepindividual = 'yes'; > > cfg.channel = {'all'}; > > cfg.method = 'mtmconvol'; > > cfg.output ='fourier'; > > cfg.toi = -0.2:0.01:1.0; > > cfg.foi = 2:2:30; %frequency steps of 2Hz > > cfg.taper = 'hanning'; > > cfg.t_ftimwin=ones(1,15).*.2; > > %cfg.t_ftimwin=1./[2:2:30]; > > TFR = ft_freqanalysis(cfg, data); > > >>>>end input specification<<<<< > > >>>>output<<<<< > TFR = > > label: {2x1 cell} > dimord: 'rpttap_chan_freq_time' > freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 > 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] > time: [1x121 double] > fourierspctrm: [4-D double] > cumtapcnt: [452x15 double] > elec: [1x1 struct] > cfg: [1x1 struct] > > >>>>end output<<<<< > > The output from this code has uneven spacing on the frequency axis. > Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, > see TFR.freq above. TFR.freq is the same (uneven) for different > output choices (fourier, powandcsd) and whether the length of time > windows are the same at each frequency or vary by frequency. > > How can I run ft_freqanalysis to generate an evenly spaced frequency > axis? Downstream functions (ft_connectivityanalysis with method > granger) check for an evenly spaced frequency axis. I am using > fieldtrip version 20140603. > > Thanks immensely, > Clara > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 10:52:32 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 10:52:32 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401957920922.45510@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au> Message-ID: See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis and http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. Best, Eelke On 5 June 2014 10:45, Tyler Grummett wrote: > Hey jorn and clara, > > I am having the same issue, I use the following code: > > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); > > and I get: > > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] > > I had a look at your links and it isnt clear as to what should be changed in the code. > > It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. > However, there are lines in the code that do the following: > > padding = cfg.pad*data.fsample; > if padding error('the specified padding is too short'); > end > > As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Thursday, 5 June 2014 5:25 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > Hi Clara, > > regarding the frequency resolution, you can best read this: > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i > If you still have trouble understanding, you can check out this: > http://www.youtube.com/watch?v=6EIBh5lHNSc > > So to get an equally spaced frequency axis, you space the frequency in > cfg.foi in steps of your frequency resolution. I hope above links help > you to find out what this means and how to do that ;) > > Best, > Jörn > > On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >> Dear FieldTrip Community, >> >> I have a question regarding the frequency axis of a fourier spectrum >> calculated using ft_freqanalysis. How do I specify the input for >> ft_freqanalysis to generate an evenly spaced frequency axis? >> >> I would like to calculate the fourier spectrum between 2 and 30 Hz in >> steps of 2 Hz (foi=2:2:30), full code here: >> >> >>>>ft_freqanalysis input specification<<<<< >> >> subj=598; >> >> load(['../subj'num2str(subj) >> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >> >> cfg=[]; >> >> cfg.channel={'E59' 'E19'}; >> >> data=ft_selectdata(cfg, dataSame); >> >> %data=dataSame; >> >> cfg = []; >> >> cfg.keeptrials = 'yes'; >> >> cfg.keepindividual = 'yes'; >> >> cfg.channel = {'all'}; >> >> cfg.method = 'mtmconvol'; >> >> cfg.output ='fourier'; >> >> cfg.toi = -0.2:0.01:1.0; >> >> cfg.foi = 2:2:30; %frequency steps of 2Hz >> >> cfg.taper = 'hanning'; >> >> cfg.t_ftimwin=ones(1,15).*.2; >> >> %cfg.t_ftimwin=1./[2:2:30]; >> >> TFR = ft_freqanalysis(cfg, data); >> >> >>>>end input specification<<<<< >> >> >>>>output<<<<< >> TFR = >> >> label: {2x1 cell} >> dimord: 'rpttap_chan_freq_time' >> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >> time: [1x121 double] >> fourierspctrm: [4-D double] >> cumtapcnt: [452x15 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> >> >>>>end output<<<<< >> >> The output from this code has uneven spacing on the frequency axis. >> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >> see TFR.freq above. TFR.freq is the same (uneven) for different >> output choices (fourier, powandcsd) and whether the length of time >> windows are the same at each frequency or vary by frequency. >> >> How can I run ft_freqanalysis to generate an evenly spaced frequency >> axis? Downstream functions (ft_connectivityanalysis with method >> granger) check for an evenly spaced frequency axis. I am using >> fieldtrip version 20140603. >> >> Thanks immensely, >> Clara >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Thu Jun 5 11:16:07 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 09:16:07 +0000 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au>, Message-ID: <1401959747282.95357@flinders.edu.au> Hello everyone, For the interest of using the output in granger causality. How bad would it be if you did run the code: > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); Then just rounded off the output frequencies. > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] freq.freq = round( freq.freq) I just ran it through ft_connectivityanalysis and it didnt crash. I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak Sent: Thursday, 5 June 2014 6:22 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis and http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. Best, Eelke On 5 June 2014 10:45, Tyler Grummett wrote: > Hey jorn and clara, > > I am having the same issue, I use the following code: > > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); > > and I get: > > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] > > I had a look at your links and it isnt clear as to what should be changed in the code. > > It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. > However, there are lines in the code that do the following: > > padding = cfg.pad*data.fsample; > if padding error('the specified padding is too short'); > end > > As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Thursday, 5 June 2014 5:25 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > Hi Clara, > > regarding the frequency resolution, you can best read this: > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i > If you still have trouble understanding, you can check out this: > http://www.youtube.com/watch?v=6EIBh5lHNSc > > So to get an equally spaced frequency axis, you space the frequency in > cfg.foi in steps of your frequency resolution. I hope above links help > you to find out what this means and how to do that ;) > > Best, > Jörn > > On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >> Dear FieldTrip Community, >> >> I have a question regarding the frequency axis of a fourier spectrum >> calculated using ft_freqanalysis. How do I specify the input for >> ft_freqanalysis to generate an evenly spaced frequency axis? >> >> I would like to calculate the fourier spectrum between 2 and 30 Hz in >> steps of 2 Hz (foi=2:2:30), full code here: >> >> >>>>ft_freqanalysis input specification<<<<< >> >> subj=598; >> >> load(['../subj'num2str(subj) >> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >> >> cfg=[]; >> >> cfg.channel={'E59' 'E19'}; >> >> data=ft_selectdata(cfg, dataSame); >> >> %data=dataSame; >> >> cfg = []; >> >> cfg.keeptrials = 'yes'; >> >> cfg.keepindividual = 'yes'; >> >> cfg.channel = {'all'}; >> >> cfg.method = 'mtmconvol'; >> >> cfg.output ='fourier'; >> >> cfg.toi = -0.2:0.01:1.0; >> >> cfg.foi = 2:2:30; %frequency steps of 2Hz >> >> cfg.taper = 'hanning'; >> >> cfg.t_ftimwin=ones(1,15).*.2; >> >> %cfg.t_ftimwin=1./[2:2:30]; >> >> TFR = ft_freqanalysis(cfg, data); >> >> >>>>end input specification<<<<< >> >> >>>>output<<<<< >> TFR = >> >> label: {2x1 cell} >> dimord: 'rpttap_chan_freq_time' >> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >> time: [1x121 double] >> fourierspctrm: [4-D double] >> cumtapcnt: [452x15 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> >> >>>>end output<<<<< >> >> The output from this code has uneven spacing on the frequency axis. >> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >> see TFR.freq above. TFR.freq is the same (uneven) for different >> output choices (fourier, powandcsd) and whether the length of time >> windows are the same at each frequency or vary by frequency. >> >> How can I run ft_freqanalysis to generate an evenly spaced frequency >> axis? Downstream functions (ft_connectivityanalysis with method >> granger) check for an evenly spaced frequency axis. I am using >> fieldtrip version 20140603. >> >> Thanks immensely, >> Clara >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 11:27:30 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 11:27:30 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401959747282.95357@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au> <1401959747282.95357@flinders.edu.au> Message-ID: Did you read the links I gave you on padding etc.? On 5 June 2014 11:16, Tyler Grummett wrote: > Hello everyone, > > For the interest of using the output in granger causality. > > How bad would it be if you did run the code: > >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); > > Then just rounded off the output frequencies. > >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] > > freq.freq = round( freq.freq) > > I just ran it through ft_connectivityanalysis and it didnt crash. > > I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 5 June 2014 6:22 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis > and > http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean > > Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. > > Best, > Eelke > > On 5 June 2014 10:45, Tyler Grummett wrote: >> Hey jorn and clara, >> >> I am having the same issue, I use the following code: >> >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); >> >> and I get: >> >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] >> >> I had a look at your links and it isnt clear as to what should be changed in the code. >> >> It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. >> However, there are lines in the code that do the following: >> >> padding = cfg.pad*data.fsample; >> if padding> error('the specified padding is too short'); >> end >> >> As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Thursday, 5 June 2014 5:25 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis >> >> Hi Clara, >> >> regarding the frequency resolution, you can best read this: >> http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i >> If you still have trouble understanding, you can check out this: >> http://www.youtube.com/watch?v=6EIBh5lHNSc >> >> So to get an equally spaced frequency axis, you space the frequency in >> cfg.foi in steps of your frequency resolution. I hope above links help >> you to find out what this means and how to do that ;) >> >> Best, >> Jörn >> >> On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >>> Dear FieldTrip Community, >>> >>> I have a question regarding the frequency axis of a fourier spectrum >>> calculated using ft_freqanalysis. How do I specify the input for >>> ft_freqanalysis to generate an evenly spaced frequency axis? >>> >>> I would like to calculate the fourier spectrum between 2 and 30 Hz in >>> steps of 2 Hz (foi=2:2:30), full code here: >>> >>> >>>>ft_freqanalysis input specification<<<<< >>> >>> subj=598; >>> >>> load(['../subj'num2str(subj) >>> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >>> >>> cfg=[]; >>> >>> cfg.channel={'E59' 'E19'}; >>> >>> data=ft_selectdata(cfg, dataSame); >>> >>> %data=dataSame; >>> >>> cfg = []; >>> >>> cfg.keeptrials = 'yes'; >>> >>> cfg.keepindividual = 'yes'; >>> >>> cfg.channel = {'all'}; >>> >>> cfg.method = 'mtmconvol'; >>> >>> cfg.output ='fourier'; >>> >>> cfg.toi = -0.2:0.01:1.0; >>> >>> cfg.foi = 2:2:30; %frequency steps of 2Hz >>> >>> cfg.taper = 'hanning'; >>> >>> cfg.t_ftimwin=ones(1,15).*.2; >>> >>> %cfg.t_ftimwin=1./[2:2:30]; >>> >>> TFR = ft_freqanalysis(cfg, data); >>> >>> >>>>end input specification<<<<< >>> >>> >>>>output<<<<< >>> TFR = >>> >>> label: {2x1 cell} >>> dimord: 'rpttap_chan_freq_time' >>> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >>> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >>> time: [1x121 double] >>> fourierspctrm: [4-D double] >>> cumtapcnt: [452x15 double] >>> elec: [1x1 struct] >>> cfg: [1x1 struct] >>> >>> >>>>end output<<<<< >>> >>> The output from this code has uneven spacing on the frequency axis. >>> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >>> see TFR.freq above. TFR.freq is the same (uneven) for different >>> output choices (fourier, powandcsd) and whether the length of time >>> windows are the same at each frequency or vary by frequency. >>> >>> How can I run ft_freqanalysis to generate an evenly spaced frequency >>> axis? Downstream functions (ft_connectivityanalysis with method >>> granger) check for an evenly spaced frequency axis. I am using >>> fieldtrip version 20140603. >>> >>> Thanks immensely, >>> Clara >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 5 11:29:08 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jun 2014 11:29:08 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401959747282.95357@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au>, <1401959747282.95357@flinders.edu.au> Message-ID: <53903864.3050206@donders.ru.nl> Hi Tyler, > How bad would it be if [...] it's wrong, don't do that. Best, Jörn On 6/5/2014 11:16 AM, Tyler Grummett wrote: > Hello everyone, > > For the interest of using the output in granger causality. > > How bad would it be if you did run the code: > >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); > Then just rounded off the output frequencies. > >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] > freq.freq = round( freq.freq) > > I just ran it through ft_connectivityanalysis and it didnt crash. > > I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 5 June 2014 6:22 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis > and > http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean > > Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. > > Best, > Eelke > > On 5 June 2014 10:45, Tyler Grummett wrote: >> Hey jorn and clara, >> >> I am having the same issue, I use the following code: >> >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); >> >> and I get: >> >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] >> >> I had a look at your links and it isnt clear as to what should be changed in the code. >> >> It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. >> However, there are lines in the code that do the following: >> >> padding = cfg.pad*data.fsample; >> if padding> error('the specified padding is too short'); >> end >> >> As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Thursday, 5 June 2014 5:25 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis >> >> Hi Clara, >> >> regarding the frequency resolution, you can best read this: >> http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i >> If you still have trouble understanding, you can check out this: >> http://www.youtube.com/watch?v=6EIBh5lHNSc >> >> So to get an equally spaced frequency axis, you space the frequency in >> cfg.foi in steps of your frequency resolution. I hope above links help >> you to find out what this means and how to do that ;) >> >> Best, >> Jörn >> >> On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >>> Dear FieldTrip Community, >>> >>> I have a question regarding the frequency axis of a fourier spectrum >>> calculated using ft_freqanalysis. How do I specify the input for >>> ft_freqanalysis to generate an evenly spaced frequency axis? >>> >>> I would like to calculate the fourier spectrum between 2 and 30 Hz in >>> steps of 2 Hz (foi=2:2:30), full code here: >>> >>>>>>> ft_freqanalysis input specification<<<<< >>> subj=598; >>> >>> load(['../subj'num2str(subj) >>> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >>> >>> cfg=[]; >>> >>> cfg.channel={'E59' 'E19'}; >>> >>> data=ft_selectdata(cfg, dataSame); >>> >>> %data=dataSame; >>> >>> cfg = []; >>> >>> cfg.keeptrials = 'yes'; >>> >>> cfg.keepindividual = 'yes'; >>> >>> cfg.channel = {'all'}; >>> >>> cfg.method = 'mtmconvol'; >>> >>> cfg.output ='fourier'; >>> >>> cfg.toi = -0.2:0.01:1.0; >>> >>> cfg.foi = 2:2:30; %frequency steps of 2Hz >>> >>> cfg.taper = 'hanning'; >>> >>> cfg.t_ftimwin=ones(1,15).*.2; >>> >>> %cfg.t_ftimwin=1./[2:2:30]; >>> >>> TFR = ft_freqanalysis(cfg, data); >>> >>>>>>> end input specification<<<<< >>>>>>> output<<<<< >>> TFR = >>> >>> label: {2x1 cell} >>> dimord: 'rpttap_chan_freq_time' >>> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >>> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >>> time: [1x121 double] >>> fourierspctrm: [4-D double] >>> cumtapcnt: [452x15 double] >>> elec: [1x1 struct] >>> cfg: [1x1 struct] >>> >>>>>>> end output<<<<< >>> The output from this code has uneven spacing on the frequency axis. >>> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >>> see TFR.freq above. TFR.freq is the same (uneven) for different >>> output choices (fourier, powandcsd) and whether the length of time >>> windows are the same at each frequency or vary by frequency. >>> >>> How can I run ft_freqanalysis to generate an evenly spaced frequency >>> axis? Downstream functions (ft_connectivityanalysis with method >>> granger) check for an evenly spaced frequency axis. I am using >>> fieldtrip version 20140603. >>> >>> Thanks immensely, >>> Clara >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Thu Jun 5 11:32:50 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Thu, 05 Jun 2014 11:32:50 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401927624823.94563@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au> Message-ID: <53903942.8010009@donders.ru.nl> Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From christoph.braun at uni-tuebingen.de Thu Jun 5 11:34:50 2014 From: christoph.braun at uni-tuebingen.de (Christoph Braun) Date: Thu, 05 Jun 2014 11:34:50 +0200 Subject: [FieldTrip] =?iso-8859-15?q?PhD_postion_at_the_University_of_T=FC?= =?iso-8859-15?q?bingen?= Message-ID: <539039BA.1090902@uni-tuebingen.de> *PhD Postion at the University of Tübingen in the EU-Initial Trainining Network "NeuroGut (www.neurogut.de)" *In the project effects of pro- and pre biotic coumpounds of nutrition on cognitive processing are studied using magnetoencephalography. Since the project is an EU funded project EU eligility and mobility rules apply. Candidates must be, at the time of recruitment by the host organization, in the first four years (full-time equivalent) of their research careers and not yet have been awarded a doctoral degree. This is measured from the date when they obtained the degree which would formally entitle them to embark on a doctorate, either in the country in which the degree was obtained or in the country in which the research training is provided, irrespective of whether or not a doctorate is envisaged. Researchers can be of any nationality, however, at the time of recruitment by the host organisation, researchers must not have resided or carried out their main activity (work, studies, etc) in the country of their host organisation for more than 12 months in the 3 years immediately prior to the reference date. If you are interested, please, find further details in the attached description of the position and send your application to: University Hospital Tübingen, Germany Department of Internal Medicine VI: Psychosomatic Medicine and Psychotherapy - Research Laboratories - Director of Research: Prof. Dr. Paul Enck Frondsbergstr. 23, 72076 Tübingen, Germany E-MAIL: paul.enck at uni-tuebingen.de PHONE office: +49 7071 29-89118; cell: +49 179 4986459, FAX: +49 7071 29-4382 WEBSITE: http://www.psychosomatik-tuebingen.de/de/index.php -- Prof. Christoph Braun MEG-Center University of Tübingen Otfried-Müller-Str. 47 72076 Tübingen Germany Tel: +49 (0)7071 29 87705 Fax: +49 (0)7071 29 5706 Email: christoph.braun at uni-tuebingen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: job-description_T?bingen Pos 2_HBM.pdf Type: application/pdf Size: 87846 bytes Desc: not available URL: From tyler.grummett at flinders.edu.au Thu Jun 5 11:36:57 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 09:36:57 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <53903942.8010009@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au>,<53903942.8010009@donders.ru.nl> Message-ID: <1401960997142.37788@flinders.edu.au> Hey jorn, Yeah I tried that, I entered in specific grid points into the leadfield. The rank was still 37 ( out of 116), I still cant really work it out haha. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 7:02 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From pia.destefano at studenti.unipr.it Thu Jun 5 12:15:45 2014 From: pia.destefano at studenti.unipr.it (PIA DE STEFANO) Date: Thu, 5 Jun 2014 12:15:45 +0200 Subject: [FieldTrip] Trouble with CHANNEL REPLACEMENT EEG Message-ID: Dear all, Dear Katrin, i have exactly the same trouble that you have with channel replacement!! I really hope somebody will help us to understand and solve this problem! Thank you all Pia -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Jun 5 12:21:16 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 5 Jun 2014 12:21:16 +0200 (CEST) Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool In-Reply-To: Message-ID: <2084370033.7272994.1401963676120.JavaMail.root@sculptor.zimbra.ru.nl> Dear Katrin, Regarding the interpolation question, the spline method, as far as I know, is based on the entire scalp instead of a small area. Then the interpolation output depends on the signals in all your scalp, not only the closest set of sensors to the bad channel you want to interpolate. You can recheck your data and/or choose other methods like 'nearest' or 'average' to compare your results and investigate what could it explain your output. To plot the channel labels with ft_databrowser, type cfg.plotlabels='yes'. To see other options check the help of the function. best, Diego ----- Original Message ----- From: "KatrinH Heimann" To: "FieldTrip discussion list" Sent: Wednesday, 4 June, 2014 7:26:22 PM Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool Dear all, I again have some basic issues... Today I tried to replace some bad channels in my data. I used cfg = []; cfg.badchannel = { 'E68' , 'E94' }; cfg.neighbours = neighbours; cfg.method = 'spline' ; obs90_1_data_int = ft_channelrepair(cfg,obs90_1_data_clean4); Unfortunately if I inspect my data afterwards the channel look as bad as before. As Output I get: interpolating channels for 72 trials ........................................................................ the call to "ft_channelrepair" took 3 seconds and required the additional allocation of an estimated 209 MB creating layout from electrode file GSN-HydroCel-129.sfp creating layout for egi128 system the call to "ft_layoutplot" took 0 seconds and required the additional allocation of an estimated 4 MB the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_prepare_neighbours at 138 there are on average 7.4 neighbours per channel Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_neighbourplot at 83 In ft_prepare_neighbours at 250 Any ideas? Furthermore I am struggling a bit with the manual rejection tool using data browser. My problem is that it does not show me the channelnames at the y axis (which is unhandy) My (simple) code is cfg = []; cfg.viewmode = 'vertical' ; cfg.continuous = 'no' ; cfg = ft_databrowser(cfg,obs90_data_ica_cleaned) ; obs90_4_data_clean4 = ft_rejectartifact (cfg,obs90_data_ica_cleaned); Any ideas how I can see the names? Thanks a lot again Katrin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From d.lozanosoldevilla at fcdonders.ru.nl Thu Jun 5 17:56:38 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 5 Jun 2014 17:56:38 +0200 (CEST) Subject: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW In-Reply-To: Message-ID: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ana, During our last fieldtrip meeting, we discussed about the triggering issues with the *RAW file format and here some thoughts: 1) What you reported is not a fieldtrip problem per se. The way NETSTATION is configured in your lab allow you to record the triggers in bits, not in decimal numbers. I don't know how but there should be a way to configure your acquisition device in such a way that triggers are not transform from decimal to binary representation. 2) Make your own trialfun to solve the conversion problem. I created a FAQ titled "How can I transform trigger values from bits to decimal representation with a trialfun?" on where you'll find code to make the transition from bits to decimals again. This FAQ could also be useful for other users having similar problems (binary to decimal conversion) with other acquisition systems. I hope this helps Diego ----- Original Message ----- > From: "Ana Laura Diez Martini" > To: "Diego Lozano" , "FieldTrip > discussion list" > Sent: Tuesday, 27 May, 2014 12:25:39 AM > Subject: Re: [FieldTrip] Cannot read the events of a .BDF file > exported from an EGI .RAW > Thank you Arjen, Diego and Chungki Lee! > I tried with the .RAW and it reads the event. The problem is that my > triggers have the following format "11,12,13,14,15,21,22...." . > Netstation instead of saving them as they are, returns them in this > way: say my trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + > DIN8 + DIN2. so I had to convert them into my original triggers. After > that I can either save the set (I tried this but it didn't work) or > export it to bdf. When I open the exported file in EEGlab, it reads > the events correctly, but fieldtrip doesn't. > Any ideas? Thanks!! > On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl > wrote: > > Dear Ana, > > Sorry for my file extension confusion: edf instead of bdf. However, > > I > > don't know a way to read events coded in BDF format exported by > > NETSTATION. I encounter this problem in the past but I had no > > problems > > with RAW file format > > Dear Chungki, > > Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but > > Ana > > was refering to a different eeg system that has the same fileformat > > extension. > > best, > > Diego > > > From: "Chungki Lee" < dr.chungki.lee at gmail.com > > > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Monday, 26 May, 2014 11:18:34 AM > > > Subject: Re: [FieldTrip] Cannot read the events of a .BDF file > > > exported from an EGI .RAW > > > Dear all > > > Fieldtrip can read events in BDF format ! > > > Hear simple examples > > > example #1 > > > %% > > > cfg = []; > > > cfg.dataset = '~~~ '; % your filename with file extension; > > > cfg.trialdef.eventtype = 'STATUS'; % Status notation maybe > > > Biosemi's > > > tigger name > > > cfg.trialdef.eventvalue = 1; % your event value > > > cfg.trialdef.prestim = 4; % before stimulation (sec), only use > > > positive value > > > cfg.trialdef.poststim = 8; % after stimulation (sec) , only use > > > positive value > > > cfg = ft_definetrial(cfg); > > > cfg.method = 'trial'; > > > data = ft_preprocessing(cfg); > > > %% > > > example #2 > > > %% > > > % if you executed these command lines > > > cfg = []; > > > cfg.dataset = '~~~ '; % your filename with file extension; > > > cfg.trialdef.eventtype = '?'; % Status notation maybe Biosemi's > > > tigger > > > name > > > cfg = ft_definetrial(cfg); > > > % result example #2 > > > the following events were found in the datafile > > > event type: 'CM_in_range' with event values: > > > event type: 'Epoch' with event values: > > > event type: 'STATUS' with event values: 1 2 3 4 255 <----------- > > > "this > > > indicate your file configuration for trigger information" > > > no trials have been defined yet, see FT_DEFINETRIAL for further > > > help > > > found 255 events > > > created 0 trials > > > the call to "ft_definetrial" took 8 seconds > > > have fun~!! > > > 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla < > > > d.lozanosoldevilla at fcdonders.ru.nl > : > > > > Hi Ana, > > > > Fieldtrip does not read events in BDF format. Take a look to our > > > > wiki: > > > > http://fieldtrip.fcdonders.nl/getting_started/egi > > > > • > > > > EDF+ (.edf) All channels, including PIB channels, are read in > > > > correctly, including channel labels. However, the events, which > > > > are > > > > stored on the annotation channel, are written in a way by Net > > > > Station > > > > that is not compatible with the edf+ reading implementation in > > > > FieldTrip. So, events do not come out properly. Also > > > > discontinuous > > > > epochs are “glued” together as one “continuous” data stream. > > > > As Arjen suggested, with *.RAW you shouldn't have any problem. > > > > event = ft_read_event('*.RAW') > > > > If you encounter it, please let us know. > > > > best, > > > > Diego > > > > On 26 May 2014 08:59, Arjen Stolk < a.stolk8 at gmail.com > wrote: > > > > > Hi Ana Laura, > > > > > Have you tried importing the .RAW file directly? That is, by > > > > > specifying cfg.dataset = 'XXX.raw'? > > > > > Best regards, > > > > > Arjen > > > > > 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini < > > > > > diezmartini at gmail.com > : > > > > > > Hi all! > > > > > > This is the .BDF file of one of my EEG subjects. For my last > > > > > > experiment I used a Biosemi system and now I'm using an EGI > > > > > > system > > > > > > which gives me .RAW files. I exported the .RAW file with > > > > > > EEGlab > > > > > > to > > > > > > .BDF format and I tried using the scripts I use to analise > > > > > > the > > > > > > data > > > > > > of > > > > > > my previous experiment but I realised that it was not > > > > > > reading > > > > > > the > > > > > > events: > > > > > > cfg = []; > > > > > > cfg.dataset = ' (location)'; > > > > > > cfg.trialdef.eventtype = '?'; > > > > > > definetrial(cfg); > > > > > > Warning: no trialfun was specified, using trialfun_general > > > > > > > In definetrial at 79 > > > > > > evaluating trialfunction 'trialfun_general' > > > > > > no events were found in the datafile > > > > > > no trials have been defined yet, see DEFINETRIAL for further > > > > > > help > > > > > > found 0 events > > > > > > created 0 trials > > > > > > EEGlab does read them. Any idea of what could be wrong? > > > > > > Thank you all!! > > > > > > _______________________________________________ > > > > > > fieldtrip mailing list > > > > > > fieldtrip at donders.ru.nl > > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > > > > > fieldtrip mailing list > > > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > > > ---------------------------------------------------------------- > > > Chungki Lee, Ph.D. > > > Post-doc > > > Biomedical Research Institute > > > Korea Institute of Science and Technology > > > E-mail: chungki at kist.re.kr > > > Tel: +82-2-958-5636 , C.P: +82-10-5223-7309 > > > ---------------------------------------------------------------- > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > PhD Student > > Neuronal Oscillations Group > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > NL-6525 EN Nijmegen > > The Netherlands > > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From diezmartini at gmail.com Fri Jun 6 00:00:02 2014 From: diezmartini at gmail.com (Ana Laura Diez Martini) Date: Fri, 6 Jun 2014 10:00:02 +1200 Subject: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW In-Reply-To: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> References: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thank you Diego! On Fri, Jun 6, 2014 at 3:56 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Ana, > > During our last fieldtrip meeting, we discussed about the triggering > issues with the *RAW file format and here some thoughts: > > 1) What you reported is not a fieldtrip problem per se. The way NETSTATION > is configured in your lab allow you to record the triggers in bits, not in > decimal numbers. I don't know how but there should be a way to configure > your acquisition device in such a way that triggers are not transform from > decimal to binary representation. > > 2) Make your own trialfun to solve the conversion problem. I created a FAQ > > titled "How can I transform trigger values from bits to decimal > representation with a trialfun?" on where you'll find code to make the > transition from bits to decimals again. This FAQ could also be useful for > other users having similar problems (binary to decimal conversion) with > other acquisition systems. > > I hope this helps > > Diego > > > ------------------------------ > > *From: *"Ana Laura Diez Martini" > *To: *"Diego Lozano" , "FieldTrip > discussion list" > *Sent: *Tuesday, 27 May, 2014 12:25:39 AM > > *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file exported > from an EGI .RAW > > Thank you Arjen, Diego and Chungki Lee! > > I tried with the .RAW and it reads the event. The problem is that my > triggers have the following format "11,12,13,14,15,21,22...." . Netstation > instead of saving them as they are, returns them in this way: say my > trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + DIN8 + DIN2. so I > had to convert them into my original triggers. After that I can either save > the set (I tried this > but it > didn't work) or export it to bdf. When I open the exported file in EEGlab, > it reads the events correctly, but fieldtrip doesn't. > > Any ideas? Thanks!! > > > On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > >> Dear Ana, >> >> Sorry for my file extension confusion: edf instead of bdf. However, I >> don't know a way to read events coded in BDF format exported by NETSTATION. >> I encounter this problem in the past but I had no problems with RAW file >> format >> >> Dear Chungki, >> >> Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but Ana >> was refering to a different eeg system that has the same fileformat >> extension. >> >> best, >> >> Diego >> >> ------------------------------ >> >> *From: *"Chungki Lee" >> *To: *"FieldTrip discussion list" >> *Sent: *Monday, 26 May, 2014 11:18:34 AM >> *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file >> exported from an EGI .RAW >> >> >> Dear all >> >> Fieldtrip can read events in BDF format ! >> >> Hear simple examples >> >> example #1 >> %% >> cfg = []; >> cfg.dataset = '~~~ '; % your filename with file extension; >> cfg.trialdef.eventtype = 'STATUS'; % Status notation maybe Biosemi's >> tigger name >> cfg.trialdef.eventvalue = 1; % your event value >> cfg.trialdef.prestim = 4; % before stimulation (sec), only use >> positive value >> cfg.trialdef.poststim = 8; % after stimulation (sec) , only use >> positive value >> cfg = ft_definetrial(cfg); >> cfg.method = 'trial'; >> data = ft_preprocessing(cfg); >> %% >> >> example #2 >> %% >> % if you executed these command lines >> cfg = []; >> cfg.dataset = '~~~ '; % your filename with file >> extension; >> cfg.trialdef.eventtype = '?'; % Status notation maybe Biosemi's >> tigger name >> cfg = ft_definetrial(cfg); >> >> % result example #2 >> the following events were found in the datafile >> event type: 'CM_in_range' with event values: >> event type: 'Epoch' with event values: >> event type: 'STATUS' with event values: 1 2 3 4 255 <----------- >> "this indicate your file configuration for trigger information" >> no trials have been defined yet, see FT_DEFINETRIAL for further help >> found 255 events >> created 0 trials >> the call to "ft_definetrial" took 8 seconds >> >> have fun~!! >> >> >> >> 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla < >> d.lozanosoldevilla at fcdonders.ru.nl>: >> >>> Hi Ana, >>> >>> Fieldtrip does not read events in BDF format. Take a look to our wiki: >>> >>> http://fieldtrip.fcdonders.nl/getting_started/egi >>> >>> >>> - *EDF+* (.edf) All channels, including PIB channels, are read in >>> correctly, including channel labels. However, the events, which are stored >>> on the annotation channel, are written in a way by Net Station that is not >>> compatible with the edf+ reading implementation in FieldTrip. So, events do >>> not come out properly. Also discontinuous epochs are “glued” together as >>> one “continuous” data stream. >>> >>> As Arjen suggested, with *.RAW you shouldn't have any problem. >>> >>> event = ft_read_event('*.RAW') >>> >>> If you encounter it, please let us know. >>> >>> best, >>> >>> Diego >>> >>> >>> On 26 May 2014 08:59, Arjen Stolk wrote: >>> >>>> Hi Ana Laura, >>>> >>>> Have you tried importing the .RAW file directly? That is, by specifying >>>> cfg.dataset = 'XXX.raw'? >>>> >>>> Best regards, >>>> Arjen >>>> >>>> >>>> 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini >>> >: >>>> >>>>> Hi all! >>>>> >>>>> This is the .BDF file >>>>> of one >>>>> of my EEG subjects. For my last experiment I used a Biosemi system and now >>>>> I'm using an EGI system which gives me .RAW files. I exported the .RAW file >>>>> with EEGlab to .BDF format and I tried using the scripts I use to analise >>>>> the data of my previous experiment but I realised that it was not reading >>>>> the events: >>>>> >>>>> cfg = []; >>>>> cfg.dataset = ' (location)'; >>>>> cfg.trialdef.eventtype = '?'; >>>>> definetrial(cfg); >>>>> Warning: no trialfun was specified, using trialfun_general >>>>> > In definetrial at 79 >>>>> evaluating trialfunction 'trialfun_general' >>>>> no events were found in the datafile >>>>> no trials have been defined yet, see DEFINETRIAL for further help >>>>> found 0 events >>>>> created 0 trials >>>>> >>>>> EEGlab does read them. Any idea of what could be wrong? >>>>> >>>>> Thank you all!! >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> ---------------------------------------------------------------- >> Chungki Lee, Ph.D. >> Post-doc >> Biomedical Research Institute >> Korea Institute of Science and Technology >> E-mail: chungki at kist.re.kr >> Tel:+82-2-958-5636, C.P: +82-10-5223-7309 >> ---------------------------------------------------------------- >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> PhD Student >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> NL-6525 EN Nijmegen >> The Netherlands >> http://www.ru.nl/people/donders/lozano-soldevilla-d/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From diezmartini at gmail.com Fri Jun 6 04:43:14 2014 From: diezmartini at gmail.com (Ana Laura Diez Martini) Date: Fri, 6 Jun 2014 14:43:14 +1200 Subject: [FieldTrip] Cluster-level permutation test problem Message-ID: Dear all, I'm trying to run a cluster-level permutation test with an old script in which I used the neighbourhood map of a Biosemi cap. The only thing I have changed there is the neighbourhood that is now for a GSN-HydroCel-129 one, so I just re wrote the neighbours for each channel the same way I did for the Biosemi one. I use an old version of Fieldtrip here which was working fine, but even with the newest versions and modifications, it doesn't work. What do you think I could be doing wrong? Thank you!! *This is the output I get:* Selecting and formatting the data. selected 128 channels selected 1000 time bins selected 1 frequency bins Calculating the neighbourhood structure of the channels. Running the statistics engine. Statistic-specific preprocessing (calculating critical values, initializing draws from the randomization distribution, ...). randomization 0 1000 Undefined function 'bwlabeln' for input arguments of type 'double'. Error in findcluster (line 73) [labelmat(spatdimlev, :, :), num] = bwlabeln(reshape(onoff(spatdimlev, :, :), nfreq, ntime), 4); Error in clusterrandstatistics (line 851) [posclusterslabelmat,nposclusters] = findcluster(onoff,data.channeighbstructmat,cfg.minnbchan); Error in clusterrandanalysis (line 462) [clusrand] = clusterrandstatistics(cfg, data); Error in clusterrand_stats_ERP_CW (line 347) [clusrand] = clusterrandanalysis(cfg,GavgI,GavgC); *And this is my script* function [clusrand] = clusterrand_stats_ERP_WC() S = load('4WC_1.avg','-MAT'); avgC41 = S.avgC; avgI41 = S.avgI; S = load('4WC_2.avg','-MAT'); avgC42 = S.avgC; avgI42 = S.avgI; etc... cfg =[]; cfg.keepindividual = 'yes'; GavgC = timelockgrandaverage(cfg,avgC41,avgC42,.....); GavgI = timelockgrandaverage(cfg,avgI41,avgI42.....); save('grand_averages','GavgC','GavgI'); cfg.latency = [0 1]; cfg.channel = {'all'}; cfg.avgovertime = 'no'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusterteststat = 'maxsum'; cfg.makeclusters = 'yes'; cfg.alphathresh = 0.05; cfg.minnbchan = 0; cfg.elecfile = 'GSN-HydroCel-129.sfp'; cfg.neighbours{1}.label = 'E1'; cfg.neighbours{1}.neighblabel = {'E125', 'E8', 'E2', 'E122','E121'}; cfg.neighbours{2}.label = 'E2'; cfg.neighbours{2}.neighblabel = {'E1', 'E8', 'E14', 'E9','E3','E123','122'}; cfg.neighbours{3}.label = 'E3'; cfg.neighbours{3}.neighblabel = {'E2', 'E123', 'E124','E4','E10','E9'}; etc... cfg.nranddraws = 1000; [clusrand] = clusterrandanalysis(cfg,GavgI,GavgC); save clusrand_WC clusrand; end -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jun 6 12:56:11 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 6 Jun 2014 10:56:11 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401960997142.37788@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au>, <53903942.8010009@donders.ru.nl>, <1401960997142.37788@flinders.edu.au> Message-ID: <1402052150162.56887@flinders.edu.au> Hey Jorn, I ended up getting it working because mvar wasnt actually in the fieldtrip toolbox, I updated and it came through. Which is great. However, now I am just getting NaNs in my adjacency matrix, is that because of the rank deficiency? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Thursday, 5 June 2014 7:06 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hey jorn, Yeah I tried that, I entered in specific grid points into the leadfield. The rank was still 37 ( out of 116), I still cant really work it out haha. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 7:02 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From giulia.rizza at tiscali.it Fri Jun 6 15:58:39 2014 From: giulia.rizza at tiscali.it (giulia.rizza at tiscali.it) Date: Fri, 06 Jun 2014 15:58:39 +0200 Subject: [FieldTrip] help for ICA on thermal signals Message-ID: <5c03e7ae27f2c24d84412d6cdd71f31a@tiscali.it> Dear FieldTrippers I know this is not a usual topic but maybe you can give me some advice, I would like to ask you some help for the correction of ocular artifacts on facial thermal imaging signals. The temperature of the periorbital areas is very informative about the sympathetic system activity, but we realized that blinks and saccades also influence the temperature in these regions Our signal is sampled at 10 Hz and the time course is extracted from 10 regions of interest, one of which is placed exactly on the right eye. Thus we have 10 channels (ROIs). We preprocessed the signal by using a band pass filter (Butt 0.01 - 4 Hz) and by demeaning it. Then we used ICA (runica or fastica) to detect the ocular components. A component was defined as "artefactual ocular" when its face distribution was mostly around the eye and the periorbital channels. After subtracting that component from the original signal, we saw that the signal was very well corrected on the eye channel itself but it got worst in the channel of interest (the periorbitals) by introducing some artefacts. Further we noticed that the unmixing matrix was close to singular (det(A) = 10^-13). We thought that this could be due to the number of channels so we also tried to export more (64) ROIs but nothing changed. Do you have any idea about why this would happen? We thought that ICA could work on any type of wave, but maybe there is something we are missing. Should we use another method? Do you have any suggestion? Any suggestion is pretty much appreciated Thanks in advance for any help. Giulia Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 [1] Links: ------ [1] http://www.istella.it?wtk=amc138614816829636 Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ncota at mrn.org Fri Jun 6 20:03:18 2014 From: ncota at mrn.org (Navin Cota) Date: Fri, 6 Jun 2014 12:03:18 -0600 Subject: [FieldTrip] IEEE 2014 Schizophrenia Classification Challenge Message-ID: Dear All: Good day !! The IEEE International Workshop on Machine Learning for Signal Processing is proud to announce. *2014 Schizophrenia Classification Challenge* Please visit the below website for full details about the competition and submission instructions.Competition flyer attached. *https://www.kaggle.com/c/mlsp-2014-mri * Have a nice week ahead. Thanks Navin Postdoctoral Fellow Medical Imaging Analysis(MIA) lab The Mind Research Network Albuquerque,New Mexico USA http://mialab.mrn.org/lab-members/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: flyer_mlsp2014.pdf Type: application/pdf Size: 430775 bytes Desc: not available URL: From Laura.Rueda at faber.kuleuven.be Mon Jun 9 16:44:29 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Mon, 9 Jun 2014 14:44:29 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: <538DD898.8050801@donders.ru.nl> References: , <538DD898.8050801@donders.ru.nl> Message-ID: Dear Jörn, Thank you for your suggestion. I used the template BEM model with the corresponding MRI template and the code works fine. In the end, the problem was the capital letters on the labels of the electrodes on the different structures. So at least for the sanity check, everything seems fine with the algorithm and the EEG data. Now I'm using an individual MRI from one of my subjects. I realigned according to the fiducials. I tried to reslice after this with a resolution of 1mm, and keeping the original dimensions, because the voxel size of my images is 1x1.1x1 mm, but this resulted in the head not being in the center of the box and the head tilted downwards, so I skipped this step to move on a bit (although I would kindly request some tip in this regard as well). Then I segmented the brain compartments (brain, skull and scalp) with tissue probability maps first, and I adjusted the size of the 3D shape used for dilating the brainmask (on strel_bol) to obtain the skull mask because the default value assigned points to the skull on the scalp, and they were clearly intersecting. After doing this, I checked the segmented compartments and the meshes. At least visually, these looked fine. When running ft_prepare_headmodel, I get a warning and the vol.mat is filled with NaNs. The warning is this one: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. > In ft_headmodel_bemcp at 184 In ft_prepare_headmodel at 253 I read in another thread that visual inspection does not guarantee the creation of a head model. So, I wonder, is there other way of checking that the meshes are correctly formed? Best regards, Laura Rueda ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: 03 June 2014 16:15 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, the problem could be in the segmentation - you have to have closed boundaries of all tissues for the BEM model, otherwise the computation can result in only nans. It requires a bit more work to check for this, so I would first start with using the standard BEM model that is in the FieldTrip/template/headmodel directory to check whether (a) your code runs smoothly then and (b) your results make sense. Even though results are less optimal than when using individual MRs, you can get a first glimpse and it's a good sanity check for everything you are doing. If these two things work well, then I can help you with checking your segmentation (also on this mailinglist). Note though that that would be more hacking than real fieldtrippin'... ;) Best, Jörn On 6/3/2014 3:30 PM, Laura Rueda Delgado wrote: > > Dear Kousik, > > I found that thread and made some tests on my data as well. The > solution that is proposed there (reject the vertices of C11st/C22st > where the NaN values are present) is not feasible in my case because I > would need to reject 2908 vertices from the 3000 ones present in the > brain compartment. Also, the xyz coordinates of these critical > vertices (vol.bnd(1).pnt) and their corresponding triangles > (vol.bnd(1).tri) do not converge into a single point, which would be > the reason to reject them in the first place. > > I’ve checked and re-checked the segmented volumes and meshes (errors > at these steps seem to be the most common problem), but all the > compartments are closed surfaces and do not intersect. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > The solution that you propose requires the use of Freesurfer to create > the sourcespace. If I’d like to restrict to use Fieldtrip and its > toolboxes, how could I constrain it to calculate leadfields for points > inside the brain? I tried to restrict the ft_sourceanalysis by > including only the points of the grid that are inside the brain, but I > still get the SVD error. > > I checked the NaN values of vol.mat and all the elements on this > matrix are NaN. I suppose that’s where the error is, however I don’t > know how to correct for it, because I just generate the volume > structure from the mesh (see first message). > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can > constrain FT to only calculate leadfields for sourcespace points > inside the brain. I generally do this. I don't know how FT handles > those outside the brain source points really. You could give this a try. > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked for NaN and Inf values in powspctrm and crsspctrm of > freqAll. There are none. However, I checked for NaN values in > grid.leadfield and it has some. I thought that these were NaN values > in the points of the grid outside a brain region, but I might be > mistaken. > > grid = > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Ah. Interesting. Good that error changes. So that was the problem before. > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked the labels and they were the same, except for whether they > were in capital letters. So I added the following before > ft_sourceanalysis: > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > This way the labels of the elec structure and freqAll are in capital > letters. > > And now I get a different error (although still within the function > beamformer_dics): > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > What could it be? > > Best regards, > > Laura > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I too had the same suggestion as Johanna's. > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > > > wrote: > > Dear Johanna, > > Thank you for your suggestion. > > On step 2 in the code, I select from the elec structure the channels > that are included in the frequency data. So the elec structure used > for preparing the leadfield has 128 electrodes, the same as the data > (data_rs, data 4, and therefore freqAll). I checked this precisely > because I read a previous thread discussing that issue. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hi Laura, > > Does your data have the same channels as the leadfield (as the > electrodes that went in to compute the leadfield)? I often see that > error when there is a mismatch of channels in that way. > > Best, > > Johanna > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado > >: > > Dear Fieldtrip users, > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and > the headmodel. That seems to work ok. However, at the step of source > analysis, I get the following error: > > Error using * > > Inner matrix dimensions must agree. > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2% Obtained after adjusting electrodes on scalp > surface interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of > channels as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > Cheers, > > Laura Rueda Delgado > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lysne at unm.edu Mon Jun 9 22:04:38 2014 From: lysne at unm.edu (Per Arnold Lysne) Date: Mon, 9 Jun 2014 20:04:38 +0000 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality Message-ID: <1402344273485.6601@unm.edu> Hello, I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) y(t) = 0.53*y(t-1) - 0.80*y(t-2) z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). Thank you for your help, Per A. Lysne University of New Mexico lysne at unm.edu The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. [cid:898dbd0d-1330-430a-8327-bd9a95f2b7fe] [cid:889457b8-d09d-4655-bac6-e3da92b8be20][cid:f640ae0e-d04f-451c-87ab-0f93aaa79870] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.NonCondGranger.jpg Type: image/jpeg Size: 24031 bytes Desc: MVAR2.NonCondGranger.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.Spectra.jpg Type: image/jpeg Size: 24742 bytes Desc: MVAR2.Spectra.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.CondGranger.jpg Type: image/jpeg Size: 23915 bytes Desc: MVAR2.CondGranger.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pal_test_ft_granger_cond.m URL: From gamaliel.ghu at gmail.com Tue Jun 10 03:16:11 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Mon, 9 Jun 2014 21:16:11 -0400 Subject: [FieldTrip] Question co-registration Message-ID: Greetings to all I read the tutorial to generate a forward model, however fiedltrip am beginner and I have some doubts: 1-If I have a patient IMRs but I have not scanned the electrodes, it is possible to use generic templates as shown in the tutorial (FieldTrip/template/electrode/standard_1020.elc.)? 2-If you can use these templates (FieldTrip/template/electrode/standard_1020.elc.), Can modify decreasing the number of electrodes that want to use? 3-I would do a head model for children, so the number of electrodes should be lower. 4-sources can be simulated fieldtrip? PD: sorry my English am Chilean, and I do not speak much English regards -- *Gamaliel Huerta* *Ingeniería Civil Biomédica* *Universidad de Valparaíso* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 10 10:15:57 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 10 Jun 2014 10:15:57 +0200 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality In-Reply-To: <1402344273485.6601@unm.edu> References: <1402344273485.6601@unm.edu> Message-ID: <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> Dear Per, Thanks for sending along the very clear code, makes it easy to run and verify ;-). I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values. Best wishes, Jan-Mathijs On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne wrote: > Hello, > > I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: > > x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) > y(t) = 0.53*y(t-1) - 0.80*y(t-2) > z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) > > This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). > > In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. > > The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. > > My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). > > Thank you for your help, > > Per A. Lysne > University of New Mexico > lysne at unm.edu > > > > > The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lysne at unm.edu Tue Jun 10 18:58:31 2014 From: lysne at unm.edu (Per Arnold Lysne) Date: Tue, 10 Jun 2014 16:58:31 +0000 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality In-Reply-To: <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> References: <1402344273485.6601@unm.edu>, <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> Message-ID: <1402419505182.71464@unm.edu> Hi Jan-Mathijs, Thank you for the quick response and for pointing out my problem with scaling the y-axis. Your suggestion pointed be to another issue: while the Granger spectra output from the non-conditional calculation is organized as 3x3xNFreqs (for a trivariate system), the conditional Granger output is a flat list of 6xNFreqs. I am now getting the correct, frequency resolved results in both cases. I will attach my code in case it can be of help in the future. If there is a convenient reference for the calculation in blockwise_conditionalgranger.m, I would still be interested in seeing it. Thanks again, -Per ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, June 10, 2014 2:15 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Non-Parametric Conditional Granger Causality Dear Per, Thanks for sending along the very clear code, makes it easy to run and verify ;-). I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values. Best wishes, Jan-Mathijs On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne > wrote: Hello, I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) y(t) = 0.53*y(t-1) - 0.80*y(t-2) z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). Thank you for your help, Per A. Lysne University of New Mexico lysne at unm.edu The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pal_test_ft_granger_cond.m URL: From tyler.grummett at flinders.edu.au Thu Jun 12 10:07:43 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 12 Jun 2014 08:07:43 +0000 Subject: [FieldTrip] error when running ft_timelockanalysis Message-ID: <1402560435810.17433@flinders.edu.au> Hello fieldtrippers, I got the following error when trying to run ft_timelockanalysis. Undefined function 'mxSerialize_cpp' for input arguments of type 'struct'. Error in mxSerialize (line 35) argout = mxSerialize_cpp(argin); Error in ft_preamble_provenance (line 74) cfg.callinfo.inputhash{iargin} = CalcMD5(mxSerialize(tmparg)); Error in ft_preamble (line 54) evalin('caller', ['ft_preamble_' cmd]); Error in ft_timelockanalysis (line 95) ft_preamble provenance data I have no idea what the problem is, I tried looking for the function in my fieldtrip folder. I have just recently installed matlab 2014a if that is any help. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Thu Jun 12 10:29:34 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Thu, 12 Jun 2014 10:29:34 +0200 Subject: [FieldTrip] error when running ft_timelockanalysis In-Reply-To: <1402560435810.17433@flinders.edu.au> References: <1402560435810.17433@flinders.edu.au> Message-ID: <20140612102934.7vrsaal80swsscg4@arco.cib.na.cnr.it> Hi Tyler this problem has already been solved by Jörn M. Horschig. I attach here the answer he gave to me some time ago Best regards Sara ----- Messaggio inoltrato da jm.horschig at donders.ru.nl ----- Data: Wed, 14 May 2014 10:35:03 +0200 Da: "Jörn M. Horschig" Rispondi-A:FieldTrip discussion list Oggetto: ***SPAM*** Re: [FieldTrip] problem occurs when using ft_timelockanalysis A: FieldTrip discussion list Hi Sara, I guess you are not using a mac. What you describe concerns bug 2452 on our Bugzilla page: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2452 which pertains to some undocumented change in Matlab. Therefore it is necessary to use a different mxserialize function that from matlab 2014a onwards than before. This is a c++ function, which requires to be compiled for each platform independently. In FieldTrip, this file exists e.g. in fileio/private but only for MacOS 64-bit platforms. Apparently, we still need to compile it for MacOS 32bit, Windows and Linux platforms. I guess we should do that quite soon ;) I'll bring it up in today's FT meeting so that hopefully from tomorrow onwards it should work. btw, for you it will help to go to the FieldTrip/src directory in Matlab and type >> mex mxSerialize_cpp.cpp Then Matlab will mex (~compile) the file for you. You can then copy that file to your matlab code directory and everything should work out fine for you. I'll keep you updated on this. Best, Jörn On 5/13/2014 4:15 PM, s.rombetto at cib.na.cnr.it wrote: > Any suggestion concerning this problem? > > it works finewith Matlab 2013 > > > Hello fieldtrippers, > > > I got the following error when trying to run ft_timelockanalysis. > > > Undefined function 'mxSerialize_cpp' for input arguments of type 'struct'. > > Error in mxSerialize (line 35) > argout = mxSerialize_cpp(argin); > > Error in ft_preamble_provenance (line 74) > cfg.callinfo.inputhash{iargin} = CalcMD5(mxSerialize(tmparg)); > > Error in ft_preamble (line 54) > evalin('caller', ['ft_preamble_' cmd]); > > Error in ft_timelockanalysis (line 95) > ft_preamble provenance data > > I have no idea what the problem is, I tried looking for the function > in my fieldtrip folder. > > I have just recently installed matlab 2014a if that is any help. > > Tyler > > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 Lab MEG 0817483511 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From mahjoory86 at gmail.com Thu Jun 12 13:10:14 2014 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Thu, 12 Jun 2014 13:10:14 +0200 Subject: [FieldTrip] Grey Matter Message-ID: I want to restrict the source reconstruction to the grey matter. I am using this template head model. (load 'standard_bem.mat') Also I used ft_volumesegment to segmente the template mri (single_subj_T1_1mm.nii), But I don't know how to use seg.gray for creating grid? How should I set the parameters to have the same resolotion? Best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jun 12 15:32:04 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 12 Jun 2014 15:32:04 +0200 (CEST) Subject: [FieldTrip] Grey Matter In-Reply-To: Message-ID: <45574063.3239152.1402579924719.JavaMail.root@draco.zimbra.ru.nl> Dear Keyvan, Please have a look at our Frequently Asked Questions , you might find this one particularly helpful: Can I restrict the source reconstruction to the grey matter? Best, Jim ----- Oorspronkelijk bericht ----- > Van: "Keyvan Mahjoory" > Aan: "FieldTrip discussion list" > Verzonden: Donderdag 12 juni 2014 13:10:14 > Onderwerp: [FieldTrip] Grey Matter > I want to restrict the source reconstruction to the grey matter. I am > using this template head model. (load 'standard_bem.mat' ) > Also I used ft_volumesegment to segmente the template mri > (single_subj_T1_1mm.nii), > But I don't know how to use seg.gray for creating grid? > How should I set the parameters to have the same resolotion? > Best, > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jim Herring, MSc. Neuronal Oscillations Group Centre for Cognitive Neuroimaging Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Fri Jun 13 13:08:30 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Fri, 13 Jun 2014 13:08:30 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? Message-ID: Hi, It seems that ft_resample applies to all of the channels in the data structure. During resampling fieldtrip applies a filter, which adds artifacts to the step function in the trigger channels. For downsampling at least it would be great if you could specify a subset of channels to be downsampled by simple decimation (i.e. skip the lowpass filter). Is there any built-in way to do this? Thanks! Aaron -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From jan.schoffelen at donders.ru.nl Fri Jun 13 13:33:54 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jun 2014 13:33:54 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: <224529F4-9E51-4ECB-BAE1-44A6727E3944@donders.ru.nl> Hi Aaron, You can use cfg.method = ‘nearest’ when downsampling the trigger channels. I suspect that in this case no filtering will be applied. Thus, call ft_resampledata twice (each time with a different method: once for the functional data, the other time for the trigger(s)), and call ft_appenddata afterwards. Best, Jan-Mathijs On Jun 13, 2014, at 1:08 PM, Aaron Schurger wrote: > Hi, > It seems that ft_resample applies to all of the channels in the data > structure. During resampling fieldtrip applies a filter, which adds > artifacts to the step function in the trigger channels. For > downsampling at least it would be great if you could specify a subset > of channels to be downsampled by simple decimation (i.e. skip the > lowpass filter). Is there any built-in way to do this? > Thanks! > Aaron > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Jun 13 16:36:11 2014 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 13 Jun 2014 10:36:11 -0400 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: Dear Aaron, Note that the decimation process is indeed the use of a low-pass filter and subsequent downsampling. As you may already know, this is to avoid aliasing. Otherwise is just an interpolation. "Decimation reduces the original sampling rate for a sequence to a lower rate, the opposite of interpolation. The decimation process filters the input data with a lowpass filter and then resamples the resulting smoothed signal at a lower rate." Best, Rodrigo On Fri, Jun 13, 2014 at 7:08 AM, Aaron Schurger wrote: > Hi, > It seems that ft_resample applies to all of the channels in the data > structure. During resampling fieldtrip applies a filter, which adds > artifacts to the step function in the trigger channels. For > downsampling at least it would be great if you could specify a subset > of channels to be downsampled by simple decimation (i.e. skip the > lowpass filter). Is there any built-in way to do this? > Thanks! > Aaron > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Sat Jun 14 01:35:44 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Sat, 14 Jun 2014 01:35:44 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: Hi, Rodrigo, You are right - in fact I meant downsampling instead of decimation. I get the two words confused sometimes. Anyway, what I mean was just taking every n-th sample. You want to avoid doing any kind of filtering on your trigger channels! Best wishes, Aaron On Fri, Jun 13, 2014 at 4:36 PM, Rodrigo Montefusco wrote: > Dear Aaron, > > Note that the decimation process is indeed the use of a low-pass filter and > subsequent downsampling. As you may already know, this is to avoid aliasing. > Otherwise is just an interpolation. > > "Decimation reduces the original sampling rate for a sequence to a lower > rate, the opposite of interpolation. The decimation process filters the > input data with a lowpass filter and then resamples the resulting smoothed > signal at a lower rate." > > > Best, > > Rodrigo > > > On Fri, Jun 13, 2014 at 7:08 AM, Aaron Schurger > wrote: >> >> Hi, >> It seems that ft_resample applies to all of the channels in the data >> structure. During resampling fieldtrip applies a filter, which adds >> artifacts to the step function in the trigger channels. For >> downsampling at least it would be great if you could specify a subset >> of channels to be downsampled by simple decimation (i.e. skip the >> lowpass filter). Is there any built-in way to do this? >> Thanks! >> Aaron >> >> -- >> Aaron Schurger, PhD >> Senior researcher >> Laboratory of Cognitive Neuroscience >> Brain-Mind Institute, Department of Life Sciences >> École Polytechnique Fédérale de Lausanne >> Station 19, AI 2101 >> 1015 Lausanne, Switzerland >> +41 21 693 1771 >> aaron.schurger at epfl.ch >> http://lnco.epfl.ch/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From sib_ozr at yahoo.com Mon Jun 16 08:23:17 2014 From: sib_ozr at yahoo.com (Sibel OZER) Date: Sun, 15 Jun 2014 23:23:17 -0700 Subject: [FieldTrip] ft_databrowser Message-ID: <1402899797.30216.YahooMailNeo@web120103.mail.ne1.yahoo.com> Dear Fieldtrippers, I have one question, one problem. Question is I would like to remove the trials which include eye-blinks just at the time of target presentation. How can I do that in fieldtrip? In ft_rejectvisual, is it possible to put time indices, at least to do that rejection visually? My problem is that I applied Dr Schouwenburg's solution to correct ft_databrowser Matlab error, it worked, however, it does not plot components, but raw data despite explicitly stating viewmode as component. Did anybody encounter the same problem? thank you, best Sibel -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.hipp at cin.uni-tuebingen.de Mon Jun 16 11:05:15 2014 From: joerg.hipp at cin.uni-tuebingen.de (Joerg Hipp) Date: Mon, 16 Jun 2014 11:05:15 +0200 Subject: [FieldTrip] =?iso-8859-15?q?2014_T=FCbingen_MEG_Symposium?= Message-ID: <539EB34B.80007@cin.uni-tuebingen.de> The MEG Center Tübingen is pleased to announce the: 2014 Tübingen MEG Symposium The symposium takes place on October 27 and 28, 2014. It brings together leading researchers in the field of MEG and related disciplines. Join us in Tübingen to learn about the latest advances in MEG research and beyond. For more information and registration, please visit http://meg.medizin.uni-tuebingen.de/2014/ -------------- next part -------------- A non-text attachment was scrubbed... Name: poster.pdf Type: application/pdf Size: 498360 bytes Desc: not available URL: From eijlers at rsm.nl Mon Jun 16 16:35:16 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Mon, 16 Jun 2014 14:35:16 +0000 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis Message-ID: Dear community, Although I’ve seen other questions related to this topic, I still have some questions regarding baseline correction when executing a time-frequency analysis: After time-frequency analysis, I want to use the trial output either to compare (within participants) trials from different conditions or to put the datapoints of different trials into a regression (also on participant level). The question for me is how to deal with a baseline correction in this situation? The data before each trial of interest is in reaction to viewing a fixation cross. 1. If I understand it correctly, with the default config setting for cfg.polyremoval the mean of the whole trial is subtracted (prior to spectral analysis) to get rid of the offset in oscillations. 2. Does it mean that since I’m doing analyses on a participant level first, I only need to do this kind of baseline correction (from stimulus onset on)? 3. I thought that I should not subtract the mean of a window prior to stimulus onset, from the raw trial data before doing time-frequency analysis (the kind of baseline correction you would do with ERP analyses), but I see this happening in some articles. Did I not get it right, or is this related to the distinction between evoked and induced power, or something else? 4. Or is it an option (and should I) subtract the mean of a window prior to stimulus onset only after decomposition of the data in the power spectrum, for all trials? Thanks a lot! Best, Esther Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 17 09:46:47 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 17 Jun 2014 09:46:47 +0200 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis In-Reply-To: References: Message-ID: <539FF267.3000803@donders.ru.nl> Hi Esther, > 1. If I understand it correctly, with the default config setting for > cfg.polyremoval the mean of the whole trial is subtracted (prior > to spectral analysis) to get rid of the offset in oscillations. > 'Getting rid of the offset in oscillations' is not the purpose of demeaning prior to doing a frequency analysis. See here: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > 1. Does it mean that since I’m doing analyses on a participant level > first, I only need to do this kind of baseline correction (from > stimulus onset on)? > No, this is not a baseline correction as you are thinking of here. Remember that a power spectrum is obtained by squaring the fourier coefficients, i.e. power is always positive. Also, you want to baseline correct per frequency, because of the 1/f characteristic. > 1. I thought that I should /not/subtract the mean of a window prior > to stimulus onset, from the raw trial data before doing > time-frequency analysis (the kind of baseline correction you would > do with ERP analyses), but I see this happening in some articles. > Did I not get it right, or is this related to the distinction > between evoked and induced power, or something else? > As mentioned in the link above, you should demean the whole trial in FieldTrip because of the way the mtmconvol method is implemented. Any other "baseline correction" in the time-domain will only affect the DC bin (ie 0Hz), but not the estimatoin at individual frequencies. This is because baseline correction in the time-domain is a mere subtraction of a your data by a single number. Hence, the frequency content of your data stays unchanged. > 1. Or is it an option (and should I) subtract the mean of a window > prior to stimulus onset only after decomposition of the data in > the power spectrum, for all trials? > Yes, in any plotting function, you can set cfg.baseline and cfg.baselinetype. You can also call ft_freqbaseline. Note baselining is also not a trivial thing here. You can serious harm (i.e. invalidate) your statistics if you're doing it wrong (but that depends on your experimental design and question). Usually, if you compare conditions you should not do a baseline correction at all (otherwise any statistical difference might show up due to a difference in baseline to start with). Best, Jörn On 6/16/2014 4:35 PM, Esther Eijlers wrote: > Dear community, > > Although I’ve seen other questions related to this topic, I still have > some questions regarding baseline correction when executing a > time-frequency analysis: > > After time-frequency analysis, I want to use the trial output either > to compare (within participants) trials from different conditions or > to put the datapoints of different trials into a regression (also on > participant level). > The question for me is how to deal with a baseline correction in this > situation? The data before each trial of interest is in reaction to > viewing a fixation cross. > > 1. If I understand it correctly, with the default config setting for > cfg.polyremoval the mean of the whole trial is subtracted (prior > to spectral analysis) to get rid of the offset in oscillations. > 2. Does it mean that since I’m doing analyses on a participant level > first, I only need to do this kind of baseline correction (from > stimulus onset on)? > 3. I thought that I should /not/subtract the mean of a window prior > to stimulus onset, from the raw trial data before doing > time-frequency analysis (the kind of baseline correction you would > do with ERP analyses), but I see this happening in some articles. > Did I not get it right, or is this related to the distinction > between evoked and induced power, or something else? > 4. Or is it an option (and should I) subtract the mean of a window > prior to stimulus onset only after decomposition of the data in > the power spectrum, for all trials? > > Thanks a lot! > > Best, > Esther > > > Disclaimer > ------------------------------------------------------------------------ > De informatie verzonden in dit e-mail bericht is vertrouwelijk en is > uitsluitend bestemd voor de geadresseerde van dit bericht. Lees > verder: www.eur.nl/email-disclaimer > The information in this e-mail message is confidential and may be > legally privileged. Read more: www.eur.nl/english/email-disclaimer > > ------------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eijlers at rsm.nl Tue Jun 17 13:44:57 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Tue, 17 Jun 2014 11:44:57 +0000 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis In-Reply-To: <539FF267.3000803@donders.ru.nl> References: <539FF267.3000803@donders.ru.nl> Message-ID: Dear Jorn, Thanks a lot for the clarification! Best, Esther On 17/06/14 09:46, ""Jörn M. Horschig"" wrote: >Hi Esther, > >> 1. If I understand it correctly, with the default config setting for >> cfg.polyremoval the mean of the whole trial is subtracted (prior >> to spectral analysis) to get rid of the offset in oscillations. >> >'Getting rid of the offset in oscillations' is not the purpose of >demeaning prior to doing a frequency analysis. See here: >http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > >> 1. Does it mean that since I¹m doing analyses on a participant level >> first, I only need to do this kind of baseline correction (from >> stimulus onset on)? >> > >No, this is not a baseline correction as you are thinking of here. >Remember that a power spectrum is obtained by squaring the fourier >coefficients, i.e. power is always positive. Also, you want to baseline >correct per frequency, because of the 1/f characteristic. > >> 1. I thought that I should /not/subtract the mean of a window prior >> to stimulus onset, from the raw trial data before doing >> time-frequency analysis (the kind of baseline correction you would >> do with ERP analyses), but I see this happening in some articles. >> Did I not get it right, or is this related to the distinction >> between evoked and induced power, or something else? >> >As mentioned in the link above, you should demean the whole trial in >FieldTrip because of the way the mtmconvol method is implemented. Any >other "baseline correction" in the time-domain will only affect the DC >bin (ie 0Hz), but not the estimatoin at individual frequencies. This is >because baseline correction in the time-domain is a mere subtraction of >a your data by a single number. Hence, the frequency content of your >data stays unchanged. > >> 1. Or is it an option (and should I) subtract the mean of a window >> prior to stimulus onset only after decomposition of the data in >> the power spectrum, for all trials? >> >Yes, in any plotting function, you can set cfg.baseline and >cfg.baselinetype. You can also call ft_freqbaseline. Note baselining is >also not a trivial thing here. You can serious harm (i.e. invalidate) >your statistics if you're doing it wrong (but that depends on your >experimental design and question). Usually, if you compare conditions >you should not do a baseline correction at all (otherwise any >statistical difference might show up due to a difference in baseline to >start with). > >Best, >Jörn > >On 6/16/2014 4:35 PM, Esther Eijlers wrote: >> Dear community, >> >> Although I¹ve seen other questions related to this topic, I still have >> some questions regarding baseline correction when executing a >> time-frequency analysis: >> >> After time-frequency analysis, I want to use the trial output either >> to compare (within participants) trials from different conditions or >> to put the datapoints of different trials into a regression (also on >> participant level). >> The question for me is how to deal with a baseline correction in this >> situation? The data before each trial of interest is in reaction to >> viewing a fixation cross. >> >> 1. If I understand it correctly, with the default config setting for >> cfg.polyremoval the mean of the whole trial is subtracted (prior >> to spectral analysis) to get rid of the offset in oscillations. >> 2. Does it mean that since I¹m doing analyses on a participant level >> first, I only need to do this kind of baseline correction (from >> stimulus onset on)? >> 3. I thought that I should /not/subtract the mean of a window prior >> to stimulus onset, from the raw trial data before doing >> time-frequency analysis (the kind of baseline correction you would >> do with ERP analyses), but I see this happening in some articles. >> Did I not get it right, or is this related to the distinction >> between evoked and induced power, or something else? >> 4. Or is it an option (and should I) subtract the mean of a window >> prior to stimulus onset only after decomposition of the data in >> the power spectrum, for all trials? >> >> Thanks a lot! >> >> Best, >> Esther >> >> >> Disclaimer >> ------------------------------------------------------------------------ >> De informatie verzonden in dit e-mail bericht is vertrouwelijk en is >> uitsluitend bestemd voor de geadresseerde van dit bericht. Lees >> verder: www.eur.nl/email-disclaimer >> The information in this e-mail message is confidential and may be >> legally privileged. Read more: www.eur.nl/english/email-disclaimer >> >> ------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >-- >Jörn M. Horschig >PhD Student >Donders Institute for Brain, Cognition and Behaviour >Centre for Cognitive Neuroimaging >Radboud University Nijmegen >Neuronal Oscillations Group >FieldTrip Development Team > >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Contact: >E-Mail: jm.horschig at donders.ru.nl >Tel: +31-(0)24-36-68493 >Web: http://www.ru.nl/donders > >Visiting address: >Trigon, room 2.30 >Kapittelweg 29 >NL-6525 EN Nijmegen >The Netherlands > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ From michelic72 at gmail.com Tue Jun 17 17:26:22 2014 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 17 Jun 2014 17:26:22 +0200 Subject: [FieldTrip] PhD Lyon, France Message-ID: Dear List, here's a PhD position I'd like to advertise. Please find a detailed description in attachment. Cristiano *Funded PhD position at the Lyon Neuroscience Research Center, Brain Dynamics and Cognition Team *starting in October 2014 *Supervisors: Aurélie Bidet-Caulet, Olivier Bertrand* *Title: Brain mechanisms of distractibility during normal ageing and after frontal damage* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BidetCaulet_Phdposting.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 12681 bytes Desc: not available URL: From k.kessler at aston.ac.uk Tue Jun 17 18:43:46 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Tue, 17 Jun 2014 16:43:46 +0000 Subject: [FieldTrip] PhD in Birmingham Message-ID: Dear Fieldtrippers, We would be grateful if you could disseminate information about a PhD scholarship supervised by Craig McAllister (Birmingham University) and Klaus Kessler (Aston University). The project will involve MEG and TMS/tES in the context of the action-observation-execution-matching system (mirroring). The scholarship includes fees (to university) a as well as a stipend (living costs) for UK and EU students. Further details can be found here: http://www.findaphd.com/search/ProjectDetails.aspx?PJID=54268 Many thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Wed Jun 18 14:22:16 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Wed, 18 Jun 2014 12:22:16 +0000 Subject: [FieldTrip] Psychology Lectureship at Aston University Message-ID: Dear All We would be grateful if you could disseminate information about a Lecturer post in Psychology at Aston University (permanent member of staff) to potential candidates. Application deadline is the 11/07/2014. Further information: http://jobs.aston.ac.uk/Vacancy.aspx?ref=R140149 Many thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominic.depke at rub.de Wed Jun 18 15:58:25 2014 From: dominic.depke at rub.de (Dominic Depke) Date: Wed, 18 Jun 2014 15:58:25 +0200 Subject: [FieldTrip] ft_freqanalysis using wavelets, problems with trialdef Message-ID: <53A19B01.9050201@rub.de> Dear all, Actually I am analyzing EEG data containing epileptic seizure-like activity in Fieldtrip. Data is read in continuous mode and segments of interest are visually identified using the databrowser and a trial-structure (cfg.trl) is made from the information in the 'cfg.artfctdef.visual.artifact' field. After the trial-definition ft_preprocessing is called a second time with the option 'cfg.continuous' set to 'no'. Now I tried to use ft_frequanalysis using wavelets to get information about power-spectral densities for every single trial and every single channel ( in terms of individual 'seizure' events) but the output structure is filled with NaNs. I read the tutorial documentations and changed the values for cfg.toi and width but the result remained the same. Further, my datastructure does not contain a .trialinfo field so how should the trialdefinition look like (e.g. if you create cfg.trials) for use with ft_freqanalysis? There is only a cfg.trl and a data.trial field in the datastructure. Moreover, my data does not contain any stimulus codes. Best, Dominic From sib_ozr at yahoo.com Wed Jun 18 20:44:23 2014 From: sib_ozr at yahoo.com (Sibel OZER) Date: Wed, 18 Jun 2014 11:44:23 -0700 Subject: [FieldTrip] binica ICA Message-ID: <1403117063.40565.YahooMailNeo@web120105.mail.ne1.yahoo.com> Hi all, How can I use binica ICA? When I run the function  ft_componentanalysis with cfg.method = 'binica';, I get the following error(my OS is Windows): Running ica from script file binica6324.sc The system cannot find the file specified. Error using floatread (line 168) floatread() fopen() error. Error in binica (line 325)     wts = floatread(weightsfile,[ncomps Inf],[],0); Error in ft_componentanalysis (line 486)     [weights, sphere] = binica(dat, optarg{:}); best, Sibel -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.fransen at donders.ru.nl Thu Jun 19 11:19:16 2014 From: a.fransen at donders.ru.nl (Anne Fransen) Date: Thu, 19 Jun 2014 11:19:16 +0200 Subject: [FieldTrip] ft_sourceplot is now forced to be interactive Message-ID: Hi, I use ft_sourceplots to make orthoplots, however, recently I cannot make multiple graphs anymore without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. Thank you, Best regards, Anne Fransen -- Anne M.M. Fransen Neurophysiology of Active Perception Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen E-mail: a.fransen at donders.ru.nl Phone: 0031 (0)24 36 55933 Visiting Address: Room B3.43 Montessorilaan 3 Mail address: Anne Fransen Dep. Bio- en NeuroPsychologie Postbus 9104 6500 HE Nijmegen the Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Thu Jun 19 11:58:03 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 19 Jun 2014 02:58:03 -0700 Subject: [FieldTrip] error in==> prepare_mesh_segmentation Message-ID: <1403171883.77499.YahooMailNeo@web124905.mail.ne1.yahoo.com> Hello, I was following the tutorial in page http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a head model for EEG, I've done the same steps explained in the tutorial but when I reach the meshing stage and use: bnd=ft_prepare_mesh(cfg,segmentedmri); I get the following error: ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. error in ==> triangulate_seg at 73 seg = myvolumefillholes(seg); error in ==> prepare_mesh_segmentation at 101 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); error in ==> ft_prepare_mesh at 178 bnd = prepare_mesh_segmentation(cfg, mri); ----------------------------------------------------------------------------- although I'm geting the same results for the data structure as in the tutorial: disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] skull: [256x256x256 logical] scalp: [256x256x256 logical] cfg: [1x1 struct] ---------------------------------------------------------- can any one help in this matter please? Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From emanuelvandenbroeke at hotmail.com Thu Jun 19 14:11:31 2014 From: emanuelvandenbroeke at hotmail.com (emanuel vandenbroeke) Date: Thu, 19 Jun 2014 14:11:31 +0200 Subject: [FieldTrip] Cluster-based permutation test Message-ID: Dear Eric Maris or other fieldtrippers, In my experiment (a 2x2x6 design) I want to test whether ERP waveforms are significant different between conditions. There is no a priori assumption about the effects.In this experiment I apply a somatosensory stimulus on both arms before and after an intervention on one arm. The somatosensory stimulus consists of 6 different intensities. So it is a within-subject design with 3 factors: Time (T0 and T1), Arm (intervention, control) and Intensity (6 different intensities). I'm interested in the MAIN effect of INTENSITY, and the INTERACTION effects (TIME x ARM) and (TIME x ARM x INTENSITY).For the Interaction effect TIME x ARM, I first calculated difference-waves (postcontrol - precontrol and postintervention - preintervention) in Matlab en then applied the permutation test on these difference-waves to test whether the two arms are different. I hope this is correct? But now my question, how to test the TIME x ARM x INTENSITY interaction? One possibility might be to calculate an ANOVA F statistic for this interaction effect (so perform a full factorial ANOVA) and perform the permutation test? Is this justified? Very much thanks,Best wishes,Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Thu Jun 19 15:29:50 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Thu, 19 Jun 2014 13:29:50 +0000 Subject: [FieldTrip] Marie-Curie Postdoctoral Fellowship at Aston University Message-ID: Dear Fieldtrippers Please disseminate to potential candidates the opportunity of a Marie-Curie Postroctoral Research Fellowship at Aston University to work with Prof Joel Talcott and Dr Caroline Witton. The fellowship offers an excellent salary (£53,765 per annum) for an early-career researcher who meets the Marie-Curie requirements (see below). Joel and Caroline are particularly looking for someone with experience in MEG data collection and analysis, and who is interested in becoming part of a vibrant EU-funded Initial Training Network which provides many opportunities for travel and networking. Prior experience with language research would be welcome but is not a requirement. To meet the Marie Curie requirements, you need to be within the first five years of your research career, and not resident in the UK for more than 12 months in the last 3 years. Further details can be found here: https://jobs.aston.ac.uk/Vacancy.aspx?id=1239&forced=1 Please contact Caroline (c.witton at aston.ac.uk) or Joel Talcott (j.b.talcott at aston.ac.uk) directly with any enquiries. Thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eijlers at rsm.nl Thu Jun 19 16:32:17 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Thu, 19 Jun 2014 14:32:17 +0000 Subject: [FieldTrip] Strange output for ft_freqanalysis using wavelets? Message-ID: Dear all, I recently started working on time-frequency analyses, and my code is working. However, it seems to me that something is going wrong; Using the code below to calculate TFRs using wavelets, the output in .powerspectrum is in the range of hundreds and sometimes even up to a thousand (can also be seen from the plot). Trying multitapers (also in the code below), the range seems to be more normal (maybe up to 20). I cannot find out what I’m doing wrong (I guess such outcomes are impossible?). I preprocessed the data in BVA and transferred it to FT structures, but that shouldn’t be a problem right? A final question considers NaNs, is it true that ft_freqanalysis can not handle them, so that the output for elektrode 16 e.g. is set to NaN when it contained artefacts (i.e. NaNs in my case) in just one trial? I would appreciate it a lot if anyone could help me out. Best, Esther Data from 1 participant (it was also the case with other participants), 1 condition can be found here: https://www.dropbox.com/s/8vjcfid5p1i0o2t/FTav.mat load('FTav.mat') cfg = []; %% wavelet %cfg.keeptrials = 'yes'; %not when you want to use ft_freqgrandaverage and permutation testing thereafter cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:2:100; cfg.toi = -0.5:0.05:2.0; %% OR multitapers %{ cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:100; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; %} TFRav = ft_freqanalysis(cfg, FTav); % plot the results cfg = []; cfg.baseline = [-0.5 0]; cfg.baselinetype = 'absolute'; cfg.zlim = 'maxabs'; cfg.showlabels = 'yes'; cfg.layout = 'biosemi64.lay'; cfg.interactive = 'yes'; cfg.colorbar = 'yes'; figure ft_multiplotTFR(cfg, TFRav); Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 19 17:23:07 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 19 Jun 2014 17:23:07 +0200 Subject: [FieldTrip] ft_sourceplot is now forced to be interactive In-Reply-To: References: Message-ID: <54A92888-F4F3-4807-A211-0E5D55E17605@donders.ru.nl> Hi Anne, Could you please file this as a bug on our bugzilla.fcdonders.nl page? Thanks, Jan-Mathijs On Jun 19, 2014, at 11:19 AM, Anne Fransen wrote: > Hi, > > I use ft_sourceplots to make orthoplots, however, recently I cannot make multiple graphs anymore without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. > This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. > > Thank you, > > Best regards, > Anne Fransen > -- > Anne M.M. Fransen > Neurophysiology of Active Perception > Donders Institute for Brain, Cognition and Behaviour > Radboud University Nijmegen > > E-mail: a.fransen at donders.ru.nl > Phone: 0031 (0)24 36 55933 > > Visiting Address: > Room B3.43 > Montessorilaan 3 > > Mail address: > Anne Fransen > Dep. Bio- en NeuroPsychologie > Postbus 9104 > 6500 HE Nijmegen > the Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jun 20 08:10:09 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 19 Jun 2014 23:10:09 -0700 Subject: [FieldTrip] error in (ft_prepare_mesh) Message-ID: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> Hello every one I was following the tutorial in page http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a head model for EEG, I've done the same steps explained in the tutorial but when I reach the meshing stage and use: bnd=ft_prepare_mesh(cfg,segmentedmri); I get the following error: ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. error in ==> triangulate_seg at 73 seg = myvolumefillholes(seg); error in ==> prepare_mesh_segmentation at 101 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); error in ==> ft_prepare_mesh at 178 bnd = prepare_mesh_segmentation(cfg, mri); ----------------------------------------------------------------------------- although I'm geting the same results for the data structure as in the tutorial: disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] skull: [256x256x256 logical] scalp: [256x256x256 logical] cfg: [1x1 struct] ---------------------------------------------------------- can any one help in this matter please? Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 20 08:45:11 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 20 Jun 2014 08:45:11 +0200 Subject: [FieldTrip] error in (ft_prepare_mesh) In-Reply-To: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> References: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> Message-ID: <53A3D877.7090200@donders.ru.nl> Hi Rasha, could you update to the latest FT version? The function should be called "volumefillholes" and is located in FieldTrip/private. "myvolumefillholes" does indeed not exist and it appears that you or someone else modified the file to call a different function at that location. Best, Jörn On 6/20/2014 8:10 AM, Rasha Haider wrote: > Hello every one > I was following the tutorial in page > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a > head model for EEG, I've done the same steps explained in the tutorial > but when I reach the meshing stage and use: > bnd=ft_prepare_mesh(cfg,segmentedmri); > > I get the following error: > > ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. > > > error in ==> triangulate_seg at 73 > seg = myvolumefillholes(seg); > > > > error in ==> prepare_mesh_segmentation at 101 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > > error in ==> ft_prepare_mesh at 178 > bnd = prepare_mesh_segmentation(cfg, mri); > ----------------------------------------------------------------------------- > although I'm geting the same results for the data structure as in the tutorial: > > disp(segmentedmri) > > dim: [256 256 256] > > transform: [4x4 double] > > coordsys: 'ctf' > > unit: 'mm' > > brain: [256x256x256 logical] > > skull: [256x256x256 logical] > > scalp: [256x256x256 logical] > > cfg: [1x1 struct] > ---------------------------------------------------------- > can any one help in this matter > please? > > Regards > Rasha > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From emanuelvandenbroeke at hotmail.com Fri Jun 20 11:17:21 2014 From: emanuelvandenbroeke at hotmail.com (emanuel vandenbroeke) Date: Fri, 20 Jun 2014 11:17:21 +0200 Subject: [FieldTrip] Cluster-based permutation test - Help please :-) In-Reply-To: References: Message-ID: Dear Eric Maris, On the website I found a solution for calculating the interaction effect with permutation testing!For my three way interaction I was thinking of the following solution and would like to know if this is statistically sound to do (perhaps also interesting for other people with the same design): First I calculated the differences as proposed by you for an interaction effect, for each intensity separately:Thus: T0 T1 Control arm A B Intervention arm C D B-A (with new variable difference_B-A) and C-D (with new variable difference_C-D). Instead of testing the interaction for these two new variables, I calculate the difference between variable difference_C-D and variable difference_B-A and use an F-statistic to express the differences across the 6 intensities and subsequently perform the permutation test. Does this sound valid to you?I'm really stuck, so hope that you will answer my question! Best wishes,Emanuel From: emanuelvandenbroeke at hotmail.com To: fieldtrip at science.ru.nl Subject: Cluster-based permutation test Date: Thu, 19 Jun 2014 14:11:31 +0200 Dear Eric Maris or other fieldtrippers, In my experiment (a 2x2x6 design) I want to test whether ERP waveforms are significant different between conditions. There is no a priori assumption about the effects.In this experiment I apply a somatosensory stimulus on both arms before and after an intervention on one arm. The somatosensory stimulus consists of 6 different intensities. So it is a within-subject design with 3 factors: Time (T0 and T1), Arm (intervention, control) and Intensity (6 different intensities). I'm interested in the MAIN effect of INTENSITY, and the INTERACTION effects (TIME x ARM) and (TIME x ARM x INTENSITY).For the Interaction effect TIME x ARM, I first calculated difference-waves (postcontrol - precontrol and postintervention - preintervention) in Matlab en then applied the permutation test on these difference-waves to test whether the two arms are different. I hope this is correct? But now my question, how to test the TIME x ARM x INTENSITY interaction? One possibility might be to calculate an ANOVA F statistic for this interaction effect (so perform a full factorial ANOVA) and perform the permutation test? Is this justified? Very much thanks,Best wishes,Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ma.bijanzadeh at gmail.com Sat Jun 21 00:42:08 2014 From: ma.bijanzadeh at gmail.com (Maryam Bijanzadeh) Date: Fri, 20 Jun 2014 16:42:08 -0600 Subject: [FieldTrip] LFP data Message-ID: Dear all, This is Maryam from University of Utah. I would like to test the time frequency script of Fieldtrip with a simple vector. I was wondering if you could help me for the data format to pass to the function as an input. in reality I analyzed my LFP data in a matrix format : Channel by time points . Best Regards, Maryam Bijanzadeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Sat Jun 21 09:47:37 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sat, 21 Jun 2014 09:47:37 +0200 Subject: [FieldTrip] LFP data In-Reply-To: References: Message-ID: Dear Maryam, This FAQ might be of relevance for you: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat Best, Eelke On 21 June 2014 00:42, Maryam Bijanzadeh wrote: > Dear all, > > This is Maryam from University of Utah. I would like to test the time > frequency script of Fieldtrip with a simple vector. I was wondering if you > could help me for the data format to pass to the function as an input. > > in reality I analyzed my LFP data in a matrix format : Channel by time > points . > > > Best Regards, > > Maryam Bijanzadeh > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gamaliel.ghu at gmail.com Mon Jun 23 02:15:20 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Sun, 22 Jun 2014 20:15:20 -0400 Subject: [FieldTrip] Simulation of eeg source Message-ID: Hi all I am beginner in brainstorm My question is this. I need to simulate an outbreak of electrical activity in a realistic head model, and acquire the EEG tracing the source (focus) dummy. The aim is to build different head models, and compare the error to locate the source you have simulated, but for this I need the layout or activity of the simulated source. Any information is helpful. Anyone know how to simulate a realistic source model?, And acquire their electrical activity? Thanks regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 23 11:45:44 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 23 Jun 2014 11:45:44 +0200 Subject: [FieldTrip] Simulation of eeg source In-Reply-To: References: Message-ID: <53A7F748.6080807@donders.ru.nl> Hi Gamaliel, are you aware that this is a fieldtrip and not brainstorm mailinglist? In case you want to use FieldTrip, have a look at ft_dipolesimulation. Otherwise I cannot be of help. Best, Jörn On 6/23/2014 2:15 AM, gamaliel huerta urrea wrote: > Hi all > > I am beginner in brainstorm > > My question is this. > I need to simulate an outbreak of electrical activity in a realistic > head model, and acquire the EEG tracing the source (focus) dummy. The > aim is to build different head models, and compare the error to locate > the source you have simulated, but for this I need the layout or > activity of the simulated source. > > Any information is helpful. > > Anyone know how to simulate a realistic source model?, And acquire > their electrical activity? > > Thanks regards > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From luke.bloy at gmail.com Mon Jun 23 14:56:51 2014 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 23 Jun 2014 08:56:51 -0400 Subject: [FieldTrip] ctf mri tools Message-ID: Hi list, I'm wondering if anyone knows of any tools for writing ctf .mri files that can be read by MRIViewer. Thanks, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.postorino at gmail.com Mon Jun 23 16:14:41 2014 From: martina.postorino at gmail.com (Martina Postorino) Date: Mon, 23 Jun 2014 16:14:41 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting Message-ID: Dear all, I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset. I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels. Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically? I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed. This is the code I use: [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); %plotting cfgp = []; cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; cfgp.avgoverchan = 'no'; cfgp.latency = [-1 1]; ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); % average data across subjects cfgp = []; cfgp.keepindividual = 'no'; ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red); % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); ERP_pain_bp_GA_avg.mask = stat.mask; ERP_buttonpress_GA_avg.mask = stat.mask; % ERP_pain_GA_avg.mask = stat.mask; % do the plotting cfgp = []; cfgp.maskparameter = 'mask'; cfgp.maskstyle = 'box'; cfgp.layout = layout_easycap_painlabmunich; ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); Thanks in advance! ___________________________________________ Martina Postorino, M.Sc Phd program in Medical Life Science and Technology Neuroimaging Center (TUM-NIC) Technische Universität München, Klinikum Rechts der Isar -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Mon Jun 23 16:53:55 2014 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Mon, 23 Jun 2014 16:53:55 +0200 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <1ADF28F5-5205-4B8F-8863-C36E0899567A@gmail.com> Dear All, here's a PhD position in Aachen, Germany I'd like to advertise. Please find a detailed description in the attachment. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. Please spread the word. Best Leo Zizlsperger -------------- next part -------------- A non-text attachment was scrubbed... Name: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE RWTH_TH_JF.doc Type: application/msword Size: 29696 bytes Desc: not available URL: From gamaliel.ghu at gmail.com Mon Jun 23 19:57:36 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Mon, 23 Jun 2014 13:57:36 -0400 Subject: [FieldTrip] Simulation of eeg source In-Reply-To: References: Message-ID: Sorry for my previous mistake, I understand that the above is fieldtrip was just wrong. Please, I would like more information about Hi all I am beginner in Fieldtrip My question is this. I need to simulate an outbreak of electrical activity in a realistic head model, and acquire the EEG tracing the source (focus) dummy. The aim is to build different head models, and compare the mistake to locate the source You have simulated, but for this I need the layout or activity of the simulated source. Any information is helpful. Anyone know how to simulate a realistic source model?, And Their acquire electrical activity? Thanks regards 2014-06-22 20:15 GMT-04:00 gamaliel huerta urrea : > Hi all > > I am beginner in brainstorm > > My question is this. > I need to simulate an outbreak of electrical activity in a realistic head > model, and acquire the EEG tracing the source (focus) dummy. The aim is to > build different head models, and compare the error to locate the source you > have simulated, but for this I need the layout or activity of the simulated > source. > > Any information is helpful. > > Anyone know how to simulate a realistic source model?, And acquire their > electrical activity? > > Thanks regards > -- *Gamaliel Huerta* *Ingeniería Civil Biomédica* *Universidad de Valparaíso* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Tue Jun 24 00:24:31 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 23 Jun 2014 18:24:31 -0400 Subject: [FieldTrip] using AAL atlas on sourcemodel Message-ID: Hi all, I am trying to use AAL atlas on cortical mesh generated for individual subjects using freesurfer. When I do it on standard (template) sourcemodel, it works fine. aal = ft_read_atlas( '/Users/gopalar/Documents/MATLAB/fieldtrip-20140430/template/atlas/aal/ROI_MNI_V4.nii' ); sourcemodel=ft_read_headshape('cortex_8196.surf.gii'); sourcemodel2=ft_sourceinterpolate(cfg,atlas,sourcemodel); sourcemodel2.tissue has all the parcellations numbered and indexed. when sourcemodel was generated for individual subjects, the above steps does not work well. ft_sourceinterpolate do not yield all parcellations and they are anatomically skewed. I guess some co-registration of individual cortical mesh with standard template needed. Or are grids are the only other option. I really would like to use the cortical mesh instead of grids in my analysis. Thanks for your help Raghavan -- *Raghavan Gopalakrishnan,* *Principal Research Engineer, * *Cleveland Clinic* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Tue Jun 24 00:46:13 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Mon, 23 Jun 2014 23:46:13 +0100 Subject: [FieldTrip] Phase Lag Index Message-ID: Hi everyone, I would like to compute a classic phase lag index between pairs of MEG time series. So far I only found a wieghted phase lag index method implemented in ft and as far as I understand it is a directed measure so it gives the values from -1 to 1. Has anyone have an idea how to transform it so it computes absolute values from 0 to 1??? Many thanks in advance. Regards, Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 24 09:05:49 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 24 Jun 2014 09:05:49 +0200 Subject: [FieldTrip] Phase Lag Index In-Reply-To: References: Message-ID: Hi Lidia, Transforming a number that is bounded between -1 and 1 into a number that has absolute value and is bounded between 0 and 1 can be achieved by taking the abs(). Alternatively, you could compute the classic PLI from a time series of complex-valued cross-spectral density estimates by abs(mean(sign(angle(x)))); Best, Jan-Mathijs On Jun 24, 2014, at 12:46 AM, Lidia Mijas wrote: > Hi everyone, > > I would like to compute a classic phase lag index between pairs of MEG time series. > > So far I only found a wieghted phase lag index method implemented in ft and as far as I understand it is a directed measure so it gives the values from -1 to 1. Has anyone have an idea how to transform it so it computes absolute values from 0 to 1??? > > Many thanks in advance. > > Regards, > Lidia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Tue Jun 24 11:44:32 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Tue, 24 Jun 2014 10:44:32 +0100 Subject: [FieldTrip] Phase Lag Index In-Reply-To: References: Message-ID: Thank you Jan-Mathijs, So abs(x) will give me absolute value of x. But how can I use it considering that my data is in spm/fieldtrip format? This is my code for wpli. 'fd' stores WPLI values so values from -1 to 1 but taking abs(fd) doesn't work. Also not sure how to use just matlab to compute pli in the same way as the code below. Any tips? listfiles=ls('C:\Users\Lid\Documents\a_project\Controls\sources [40 80]\both_m1s\BceRdfspm8_*.mat'); for j=1:size(listfiles,1) spmfilename=deblank(listfiles(j,:)); D= spm_eeg_load(spmfilename); data = D.ftraw(0); % % megchan1 = 'lm1'; megchan2 = 'rm1'; emgchan = 'EEG061'; % meg1 = ft_selectdata(data, 'channel', megchan1, 'toilim', [1 3], 'avgoverrpt', 'no'); % meg1.label{1} = 'LM1'; meg2 = ft_selectdata(data, 'channel', megchan2, 'toilim', [1 3], 'avgoverrpt', 'no'); meg2.label{1} = 'RM1'; emg = ft_selectdata(data, 'channel', emgchan, 'toilim', [1 3], 'avgoverrpt', 'no'); emg.label{1} = 'EMG'; %emg.time = meg.time; inp = ft_appenddata([],emg, meg2); % cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; %cfg.taper = 'hanning'; cfg.foilim = [5 100]; cfg.toi = [1 3]; cfg.tapsmofrq = 7; % was 2.5 cfg.keeptrials = 'yes'; cfg.channel = {'EMG', 'RM1'};%'EMG'; cfg.channelcmb = {'RM1','EMG'}; %'EMG' 'RM1'; 'LM1' 'RM1' }; freq = ft_freqanalysis(cfg, inp); % cfg = []; cfg.method = 'wpli'; cfg.channelcmb = {'RM1', 'EMG'}; fd = ft_connectivityanalysis(cfg, freq); % cfg = []; cfg.xparam = 'freq'; cfg.zparam = 'wplispctrm'; cfg.xlim = [5 100]; cfg.ylim = [-1 1]; cfg.channel = 'EMG'; cfg.refchannel = 'RM1'; cfg.showlabels = 'yes'; figure; ft_singleplotER(cfg,fd); L = 120; c95 = 1-0.05^(1/(L-1)); x = get(gca,'xlim'); xlabel('frequency'); ylabel('cortico-muscular PLI'); hold on, line(x,[c95,c95],'linestyle','--','color','k'), hold off % eval(['print -dpng beta_ppc_emg_rm1_patient_' LW240492 '.png']); eval(['print -dpng gamma_pli_emg_rm1_control_' num2str(spmfilename(12:19)) '.png']); close(gcf); % % mean(fd.ppcspctrm(fd.freq>=15 & fd.freq<=30)) % % ffreq = fd.freq(fd.freq>=15 & fd.freq<=30); % [m, ind] = max(fd.ppcspctrm(ismember(fd.freq, ffreq))); % disp(['Max ' num2str(m) ' at ' num2str(ffreq(ind)) ' Hz']); end %% Many thanks!! 2014-06-24 8:05 GMT+01:00 jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl>: > Hi Lidia, > > Transforming a number that is bounded between -1 and 1 into a number that > has absolute value and is bounded between 0 and 1 can be achieved by taking > the abs(). > Alternatively, you could compute the classic PLI from a time series of > complex-valued cross-spectral density estimates by > abs(mean(sign(angle(x)))); > > Best, > Jan-Mathijs > > > On Jun 24, 2014, at 12:46 AM, Lidia Mijas wrote: > > Hi everyone, > > I would like to compute a classic phase lag index between pairs of MEG > time series. > > So far I only found a wieghted phase lag index method implemented in ft > and as far as I understand it is a directed measure so it gives the values > from -1 to 1. Has anyone have an idea how to transform it so it computes > absolute values from 0 to 1??? > > Many thanks in advance. > > Regards, > Lidia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From taosong at ucsd.edu Tue Jun 24 22:19:07 2014 From: taosong at ucsd.edu (Song, Tao) Date: Tue, 24 Jun 2014 20:19:07 +0000 Subject: [FieldTrip] MEG Engineer Position Message-ID: Dear Colleagues: Elekta Inc is hiring a MEG service engineer in US. If you are interested and have the working permission in US, or you know someone might be interested, pls send me an email at: tao.song at elekta.com Thanks so much! Tao -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 08:37:12 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 24 Jun 2014 23:37:12 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 25 08:55:08 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jun 2014 08:55:08 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting In-Reply-To: References: Message-ID: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> Hi Martina, I agree that the sorting of the channels is somewhat annoying, and an unexpected feature in the coding. Presently we are looking into how to address this. Yet, the sorting that is applied to the list of channels is consistently applied to all fields that contain numeric data. In your case I don’t understand your statement that the mask stays unsorted. Is there any way you are able to verify that? If I run the following simple simulation everything is reordered, also the ‘mask’-field. stat.label={‘B’;’A’;’C’}; stat.stat=repmat([1:3]’,[1 2]); stat.mask=stat.stat; stat.prob=stat.stat; stat.time=[1 2]; stat.dimord=‘chan_time’; stat2=ft_selectdata([],stat); If I now do: stat2.label I get ans = ‘A’ ‘B’ ‘C’ and when I do: stat2.stat I get ans = 2 2 1 1 3 3 and when I do: stat2.mask I get ans = 2 2 1 1 3 3 Conslusion: the mask is also re-ordered. In other words, the rows in the numeric data fields are still consistent with respect to one another. If you want to stay informed about this issue, I suggest you to create an account on bugzilla.fcdonders.nl, and add yourself to the cc-list of bug #2597. Best wishes, Jan-Mathijs On Jun 23, 2014, at 4:14 PM, Martina Postorino wrote: > Dear all, > > I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset. > > I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels. > > Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically? > > I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed. > > This is the code I use: > > [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); > > %plotting > > cfgp = []; > cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; > cfgp.avgoverchan = 'no'; > cfgp.latency = [-1 1]; > ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); > ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); > > % average data across subjects > > cfgp = []; > cfgp.keepindividual = 'no'; > ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); > ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red); > % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); > > ERP_pain_bp_GA_avg.mask = stat.mask; > ERP_buttonpress_GA_avg.mask = stat.mask; > % ERP_pain_GA_avg.mask = stat.mask; > > % do the plotting > > cfgp = []; > cfgp.maskparameter = 'mask'; > cfgp.maskstyle = 'box'; > cfgp.layout = layout_easycap_painlabmunich; > > ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); > > Thanks in advance! > > ___________________________________________ > > Martina Postorino, M.Sc > Phd program in Medical Life Science and Technology > > Neuroimaging Center (TUM-NIC) > Technische Universität München, Klinikum Rechts der Isar > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 08:56:35 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 24 Jun 2014 23:56:35 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel In-Reply-To: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> References: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> Message-ID: <1403679395.95135.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From eijlers at rsm.nl Wed Jun 25 10:20:57 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Wed, 25 Jun 2014 08:20:57 +0000 Subject: [FieldTrip] Large values for output ft_freqanalysis using wavelets Message-ID: Dear all, Could someone please tell me whether the large values in my power spectrum (in the range of hundreds and sometimes even up to a thousand), can be correct values, or whether something must be going wrong? I am using the same settings as specified in the time frequency tutorial. Thanks a lot, Esther Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Wed Jun 25 10:38:24 2014 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Wed, 25 Jun 2014 10:38:24 +0200 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <1BB666E0-72F7-44DB-863F-6647EC7104E8@gmail.com> Dear All, here's a PhD position I'd like to advertise: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE, RWTH Aachen, GERMANY A research position (PhD student, 50% TV-L 13) is available to study the impact of stroke on visual perception using behavioral methodology combined with fMRI methods. In particular, the research aims to depict the plastic changes in the visual network that are induced by ischemic stroke. Experiments performed with healthy human subjects and directed at studying the neuronal mechanisms underlying sensory decision making will be combined with studies of patients suffering from circumscribed lesions in striate and extrastriate cortex. The project will be conducted at the Departments of Neurology and Neuroradiology and is part of an IZKF funded collaborative project within the Medical faculty of RWTH Aachen University. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. The successful candidate will work within an interdisciplinary team of young researchers at a well-known research institution (www.rwth-aachen.de). The candidate will design and conduct behavioral as well as functional imaging experiments, collect data, perform statistical data analysis (SPSS, Matlab, BrainVoyager and SPM), present the results at national and international meetings and publish research manuscripts. Candidates (Ph.D. students, Ph.D., or M.D.) interested in visual perception, cognitive psychology, or clinical psychology are particularly encouraged to apply. Very good English communication and writing skills are expected. The position requires a strong interest in research questions and experimental skills combined with a high level of motivation, team-orientation as well as the ability to solve problems independently. Programming skills in Matlab are considered a plus. Qualified women are explicitly invited to apply and handicapped candidates with equal qualification will be given preference. Please send your CV, publication record, and the names of two references (preferably by e-mail) to: Prof. Dr. Thomas Haarmeier Department of Neurology, University of Aachen Pauwelsstraße 30, 52074 Aachen, Germany Phone: +49 241 80-89603 Secr: +49 241 80-89601 Fax: +49 241 80-82582 e-mail: thaarmeier at web.de and Prof. Dr. Jessica Freiherr Diagnostic and Interventional Neuroradiology, University of Aachen Pauwelsstr. 30, 52074 Aachen, Germany Pager: +49 241 80 35688 Phone.: +49 241 80 80976 Fax: +49 241 80 3335688 eMail: jfreiherr at ukaachen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 11:39:30 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Wed, 25 Jun 2014 02:39:30 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403689170.25454.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 12:12:31 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Wed, 25 Jun 2014 03:12:31 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Wed Jun 25 13:41:21 2014 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Wed, 25 Jun 2014 13:41:21 +0200 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip Message-ID: Hello, I was checking the one of the Fieldtrip's pages to perform an have change the coordinate system of my electrodes position The page: http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel For doing an alignment, the fiducials positions should be given, I did not have them first, so I use the brainstorm toolbox to get them from the patient MRI. In brainstrom I found this equation for transforming from voxel to mm. (given the voxel size) Position_mm = Position_voxel .* Voxel_size. While in fieldtrip I found another statement which gives (given the transformation matrix) a different answer: warp_apply(vox2head, vox_Nas, 'homogenous'); For example using brainstorm equation I got: NAS = [117.1920 215.8287 118.9998] And using the fieldtrip function, I got: NAS = [14.3973 49.3926 49.6322] What is the difference between the two? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 25 16:10:11 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 25 Jun 2014 16:10:11 +0200 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip In-Reply-To: References: Message-ID: <53AAD843.80208@donders.ru.nl> Dear Hamzi, this might be related to different coordinate systems, see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined FieldTrip is using whatever coordinate system the data was spceified in, and it seems that brainstorm is using some fixed coordinate system and applied a transformation beforehands. you could e.g. notice that in Brainstorm the coordinates for the first and third dimension have about the same value, where in FieldTrip this happens for the second and third value. So I would assume the difference is due to a difference in coordinate systems. Best, Jörn On 6/25/2014 1:41 PM, Hamza Fawzi Altakroury (Alumni) wrote: > Hello, > > I was checking the one of the Fieldtrip's pages to perform an have > change the coordinate system of my electrodes position > > The page: > http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel > > For doing an alignment, the fiducials positions should be given, I did > not have them first, so I use the brainstorm toolbox to get them from > the patient MRI. > > In brainstrom I found this equation for transforming from voxel to mm. > (given the voxel size) > > Position_mm = Position_voxel .* Voxel_size. > > While in fieldtrip I found another statement which gives (given the > transformation matrix) a different answer: > > warp_apply(vox2head, vox_Nas, 'homogenous'); > > > For example using brainstorm equation I got: > > NAS = [117.1920215.8287118.9998] > > > And using the fieldtrip function, I got: > > NAS = [14.397349.392649.6322] > > > What is the difference between the two? > > > Thank you > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jun 25 16:11:49 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 25 Jun 2014 16:11:49 +0200 Subject: [FieldTrip] Large values for output ft_freqanalysis using wavelets In-Reply-To: References: Message-ID: <53AAD8A5.30508@donders.ru.nl> Hi Esther, yes, this can very well be. Note that the time frequency tutorial is on MEG data, where data is usually in the order of 10^-29. Best, Jörn On 6/25/2014 10:20 AM, Esther Eijlers wrote: > Dear all, > > Could someone please tell me whether the large values in my power > spectrum (in the range of hundreds and sometimes even up to a > thousand), can be correct values, or whether something must be going > wrong? > I am using the same settings as specified in the time frequency tutorial. > > Thanks a lot, > Esther > > Disclaimer > ------------------------------------------------------------------------ > De informatie verzonden in dit e-mail bericht is vertrouwelijk en is > uitsluitend bestemd voor de geadresseerde van dit bericht. Lees > verder: www.eur.nl/email-disclaimer > The information in this e-mail message is confidential and may be > legally privileged. Read more: www.eur.nl/english/email-disclaimer > > ------------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jun 25 16:13:38 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 25 Jun 2014 16:13:38 +0200 Subject: [FieldTrip] error in ft_prepare_headmodel In-Reply-To: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> References: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> Message-ID: <53AAD912.7010801@donders.ru.nl> Hi Rasha, could you paste a part of your script and the full error message? Then we would be better able to provide any assistance. Best, Jörn PS: the mail server can be a bit slow sometimes, so please be patient when a mail is not instantaneously delivered. On 6/25/2014 12:12 PM, Rasha Haider wrote: > Dear fieldtrip experts, > I'm trying to construct a head model following the tutorial, but when > I apply the function (ft_prepare_headmodel): > > vol = ft_prepare_headmodel (cfg, segmentedmri); > > I'm having this error: > > Error in ==> ft_prepare_headmodel>prepare_shells at 352 > tissue = ft_getopt(cfg,'tissue'); > > ??? Output argument "bnd" (and maybe others) not assigned during call > to "/Volumes/My Passport/my work/untitled > folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". > > Error in ==> ft_prepare_headmodel at 205 > geometry = prepare_shells(cfg,data); > > although I'm following the tutorial step be step, I think it could be > a bug in the function, can any one help pls. > > Regards > rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From gopalar.ccf at gmail.com Wed Jun 25 19:17:28 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Wed, 25 Jun 2014 13:17:28 -0400 Subject: [FieldTrip] problem with coordsys - neuromag data Message-ID: Dear all, My aim is to use MEG data collected on a neuromag system, perform MNE source analysis and use AAL atlas to extract time series of the anatomical areas. However there seems to be conflicting problems with the coordsys. I tried the following: 1. Kept everything (mri, headmodel, volume) in MNI/SPM coordinate. However, when computing leadfield the gradstruct seems to be in neuromag coordinate. There is no way to change the grad structure from neuromag to spm/mni 2. I tried keeping everything (mri, headmodel, volume) in Neuromag coordinate, and performed source resonstruction. However, to use AAL atlas and source interpolate I need the sources in MNI/SPM coordinates. However, ft_convert_coordsys only supports atlas and mri. I am not sure how to proceed. Any help would be appreciated. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jun 26 10:00:31 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 26 Jun 2014 08:00:31 +0000 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403766371589.36361@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> Message-ID: <1403769631013.86820@flinders.edu.au> ?Hello Fieldtrip, I have been using the LCMV beamformer in fieldtrip for some time now, so I have experience with it. I am facing an issue where whatever data I process I get an image identical to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, tactile tasks etc. Also, whatever I do with the data, the same issue occurs (filtering etc). Attachment 'original_data.png' shows the data before going into the beamformer, and 'virtual_data.png' shows the data after it has run through beamformer. We have tried filtering in every possible combination ie lowpass = 40/30/20, highpass = 1/10/20, we even did a highpass of 100 and it was still identical. We dont think this is a fault of the beamformer, but we cant work out how to get rid of the issue. It is overpowering the other data. We have also had a look at some spectra of the brain region with the high power and a brain region that doesnt have the high power and it appears as though there is higher power over all frequencies. Before asking: -There isnt any muscle, the data was recorded from a paralysed person. -We have tried it on CAR'd data and data that hasnt been CAR'd We are all out of ideas. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original_data.png Type: image/png Size: 341653 bytes Desc: original_data.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source_plot.png Type: image/png Size: 97370 bytes Desc: source_plot.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_data.png Type: image/png Size: 287260 bytes Desc: virtual_data.png URL: From hamzaf at sabanciuniv.edu Thu Jun 26 10:08:55 2014 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Thu, 26 Jun 2014 11:08:55 +0300 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip In-Reply-To: <53AAD843.80208@donders.ru.nl> References: <53AAD843.80208@donders.ru.nl> Message-ID: Thank you Dr. Horschig, I am sorry for writing the first line of my letter wrongly. Hamza On Wed, Jun 25, 2014 at 5:10 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Hamzi, > > this might be related to different coordinate systems, see > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_ > head_and_mri_coordinate_systems_defined > > FieldTrip is using whatever coordinate system the data was spceified in, > and it seems that brainstorm is using some fixed coordinate system and > applied a transformation beforehands. you could e.g. notice that in > Brainstorm the coordinates for the first and third dimension have about the > same value, where in FieldTrip this happens for the second and third value. > So I would assume the difference is due to a difference in coordinate > systems. > > Best, > Jörn > > > On 6/25/2014 1:41 PM, Hamza Fawzi Altakroury (Alumni) wrote: > >> Hello, >> >> I was checking the one of the Fieldtrip's pages to perform an have change >> the coordinate system of my electrodes position >> >> The page: >> http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_ >> positions_to_bem_headmodel >> >> For doing an alignment, the fiducials positions should be given, I did >> not have them first, so I use the brainstorm toolbox to get them from the >> patient MRI. >> >> In brainstrom I found this equation for transforming from voxel to mm. >> (given the voxel size) >> >> Position_mm = Position_voxel .* Voxel_size. >> >> While in fieldtrip I found another statement which gives (given the >> transformation matrix) a different answer: >> >> warp_apply(vox2head, vox_Nas, 'homogenous'); >> >> >> For example using brainstorm equation I got: >> >> NAS = [117.1920215.8287118.9998] >> >> >> And using the fieldtrip function, I got: >> >> NAS = [14.397349.392649.6322] >> >> >> What is the difference between the two? >> >> >> Thank you >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimparkinson at me.com Thu Jun 26 15:12:32 2014 From: jimparkinson at me.com (Jim Parkinson) Date: Thu, 26 Jun 2014 14:12:32 +0100 Subject: [FieldTrip] Possible bug with 'outline' option in ft_singleplotTFR Message-ID: Hi I have been using ft_singleplotTFR along with the 'outline' option to mask areas of the plot as given by an ft_freqstatistics output. I started to notice that the outline didn't match up with what (by eyeball!) should be outlined. So I checked the function by using ft_singleplotTFR cfg = []; cfg.parameter = 'mask'; cfg.channel = 'Cz'; cfg.zlim = [0 1]; % masks cfg.maskparameter = 'mask'; cfg.maskstyle = 'outline'; cfg.renderer = 'opengl'; ft_singleplotTFR(cfg,td); therefore I am plotting the mask data (zeros or ones) and also using that data as the outline parameter - so the outline should be EXACTLY around the RED area (ones), right? This doesn't happen (screencap here: https://www.dropbox.com/s/3lnu4f63wq0zdg2/OutlineDemo.png). However, the 'opacity' and 'saturation' methods work fine, and perfectly bounds the mask area. Has anyone else had this issue with 'outline', have any pointers, or alternatives that are easy to implement. p.s., I've replicated this with all rendering options, on both Mac and Linux Thanks for any help Jim -- Dr Jim Parkinson, D.Phil Postdoctoral Research Fellow Sackler Centre For Consciousness Science School of Psychology University of Sussex Brighton BN1 9QH jimparkinson at me.com j.m.parkinson at sussex.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 26 15:47:07 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 26 Jun 2014 15:47:07 +0200 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403769631013.86820@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> Message-ID: Hi Tyler, You write that you end up with the same result "whatever data you process", so I suspect the raw EEG/MEG data is not to blame. Rather, I suspect something is wrong with your leadfield or one of its ingredients: the volume conductor model, source model, or electrode/gradiometer definitions. It's probably a good idea to check whether these three ingredients all line up. Could you plot them in one set of axes, as described at the end of this section: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel ? Best, Eelke On 26 June 2014 10:00, Tyler Grummett wrote: > Hello Fieldtrip, > > > I have been using the LCMV beamformer in fieldtrip for some time now, so I > have experience with it. > > > I am facing an issue where whatever data I process I get an image identical > to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, > tactile tasks etc. > > Also, whatever I do with the data, the same issue occurs (filtering etc). > > > Attachment 'original_data.png' shows the data before going into the > beamformer, and 'virtual_data.png' shows the data after it has run through > beamformer. > > > We have tried filtering in every possible combination ie lowpass = 40/30/20, > highpass = 1/10/20, we even did a highpass of 100 and it > > was still identical. > > > We dont think this is a fault of the beamformer, but we cant work out how to > get rid of the issue. It is overpowering the other data. > > > We have also had a look at some spectra of the brain region with the high > power and a brain region that doesnt have the high power and it appears > > as though there is higher power over all frequencies. > > > Before asking: > > -There isnt any muscle, the data was recorded from a paralysed person. > > -We have tried it on CAR'd data and data that hasnt been CAR'd > > > We are all out of ideas. > > > Kind regards, > > > Tyler > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.vicente.grab at gmail.com Thu Jun 26 17:14:48 2014 From: a.vicente.grab at gmail.com (Alejandro Vicente Grabovetsky) Date: Thu, 26 Jun 2014 17:14:48 +0200 Subject: [FieldTrip] Realtime Buffer error from Matlab but not in terminal Message-ID: Dear FT, I'm attempting to test the realtime at the DCCN from within the simple tutorial at: http://fieldtrip.fcdonders.nl/faq/how_should_i_get_started_with_the_fieldtrip_realtime_buffer The tutorial works very well from within the terminal, but when I attempt to start an interactive matlab session and do while true hdr = ft_read_header('buffer://localhost:1972') pause(1) end it gives me an error from the "buffer" mex: ERROR: failed to create socket (1) Thanks in advance, Sasha -- Vicente Grabovetsky, Alejandro (Sasha) Postdoctoral researcher Donders Centre for Cognitive Neuroimaging http://www.doellerlab.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From evaladez at psych.udel.edu Thu Jun 26 19:41:15 2014 From: evaladez at psych.udel.edu (Emilio Valadez) Date: Thu, 26 Jun 2014 13:41:15 -0400 Subject: [FieldTrip] Outputting peak z-values from artifact detection Message-ID: <8DC1EA0EB7E3FD419D9B3BE76BD403862C545B6AFB@razor.psych.udel.edu> Hello fieldtrippers! I'm trying to create a simple plot showing the number of trials that will be retained in my data set at various artifact z-value thresholds. To do this, I'll need an output with the peak z-value of every trial. I've tried using ft_artifact_zvalue with the cfg setting "cfg.artfctdef.zvalue.artfctpeak='yes'" but this seems to fill cfg.artfctdef.zvalue.peaks with values that are much, much larger than the peak z-values I see in the interactive window. In fact, the values in cfg.artfctdef.zvalue.peaks look more like time or sample points than z-values, as they are in ascending order and range all the way up to the hundred thousands. I feel I must be missing something obvious. Any suggestions? Thanks in advance for any help! Best, Emilio -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Thu Jun 26 21:29:31 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Thu, 26 Jun 2014 21:29:31 +0200 (CEST) Subject: [FieldTrip] Realtime Buffer error from Matlab but not in terminal In-Reply-To: Message-ID: <2094728179.7647534.1403810971108.JavaMail.root@sculptor.zimbra.ru.nl> Hi Sasha, You are trying to read the header in realtime from the machine where you started the matlab session, i.e. localhost:1972. Is this the same machine where you wrote that header? Best, Arjen ----- Oorspronkelijk bericht ----- > Van: "Alejandro Vicente Grabovetsky" > Aan: fieldtrip at science.ru.nl > Verzonden: Donderdag 26 juni 2014 17:14:48 > Onderwerp: [FieldTrip] Realtime Buffer error from Matlab but not in > terminal > Dear FT, > I'm attempting to test the realtime at the DCCN from within the simple > tutorial at: > http://fieldtrip.fcdonders.nl/faq/how_should_i_get_started_with_the_fieldtrip_realtime_buffer > The tutorial works very well from within the terminal, but when I > attempt to start an interactive matlab session and do > while true > hdr = ft_read_header('buffer://localhost:1972') > pause(1) > end > it gives me an error from the "buffer" mex: > ERROR: failed to create socket (1) > Thanks in advance, > Sasha > -- > Vicente Grabovetsky, Alejandro (Sasha) > Postdoctoral researcher > Donders Centre for Cognitive Neuroimaging > http://www.doellerlab.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jun 27 07:40:51 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jun 2014 07:40:51 +0200 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403831209671.90701@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, so I >> have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image identical >> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >> tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run through >> beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = 40/30/20, >> highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out how to >> get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the high >> power and a brain region that doesnt have the high power and it appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jun 27 07:41:55 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jun 2014 07:41:55 +0200 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: PS: Forwarding your figure to the list. ---------- Forwarded message ---------- From: Eelke Spaak Date: 27 June 2014 07:40 Subject: Re: [FieldTrip] Beamformer confusion To: Email discussion list for the FieldTrip project Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, so I >> have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image identical >> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >> tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run through >> beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = 40/30/20, >> highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out how to >> get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the high >> power and a brain region that doesnt have the high power and it appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel.fig Type: application/octet-stream Size: 60726 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Fri Jun 27 09:16:30 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 27 Jun 2014 09:16:30 +0200 (CEST) Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: <023801cf91d7$b837e220$28a7a660$@herring@fcdonders.ru.nl> Hi Tyler, Although I cannot comment on whether or not something went wrong, as far as I know you shouldn't use single-sphere models in EEG as they do not take into account the difference in conductivity of the various tissue types. At least use a triple sphere model or preferably a BEM of FEM model. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: vrijdag 27 juni 2014 7:42 To: Email discussion list for the FieldTrip project Subject: [FieldTrip] Fwd: Beamformer confusion PS: Forwarding your figure to the list. ---------- Forwarded message ---------- From: Eelke Spaak Date: 27 June 2014 07:40 Subject: Re: [FieldTrip] Beamformer confusion To: Email discussion list for the FieldTrip project Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and > sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl > on behalf of Eelke Spaak > > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_t > he_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett > wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, >> so I have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image >> identical to attachment 'sourceplot.png'. We have tried visual SSR, >> memory tasks, tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run >> through beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = >> 40/30/20, highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out >> how to get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the >> high power and a brain region that doesnt have the high power and it >> appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lzizlsperger at ukaachen.de Fri Jun 27 12:09:16 2014 From: lzizlsperger at ukaachen.de (Zizlsperger, Leopold) Date: Fri, 27 Jun 2014 10:09:16 +0000 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <362E90FB-1198-4D7F-9E73-349E95B0672C@ukaachen.de> Dear All, here's a PhD position I'd like to advertise: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE, RWTH Aachen, GERMANY A research position (PhD student, 50% TV-L 13) is available to study the impact of stroke on visual perception using behavioral methodology combined with fMRI methods. In particular, the research aims to depict the plastic changes in the visual network that are induced by ischemic stroke. Experiments performed with healthy human subjects and directed at studying the neuronal mechanisms underlying sensory decision making will be combined with studies of patients suffering from circumscribed lesions in striate and extrastriate cortex. The project will be conducted at the Departments of Neurology and Neuroradiology and is part of an IZKF funded collaborative project within the Medical faculty of RWTH Aachen University. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. The successful candidate will work within an interdisciplinary team of young researchers at a well-known research institution (www.rwth-aachen.de). The candidate will design and conduct behavioral as well as functional imaging experiments, collect data, perform statistical data analysis (SPSS, Matlab, BrainVoyager and SPM), present the results at national and international meetings and publish research manuscripts. Candidates (Ph.D. students, Ph.D., or M.D.) interested in visual perception, cognitive psychology, or clinical psychology are particularly encouraged to apply. Very good English communication and writing skills are expected. The position requires a strong interest in research questions and experimental skills combined with a high level of motivation, team-orientation as well as the ability to solve problems independently. Programming skills in Matlab are considered a plus. Qualified women are explicitly invited to apply and handicapped candidates with equal qualification will be given preference. Please send your CV, publication record, and the names of two references (preferably by e-mail) to: Prof. Dr. Thomas Haarmeier Department of Neurology, University of Aachen Pauwelsstraße 30, 52074 Aachen, Germany Phone: +49 241 80-89603 Secr: +49 241 80-89601 Fax: +49 241 80-82582 e-mail: thaarmeier at web.de and Prof. Dr. Jessica Freiherr Diagnostic and Interventional Neuroradiology, University of Aachen Pauwelsstr. 30, 52074 Aachen, Germany Pager: +49 241 80 35688 Phone.: +49 241 80 80976 Fax: +49 241 80 3335688 eMail: jfreiherr at ukaachen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Fri Jun 27 12:51:11 2014 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Fri, 27 Jun 2014 11:51:11 +0100 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: <53AD4C9F.90809@uni-leipzig.de> Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock From tyler.grummett at flinders.edu.au Mon Jun 30 03:42:53 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 01:42:53 +0000 Subject: [FieldTrip] ft_sensorrealign Message-ID: <1404092572773.3933@flinders.edu.au> Hello fieldtrip, I dont know if this is a bug or not, but I am trying to use the electrode positions from a template file in fieldtrip using the following code: cfg = []; cfg.method = 'template'; cfg.target = 'fieldtrip\template\electrode\standard_1005.elec' ft_sensorrealign( cfg, data.elec) and I get the following error: Reference to non-existent field 'pnt'. Error in ft_sensorrealign (line 306) template(i).pnt = template(i).pnt(datsel,:); Am I using this wrong? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jun 30 04:17:53 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 02:17:53 +0000 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <53AD4C9F.90809@uni-leipzig.de> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> , <53AD4C9F.90809@uni-leipzig.de> Message-ID: <1404094672818.50881@flinders.edu.au> Hello all, Thank you for the quick replies, I greatly appreciate it. I recalculated vol using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); cfg = []; cfg.write = 'no'; cfg.coordsys = 'mni'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! Mesh Info : # points : 3000 # triangles : 5996 Euler characteristic : 2 Min Area : 2.44949 Max Area : 58.4166 Self intersection for mesh number 0 C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 | ------ om_minverser | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin | ----------------------- Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... Error using fread Invalid file identifier. Use fopen to generate a valid file identifier. the call to "ft_prepare_headmodel" took 21 seconds I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better. I just tried to prepare the leadfield and got the following error: ************************* No system matrix is present, calling the Nemo Lab pipeline... om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 Not enough arguments Please try "om_assemble -h" or "om_assemble --help " Writing sensor coordinates... Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 113) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Error in ft_compute_leadfield (line 442) lf = ft_leadfield_openmeeg(pos, vol, sens); Error in ft_prepare_leadfield (line 187) lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam); ************************* So it looks like I need to sort this issue out before I can proceed. Thank you for all your help again! Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Matt Craddock Sent: Friday, 27 June 2014 8:21 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.fig Type: application/octet-stream Size: 47769 bytes Desc: sensor positions_sourcemodel_new.fig URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.png Type: image/png Size: 6055 bytes Desc: sensor positions_sourcemodel_new.png URL: From roeysc at gmail.com Mon Jun 30 08:47:02 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 30 Jun 2014 09:47:02 +0300 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <1404094672818.50881@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> <53AD4C9F.90809@uni-leipzig.de> <1404094672818.50881@flinders.edu.au> Message-ID: Dear Tyler, Perhaps you'll find this old post helpful: http://mailman.science.ru.nl/pipermail/fieldtrip/2014-January/007437.html it holds a piece of code that uses the iso2mesh option added by Daniel Wong, Sarang Dalal, and Robert Oostenveld, that solves such cases of intersecting meshes. Hope this helps! Best, roey On Mon, Jun 30, 2014 at 5:17 AM, Tyler Grummett < tyler.grummett at flinders.edu.au> wrote: > Hello all, > > Thank you for the quick replies, I greatly appreciate it. > > I recalculated vol using the following code: > > mri = ft_read_mri( 'Subject01.mri'); > mri = ft_volumenormalise( [], mri); > mri = ft_volumereslice([], mri); > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'mni'; > segmentedmri = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.method = 'openmeeg'; > vol = ft_prepare_headmodel(cfg, segmentedmri); > > However I got the following error when using openmeeg (I followed the > instructions on how to install the binary files from openmeeg). > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > !!!!!!!!!!! WARNING !!!!!!!!!!! > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Mesh is self intersecting ! > Mesh Info : > # points : 3000 > # triangles : 5996 > Euler characteristic : 2 > Min Area : 2.44949 > Max Area : 58.4166 > Self intersection for mesh number 0 > > C:\Users\grum0003\AppData\Local\Temp>om_minverser > ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin > ./tp844032d5_1439_4794_b28e_c554e265bca8.bin > om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 > > > | ------ om_minverser > | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin > | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin > | ----------------------- > Exception: Unable to open the file > ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... > Error using fread > Invalid file identifier. Use fopen to generate a valid file identifier. > the call to "ft_prepare_headmodel" took 21 seconds > > > I am still able to generate a boundary element model (see attached). > Please inform me if they are correct. I had some issues with > ft_sensorrealign and using openmeeg. However it is looking a lot better. > > I just tried to prepare the leadfield and got the following error: > > ************************* > > No system matrix is present, calling the Nemo Lab pipeline... > om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 > > Not enough arguments > Please try "om_assemble -h" or "om_assemble --help " > > Writing sensor coordinates... > Error using fprintf > Invalid file identifier. Use fopen to generate a valid file identifier. > > Error in ft_leadfield_openmeeg (line 113) > fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, > sens.chanpos(ii,:)); > > Error in ft_compute_leadfield (line 442) > lf = ft_leadfield_openmeeg(pos, vol, sens); > > Error in ft_prepare_leadfield (line 187) > lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, > 'reducerank', > cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', > cfg.normalizeparam); > ************************* > > So it looks like I need to sort this issue out before I can proceed. > > Thank you for all your help again! > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl > on behalf of Matt Craddock > Sent: Friday, 27 June 2014 8:21 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Fwd: Beamformer confusion > > Hi Tyler, > > From the plot, it looks like the volume conductor is singlesphere but > the sourcemodel is derived from the standard boundary element model, and > the electrodes are then not aligned to either of them. First up, I'd > suggest using the standard BEM as your volume conductor and see if that > helps. The electrode positions may be the next thing to fix - they might > re-align automatically properly, in which case you won't need to do > anything. If they have standard 1020/1005 co-ordinates, they should be > aligned fine already, but if not you could try replacing the positions > in your dataset with the standard positions (i.e. if you have an Fp1, > take the Fp1 co-ordinates from the templates in the > fieldtrip\template\electrode directory). > > Cheers, > Matt > > On 27/06/2014 06:41, Eelke Spaak wrote: > > PS: Forwarding your figure to the list. > > > > > > ---------- Forwarded message ---------- > > From: Eelke Spaak > > Date: 27 June 2014 07:40 > > Subject: Re: [FieldTrip] Beamformer confusion > > To: Email discussion list for the FieldTrip project < > fieldtrip at donders.ru.nl> > > > > > > Hi Tyler, > > > > First, please send your messages to the list, so that others may > > benefit (now or in the future through the archives). > > > > Then, regarding your plot, indeed I think there might be something > > wrong (though I am not sure). You are looking for a proper alignment > > between the sensors (I have colored them red to be able to better > > see), the source model (grid points for beamforming) and the volume > > conductor model (translucent mesh; sphere in your case). I have never > > used a single sphere model myself, so I cannot really comment on > > whether the sphere aligns properly. However, I would suspect not, > > since there are grid points located outside the sphere. Also, the > > sensors might not be properly located, some are intersecting the body > > of grid points. > > > > But I do seem to recall that sensors are automatically projected to > > the volume conductor surface in the case of EEG. Maybe someone who has > > EEG source modelling experience can comment on this (and your figure)? > > I usually only work with MEG, so I don't have the same intuition for > > your kind of plot as with an analogous plot for MEG. > > > > The following tutorial might be very helpful for you, by the way: > > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > > > Best, > > Eelke > > > > On 27 June 2014 03:06, Tyler Grummett > wrote: > >> Hello Eelke, > >> > >> Thank you for replying to my email. > >> > >> I have attached an image with the requested sourcemodel positions and > sensor positions. > >> > >> I dont really know how to interpret the figures to be honest. > >> > >> I have attached a .fig figure so that you can have a play with it. > >> > >> Tyler > >> > >> ************************* > >> > >> Tyler Grummett ( BBSc, BSc(Hons I)) > >> PhD Candidate > >> Brain Signals Laboratory > >> Flinders University > >> Rm 5A301 > >> Ext 66124 > >> > >> ________________________________________ > >> From: fieldtrip-bounces at science.ru.nl > on behalf of Eelke Spaak > >> Sent: Thursday, 26 June 2014 11:17 PM > >> To: FieldTrip discussion list > >> Subject: Re: [FieldTrip] Beamformer confusion > >> > >> Hi Tyler, > >> > >> You write that you end up with the same result "whatever data you > >> process", so I suspect the raw EEG/MEG data is not to blame. > >> > >> Rather, I suspect something is wrong with your leadfield or one of its > >> ingredients: the volume conductor model, source model, or > >> electrode/gradiometer definitions. It's probably a good idea to check > >> whether these three ingredients all line up. Could you plot them in > >> one set of axes, as described at the end of this section: > >> > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > >> ? > >> > >> Best, > >> Eelke > >> > >> On 26 June 2014 10:00, Tyler Grummett > wrote: > >>> Hello Fieldtrip, > >>> > >>> > >>> I have been using the LCMV beamformer in fieldtrip for some time now, > so I > >>> have experience with it. > >>> > >>> > >>> I am facing an issue where whatever data I process I get an image > identical > >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, > >>> tactile tasks etc. > >>> > >>> Also, whatever I do with the data, the same issue occurs (filtering > etc). > >>> > >>> > >>> Attachment 'original_data.png' shows the data before going into the > >>> beamformer, and 'virtual_data.png' shows the data after it has run > through > >>> beamformer. > >>> > >>> > >>> We have tried filtering in every possible combination ie lowpass = > 40/30/20, > >>> highpass = 1/10/20, we even did a highpass of 100 and it > >>> > >>> was still identical. > >>> > >>> > >>> We dont think this is a fault of the beamformer, but we cant work out > how to > >>> get rid of the issue. It is overpowering the other data. > >>> > >>> > >>> We have also had a look at some spectra of the brain region with the > high > >>> power and a brain region that doesnt have the high power and it appears > >>> > >>> as though there is higher power over all frequencies. > >>> > >>> > >>> Before asking: > >>> > >>> -There isnt any muscle, the data was recorded from a paralysed person. > >>> > >>> -We have tried it on CAR'd data and data that hasnt been CAR'd > >>> > >>> > >>> We are all out of ideas. > >>> > >>> > >>> Kind regards, > >>> > >>> > >>> Tyler > > > > -- > Dr. Matt Craddock > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jun 30 08:54:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 06:54:17 +0000 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <1404094672818.50881@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> , <53AD4C9F.90809@uni-leipzig.de>,<1404094672818.50881@flinders.edu.au> Message-ID: <1404111256856.12754@flinders.edu.au> Hello all, An update on this is that the openmeeg download page in the fieldtrip page: http://fieldtrip.fcdonders.nl/faq/how_can_i_use_openmeeg_for_forward_modelling https://gforge.inria.fr/frs/?group_id=435 should be: http://openmeeg.gforge.inria.fr/download/ because I downloaded the latest version, which was more up to date relative to the first website. I have checked and everything is now running smoothly. See attached, my only concern is that the there are some inside positions that are clearly located outside of the headmodel. Could this be the cause of the noisy data? I calculate the sourcemodel using the following code: template = load( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', 'template', 'sourcemodel', 'standard_sourcemodel3d10mm.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; sourcemodel = ft_prepare_sourcemodel( cfg); I then calculate the headmodel using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); mri.coordsys = 'spm'; cfg = []; cfg.write = 'no'; segmentedmri = ft_volumesegment(cfg, mri); Just to check I am doing it right (as per the tutorial) segmentedmri.transform = mri.transform; segmentedmri.anatomy = mri.anatomy; figure cfg = []; ft_sourceplot(cfg,segmentedmri); %only mri figure cfg.funparameter = 'gray'; ft_sourceplot(cfg,segmentedmri); %segmented gray matter on top figure cfg.funparameter = 'white'; ft_sourceplot(cfg,segmentedmri); %segmented white matter on top figure cfg.funparameter = 'csf'; ft_sourceplot(cfg,segmentedmri); %segmented csf matter on top cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); vol = ft_convert_units( vol, 'cm'); And then I get the attached source plot Also attached is the data that comes out of it, I evidently still have a problem. I am all out of ideas. Thank you again. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Monday, 30 June 2014 11:47 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hello all, Thank you for the quick replies, I greatly appreciate it. I recalculated vol using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); cfg = []; cfg.write = 'no'; cfg.coordsys = 'mni'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! Mesh Info : # points : 3000 # triangles : 5996 Euler characteristic : 2 Min Area : 2.44949 Max Area : 58.4166 Self intersection for mesh number 0 C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 | ------ om_minverser | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin | ----------------------- Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... Error using fread Invalid file identifier. Use fopen to generate a valid file identifier. the call to "ft_prepare_headmodel" took 21 seconds I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better. I just tried to prepare the leadfield and got the following error: ************************* No system matrix is present, calling the Nemo Lab pipeline... om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 Not enough arguments Please try "om_assemble -h" or "om_assemble --help " Writing sensor coordinates... Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 113) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Error in ft_compute_leadfield (line 442) lf = ft_leadfield_openmeeg(pos, vol, sens); Error in ft_prepare_leadfield (line 187) lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam); ************************* So it looks like I need to sort this issue out before I can proceed. Thank you for all your help again! Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Matt Craddock Sent: Friday, 27 June 2014 8:21 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.fig Type: application/octet-stream Size: 193506 bytes Desc: sensor positions_sourcemodel_new.fig URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_data.png Type: image/png Size: 184000 bytes Desc: virtual_data.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source_plot_new.png Type: image/png Size: 45643 bytes Desc: source_plot_new.png URL: From eelke.spaak at donders.ru.nl Mon Jun 30 09:09:15 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 30 Jun 2014 09:09:15 +0200 Subject: [FieldTrip] Possible bug with 'outline' option in ft_singleplotTFR In-Reply-To: References: Message-ID: Hi Jim, That indeed sounds like a possible bug. I have filed it on our bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2627 I tried to add you as CC on the bug, but it seems to have failed. Please register an account there and add yourself as CC to keep up to date on the bug. Thanks for letting us know. Best, Eelke On 26 June 2014 15:12, Jim Parkinson wrote: > Hi > > I have been using ft_singleplotTFR along with the 'outline' option to mask > areas of the plot as given by an ft_freqstatistics output. I started to > notice that the outline didn't match up with what (by eyeball!) should be > outlined. > > So I checked the function by using ft_singleplotTFR > cfg = []; > cfg.parameter = 'mask'; > cfg.channel = 'Cz'; > cfg.zlim = [0 1]; > > % masks > cfg.maskparameter = 'mask'; > cfg.maskstyle = 'outline'; > > cfg.renderer = 'opengl'; > ft_singleplotTFR(cfg,td); > > therefore I am plotting the mask data (zeros or ones) and also using that > data as the outline parameter - so the outline should be EXACTLY around the > RED area (ones), right? This doesn't happen (screencap here: > https://www.dropbox.com/s/3lnu4f63wq0zdg2/OutlineDemo.png). > > However, the 'opacity' and 'saturation' methods work fine, and perfectly > bounds the mask area. Has anyone else had this issue with 'outline', have > any pointers, or alternatives that are easy to implement. > > p.s., I've replicated this with all rendering options, on both Mac and Linux > > Thanks for any help > > Jim > > > > -- > > Dr Jim Parkinson, D.Phil > > Postdoctoral Research Fellow > > Sackler Centre For Consciousness Science > > School of Psychology > > University of Sussex > > Brighton > > BN1 9QH > > > jimparkinson at me.com > > j.m.parkinson at sussex.ac.uk > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Mon Jun 30 11:19:25 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 30 Jun 2014 11:19:25 +0200 Subject: [FieldTrip] re-referencing EEG signals Message-ID: Dear all, I was wondering if re-referencing of EEG signals should be done before trial definition or after all the preprocessing have been done. Would it make a difference in terms of statistical analyses? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 30 15:26:37 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 30 Jun 2014 15:26:37 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: Message-ID: <53B1658D.40003@donders.ru.nl> Dear Hweeling, re-referencing is a linear step and can be done at any time preceding any non-linear transformation, e.g. computing a power spectrum. So it depends on what type of preprocessing you have planned, but for the most usual preprocessing steps the answer is that it would not make any difference when exactly you are doing this. Best, Jörn On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before > trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mcantor at umich.edu Mon Jun 30 15:02:16 2014 From: mcantor at umich.edu (Max Cantor) Date: Mon, 30 Jun 2014 09:02:16 -0400 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: Message-ID: Re-referencing is a linear operation, so it shouldn't matter if you do it in the preprocessing or epoching steps. Hope that helps, Max On Mon, Jun 30, 2014 at 5:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before > trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Mon Jun 30 17:15:52 2014 From: david.m.groppe at gmail.com (David Groppe) Date: Mon, 30 Jun 2014 11:15:52 -0400 Subject: [FieldTrip] Postdoc opening in multimodal human brain mapping/modulation & epilepsy Message-ID: Post doctoral position available for research using a multimodal approach to investigate brain organization and function at the Hofstra University-North Shore LIJ School of Medicine in partnership with the Feinstein Institute for Medical Research. Studies involve surgical epilepsy patients undergoing intracranial electrophysiological monitoring for seizure detection and functional electrical stimulation mapping. Ongoing research projects include: 1) Validation of task-based and resting state fMRI and DTI using electrical stimulation mapping, electrocorticography and corticocortical evoked potentials; 2) Investigation of the neuronal dynamics underlying selective attention and active sensing, language, object identification and auditory stream analysis; 3) Modulation of neuronal function by direct cortical stimulation and investigation of the mechanisms of TMS, tDCS and tACS; 4) Prediction of seizure spread using electrophysiological and MRI markers. Responsibilities will include designing fMRI, ECoG and neurostimulation experiments and data analysis and the coordination of access to patients for research studies. Located in Long Island, 10 miles from Manhattan, there is tremendous opportunity for involvement with collaborative effort with multiple research groups the area with similar interests. Candidates should have M.D. and/or Ph.D. degrees and have some background in fMRI, electrophysiology, and/or data analysis (Matlab). Ideal start date would be between 9/2014-1/2015. For more information about the lab see: http://www.feinsteininstitute.org/faculty/ashesh-mehta-md-phd/ If interested, please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Jun 30 22:57:06 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 30 Jun 2014 22:57:06 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: <53B1658D.40003@donders.ru.nl> References: <53B1658D.40003@donders.ru.nl> Message-ID: Hi, Thanks, Max and Joern. Another question, is there an easier way to re-reference the EEG signals to an averaged montage? Cheers, Hweeling On 30 June 2014 15:26, "Jörn M. Horschig" wrote: > Dear Hweeling, > > re-referencing is a linear step and can be done at any time preceding any > non-linear transformation, e.g. computing a power spectrum. So it depends > on what type of preprocessing you have planned, but for the most usual > preprocessing steps the answer is that it would not make any difference > when exactly you are doing this. > > Best, > Jörn > > > On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > >> Dear all, >> >> I was wondering if re-referencing of EEG signals should be done before >> trial definition or after all the preprocessing have been done. >> >> Would it make a difference in terms of statistical analyses? >> >> Thanks. >> >> Best regards, >> Hweeling >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Jun 30 23:13:06 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 30 Jun 2014 23:13:06 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: <53B1658D.40003@donders.ru.nl> Message-ID: <0875E786-4FAC-441F-91A2-099ACAE2443C@uni-konstanz.de> Hi Hweeling, > > > Another question, is there an easier way to re-reference the EEG signals to an averaged montage? yes quite easy. Just specify cfg.reref = ‘yes’; and cfg.refchannel = ‘all’; during the call to ft_preprocessing. best tzvetan > > Cheers, > Hweeling > > > > On 30 June 2014 15:26, "Jörn M. Horschig" wrote: > Dear Hweeling, > > re-referencing is a linear step and can be done at any time preceding any non-linear transformation, e.g. computing a power spectrum. So it depends on what type of preprocessing you have planned, but for the most usual preprocessing steps the answer is that it would not make any difference when exactly you are doing this. > > Best, > Jörn > > > On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Sun Jun 1 09:11:10 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 1 Jun 2014 09:11:10 +0200 Subject: [FieldTrip] source resampling In-Reply-To: References: Message-ID: Dear Azeez, After source analysis, if you interpolate (using ft_sourceinterpolate) the source results (at 8 mm resolution) onto another volume that has a 1 mm resolution, it will be upsampled. Best, Eelke On 28 May 2014 17:36, Azeez Adebimpe wrote: > Dear all > > > I calculated my leadfield or grid with 8 mm resolution. > Please is there anyway after or before source interpolation or before to > resample the source to 1 mm resolution. > > merci! > > > > Azeez A. Adebimpe > > > "Knowledge and good manner, the beauty of a man" > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rikkert.hindriks at upf.edu Sun Jun 1 13:06:29 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Sun, 1 Jun 2014 13:06:29 +0200 Subject: [FieldTrip] (no subject) Message-ID: Dear all, I'm having trouble installing openMEEG under Windows for use in ft_prepare_headmodel. After running the installation, the comment system(om_assemble) returns non-zero value, meaning that the installation has not been succesfull. FYI I installed openMEEG inside the Fieldtrip folder. Does anyone has encountered the same problem and help me out? Much appreciated! Rikkert -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sun Jun 1 13:21:40 2014 From: roeysc at gmail.com (Roey) Date: Sun, 1 Jun 2014 14:21:40 +0300 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Rikkert, From my experience it is not possible yet to prepare a head model using OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not mistaken, this is also documented in the ft_prepare_headmodel code. Hopefully some more optimistic answers will be given here :) Best, Roey ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" כתב/ה: > Dear all, > > I'm having trouble installing openMEEG under Windows for use in ft_prepare_headmodel. After running the installation, > the comment system(om_assemble) returns non-zero value, meaning that the installation has not been succesfull. FYI I installed openMEEG inside the Fieldtrip folder. Does anyone has encountered the same problem and help me out? > > Much appreciated! > Rikkert > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Sun Jun 1 13:29:01 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Sun, 1 Jun 2014 13:29:01 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Hi Roey, Ok, thats clear! Thanks Rikkert On Sun, Jun 1, 2014 at 1:21 PM, Roey wrote: > Dear Rikkert, > From my experience it is not possible yet to prepare a head model using > OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not > mistaken, this is also documented in the ft_prepare_headmodel code. > Hopefully some more optimistic answers will be given here :) > Best, > Roey > > > > ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" > כתב/ה: > > Dear all, > > I'm having trouble installing openMEEG under Windows for use in > ft_prepare_headmodel. After running the installation, > the comment system(om_assemble) returns non-zero value, meaning that the > installation has not been succesfull. FYI I installed openMEEG inside the > Fieldtrip folder. Does anyone has encountered the same problem and help me > out? > > Much appreciated! > Rikkert > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Sun Jun 1 23:58:35 2014 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Sun, 1 Jun 2014 23:58:35 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: hi, OpenMEEG runs on windows and Brainstorm makes it work from Matlab. So I guess it should be doable from Fieldtrip too. Alex On Sun, Jun 1, 2014 at 1:29 PM, HINDRIKS, RIKKERT wrote: > Hi Roey, > > Ok, thats clear! > > Thanks > Rikkert > > > On Sun, Jun 1, 2014 at 1:21 PM, Roey wrote: >> >> Dear Rikkert, >> From my experience it is not possible yet to prepare a head model using >> OpenMEEG on Windows, and this has to be done using Linux or Mac (if I'm not >> mistaken, this is also documented in the ft_prepare_headmodel code. >> Hopefully some more optimistic answers will be given here :) >> Best, >> Roey >> >> >> >> ב-1 ביונ 2014, בשעה 14:06, "HINDRIKS, RIKKERT" >> כתב/ה: >> >> Dear all, >> >> I'm having trouble installing openMEEG under Windows for use in >> ft_prepare_headmodel. After running the installation, >> the comment system(om_assemble) returns non-zero value, meaning that the >> installation has not been succesfull. FYI I installed openMEEG inside the >> Fieldtrip folder. Does anyone has encountered the same problem and help me >> out? >> >> Much appreciated! >> Rikkert >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From spa268 at nyu.edu Mon Jun 2 09:39:57 2014 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Mon, 2 Jun 2014 08:39:57 +0100 Subject: [FieldTrip] Defining a custom statfun for cluster statistics Message-ID: Hello all, Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki. I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it. Thanks! Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 2 10:01:15 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 2 Jun 2014 10:01:15 +0200 (CEST) Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: Message-ID: <69733282.7184003.1401696075987.JavaMail.root@sculptor.zimbra.ru.nl> Hi Stephen, You can take a look to ft_statfun_diff.m function: it's a good example to start with. You might also want to take a look here: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests Regarding the abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)), I'm not sure what the output of your statistic would mean. best, Diego ----- Original Message ----- > From: "Stephen Politzer-Ahles" > To: fieldtrip at donders.ru.nl > Sent: Monday, 2 June, 2014 9:39:57 AM > Subject: [FieldTrip] Defining a custom statfun for cluster statistics > Hello all, > Are there any examples for defining a new statfun to use in > ft_timelockstatistics? I thought there were, but can't currently find > them on the wiki. > I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, > and IIb), and I an only interested in a certain kind of interaction, > one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an > effect of the second factor at just one level of the first factor, and > not the other level). So rather than using F as my test statistic for > defining clusters, I would like to use something like > abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define > the function to do this; if anyone could point me in the right > direction I would greatly appreciate it. > Thanks! > Steve > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.leszczynski.m at gmail.com Mon Jun 2 10:01:34 2014 From: m.leszczynski.m at gmail.com (Marcin) Date: Mon, 2 Jun 2014 10:01:34 +0200 Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: References: Message-ID: Hey Steve, this might give you a hint: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html Best, Marcin 2014-06-02 9:39 GMT+02:00 Stephen Politzer-Ahles : > Hello all, > > Are there any examples for defining a new statfun to use in > ft_timelockstatistics? I thought there were, but can't currently find them > on the wiki. > > I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and > IIb), and I an only interested in a certain kind of interaction, one where > abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the > second factor at just one level of the first factor, and not the other > level). So rather than using F as my test statistic for defining clusters, > I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I > just don't know how to define the function to do this; if anyone could > point me in the right direction I would greatly appreciate it. > > Thanks! > Steve > > > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Mon Jun 2 10:51:38 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 2 Jun 2014 10:51:38 +0200 (CEST) Subject: [FieldTrip] Defining a custom statfun for cluster statistics In-Reply-To: References: Message-ID: <010d01cf7e3f$dd9654d0$98c2fe70$@herring@fcdonders.ru.nl> Hi Steve, If I understand you correctly you basically want to test a one-sided interaction effect, which boils down to doing a one-sided dependent samples t-test between the difference scores of condition I vs the difference scores of condition II. So, first you would have to calculate the difference timeseries diff_I(Ia – Ib) and diff_II(IIa-IIb). Then you run ft_timelockstatistics using statfun_depsamplesT on diff_I vs diff_II testing one-sided only looking at positive clusters (If you expect that diff_I > diff_II ). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Stephen Politzer-Ahles Sent: maandag 2 juni 2014 9:40 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Defining a custom statfun for cluster statistics Hello all, Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki. I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it. Thanks! Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 03:04:50 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 01:04:50 +0000 Subject: [FieldTrip] convert mri headmodel from ctf to mni Message-ID: <1401757472326.35223@flinders.edu.au> hello fieldtrippers, I recently worked out how to create virtual channels using beamformer and an atlas. However, now i have the problem of plotting the data using ft_sourceplot. The atlas has mni coordinates, but the mri headmodel has ctf coordinates. atlas = dim: [91 109 91] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' tissue: [91x109x91 double] tissuelabel: {116x1 cell} coordsys: 'mni' mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Is there a way to change either so that I can plot the data? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 03:39:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 01:39:17 +0000 Subject: [FieldTrip] ft_mvaranalysis Message-ID: <1401759539185.62016@flinders.edu.au> Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 07:29:55 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 05:29:55 +0000 Subject: [FieldTrip] averaging over frequency Message-ID: <1401773376603.4016@flinders.edu.au> ?Hello fieldtrippers, Is there any way to average over frequency after using the function ft_freqanalysis? I am trying to separate my data into bands, rather than individual frequencies. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:19:07 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:19:07 +0200 Subject: [FieldTrip] convert mri headmodel from ctf to mni In-Reply-To: <1401757472326.35223@flinders.edu.au> References: <1401757472326.35223@flinders.edu.au> Message-ID: <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> Hi Tyler, Try using ft_volumenormalise on your variabl mri. JM On Jun 3, 2014, at 3:04 AM, Tyler Grummett wrote: > hello fieldtrippers, > > I recently worked out how to create virtual channels using beamformer and an atlas. > > However, now i have the problem of plotting the data using ft_sourceplot. > > The atlas has mni coordinates, but the mri headmodel has ctf coordinates. > > atlas = > > dim: [91 109 91] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' > tissue: [91x109x91 double] > tissuelabel: {116x1 cell} > coordsys: 'mni' > > mri = > > anatomy: [256x256x256 double] > dim: [256 256 256] > transform: [4x4 double] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > Is there a way to change either so that I can plot the data? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:19:55 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:19:55 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401759539185.62016@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au> Message-ID: <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> Hi Tyler, Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett wrote: > Hello fieldtrippers, > > Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); > > The error message is: > > Undefined function 'mvar' for input arguments of type 'double'. > > ​Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? > > I swear this has worked before on old data, and I didnt update the toolbox between trying it > with the old data and with the new data. I have now updated the fieldtrip toolbox and I have > tried running the code again, but no luck. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:20:44 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:20:44 +0200 Subject: [FieldTrip] averaging over frequency In-Reply-To: <1401773376603.4016@flinders.edu.au> References: <1401773376603.4016@flinders.edu.au> Message-ID: Hi Tyler, Try using ft_selectdata with the option cfg.avgoverfreq. Best, Jan-Mathijs On Jun 3, 2014, at 7:29 AM, Tyler Grummett wrote: > ​Hello fieldtrippers, > > Is there any way to average over frequency after using the function ft_freqanalysis? > > I am trying to separate my data into bands, rather than individual frequencies. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:32:44 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:32:44 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> Message-ID: <1401780746302.15342@flinders.edu.au> Using the same code it generates the error: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, Try using ft_hastoolbox('bsmart',1) and then in the cfg for ft_mvaranalysis cfg.toolbox = 'bsmart' Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 3 09:36:13 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jun 2014 09:36:13 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401780746302.15342@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au> Message-ID: This is a low level matlab error and suggests a problem with your data. On Jun 3, 2014, at 9:32 AM, Tyler Grummett wrote: > Using the same code it generates the error: > > Error using chol > Matrix must be positive definite. > > Error in armorf (line 40) > ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); > > Error in ft_mvaranalysis (line 395) > [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), > cfg.order); > > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen > Sent: Tuesday, 3 June 2014 4:49 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ > > Best, > Jan-Mathijs > > On Jun 3, 2014, at 3:39 AM, Tyler Grummett wrote: > >> Hello fieldtrippers, >> >> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); >> >> The error message is: >> >> Undefined function 'mvar' for input arguments of type 'double'. >> >> ​Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? >> >> I swear this has worked before on old data, and I didnt update the toolbox between trying it >> with the old data and with the new data. I have now updated the fieldtrip toolbox and I have >> tried running the code again, but no luck. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:36:05 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:36:05 +0000 Subject: [FieldTrip] averaging over frequency In-Reply-To: References: <1401773376603.4016@flinders.edu.au>, Message-ID: <1401780946595.70725@flinders.edu.au> ?Excellent, thank you!! Now I know this function exists, I hopefully wont ask more of these questions. ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:50 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] averaging over frequency Hi Tyler, Try using ft_selectdata with the option cfg.avgoverfreq. Best, Jan-Mathijs On Jun 3, 2014, at 7:29 AM, Tyler Grummett > wrote: ?Hello fieldtrippers, Is there any way to average over frequency after using the function ft_freqanalysis? I am trying to separate my data into bands, rather than individual frequencies. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:43:06 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:43:06 +0000 Subject: [FieldTrip] convert mri headmodel from ctf to mni In-Reply-To: <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> References: <1401757472326.35223@flinders.edu.au>, <1C85B46B-7D71-407C-A7F8-84587ED6E93D@donders.ru.nl> Message-ID: <1401781368318.8277@flinders.edu.au> ?JM, This worked well. I have used it in this order: ft_read_mri ft_volumenormalise ft_volumereslice Is that the correct order? Or doesnt it matter as such? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] convert mri headmodel from ctf to mni Hi Tyler, Try using ft_volumenormalise on your variabl mri. JM On Jun 3, 2014, at 3:04 AM, Tyler Grummett > wrote: hello fieldtrippers, I recently worked out how to create virtual channels using beamformer and an atlas. However, now i have the problem of plotting the data using ft_sourceplot. The atlas has mni coordinates, but the mri headmodel has ctf coordinates. atlas = dim: [91 109 91] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' tissue: [91x109x91 double] tissuelabel: {116x1 cell} coordsys: 'mni' mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Is there a way to change either so that I can plot the data? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jun 3 09:50:56 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 07:50:56 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, Message-ID: <1401781837723.25460@flinders.edu.au> JM, My data has the following format: data = fsample: 500 sampleinfo: [14x2 double] trial: {1x14 cell} time: {1x14 cell} label: {1x116 cell} cfg: [1x1 struct] I had a look and there are no NaNs or anything. I have tried running using the coherence method for connectivity analysis (hence I didnt need to use mvaranalysis) and it seemed to work fine. Can you give me any suggestions as to what the problems with my data could be? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, 3 June 2014 5:06 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis This is a low level matlab error and suggests a problem with your data. On Jun 3, 2014, at 9:32 AM, Tyler Grummett > wrote: Using the same code it generates the error: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > Sent: Tuesday, 3 June 2014 4:49 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, Try using ft_hastoolbox('bsmart',1) and then in the cfg for ft_mvaranalysis cfg.toolbox = 'bsmart' Best, Jan-Mathijs On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: Hello fieldtrippers, Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); The error message is: Undefined function 'mvar' for input arguments of type 'double'. ?Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? I swear this has worked before on old data, and I didnt update the toolbox between trying it with the old data and with the new data. I have now updated the fieldtrip toolbox and I have tried running the code again, but no luck. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Jun 3 10:28:12 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 3 Jun 2014 08:28:12 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Dear Kousik, The solution that you propose requires the use of Freesurfer to create the sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, how could I constrain it to calculate leadfields for points inside the brain? I tried to restrict the ft_sourceanalysis by including only the points of the grid that are inside the brain, but I still get the SVD error. I checked the NaN values of vol.mat and all the elements on this matrix are NaN. I suppose that’s where the error is, however I don’t know how to correct for it, because I just generate the volume structure from the mesh (see first message). Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 18:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Oh. Yes. FT puts NaN's into sourcespace points outside the brain. You can constrain FT to only calculate leadfields for sourcespace points inside the brain. I generally do this. I don't know how FT handles those outside the brain source points really. You could give this a try. Check this tutorial/code: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. There are none. However, I checked for NaN values in grid.leadfield and it has some. I thought that these were NaN values in the points of the grid outside a brain region, but I might be mistaken. grid = xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] dim: [17 13 14] pos: [3094x3 double] unit: 'mm' inside: [1x1516 double] outside: [1x1578 double] cfg: [1x1 struct] leadfield: {1x3094 cell} Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Ah. Interesting. Good that error changes. So that was the problem before. Now, can you check if your Freq matrices contain any NaN's (isnan(freqAll))? It can happen sometimes. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked the labels and they were the same, except for whether they were in capital letters. So I added the following before ft_sourceanalysis: freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); This way the labels of the elec structure and freqAll are in capital letters. And now I get a different error (although still within the function beamformer_dics): 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); What could it be? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I too had the same suggestion as Johanna's. Another thing to check would be if the labels that you used for the leadfield estimation are the same as the freq data. I guess FT at some point would also check this to extract the indices. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > wrote: Dear Johanna, Thank you for your suggestion. On step 2 in the code, I select from the elec structure the channels that are included in the frequency data. So the elec structure used for preparing the leadfield has 128 electrodes, the same as the data (data_rs, data 4, and therefore freqAll). I checked this precisely because I read a previous thread discussing that issue. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: woensdag 28 mei 2014 16:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, Does your data have the same channels as the leadfield (as the electrodes that went in to compute the leadfield)? I often see that error when there is a mismatch of channels in that way. Best, Johanna 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado >: Dear Fieldtrip users, I’m following the tutorial of beamformers (Source Analysis: Contrast activity to another interval) to estimate oscillatory sources using DICS. I’ve checked the surface created after segmentation and the grid generated from the electrode positions and the headmodel. That seems to work ok. However, at the step of source analysis, I get the following error: Error using * Inner matrix dimensions must agree. 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Does anybody have an idea of what I’m doing wrong? Thank you in advance for any help or suggestion! ----------------------------------------------------------------- This is my code: %% 1 - Preparation of MRI- source space % Read MRI mrifile = 'Subject01\Subject01.mri'; mri = ft_read_mri(mrifile); % Reslice to reorient images cfg = []; cfg.dim = [256 256 256]; mri = ft_volumereslice(cfg,mri); % Segment compartments cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); % Prepare mesh cfg=[]; cfg.tissue={'brain', 'skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); % Prepare headmodel cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); %% 2- Prepare leadfield - Creating grid load elec_aligned2 % Obtained after adjusting electrodes on scalp surface interactively % Three fiducial markers were added to the electrode file, and now they're % removed so that the electrode structure has the same number of channels as the data elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); elec_aligned2.label = elec_aligned2.label(1:128, :); cfg =[]; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.grid.resolution = 10; cfg.grid.unit = 'mm'; [grid] = ft_prepare_leadfield(cfg); %% 3- Join rest and task data % data_rs: resting state data % data4: data during task dataAll = ft_appenddata([], data_rs, data4); cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [18 18]; freqAll = ft_freqanalysis(cfg, dataAll); %---------------------------------- % all seems normal until here %---------------------------------- %% 4- Estimate source of all data cfg = []; cfg.method = 'dics'; cfg.frequency = 18; cfg.grid = grid; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); Cheers, Laura Rueda Delgado _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 3 10:46:09 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 03 Jun 2014 10:46:09 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401781837723.25460@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au> Message-ID: <538D8B51.6040508@donders.ru.nl> Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Tue Jun 3 11:07:09 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 3 Jun 2014 09:07:09 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538D8B51.6040508@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>,<538D8B51.6040508@donders.ru.nl> Message-ID: <443925E6-ABED-48F6-AEA0-CD0696F78685@flinders.edu.au> That is very helpful, I'll look into that. Tyler > On 3 Jun 2014, at 6:18 pm, "Jörn M. Horschig" wrote: > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running using the coherence method for connectivity analysis (hence I didnt need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett > wrote: >>> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett > wrote: >>>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the toolbox between trying it >>>> with the old data and with the new data. I have now updated the fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From zriouil.imane at gmail.com Tue Jun 3 11:41:58 2014 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 3 Jun 2014 09:41:58 +0000 Subject: [FieldTrip] convert data .mat to .ds Message-ID: hi i want to convert my data .mat to .ds or another format. if you help me please -- Zriouil Imane -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Tue Jun 3 14:47:13 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Tue, 3 Jun 2014 14:47:13 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Hey Laura, I'm not very familiar with BEM's. I assumed the problem to be more superficial and it is not. So I re-ran some codes and I too have a vol.vol that has only NaN's. I think the problem has been previously raised here. http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html Let's wait to see if someone more experienced has something to say. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado < Laura.Rueda at faber.kuleuven.be> wrote: > Dear Kousik, > > > > The solution that you propose requires the use of Freesurfer to create the > sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, > how could I constrain it to calculate leadfields for points inside the > brain? I tried to restrict the ft_sourceanalysis by including only the > points of the grid that are inside the brain, but I still get the SVD > error. > > > > I checked the NaN values of vol.mat and all the elements on this matrix > are NaN. I suppose that’s where the error is, however I don’t know how to > correct for it, because I just generate the volume structure from the mesh > (see first message). > > > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can constrain > FT to only calculate leadfields for sourcespace points inside the brain. I > generally do this. I don't know how FT handles those outside the brain > source points really. You could give this a try. > > > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. > There are none. However, I checked for NaN values in grid.leadfield and it > has some. I thought that these were NaN values in the points of the grid > outside a brain region, but I might be mistaken. > > > > > > grid = > > > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Ah. Interesting. Good that error changes. So that was the problem before. > > > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked the labels and they were the same, except for whether they were > in capital letters. So I added the following before ft_sourceanalysis: > > > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > > > This way the labels of the elec structure and freqAll are in capital > letters. > > > > And now I get a different error (although still within the function > beamformer_dics): > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > > > What could it be? > > > > Best regards, > > Laura > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I too had the same suggestion as Johanna's. > > > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Johanna, > > > > Thank you for your suggestion. > > > > On step 2 in the code, I select from the elec structure the channels that > are included in the frequency data. So the elec structure used for > preparing the leadfield has 128 electrodes, the same as the data (data_rs, > data 4, and therefore freqAll). I checked this precisely because I read a > previous thread discussing that issue. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hi Laura, > > > > Does your data have the same channels as the leadfield (as the electrodes > that went in to compute the leadfield)? I often see that error when there > is a mismatch of channels in that way. > > > > Best, > > Johanna > > > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be>: > > Dear Fieldtrip users, > > > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and the > headmodel. That seems to work ok. However, at the step of source analysis, > I get the following error: > > > > Error using * > > Inner matrix dimensions must agree. > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2 % Obtained after adjusting electrodes on scalp surface > interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of channels > as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > > > > > Cheers, > > > > Laura Rueda Delgado > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Jun 3 15:30:56 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 3 Jun 2014 13:30:56 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Dear Kousik, I found that thread and made some tests on my data as well. The solution that is proposed there (reject the vertices of C11st/C22st where the NaN values are present) is not feasible in my case because I would need to reject 2908 vertices from the 3000 ones present in the brain compartment. Also, the xyz coordinates of these critical vertices (vol.bnd(1).pnt) and their corresponding triangles (vol.bnd(1).tri) do not converge into a single point, which would be the reason to reject them in the first place. I’ve checked and re-checked the segmented volumes and meshes (errors at these steps seem to be the most common problem), but all the compartments are closed surfaces and do not intersect. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: dinsdag 3 juni 2014 14:47 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I'm not very familiar with BEM's. I assumed the problem to be more superficial and it is not. So I re-ran some codes and I too have a vol.vol that has only NaN's. I think the problem has been previously raised here. http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html Let's wait to see if someone more experienced has something to say. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > wrote: Dear Kousik, The solution that you propose requires the use of Freesurfer to create the sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, how could I constrain it to calculate leadfields for points inside the brain? I tried to restrict the ft_sourceanalysis by including only the points of the grid that are inside the brain, but I still get the SVD error. I checked the NaN values of vol.mat and all the elements on this matrix are NaN. I suppose that’s where the error is, however I don’t know how to correct for it, because I just generate the volume structure from the mesh (see first message). Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 18:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Oh. Yes. FT puts NaN's into sourcespace points outside the brain. You can constrain FT to only calculate leadfields for sourcespace points inside the brain. I generally do this. I don't know how FT handles those outside the brain source points really. You could give this a try. Check this tutorial/code: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. There are none. However, I checked for NaN values in grid.leadfield and it has some. I thought that these were NaN values in the points of the grid outside a brain region, but I might be mistaken. grid = xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] dim: [17 13 14] pos: [3094x3 double] unit: 'mm' inside: [1x1516 double] outside: [1x1578 double] cfg: [1x1 struct] leadfield: {1x3094 cell} Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Ah. Interesting. Good that error changes. So that was the problem before. Now, can you check if your Freq matrices contain any NaN's (isnan(freqAll))? It can happen sometimes. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > wrote: Dear Kousik, I checked the labels and they were the same, except for whether they were in capital letters. So I added the following before ft_sourceanalysis: freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); This way the labels of the elec structure and freqAll are in capital letters. And now I get a different error (although still within the function beamformer_dics): 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); What could it be? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of kousik sarathy Sent: woensdag 28 mei 2014 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hey Laura, I too had the same suggestion as Johanna's. Another thing to check would be if the labels that you used for the leadfield estimation are the same as the freq data. I guess FT at some point would also check this to extract the indices. -- Regards, Kousik Sarathy, S On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > wrote: Dear Johanna, Thank you for your suggestion. On step 2 in the code, I select from the elec structure the channels that are included in the frequency data. So the elec structure used for preparing the leadfield has 128 electrodes, the same as the data (data_rs, data 4, and therefore freqAll). I checked this precisely because I read a previous thread discussing that issue. Best regards, Laura Rueda Delgado From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: woensdag 28 mei 2014 16:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, Does your data have the same channels as the leadfield (as the electrodes that went in to compute the leadfield)? I often see that error when there is a mismatch of channels in that way. Best, Johanna 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado >: Dear Fieldtrip users, I’m following the tutorial of beamformers (Source Analysis: Contrast activity to another interval) to estimate oscillatory sources using DICS. I’ve checked the surface created after segmentation and the grid generated from the electrode positions and the headmodel. That seems to work ok. However, at the step of source analysis, I get the following error: Error using * Inner matrix dimensions must agree. 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 567) dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Does anybody have an idea of what I’m doing wrong? Thank you in advance for any help or suggestion! ----------------------------------------------------------------- This is my code: %% 1 - Preparation of MRI- source space % Read MRI mrifile = 'Subject01\Subject01.mri'; mri = ft_read_mri(mrifile); % Reslice to reorient images cfg = []; cfg.dim = [256 256 256]; mri = ft_volumereslice(cfg,mri); % Segment compartments cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); % Prepare mesh cfg=[]; cfg.tissue={'brain', 'skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmentedmri); % Prepare headmodel cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); %% 2- Prepare leadfield - Creating grid load elec_aligned2 % Obtained after adjusting electrodes on scalp surface interactively % Three fiducial markers were added to the electrode file, and now they're % removed so that the electrode structure has the same number of channels as the data elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); elec_aligned2.label = elec_aligned2.label(1:128, :); cfg =[]; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.grid.resolution = 10; cfg.grid.unit = 'mm'; [grid] = ft_prepare_leadfield(cfg); %% 3- Join rest and task data % data_rs: resting state data % data4: data during task dataAll = ft_appenddata([], data_rs, data4); cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [18 18]; freqAll = ft_freqanalysis(cfg, dataAll); %---------------------------------- % all seems normal until here %---------------------------------- %% 4- Estimate source of all data cfg = []; cfg.method = 'dics'; cfg.frequency = 18; cfg.grid = grid; cfg.vol = vol; cfg.elec = elec_aligned2; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); Cheers, Laura Rueda Delgado _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Tue Jun 3 15:56:08 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Tue, 3 Jun 2014 15:56:08 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: Hey Laura, I'm out of suggestions now. :( I would suggest you wait on this thread for a few days and see if someone answers. If not you can start a new thread explaining the current problem you have. -- Regards, Kousik Sarathy, S On Tue, Jun 3, 2014 at 3:30 PM, Laura Rueda Delgado < Laura.Rueda at faber.kuleuven.be> wrote: > Dear Kousik, > > > > I found that thread and made some tests on my data as well. The solution > that is proposed there (reject the vertices of C11st/C22st where the NaN > values are present) is not feasible in my case because I would need to > reject 2908 vertices from the 3000 ones present in the brain compartment. > Also, the xyz coordinates of these critical vertices (vol.bnd(1).pnt) and > their corresponding triangles (vol.bnd(1).tri) do not converge into a > single point, which would be the reason to reject them in the first place. > > > > I’ve checked and re-checked the segmented volumes and meshes (errors at > these steps seem to be the most common problem), but all the compartments > are closed surfaces and do not intersect. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > The solution that you propose requires the use of Freesurfer to create the > sourcespace. If I’d like to restrict to use Fieldtrip and its toolboxes, > how could I constrain it to calculate leadfields for points inside the > brain? I tried to restrict the ft_sourceanalysis by including only the > points of the grid that are inside the brain, but I still get the SVD > error. > > > > I checked the NaN values of vol.mat and all the elements on this matrix > are NaN. I suppose that’s where the error is, however I don’t know how to > correct for it, because I just generate the volume structure from the mesh > (see first message). > > > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can constrain > FT to only calculate leadfields for sourcespace points inside the brain. I > generally do this. I don't know how FT handles those outside the brain > source points really. You could give this a try. > > > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked for NaN and Inf values in powspctrm and crsspctrm of freqAll. > There are none. However, I checked for NaN values in grid.leadfield and it > has some. I thought that these were NaN values in the points of the grid > outside a brain region, but I might be mistaken. > > > > > > grid = > > > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Ah. Interesting. Good that error changes. So that was the problem before. > > > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Kousik, > > > > I checked the labels and they were the same, except for whether they were > in capital letters. So I added the following before ft_sourceanalysis: > > > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > > > This way the labels of the elec structure and freqAll are in capital > letters. > > > > And now I get a different error (although still within the function > beamformer_dics): > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > > > What could it be? > > > > Best regards, > > Laura > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hey Laura, > > > > I too had the same suggestion as Johanna's. > > > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > > > > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be> wrote: > > Dear Johanna, > > > > Thank you for your suggestion. > > > > On step 2 in the code, I select from the elec structure the channels that > are included in the frequency data. So the elec structure used for > preparing the leadfield has 128 electrodes, the same as the data (data_rs, > data 4, and therefore freqAll). I checked this precisely because I read a > previous thread discussing that issue. > > > > Best regards, > > > > Laura Rueda Delgado > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > > > Hi Laura, > > > > Does your data have the same channels as the leadfield (as the electrodes > that went in to compute the leadfield)? I often see that error when there > is a mismatch of channels in that way. > > > > Best, > > Johanna > > > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado < > Laura.Rueda at faber.kuleuven.be>: > > Dear Fieldtrip users, > > > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and the > headmodel. That seems to work ok. However, at the step of source analysis, > I get the following error: > > > > Error using * > > Inner matrix dimensions must agree. > > > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2 % Obtained after adjusting electrodes on scalp surface > interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of channels > as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > > > > > Cheers, > > > > Laura Rueda Delgado > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 3 16:15:52 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 03 Jun 2014 16:15:52 +0200 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: References: Message-ID: <538DD898.8050801@donders.ru.nl> Hi Laura, the problem could be in the segmentation - you have to have closed boundaries of all tissues for the BEM model, otherwise the computation can result in only nans. It requires a bit more work to check for this, so I would first start with using the standard BEM model that is in the FieldTrip/template/headmodel directory to check whether (a) your code runs smoothly then and (b) your results make sense. Even though results are less optimal than when using individual MRs, you can get a first glimpse and it's a good sanity check for everything you are doing. If these two things work well, then I can help you with checking your segmentation (also on this mailinglist). Note though that that would be more hacking than real fieldtrippin'... ;) Best, Jörn On 6/3/2014 3:30 PM, Laura Rueda Delgado wrote: > > Dear Kousik, > > I found that thread and made some tests on my data as well. The > solution that is proposed there (reject the vertices of C11st/C22st > where the NaN values are present) is not feasible in my case because I > would need to reject 2908 vertices from the 3000 ones present in the > brain compartment. Also, the xyz coordinates of these critical > vertices (vol.bnd(1).pnt) and their corresponding triangles > (vol.bnd(1).tri) do not converge into a single point, which would be > the reason to reject them in the first place. > > I’ve checked and re-checked the segmented volumes and meshes (errors > at these steps seem to be the most common problem), but all the > compartments are closed surfaces and do not intersect. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > The solution that you propose requires the use of Freesurfer to create > the sourcespace. If I’d like to restrict to use Fieldtrip and its > toolboxes, how could I constrain it to calculate leadfields for points > inside the brain? I tried to restrict the ft_sourceanalysis by > including only the points of the grid that are inside the brain, but I > still get the SVD error. > > I checked the NaN values of vol.mat and all the elements on this > matrix are NaN. I suppose that’s where the error is, however I don’t > know how to correct for it, because I just generate the volume > structure from the mesh (see first message). > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can > constrain FT to only calculate leadfields for sourcespace points > inside the brain. I generally do this. I don't know how FT handles > those outside the brain source points really. You could give this a try. > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked for NaN and Inf values in powspctrm and crsspctrm of > freqAll. There are none. However, I checked for NaN values in > grid.leadfield and it has some. I thought that these were NaN values > in the points of the grid outside a brain region, but I might be > mistaken. > > grid = > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Ah. Interesting. Good that error changes. So that was the problem before. > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked the labels and they were the same, except for whether they > were in capital letters. So I added the following before > ft_sourceanalysis: > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > This way the labels of the elec structure and freqAll are in capital > letters. > > And now I get a different error (although still within the function > beamformer_dics): > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > What could it be? > > Best regards, > > Laura > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I too had the same suggestion as Johanna's. > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > > > wrote: > > Dear Johanna, > > Thank you for your suggestion. > > On step 2 in the code, I select from the elec structure the channels > that are included in the frequency data. So the elec structure used > for preparing the leadfield has 128 electrodes, the same as the data > (data_rs, data 4, and therefore freqAll). I checked this precisely > because I read a previous thread discussing that issue. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hi Laura, > > Does your data have the same channels as the leadfield (as the > electrodes that went in to compute the leadfield)? I often see that > error when there is a mismatch of channels in that way. > > Best, > > Johanna > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado > >: > > Dear Fieldtrip users, > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and > the headmodel. That seems to work ok. However, at the step of source > analysis, I get the following error: > > Error using * > > Inner matrix dimensions must agree. > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2% Obtained after adjusting electrodes on scalp > surface interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of > channels as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > Cheers, > > Laura Rueda Delgado > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From bankimchander at gmail.com Tue Jun 3 18:40:05 2014 From: bankimchander at gmail.com (Bankim Chander) Date: Tue, 3 Jun 2014 18:40:05 +0200 Subject: [FieldTrip] convert data .mat to .ds (z.imane) Message-ID: Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander Applied Neurotechnology Working Group Institute for Medical Psychology and Behavioural Neurobiology Department of Psychiatry and Psychotherapy Eberhard Karls Universität Tübingen Calwer Str. 14 D-72076 Tübingen -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Wed Jun 4 02:41:22 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 00:41:22 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538D8B51.6040508@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>,<538D8B51.6040508@donders.ru.nl> Message-ID: <1401842462961.53202@flinders.edu.au> Hey Jorn, You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. My code is as follows: (I used an atlas to get the grid coordinates) % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid.unit = 'mm'; cfg.dim = atlas_grid.dim; cfg.pos = pos; cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; source = ft_sourceanalysis( cfg, timelock); Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. Any suggestions? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Tuesday, 3 June 2014 6:16 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Wed Jun 4 03:15:46 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 01:15:46 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401842462961.53202@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> Message-ID: <1401844526765.83574@flinders.edu.au> Jorn, There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. I have hit a wall of issues haha Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Wednesday, 4 June 2014 10:11 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hey Jorn, You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. My code is as follows: (I used an atlas to get the grid coordinates) % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid.unit = 'mm'; cfg.dim = atlas_grid.dim; cfg.pos = pos; cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; source = ft_sourceanalysis( cfg, timelock); Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. Any suggestions? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Tuesday, 3 June 2014 6:16 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, most likely your data is rank deficient. You can check this by >> rank(data.trial{1}) You probably won't get 116 (#channels) as a result. If I remember correctly your data needs to have full-rank for mvaranalysis. Best, Jörn On 6/3/2014 9:50 AM, Tyler Grummett wrote: > > JM, > > > My data has the following format: > > > data = > > > fsample: 500 > sampleinfo: [14x2 double] > trial: {1x14 cell} > time: {1x14 cell} > label: {1x116 cell} > cfg: [1x1 struct] > > I had a look and there are no NaNs or anything. I have tried running > using the coherence method for connectivity analysis (hence I didnt > need to use mvaranalysis) and it seemed to work fine. > > Can you give me any suggestions as to what the problems with my data > could be? > > Tyler > > > > ************************* > > /Tyler Grummett ( BBSc, BSc(Hons I))/ > /PhD Candidate/ > /Brain Signals Laboratory/ > /Flinders University/ > /Rm 5A301/ > /Ext 66124/ > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of jan-mathijs schoffelen > > *Sent:* Tuesday, 3 June 2014 5:06 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] ft_mvaranalysis > This is a low level matlab error and suggests a problem with your data. > > > On Jun 3, 2014, at 9:32 AM, Tyler Grummett > > wrote: > >> Using the same code it generates the error: >> >> Error using chol >> Matrix must be positive definite. >> >> Error in armorf (line 40) >> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >> >> Error in ft_mvaranalysis (line 395) >> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >> size(tmpdata.trial{1},2), >> cfg.order); >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:*fieldtrip-bounces at science.ru.nl >> > > on behalf of jan-mathijs >> schoffelen > > >> *Sent:*Tuesday, 3 June 2014 4:49 PM >> *To:*FieldTrip discussion list >> *Subject:*Re: [FieldTrip] ft_mvaranalysis >> Hi Tyler, >> >> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >> >> Best, >> Jan-Mathijs >> >> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >> > > wrote: >> >>> Hello fieldtrippers, >>> >>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>> mvar(dat', cfg.order, cfg.mvarmethod); >>> >>> The error message is: >>> >>> Undefined function 'mvar' for input arguments of type 'double'. >>> >>> ​ Ive tried looking for the function, but I cant find it. Is it >>> likely that it is hidden or absent? >>> >>> I swear this has worked before on old data, and I didnt update the >>> toolbox between trying it >>> with the old data and with the new data. I have now updated the >>> fieldtrip toolbox and I have >>> tried running the code again, but no luck. >>> >>> Tyler >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From karl.doron at gmail.com Wed Jun 4 03:28:36 2014 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 03 Jun 2014 18:28:36 -0700 Subject: [FieldTrip] emotiv2ft OSX? Message-ID: Hello, I’m wondering if anyone has been able to compile emotiv2ft on for OSX (64 bit) yet. From some other threads related to the subject, the issue seemed to be a conio.h file that was DOS only. However, this may have been corrected with newer versions of Xcode which have curses.h. The error I’m getting seems to be with the GDF writer (pasted below) Thanks, karl doron -> llvm-g++ -c -I/Applications/MATLAB_R2012b.app/extern/include -I/Applications/MATLAB_R2012b.app/simulink/include -DMATLAB_MEX_FILE -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ -mmacosx-version-min=10.5 -DMX_COMPAT_32 -O2 -DNDEBUG "emotiv2ft.cc" In file included from emotiv2ft.cc:7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/OnlineDataManager.h:5: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/GDF_BackgroundWriter.h:1: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/GdfWriter.h:103:10: error: cannot initialize return object of type 'GDF_Type' with an rvalue of type 'int' return 0; ^ emotiv2ft.cc:114:3: error: use of undeclared identifier 'Sleep'; did you mean 'sleep'? Sleep(10); ^~~~~ sleep /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk//usr/include/unistd.h:475:3: note: 'sleep' declared here sleep(unsigned int) __DARWIN_ALIAS_C(sleep); ^ 2 errors generated. mex: compile of ' "emotiv2ft.cc"' failed. --- Karl Doron, PhD University of California, San Diego -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 4 09:42:27 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 04 Jun 2014 09:42:27 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401844526765.83574@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au> Message-ID: <538ECDE3.90803@donders.ru.nl> Hi Tyler, I thought you are talking about mvaranalysis - why is the code you've pasted about leadfields and lcmv beamforming? Best, Jörn On 6/4/2014 3:15 AM, Tyler Grummett wrote: > Jorn, > > There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. > > I have hit a wall of issues haha > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett > Sent: Wednesday, 4 June 2014 10:11 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hey Jorn, > > You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. > > My code is as follows: (I used an atlas to get the grid coordinates) > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > cfg.grid.unit = 'mm'; > cfg.dim = atlas_grid.dim; > cfg.pos = pos; > cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > % Source Analysis: without contrasting condition > cfg = []; > cfg.channel = 'EEG'; > cfg.method = 'lcmv'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > source = ft_sourceanalysis( cfg, timelock); > > Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. > > Any suggestions? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Tuesday, 3 June 2014 6:16 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember > correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > > On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running >> using the coherence method for connectivity analysis (hence I didnt >> need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data >> could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl >> on behalf of jan-mathijs schoffelen >> >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >> > > wrote: >> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>> size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl >>> >> > on behalf of jan-mathijs >>> schoffelen >> > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>> likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the >>>> toolbox between trying it >>>> with the old data and with the new data. I have now updated the >>>> fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Wed Jun 4 09:53:05 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 4 Jun 2014 07:53:05 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538ECDE3.90803@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>,<538ECDE3.90803@donders.ru.nl> Message-ID: <1401868365953.99873@flinders.edu.au> Hey Jorn, I was just checking to see if I was calculating the beamformer correctly. Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid and Zgrid as the atlas). I was trying to increase my rank (or decrease rank deficiency by changing my code). However, no matter what I have tried thus far, nothing has helped. Tyler. ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Wednesday, 4 June 2014 5:12 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, I thought you are talking about mvaranalysis - why is the code you've pasted about leadfields and lcmv beamforming? Best, Jörn On 6/4/2014 3:15 AM, Tyler Grummett wrote: > Jorn, > > There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. > > I have hit a wall of issues haha > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett > Sent: Wednesday, 4 June 2014 10:11 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hey Jorn, > > You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. > > My code is as follows: (I used an atlas to get the grid coordinates) > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > cfg.grid.unit = 'mm'; > cfg.dim = atlas_grid.dim; > cfg.pos = pos; > cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > % Source Analysis: without contrasting condition > cfg = []; > cfg.channel = 'EEG'; > cfg.method = 'lcmv'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > source = ft_sourceanalysis( cfg, timelock); > > Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. > > Any suggestions? > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Tuesday, 3 June 2014 6:16 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > most likely your data is rank deficient. You can check this by > >> rank(data.trial{1}) > > You probably won't get 116 (#channels) as a result. If I remember > correctly your data needs to have full-rank for mvaranalysis. > > Best, > Jörn > > > On 6/3/2014 9:50 AM, Tyler Grummett wrote: >> JM, >> >> >> My data has the following format: >> >> >> data = >> >> >> fsample: 500 >> sampleinfo: [14x2 double] >> trial: {1x14 cell} >> time: {1x14 cell} >> label: {1x116 cell} >> cfg: [1x1 struct] >> >> I had a look and there are no NaNs or anything. I have tried running >> using the coherence method for connectivity analysis (hence I didnt >> need to use mvaranalysis) and it seemed to work fine. >> >> Can you give me any suggestions as to what the problems with my data >> could be? >> >> Tyler >> >> >> >> ************************* >> >> /Tyler Grummett ( BBSc, BSc(Hons I))/ >> /PhD Candidate/ >> /Brain Signals Laboratory/ >> /Flinders University/ >> /Rm 5A301/ >> /Ext 66124/ >> ------------------------------------------------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl >> on behalf of jan-mathijs schoffelen >> >> *Sent:* Tuesday, 3 June 2014 5:06 PM >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] ft_mvaranalysis >> This is a low level matlab error and suggests a problem with your data. >> >> >> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >> > > wrote: >> >>> Using the same code it generates the error: >>> >>> Error using chol >>> Matrix must be positive definite. >>> >>> Error in armorf (line 40) >>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>> >>> Error in ft_mvaranalysis (line 395) >>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>> size(tmpdata.trial{1},2), >>> cfg.order); >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:*fieldtrip-bounces at science.ru.nl >>> >> > on behalf of jan-mathijs >>> schoffelen >> > >>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>> *To:*FieldTrip discussion list >>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>> Hi Tyler, >>> >>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Hello fieldtrippers, >>>> >>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>> >>>> The error message is: >>>> >>>> Undefined function 'mvar' for input arguments of type 'double'. >>>> >>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>> likely that it is hidden or absent? >>>> >>>> I swear this has worked before on old data, and I didnt update the >>>> toolbox between trying it >>>> with the old data and with the new data. I have now updated the >>>> fieldtrip toolbox and I have >>>> tried running the code again, but no luck. >>>> >>>> Tyler >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Wed Jun 4 10:11:03 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 4 Jun 2014 10:11:03 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401868365953.99873@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au> Message-ID: <780D308F-F1DE-423F-A93B-0DDC59B02206@donders.ru.nl> Hi Tyler, It’s impossible to increase the rank of your data. The rank of your data will be limited by the number of independent channels in the data. I don’t know whether you have used a maxfilter or not, and whether you were doing the source reconstruction on the gradiometers alone, or on all channels etc. Irrespective of this, if you are ‘upsampling’ the number of ‘channels’ artificially by concatenating across reconstructed dipoles ---(aggravating the issue by appending the x/y/z directions per dipole, and even more aggravating it by using rank-reduced leadfields (but note that without rank reduced leadfields it will be problematic: not only due to the dimensionality, but also because of the fact that in MEG the most ‘radial’ component picks up a lot of noise, thus disturbing the quality of the estimates))—- the rank in the reconstructed data will never be more than the number of channels. Thus, if you want to have a meaningful multivariate decomposition, the ‘multi’ in multivariate should be less than the number of channels (where in addition I assume that you have recorded a sufficient amount of data in order for a somewhat robust estimation of the AR-coefficients). Would it make sense to start off with the computation of pairwise models? I.e. estimating the AR-model for each dipole pair? Best, Jan-Mathijs On Jun 4, 2014, at 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >>>> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 4 10:15:13 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 04 Jun 2014 10:15:13 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401868365953.99873@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au> Message-ID: <538ED591.8000108@donders.ru.nl> Hi Tyler, ah I see, so the 'source'-structure you get from the beamforming serves to create the 'data'-structure to run mvaranalysis. cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your data, it reduces the rank of leadfield dimensionality (a dipole has moments in 3 directions, x,y,z). The interpolation does not work for you, because you do not have a full 3D grid anymore but rather individual grid points. Of course one could interpolate, but it would be far from optimal, so FieldTrip refuses to do so (imagine you want to interpolate to a 2D grid, e.g. a square, but you only have a data point of the center of that 2D grid). Instead of using 116 gridpoints why not lump them together to regions of interest. That way you'd probably get only a handful of 'voxels', and you probably get rid of the rank deficiency. However, I am not quite sure what you want to achieve with this analysis, so I am not sure whether I give adequate help advise ;) Best, Jörn On 6/4/2014 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >> >> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From clara.scholl at gmail.com Wed Jun 4 17:51:59 2014 From: clara.scholl at gmail.com (Clara A. Scholl) Date: Wed, 4 Jun 2014 11:51:59 -0400 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis Message-ID: Dear FieldTrip Community, I have a question regarding the frequency axis of a fourier spectrum calculated using ft_freqanalysis. How do I specify the input for ft_freqanalysis to generate an evenly spaced frequency axis? I would like to calculate the fourier spectrum between 2 and 30 Hz in steps of 2 Hz (foi=2:2:30), full code here: >>>>ft_freqanalysis input specification<<<<< subj=598; load(['../subj' num2str(subj) 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat' ]); cfg=[]; cfg.channel={'E59' 'E19'}; data=ft_selectdata(cfg, dataSame); %data=dataSame; cfg = []; cfg.keeptrials = 'yes'; cfg.keepindividual = 'yes'; cfg.channel = {'all'}; cfg.method = 'mtmconvol'; cfg.output ='fourier'; cfg.toi = -0.2:0.01:1.0; cfg.foi = 2:2:30; %frequency steps of 2Hz cfg.taper = 'hanning'; cfg.t_ftimwin=ones(1,15).*.2; %cfg.t_ftimwin=1./[2:2:30]; TFR = ft_freqanalysis(cfg, data); >>>>end input specification<<<<< >>>>output<<<<< TFR = label: {2x1 cell} dimord: 'rpttap_chan_freq_time' freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] time: [1x121 double] fourierspctrm: [4-D double] cumtapcnt: [452x15 double] elec: [1x1 struct] cfg: [1x1 struct] >>>>end output<<<<< The output from this code has uneven spacing on the frequency axis. Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, see TFR.freq above. TFR.freq is the same (uneven) for different output choices (fourier, powandcsd) and whether the length of time windows are the same at each frequency or vary by frequency. How can I run ft_freqanalysis to generate an evenly spaced frequency axis? Downstream functions (ft_connectivityanalysis with method granger) check for an evenly spaced frequency axis. I am using fieldtrip version 20140603. Thanks immensely, Clara -------------- next part -------------- An HTML attachment was scrubbed... URL: From clara.scholl at gmail.com Wed Jun 4 18:03:12 2014 From: clara.scholl at gmail.com (Clara A. Scholl) Date: Wed, 4 Jun 2014 12:03:12 -0400 Subject: [FieldTrip] Time lag for granger with input freq data Message-ID: Dear FieldTrip Community, I have a question about ft_connectivityanalysis using method granger with input freq data: how do I specify the time lag? If no time lag is specified, is a time lag automatically selected? I get plausible results with the following inputs (only specifying channelcmb and method, data are freq structure) but I haven't specified a time lag… >>>>snip<<<<< cfg=[]; cfg.channelcmb={'E59' 'all'}; cfg.method='granger'; w=ft_connectivityanalysis(cfg, TFR) >>>>end snip<<<< Sincerely, Clara -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chiran.Doshi at childrens.harvard.edu Wed Jun 4 18:58:10 2014 From: Chiran.Doshi at childrens.harvard.edu (Doshi, Chiran) Date: Wed, 4 Jun 2014 16:58:10 +0000 Subject: [FieldTrip] Small error in dipole_fit.m function Message-ID: Hi All, I noticed a small bug in https://github.com/fieldtrip/fieldtrip/blob/master/inverse/dipole_fit.m On line 89, instead of str2fun it should be str2func. With str2fun it was not enabling use of an explicit optimization algorithm. Chiran Doshi, MS MEG system technologist Department of Newborn Medicine Boston Children's Hospital Phone: 781-216-1136 Fax: 781-216-1172 -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Wed Jun 4 19:26:22 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Wed, 4 Jun 2014 19:26:22 +0200 Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool Message-ID: Dear all, I again have some basic issues... Today I tried to replace some bad channels in my data. I used cfg = []; cfg.badchannel = {'E68', 'E94'}; cfg.neighbours = neighbours; cfg.method = 'spline'; obs90_1_data_int = ft_channelrepair(cfg,obs90_1_data_clean4); Unfortunately if I inspect my data afterwards the channel look as bad as before. As Output I get: interpolating channels for 72 trials ........................................................................ the call to "ft_channelrepair" took 3 seconds and required the additional allocation of an estimated 209 MB creating layout from electrode file GSN-HydroCel-129.sfp creating layout for egi128 system the call to "ft_layoutplot" took 0 seconds and required the additional allocation of an estimated 4 MB the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_prepare_neighbours at 138 there are on average 7.4 neighbours per channel Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_neighbourplot at 83 In ft_prepare_neighbours at 250 Any ideas? Furthermore I am struggling a bit with the manual rejection tool using data browser. My problem is that it does not show me the channelnames at the y axis (which is unhandy) My (simple) code is cfg = []; cfg.viewmode = 'vertical'; cfg.continuous = 'no'; cfg = ft_databrowser(cfg,obs90_data_ica_cleaned); obs90_4_data_clean4 = ft_rejectartifact (cfg,obs90_data_ica_cleaned); Any ideas how I can see the names? Thanks a lot again Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jun 5 02:20:44 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 00:20:44 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <538ED591.8000108@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>,<538ED591.8000108@donders.ru.nl> Message-ID: <1401927624823.94563@flinders.edu.au> Hey Jorn, First off, thank you and you are a champ. I am trying to create a virtual channel for each area of the brain using an atlas. Originally I was doing the following to get my grid: % compute lead field ( apparently source analysis computes % lead field anyway cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution % cfg.grid.unit = 'mm'; cfg.grid.xgrid = atlas_grid.xgrid; cfg.grid.ygrid = atlas_grid.ygrid; cfg.grid.zgrid = atlas_grid.zgrid; % cfg.dim = atlas_grid.dim; % cfg.pos = pos; cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg); This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: parameter = 'avg.pow'; cfg = []; cfg.downsample = 2; cfg.parameter = parameter; sourceInt = ft_sourceinterpolate( cfg, source, mri); And it gives me a plot where the cross-hair is outside the brain ( see attached). Ive made sure each step is using the MNI coordinate system. I honestly dont know how to create voxels, and how that would translate into channels. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Wednesday, 4 June 2014 5:45 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hi Tyler, ah I see, so the 'source'-structure you get from the beamforming serves to create the 'data'-structure to run mvaranalysis. cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your data, it reduces the rank of leadfield dimensionality (a dipole has moments in 3 directions, x,y,z). The interpolation does not work for you, because you do not have a full 3D grid anymore but rather individual grid points. Of course one could interpolate, but it would be far from optimal, so FieldTrip refuses to do so (imagine you want to interpolate to a 2D grid, e.g. a square, but you only have a data point of the center of that 2D grid). Instead of using 116 gridpoints why not lump them together to regions of interest. That way you'd probably get only a handful of 'voxels', and you probably get rid of the rank deficiency. However, I am not quite sure what you want to achieve with this analysis, so I am not sure whether I give adequate help advise ;) Best, Jörn On 6/4/2014 9:53 AM, Tyler Grummett wrote: > Hey Jorn, > > I was just checking to see if I was calculating the beamformer correctly. > > Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. > What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid > and Zgrid as the atlas). > > I was trying to increase my rank (or decrease rank deficiency by changing my code). > > However, no matter what I have tried thus far, nothing has helped. > > Tyler. > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:12 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > I thought you are talking about mvaranalysis - why is the code you've > pasted about leadfields and lcmv beamforming? > > Best, > Jörn > > On 6/4/2014 3:15 AM, Tyler Grummett wrote: >> Jorn, >> >> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >> >> I have hit a wall of issues haha >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >> Sent: Wednesday, 4 June 2014 10:11 AM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hey Jorn, >> >> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >> >> My code is as follows: (I used an atlas to get the grid coordinates) >> >> % compute lead field ( apparently source analysis computes >> % lead field anyway >> cfg = []; >> cfg.elec = timelock.elec; >> cfg.vol = vol; >> cfg.grid.unit = 'mm'; >> cfg.dim = atlas_grid.dim; >> cfg.pos = pos; >> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >> cfg.backproject = 'yes'; >> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >> grid = ft_prepare_leadfield( cfg); >> >> % Source Analysis: without contrasting condition >> cfg = []; >> cfg.channel = 'EEG'; >> cfg.method = 'lcmv'; >> cfg.grid = grid; >> cfg.vol = vol; >> cfg.keepfilter = 'yes'; >> source = ft_sourceanalysis( cfg, timelock); >> >> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >> >> Any suggestions? >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Tuesday, 3 June 2014 6:16 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> most likely your data is rank deficient. You can check this by >> >> rank(data.trial{1}) >> >> You probably won't get 116 (#channels) as a result. If I remember >> correctly your data needs to have full-rank for mvaranalysis. >> >> Best, >> Jörn >> >> >> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>> JM, >>> >>> >>> My data has the following format: >>> >>> >>> data = >>> >>> >>> fsample: 500 >>> sampleinfo: [14x2 double] >>> trial: {1x14 cell} >>> time: {1x14 cell} >>> label: {1x116 cell} >>> cfg: [1x1 struct] >>> >>> I had a look and there are no NaNs or anything. I have tried running >>> using the coherence method for connectivity analysis (hence I didnt >>> need to use mvaranalysis) and it seemed to work fine. >>> >>> Can you give me any suggestions as to what the problems with my data >>> could be? >>> >>> Tyler >>> >>> >>> >>> ************************* >>> >>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>> /PhD Candidate/ >>> /Brain Signals Laboratory/ >>> /Flinders University/ >>> /Rm 5A301/ >>> /Ext 66124/ >>> ------------------------------------------------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl >>> on behalf of jan-mathijs schoffelen >>> >>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>> *To:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>> This is a low level matlab error and suggests a problem with your data. >>> >>> >>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>> >> > wrote: >>> >>>> Using the same code it generates the error: >>>> >>>> Error using chol >>>> Matrix must be positive definite. >>>> >>>> Error in armorf (line 40) >>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>> >>>> Error in ft_mvaranalysis (line 395) >>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>> size(tmpdata.trial{1},2), >>>> cfg.order); >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:*fieldtrip-bounces at science.ru.nl >>>> >>> > on behalf of jan-mathijs >>>> schoffelen >>> > >>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>> *To:*FieldTrip discussion list >>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>> Hi Tyler, >>>> >>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Hello fieldtrippers, >>>>> >>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>> >>>>> The error message is: >>>>> >>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>> >>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>> likely that it is hidden or absent? >>>>> >>>>> I swear this has worked before on old data, and I didnt update the >>>>> toolbox between trying it >>>>> with the old data and with the new data. I have now updated the >>>>> fieldtrip toolbox and I have >>>>> tried running the code again, but no luck. >>>>> >>>>> Tyler >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sourceplot.png Type: image/png Size: 49483 bytes Desc: sourceplot.png URL: From eelke.spaak at donders.ru.nl Thu Jun 5 09:47:08 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 09:47:08 +0200 Subject: [FieldTrip] Time lag for granger with input freq data In-Reply-To: References: Message-ID: Dear Clara, The Granger causality in ft_connectivityanalysis is always frequency-domain Granger (time-domain Granger is not implemented in FieldTrip). Frequency-domain Granger is lag-free, i.e., the Granger causality is estimated as a function of frequency; no explicit specification of lag is required. In some sense the frequencies correspond to different time lags at which causality is estimated. That said, there are two ways of estimating the cross-spectral density (CSD) required for frequency-domain Granger computation: the parametric and the non-parametric way. The non-parametric way is I guess most typically used; it involves ft_freqanalysis with cfg.method = 'mtmfft' or 'mtmconvol'. The parametric way involves first estimating a multivariate autoregressive model (ft_mvaranalysis) and subsequently computing the CSD from the estimated model coefficients (ft_freqanalysis with cfg.method = 'mvar'). In the parametric way of estimating the CSD, a time lag specification *is* required, namely when invoking ft_mvaranalysis. If I'm not mistaken, the choice of time lag at that step determines the effective frequency resolution of the CSD. Best, Eelke On 4 June 2014 18:03, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question about ft_connectivityanalysis using method granger with > input freq data: how do I specify the time lag? If no time lag is > specified, is a time lag automatically selected? I get plausible results > with the following inputs (only specifying channelcmb and method, data are > freq structure) but I haven't specified a time lag… > >>>>>snip<<<<< > > cfg=[]; > > cfg.channelcmb={'E59' 'all'}; > > cfg.method='granger'; > > > > w=ft_connectivityanalysis(cfg, TFR) > > >>>>>end snip<<<< > > Sincerely, > Clara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 09:48:52 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 09:48:52 +0200 Subject: [FieldTrip] Small error in dipole_fit.m function In-Reply-To: References: Message-ID: Hi Chiran, Thanks for reporting this, I just fixed it. Best, Eelke On 4 June 2014 18:58, Doshi, Chiran wrote: > Hi All, > > I noticed a small bug in > https://github.com/fieldtrip/fieldtrip/blob/master/inverse/dipole_fit.m > > On line 89, instead of str2fun it should be str2func. With str2fun it was > not enabling use of an explicit optimization algorithm. > > > Chiran Doshi, MS > MEG system technologist > Department of Newborn Medicine > Boston Children's Hospital > Phone: 781-216-1136 > Fax: 781-216-1172 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 5 09:55:54 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jun 2014 09:55:54 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: References: Message-ID: <5390228A.80408@donders.ru.nl> Hi Clara, regarding the frequency resolution, you can best read this: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i If you still have trouble understanding, you can check out this: http://www.youtube.com/watch?v=6EIBh5lHNSc So to get an equally spaced frequency axis, you space the frequency in cfg.foi in steps of your frequency resolution. I hope above links help you to find out what this means and how to do that ;) Best, Jörn On 6/4/2014 5:51 PM, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question regarding the frequency axis of a fourier spectrum > calculated using ft_freqanalysis. How do I specify the input for > ft_freqanalysis to generate an evenly spaced frequency axis? > > I would like to calculate the fourier spectrum between 2 and 30 Hz in > steps of 2 Hz (foi=2:2:30), full code here: > > >>>>ft_freqanalysis input specification<<<<< > > subj=598; > > load(['../subj'num2str(subj) > 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); > > cfg=[]; > > cfg.channel={'E59' 'E19'}; > > data=ft_selectdata(cfg, dataSame); > > %data=dataSame; > > cfg = []; > > cfg.keeptrials = 'yes'; > > cfg.keepindividual = 'yes'; > > cfg.channel = {'all'}; > > cfg.method = 'mtmconvol'; > > cfg.output ='fourier'; > > cfg.toi = -0.2:0.01:1.0; > > cfg.foi = 2:2:30; %frequency steps of 2Hz > > cfg.taper = 'hanning'; > > cfg.t_ftimwin=ones(1,15).*.2; > > %cfg.t_ftimwin=1./[2:2:30]; > > TFR = ft_freqanalysis(cfg, data); > > >>>>end input specification<<<<< > > >>>>output<<<<< > TFR = > > label: {2x1 cell} > dimord: 'rpttap_chan_freq_time' > freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 > 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] > time: [1x121 double] > fourierspctrm: [4-D double] > cumtapcnt: [452x15 double] > elec: [1x1 struct] > cfg: [1x1 struct] > > >>>>end output<<<<< > > The output from this code has uneven spacing on the frequency axis. > Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, > see TFR.freq above. TFR.freq is the same (uneven) for different > output choices (fourier, powandcsd) and whether the length of time > windows are the same at each frequency or vary by frequency. > > How can I run ft_freqanalysis to generate an evenly spaced frequency > axis? Downstream functions (ft_connectivityanalysis with method > granger) check for an evenly spaced frequency axis. I am using > fieldtrip version 20140603. > > Thanks immensely, > Clara > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From tyler.grummett at flinders.edu.au Thu Jun 5 10:45:41 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 08:45:41 +0000 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <5390228A.80408@donders.ru.nl> References: , <5390228A.80408@donders.ru.nl> Message-ID: <1401957920922.45510@flinders.edu.au> Hey jorn and clara, I am having the same issue, I use the following code: % compute spectral transfer function cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'; cfg.tapsmofrq = 5; cfg.foi = 5:1:7; freq = ft_freqanalysis(cfg, data); and I get: freq = label: {1x116 cell} dimord: 'rpttap_chan_freq' freq: [5.2000 6 7.2000] fourierspctrm: [336x116x3 double] cumsumcnt: [14x1 double] cumtapcnt: [14x1 double] cfg: [1x1 struct] I had a look at your links and it isnt clear as to what should be changed in the code. It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. However, there are lines in the code that do the following: padding = cfg.pad*data.fsample; if padding on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 5:25 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis Hi Clara, regarding the frequency resolution, you can best read this: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i If you still have trouble understanding, you can check out this: http://www.youtube.com/watch?v=6EIBh5lHNSc So to get an equally spaced frequency axis, you space the frequency in cfg.foi in steps of your frequency resolution. I hope above links help you to find out what this means and how to do that ;) Best, Jörn On 6/4/2014 5:51 PM, Clara A. Scholl wrote: > Dear FieldTrip Community, > > I have a question regarding the frequency axis of a fourier spectrum > calculated using ft_freqanalysis. How do I specify the input for > ft_freqanalysis to generate an evenly spaced frequency axis? > > I would like to calculate the fourier spectrum between 2 and 30 Hz in > steps of 2 Hz (foi=2:2:30), full code here: > > >>>>ft_freqanalysis input specification<<<<< > > subj=598; > > load(['../subj'num2str(subj) > 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); > > cfg=[]; > > cfg.channel={'E59' 'E19'}; > > data=ft_selectdata(cfg, dataSame); > > %data=dataSame; > > cfg = []; > > cfg.keeptrials = 'yes'; > > cfg.keepindividual = 'yes'; > > cfg.channel = {'all'}; > > cfg.method = 'mtmconvol'; > > cfg.output ='fourier'; > > cfg.toi = -0.2:0.01:1.0; > > cfg.foi = 2:2:30; %frequency steps of 2Hz > > cfg.taper = 'hanning'; > > cfg.t_ftimwin=ones(1,15).*.2; > > %cfg.t_ftimwin=1./[2:2:30]; > > TFR = ft_freqanalysis(cfg, data); > > >>>>end input specification<<<<< > > >>>>output<<<<< > TFR = > > label: {2x1 cell} > dimord: 'rpttap_chan_freq_time' > freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 > 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] > time: [1x121 double] > fourierspctrm: [4-D double] > cumtapcnt: [452x15 double] > elec: [1x1 struct] > cfg: [1x1 struct] > > >>>>end output<<<<< > > The output from this code has uneven spacing on the frequency axis. > Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, > see TFR.freq above. TFR.freq is the same (uneven) for different > output choices (fourier, powandcsd) and whether the length of time > windows are the same at each frequency or vary by frequency. > > How can I run ft_freqanalysis to generate an evenly spaced frequency > axis? Downstream functions (ft_connectivityanalysis with method > granger) check for an evenly spaced frequency axis. I am using > fieldtrip version 20140603. > > Thanks immensely, > Clara > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 10:52:32 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 10:52:32 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401957920922.45510@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au> Message-ID: See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis and http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. Best, Eelke On 5 June 2014 10:45, Tyler Grummett wrote: > Hey jorn and clara, > > I am having the same issue, I use the following code: > > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); > > and I get: > > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] > > I had a look at your links and it isnt clear as to what should be changed in the code. > > It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. > However, there are lines in the code that do the following: > > padding = cfg.pad*data.fsample; > if padding error('the specified padding is too short'); > end > > As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Thursday, 5 June 2014 5:25 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > Hi Clara, > > regarding the frequency resolution, you can best read this: > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i > If you still have trouble understanding, you can check out this: > http://www.youtube.com/watch?v=6EIBh5lHNSc > > So to get an equally spaced frequency axis, you space the frequency in > cfg.foi in steps of your frequency resolution. I hope above links help > you to find out what this means and how to do that ;) > > Best, > Jörn > > On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >> Dear FieldTrip Community, >> >> I have a question regarding the frequency axis of a fourier spectrum >> calculated using ft_freqanalysis. How do I specify the input for >> ft_freqanalysis to generate an evenly spaced frequency axis? >> >> I would like to calculate the fourier spectrum between 2 and 30 Hz in >> steps of 2 Hz (foi=2:2:30), full code here: >> >> >>>>ft_freqanalysis input specification<<<<< >> >> subj=598; >> >> load(['../subj'num2str(subj) >> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >> >> cfg=[]; >> >> cfg.channel={'E59' 'E19'}; >> >> data=ft_selectdata(cfg, dataSame); >> >> %data=dataSame; >> >> cfg = []; >> >> cfg.keeptrials = 'yes'; >> >> cfg.keepindividual = 'yes'; >> >> cfg.channel = {'all'}; >> >> cfg.method = 'mtmconvol'; >> >> cfg.output ='fourier'; >> >> cfg.toi = -0.2:0.01:1.0; >> >> cfg.foi = 2:2:30; %frequency steps of 2Hz >> >> cfg.taper = 'hanning'; >> >> cfg.t_ftimwin=ones(1,15).*.2; >> >> %cfg.t_ftimwin=1./[2:2:30]; >> >> TFR = ft_freqanalysis(cfg, data); >> >> >>>>end input specification<<<<< >> >> >>>>output<<<<< >> TFR = >> >> label: {2x1 cell} >> dimord: 'rpttap_chan_freq_time' >> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >> time: [1x121 double] >> fourierspctrm: [4-D double] >> cumtapcnt: [452x15 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> >> >>>>end output<<<<< >> >> The output from this code has uneven spacing on the frequency axis. >> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >> see TFR.freq above. TFR.freq is the same (uneven) for different >> output choices (fourier, powandcsd) and whether the length of time >> windows are the same at each frequency or vary by frequency. >> >> How can I run ft_freqanalysis to generate an evenly spaced frequency >> axis? Downstream functions (ft_connectivityanalysis with method >> granger) check for an evenly spaced frequency axis. I am using >> fieldtrip version 20140603. >> >> Thanks immensely, >> Clara >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Thu Jun 5 11:16:07 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 09:16:07 +0000 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au>, Message-ID: <1401959747282.95357@flinders.edu.au> Hello everyone, For the interest of using the output in granger causality. How bad would it be if you did run the code: > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); Then just rounded off the output frequencies. > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] freq.freq = round( freq.freq) I just ran it through ft_connectivityanalysis and it didnt crash. I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak Sent: Thursday, 5 June 2014 6:22 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis and http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. Best, Eelke On 5 June 2014 10:45, Tyler Grummett wrote: > Hey jorn and clara, > > I am having the same issue, I use the following code: > > % compute spectral transfer function > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'; > cfg.tapsmofrq = 5; > cfg.foi = 5:1:7; > freq = ft_freqanalysis(cfg, data); > > and I get: > > freq = > > label: {1x116 cell} > dimord: 'rpttap_chan_freq' > freq: [5.2000 6 7.2000] > fourierspctrm: [336x116x3 double] > cumsumcnt: [14x1 double] > cumtapcnt: [14x1 double] > cfg: [1x1 struct] > > I had a look at your links and it isnt clear as to what should be changed in the code. > > It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. > However, there are lines in the code that do the following: > > padding = cfg.pad*data.fsample; > if padding error('the specified padding is too short'); > end > > As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Thursday, 5 June 2014 5:25 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > Hi Clara, > > regarding the frequency resolution, you can best read this: > http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i > If you still have trouble understanding, you can check out this: > http://www.youtube.com/watch?v=6EIBh5lHNSc > > So to get an equally spaced frequency axis, you space the frequency in > cfg.foi in steps of your frequency resolution. I hope above links help > you to find out what this means and how to do that ;) > > Best, > Jörn > > On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >> Dear FieldTrip Community, >> >> I have a question regarding the frequency axis of a fourier spectrum >> calculated using ft_freqanalysis. How do I specify the input for >> ft_freqanalysis to generate an evenly spaced frequency axis? >> >> I would like to calculate the fourier spectrum between 2 and 30 Hz in >> steps of 2 Hz (foi=2:2:30), full code here: >> >> >>>>ft_freqanalysis input specification<<<<< >> >> subj=598; >> >> load(['../subj'num2str(subj) >> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >> >> cfg=[]; >> >> cfg.channel={'E59' 'E19'}; >> >> data=ft_selectdata(cfg, dataSame); >> >> %data=dataSame; >> >> cfg = []; >> >> cfg.keeptrials = 'yes'; >> >> cfg.keepindividual = 'yes'; >> >> cfg.channel = {'all'}; >> >> cfg.method = 'mtmconvol'; >> >> cfg.output ='fourier'; >> >> cfg.toi = -0.2:0.01:1.0; >> >> cfg.foi = 2:2:30; %frequency steps of 2Hz >> >> cfg.taper = 'hanning'; >> >> cfg.t_ftimwin=ones(1,15).*.2; >> >> %cfg.t_ftimwin=1./[2:2:30]; >> >> TFR = ft_freqanalysis(cfg, data); >> >> >>>>end input specification<<<<< >> >> >>>>output<<<<< >> TFR = >> >> label: {2x1 cell} >> dimord: 'rpttap_chan_freq_time' >> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >> time: [1x121 double] >> fourierspctrm: [4-D double] >> cumtapcnt: [452x15 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> >> >>>>end output<<<<< >> >> The output from this code has uneven spacing on the frequency axis. >> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >> see TFR.freq above. TFR.freq is the same (uneven) for different >> output choices (fourier, powandcsd) and whether the length of time >> windows are the same at each frequency or vary by frequency. >> >> How can I run ft_freqanalysis to generate an evenly spaced frequency >> axis? Downstream functions (ft_connectivityanalysis with method >> granger) check for an evenly spaced frequency axis. I am using >> fieldtrip version 20140603. >> >> Thanks immensely, >> Clara >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Thu Jun 5 11:27:30 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 5 Jun 2014 11:27:30 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401959747282.95357@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au> <1401959747282.95357@flinders.edu.au> Message-ID: Did you read the links I gave you on padding etc.? On 5 June 2014 11:16, Tyler Grummett wrote: > Hello everyone, > > For the interest of using the output in granger causality. > > How bad would it be if you did run the code: > >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); > > Then just rounded off the output frequencies. > >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] > > freq.freq = round( freq.freq) > > I just ran it through ft_connectivityanalysis and it didnt crash. > > I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 5 June 2014 6:22 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis > and > http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean > > Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. > > Best, > Eelke > > On 5 June 2014 10:45, Tyler Grummett wrote: >> Hey jorn and clara, >> >> I am having the same issue, I use the following code: >> >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); >> >> and I get: >> >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] >> >> I had a look at your links and it isnt clear as to what should be changed in the code. >> >> It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. >> However, there are lines in the code that do the following: >> >> padding = cfg.pad*data.fsample; >> if padding> error('the specified padding is too short'); >> end >> >> As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Thursday, 5 June 2014 5:25 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis >> >> Hi Clara, >> >> regarding the frequency resolution, you can best read this: >> http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i >> If you still have trouble understanding, you can check out this: >> http://www.youtube.com/watch?v=6EIBh5lHNSc >> >> So to get an equally spaced frequency axis, you space the frequency in >> cfg.foi in steps of your frequency resolution. I hope above links help >> you to find out what this means and how to do that ;) >> >> Best, >> Jörn >> >> On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >>> Dear FieldTrip Community, >>> >>> I have a question regarding the frequency axis of a fourier spectrum >>> calculated using ft_freqanalysis. How do I specify the input for >>> ft_freqanalysis to generate an evenly spaced frequency axis? >>> >>> I would like to calculate the fourier spectrum between 2 and 30 Hz in >>> steps of 2 Hz (foi=2:2:30), full code here: >>> >>> >>>>ft_freqanalysis input specification<<<<< >>> >>> subj=598; >>> >>> load(['../subj'num2str(subj) >>> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >>> >>> cfg=[]; >>> >>> cfg.channel={'E59' 'E19'}; >>> >>> data=ft_selectdata(cfg, dataSame); >>> >>> %data=dataSame; >>> >>> cfg = []; >>> >>> cfg.keeptrials = 'yes'; >>> >>> cfg.keepindividual = 'yes'; >>> >>> cfg.channel = {'all'}; >>> >>> cfg.method = 'mtmconvol'; >>> >>> cfg.output ='fourier'; >>> >>> cfg.toi = -0.2:0.01:1.0; >>> >>> cfg.foi = 2:2:30; %frequency steps of 2Hz >>> >>> cfg.taper = 'hanning'; >>> >>> cfg.t_ftimwin=ones(1,15).*.2; >>> >>> %cfg.t_ftimwin=1./[2:2:30]; >>> >>> TFR = ft_freqanalysis(cfg, data); >>> >>> >>>>end input specification<<<<< >>> >>> >>>>output<<<<< >>> TFR = >>> >>> label: {2x1 cell} >>> dimord: 'rpttap_chan_freq_time' >>> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >>> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >>> time: [1x121 double] >>> fourierspctrm: [4-D double] >>> cumtapcnt: [452x15 double] >>> elec: [1x1 struct] >>> cfg: [1x1 struct] >>> >>> >>>>end output<<<<< >>> >>> The output from this code has uneven spacing on the frequency axis. >>> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >>> see TFR.freq above. TFR.freq is the same (uneven) for different >>> output choices (fourier, powandcsd) and whether the length of time >>> windows are the same at each frequency or vary by frequency. >>> >>> How can I run ft_freqanalysis to generate an evenly spaced frequency >>> axis? Downstream functions (ft_connectivityanalysis with method >>> granger) check for an evenly spaced frequency axis. I am using >>> fieldtrip version 20140603. >>> >>> Thanks immensely, >>> Clara >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 5 11:29:08 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jun 2014 11:29:08 +0200 Subject: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis In-Reply-To: <1401959747282.95357@flinders.edu.au> References: <5390228A.80408@donders.ru.nl> <1401957920922.45510@flinders.edu.au>, <1401959747282.95357@flinders.edu.au> Message-ID: <53903864.3050206@donders.ru.nl> Hi Tyler, > How bad would it be if [...] it's wrong, don't do that. Best, Jörn On 6/5/2014 11:16 AM, Tyler Grummett wrote: > Hello everyone, > > For the interest of using the output in granger causality. > > How bad would it be if you did run the code: > >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); > Then just rounded off the output frequencies. > >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] > freq.freq = round( freq.freq) > > I just ran it through ft_connectivityanalysis and it didnt crash. > > I know this isnt the correct thing to do, but you otherwise unable to calculate granger causality. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 5 June 2014 6:22 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis > > See http://fieldtrip.fcdonders.nl/faq/why_does_my_output.freq_not_match_my_cfg.foi_when_using_mtmconvol_in_ft_freqanalyis > and > http://fieldtrip.fcdonders.nl/faq/what_does_padding_not_sufficient_for_requested_frequency_resolution_mean > > Also, 1250 samples == 2.5s > 1s. So the padding is too small indeed. > > Best, > Eelke > > On 5 June 2014 10:45, Tyler Grummett wrote: >> Hey jorn and clara, >> >> I am having the same issue, I use the following code: >> >> % compute spectral transfer function >> cfg = []; >> cfg.output = 'fourier'; >> cfg.method = 'mtmfft'; >> cfg.tapsmofrq = 5; >> cfg.foi = 5:1:7; >> freq = ft_freqanalysis(cfg, data); >> >> and I get: >> >> freq = >> >> label: {1x116 cell} >> dimord: 'rpttap_chan_freq' >> freq: [5.2000 6 7.2000] >> fourierspctrm: [336x116x3 double] >> cumsumcnt: [14x1 double] >> cumtapcnt: [14x1 double] >> cfg: [1x1 struct] >> >> I had a look at your links and it isnt clear as to what should be changed in the code. >> >> It seems to rely on padding, ie if cfg.pad = 1, then it should theoretically work. >> However, there are lines in the code that do the following: >> >> padding = cfg.pad*data.fsample; >> if padding> error('the specified padding is too short'); >> end >> >> As my fsample is 500 and my trllength is 1250 (sample points), then it regards my padding to be too small. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Thursday, 5 June 2014 5:25 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Spacing of Frequency Axis, output from ft_freqanalysis >> >> Hi Clara, >> >> regarding the frequency resolution, you can best read this: >> http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis?s[]=frequency&s[]=resolution#time-frequency_analysis_i >> If you still have trouble understanding, you can check out this: >> http://www.youtube.com/watch?v=6EIBh5lHNSc >> >> So to get an equally spaced frequency axis, you space the frequency in >> cfg.foi in steps of your frequency resolution. I hope above links help >> you to find out what this means and how to do that ;) >> >> Best, >> Jörn >> >> On 6/4/2014 5:51 PM, Clara A. Scholl wrote: >>> Dear FieldTrip Community, >>> >>> I have a question regarding the frequency axis of a fourier spectrum >>> calculated using ft_freqanalysis. How do I specify the input for >>> ft_freqanalysis to generate an evenly spaced frequency axis? >>> >>> I would like to calculate the fourier spectrum between 2 and 30 Hz in >>> steps of 2 Hz (foi=2:2:30), full code here: >>> >>>>>>> ft_freqanalysis input specification<<<<< >>> subj=598; >>> >>> load(['../subj'num2str(subj) >>> 'FT_sameDiff_correctTrials_continuous_1secBlinkInt500hz0.1hz-30hz_fromContinuous_start-0.4end1.2.mat']); >>> >>> cfg=[]; >>> >>> cfg.channel={'E59' 'E19'}; >>> >>> data=ft_selectdata(cfg, dataSame); >>> >>> %data=dataSame; >>> >>> cfg = []; >>> >>> cfg.keeptrials = 'yes'; >>> >>> cfg.keepindividual = 'yes'; >>> >>> cfg.channel = {'all'}; >>> >>> cfg.method = 'mtmconvol'; >>> >>> cfg.output ='fourier'; >>> >>> cfg.toi = -0.2:0.01:1.0; >>> >>> cfg.foi = 2:2:30; %frequency steps of 2Hz >>> >>> cfg.taper = 'hanning'; >>> >>> cfg.t_ftimwin=ones(1,15).*.2; >>> >>> %cfg.t_ftimwin=1./[2:2:30]; >>> >>> TFR = ft_freqanalysis(cfg, data); >>> >>>>>>> end input specification<<<<< >>>>>>> output<<<<< >>> TFR = >>> >>> label: {2x1 cell} >>> dimord: 'rpttap_chan_freq_time' >>> freq: [1.8750 3.7500 6.2500 8.1250 10 11.8750 13.7500 >>> 16.2500 18.1250 20 21.8750 23.7500 26.2500 28.1250 30] >>> time: [1x121 double] >>> fourierspctrm: [4-D double] >>> cumtapcnt: [452x15 double] >>> elec: [1x1 struct] >>> cfg: [1x1 struct] >>> >>>>>>> end output<<<<< >>> The output from this code has uneven spacing on the frequency axis. >>> Some frequency intervals are 1.875 Hz and some intervals are 2.5 Hz, >>> see TFR.freq above. TFR.freq is the same (uneven) for different >>> output choices (fourier, powandcsd) and whether the length of time >>> windows are the same at each frequency or vary by frequency. >>> >>> How can I run ft_freqanalysis to generate an evenly spaced frequency >>> axis? Downstream functions (ft_connectivityanalysis with method >>> granger) check for an evenly spaced frequency axis. I am using >>> fieldtrip version 20140603. >>> >>> Thanks immensely, >>> Clara >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Thu Jun 5 11:32:50 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Thu, 05 Jun 2014 11:32:50 +0200 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401927624823.94563@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au> Message-ID: <53903942.8010009@donders.ru.nl> Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From christoph.braun at uni-tuebingen.de Thu Jun 5 11:34:50 2014 From: christoph.braun at uni-tuebingen.de (Christoph Braun) Date: Thu, 05 Jun 2014 11:34:50 +0200 Subject: [FieldTrip] =?iso-8859-15?q?PhD_postion_at_the_University_of_T=FC?= =?iso-8859-15?q?bingen?= Message-ID: <539039BA.1090902@uni-tuebingen.de> *PhD Postion at the University of Tübingen in the EU-Initial Trainining Network "NeuroGut (www.neurogut.de)" *In the project effects of pro- and pre biotic coumpounds of nutrition on cognitive processing are studied using magnetoencephalography. Since the project is an EU funded project EU eligility and mobility rules apply. Candidates must be, at the time of recruitment by the host organization, in the first four years (full-time equivalent) of their research careers and not yet have been awarded a doctoral degree. This is measured from the date when they obtained the degree which would formally entitle them to embark on a doctorate, either in the country in which the degree was obtained or in the country in which the research training is provided, irrespective of whether or not a doctorate is envisaged. Researchers can be of any nationality, however, at the time of recruitment by the host organisation, researchers must not have resided or carried out their main activity (work, studies, etc) in the country of their host organisation for more than 12 months in the 3 years immediately prior to the reference date. If you are interested, please, find further details in the attached description of the position and send your application to: University Hospital Tübingen, Germany Department of Internal Medicine VI: Psychosomatic Medicine and Psychotherapy - Research Laboratories - Director of Research: Prof. Dr. Paul Enck Frondsbergstr. 23, 72076 Tübingen, Germany E-MAIL: paul.enck at uni-tuebingen.de PHONE office: +49 7071 29-89118; cell: +49 179 4986459, FAX: +49 7071 29-4382 WEBSITE: http://www.psychosomatik-tuebingen.de/de/index.php -- Prof. Christoph Braun MEG-Center University of Tübingen Otfried-Müller-Str. 47 72076 Tübingen Germany Tel: +49 (0)7071 29 87705 Fax: +49 (0)7071 29 5706 Email: christoph.braun at uni-tuebingen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: job-description_T?bingen Pos 2_HBM.pdf Type: application/pdf Size: 87846 bytes Desc: not available URL: From tyler.grummett at flinders.edu.au Thu Jun 5 11:36:57 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 5 Jun 2014 09:36:57 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <53903942.8010009@donders.ru.nl> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au>,<53903942.8010009@donders.ru.nl> Message-ID: <1401960997142.37788@flinders.edu.au> Hey jorn, Yeah I tried that, I entered in specific grid points into the leadfield. The rank was still 37 ( out of 116), I still cant really work it out haha. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 7:02 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From pia.destefano at studenti.unipr.it Thu Jun 5 12:15:45 2014 From: pia.destefano at studenti.unipr.it (PIA DE STEFANO) Date: Thu, 5 Jun 2014 12:15:45 +0200 Subject: [FieldTrip] Trouble with CHANNEL REPLACEMENT EEG Message-ID: Dear all, Dear Katrin, i have exactly the same trouble that you have with channel replacement!! I really hope somebody will help us to understand and solve this problem! Thank you all Pia -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Jun 5 12:21:16 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 5 Jun 2014 12:21:16 +0200 (CEST) Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool In-Reply-To: Message-ID: <2084370033.7272994.1401963676120.JavaMail.root@sculptor.zimbra.ru.nl> Dear Katrin, Regarding the interpolation question, the spline method, as far as I know, is based on the entire scalp instead of a small area. Then the interpolation output depends on the signals in all your scalp, not only the closest set of sensors to the bad channel you want to interpolate. You can recheck your data and/or choose other methods like 'nearest' or 'average' to compare your results and investigate what could it explain your output. To plot the channel labels with ft_databrowser, type cfg.plotlabels='yes'. To see other options check the help of the function. best, Diego ----- Original Message ----- From: "KatrinH Heimann" To: "FieldTrip discussion list" Sent: Wednesday, 4 June, 2014 7:26:22 PM Subject: [FieldTrip] Trouble with a) channel replacement and b) manual rejection tool Dear all, I again have some basic issues... Today I tried to replace some bad channels in my data. I used cfg = []; cfg.badchannel = { 'E68' , 'E94' }; cfg.neighbours = neighbours; cfg.method = 'spline' ; obs90_1_data_int = ft_channelrepair(cfg,obs90_1_data_clean4); Unfortunately if I inspect my data afterwards the channel look as bad as before. As Output I get: interpolating channels for 72 trials ........................................................................ the call to "ft_channelrepair" took 3 seconds and required the additional allocation of an estimated 209 MB creating layout from electrode file GSN-HydroCel-129.sfp creating layout for egi128 system the call to "ft_layoutplot" took 0 seconds and required the additional allocation of an estimated 4 MB the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_prepare_neighbours at 138 there are on average 7.4 neighbours per channel Your data and configuration allow for multiple sensor definitions. Warning: using electrodes specified in the data\n > In fieldtrip-20140424/private/ft_fetch_sens at 148 In ft_neighbourplot at 83 In ft_prepare_neighbours at 250 Any ideas? Furthermore I am struggling a bit with the manual rejection tool using data browser. My problem is that it does not show me the channelnames at the y axis (which is unhandy) My (simple) code is cfg = []; cfg.viewmode = 'vertical' ; cfg.continuous = 'no' ; cfg = ft_databrowser(cfg,obs90_data_ica_cleaned) ; obs90_4_data_clean4 = ft_rejectartifact (cfg,obs90_data_ica_cleaned); Any ideas how I can see the names? Thanks a lot again Katrin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From d.lozanosoldevilla at fcdonders.ru.nl Thu Jun 5 17:56:38 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 5 Jun 2014 17:56:38 +0200 (CEST) Subject: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW In-Reply-To: Message-ID: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ana, During our last fieldtrip meeting, we discussed about the triggering issues with the *RAW file format and here some thoughts: 1) What you reported is not a fieldtrip problem per se. The way NETSTATION is configured in your lab allow you to record the triggers in bits, not in decimal numbers. I don't know how but there should be a way to configure your acquisition device in such a way that triggers are not transform from decimal to binary representation. 2) Make your own trialfun to solve the conversion problem. I created a FAQ titled "How can I transform trigger values from bits to decimal representation with a trialfun?" on where you'll find code to make the transition from bits to decimals again. This FAQ could also be useful for other users having similar problems (binary to decimal conversion) with other acquisition systems. I hope this helps Diego ----- Original Message ----- > From: "Ana Laura Diez Martini" > To: "Diego Lozano" , "FieldTrip > discussion list" > Sent: Tuesday, 27 May, 2014 12:25:39 AM > Subject: Re: [FieldTrip] Cannot read the events of a .BDF file > exported from an EGI .RAW > Thank you Arjen, Diego and Chungki Lee! > I tried with the .RAW and it reads the event. The problem is that my > triggers have the following format "11,12,13,14,15,21,22...." . > Netstation instead of saving them as they are, returns them in this > way: say my trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + > DIN8 + DIN2. so I had to convert them into my original triggers. After > that I can either save the set (I tried this but it didn't work) or > export it to bdf. When I open the exported file in EEGlab, it reads > the events correctly, but fieldtrip doesn't. > Any ideas? Thanks!! > On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl > wrote: > > Dear Ana, > > Sorry for my file extension confusion: edf instead of bdf. However, > > I > > don't know a way to read events coded in BDF format exported by > > NETSTATION. I encounter this problem in the past but I had no > > problems > > with RAW file format > > Dear Chungki, > > Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but > > Ana > > was refering to a different eeg system that has the same fileformat > > extension. > > best, > > Diego > > > From: "Chungki Lee" < dr.chungki.lee at gmail.com > > > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Monday, 26 May, 2014 11:18:34 AM > > > Subject: Re: [FieldTrip] Cannot read the events of a .BDF file > > > exported from an EGI .RAW > > > Dear all > > > Fieldtrip can read events in BDF format ! > > > Hear simple examples > > > example #1 > > > %% > > > cfg = []; > > > cfg.dataset = '~~~ '; % your filename with file extension; > > > cfg.trialdef.eventtype = 'STATUS'; % Status notation maybe > > > Biosemi's > > > tigger name > > > cfg.trialdef.eventvalue = 1; % your event value > > > cfg.trialdef.prestim = 4; % before stimulation (sec), only use > > > positive value > > > cfg.trialdef.poststim = 8; % after stimulation (sec) , only use > > > positive value > > > cfg = ft_definetrial(cfg); > > > cfg.method = 'trial'; > > > data = ft_preprocessing(cfg); > > > %% > > > example #2 > > > %% > > > % if you executed these command lines > > > cfg = []; > > > cfg.dataset = '~~~ '; % your filename with file extension; > > > cfg.trialdef.eventtype = '?'; % Status notation maybe Biosemi's > > > tigger > > > name > > > cfg = ft_definetrial(cfg); > > > % result example #2 > > > the following events were found in the datafile > > > event type: 'CM_in_range' with event values: > > > event type: 'Epoch' with event values: > > > event type: 'STATUS' with event values: 1 2 3 4 255 <----------- > > > "this > > > indicate your file configuration for trigger information" > > > no trials have been defined yet, see FT_DEFINETRIAL for further > > > help > > > found 255 events > > > created 0 trials > > > the call to "ft_definetrial" took 8 seconds > > > have fun~!! > > > 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla < > > > d.lozanosoldevilla at fcdonders.ru.nl > : > > > > Hi Ana, > > > > Fieldtrip does not read events in BDF format. Take a look to our > > > > wiki: > > > > http://fieldtrip.fcdonders.nl/getting_started/egi > > > > • > > > > EDF+ (.edf) All channels, including PIB channels, are read in > > > > correctly, including channel labels. However, the events, which > > > > are > > > > stored on the annotation channel, are written in a way by Net > > > > Station > > > > that is not compatible with the edf+ reading implementation in > > > > FieldTrip. So, events do not come out properly. Also > > > > discontinuous > > > > epochs are “glued” together as one “continuous” data stream. > > > > As Arjen suggested, with *.RAW you shouldn't have any problem. > > > > event = ft_read_event('*.RAW') > > > > If you encounter it, please let us know. > > > > best, > > > > Diego > > > > On 26 May 2014 08:59, Arjen Stolk < a.stolk8 at gmail.com > wrote: > > > > > Hi Ana Laura, > > > > > Have you tried importing the .RAW file directly? That is, by > > > > > specifying cfg.dataset = 'XXX.raw'? > > > > > Best regards, > > > > > Arjen > > > > > 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini < > > > > > diezmartini at gmail.com > : > > > > > > Hi all! > > > > > > This is the .BDF file of one of my EEG subjects. For my last > > > > > > experiment I used a Biosemi system and now I'm using an EGI > > > > > > system > > > > > > which gives me .RAW files. I exported the .RAW file with > > > > > > EEGlab > > > > > > to > > > > > > .BDF format and I tried using the scripts I use to analise > > > > > > the > > > > > > data > > > > > > of > > > > > > my previous experiment but I realised that it was not > > > > > > reading > > > > > > the > > > > > > events: > > > > > > cfg = []; > > > > > > cfg.dataset = ' (location)'; > > > > > > cfg.trialdef.eventtype = '?'; > > > > > > definetrial(cfg); > > > > > > Warning: no trialfun was specified, using trialfun_general > > > > > > > In definetrial at 79 > > > > > > evaluating trialfunction 'trialfun_general' > > > > > > no events were found in the datafile > > > > > > no trials have been defined yet, see DEFINETRIAL for further > > > > > > help > > > > > > found 0 events > > > > > > created 0 trials > > > > > > EEGlab does read them. Any idea of what could be wrong? > > > > > > Thank you all!! > > > > > > _______________________________________________ > > > > > > fieldtrip mailing list > > > > > > fieldtrip at donders.ru.nl > > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > > > > > fieldtrip mailing list > > > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > > > ---------------------------------------------------------------- > > > Chungki Lee, Ph.D. > > > Post-doc > > > Biomedical Research Institute > > > Korea Institute of Science and Technology > > > E-mail: chungki at kist.re.kr > > > Tel: +82-2-958-5636 , C.P: +82-10-5223-7309 > > > ---------------------------------------------------------------- > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > PhD Student > > Neuronal Oscillations Group > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > NL-6525 EN Nijmegen > > The Netherlands > > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From diezmartini at gmail.com Fri Jun 6 00:00:02 2014 From: diezmartini at gmail.com (Ana Laura Diez Martini) Date: Fri, 6 Jun 2014 10:00:02 +1200 Subject: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW In-Reply-To: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> References: <1059911443.7285582.1401983798757.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thank you Diego! On Fri, Jun 6, 2014 at 3:56 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Ana, > > During our last fieldtrip meeting, we discussed about the triggering > issues with the *RAW file format and here some thoughts: > > 1) What you reported is not a fieldtrip problem per se. The way NETSTATION > is configured in your lab allow you to record the triggers in bits, not in > decimal numbers. I don't know how but there should be a way to configure > your acquisition device in such a way that triggers are not transform from > decimal to binary representation. > > 2) Make your own trialfun to solve the conversion problem. I created a FAQ > > titled "How can I transform trigger values from bits to decimal > representation with a trialfun?" on where you'll find code to make the > transition from bits to decimals again. This FAQ could also be useful for > other users having similar problems (binary to decimal conversion) with > other acquisition systems. > > I hope this helps > > Diego > > > ------------------------------ > > *From: *"Ana Laura Diez Martini" > *To: *"Diego Lozano" , "FieldTrip > discussion list" > *Sent: *Tuesday, 27 May, 2014 12:25:39 AM > > *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file exported > from an EGI .RAW > > Thank you Arjen, Diego and Chungki Lee! > > I tried with the .RAW and it reads the event. The problem is that my > triggers have the following format "11,12,13,14,15,21,22...." . Netstation > instead of saving them as they are, returns them in this way: say my > trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + DIN8 + DIN2. so I > had to convert them into my original triggers. After that I can either save > the set (I tried this > but it > didn't work) or export it to bdf. When I open the exported file in EEGlab, > it reads the events correctly, but fieldtrip doesn't. > > Any ideas? Thanks!! > > > On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > >> Dear Ana, >> >> Sorry for my file extension confusion: edf instead of bdf. However, I >> don't know a way to read events coded in BDF format exported by NETSTATION. >> I encounter this problem in the past but I had no problems with RAW file >> format >> >> Dear Chungki, >> >> Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but Ana >> was refering to a different eeg system that has the same fileformat >> extension. >> >> best, >> >> Diego >> >> ------------------------------ >> >> *From: *"Chungki Lee" >> *To: *"FieldTrip discussion list" >> *Sent: *Monday, 26 May, 2014 11:18:34 AM >> *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file >> exported from an EGI .RAW >> >> >> Dear all >> >> Fieldtrip can read events in BDF format ! >> >> Hear simple examples >> >> example #1 >> %% >> cfg = []; >> cfg.dataset = '~~~ '; % your filename with file extension; >> cfg.trialdef.eventtype = 'STATUS'; % Status notation maybe Biosemi's >> tigger name >> cfg.trialdef.eventvalue = 1; % your event value >> cfg.trialdef.prestim = 4; % before stimulation (sec), only use >> positive value >> cfg.trialdef.poststim = 8; % after stimulation (sec) , only use >> positive value >> cfg = ft_definetrial(cfg); >> cfg.method = 'trial'; >> data = ft_preprocessing(cfg); >> %% >> >> example #2 >> %% >> % if you executed these command lines >> cfg = []; >> cfg.dataset = '~~~ '; % your filename with file >> extension; >> cfg.trialdef.eventtype = '?'; % Status notation maybe Biosemi's >> tigger name >> cfg = ft_definetrial(cfg); >> >> % result example #2 >> the following events were found in the datafile >> event type: 'CM_in_range' with event values: >> event type: 'Epoch' with event values: >> event type: 'STATUS' with event values: 1 2 3 4 255 <----------- >> "this indicate your file configuration for trigger information" >> no trials have been defined yet, see FT_DEFINETRIAL for further help >> found 255 events >> created 0 trials >> the call to "ft_definetrial" took 8 seconds >> >> have fun~!! >> >> >> >> 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla < >> d.lozanosoldevilla at fcdonders.ru.nl>: >> >>> Hi Ana, >>> >>> Fieldtrip does not read events in BDF format. Take a look to our wiki: >>> >>> http://fieldtrip.fcdonders.nl/getting_started/egi >>> >>> >>> - *EDF+* (.edf) All channels, including PIB channels, are read in >>> correctly, including channel labels. However, the events, which are stored >>> on the annotation channel, are written in a way by Net Station that is not >>> compatible with the edf+ reading implementation in FieldTrip. So, events do >>> not come out properly. Also discontinuous epochs are “glued” together as >>> one “continuous” data stream. >>> >>> As Arjen suggested, with *.RAW you shouldn't have any problem. >>> >>> event = ft_read_event('*.RAW') >>> >>> If you encounter it, please let us know. >>> >>> best, >>> >>> Diego >>> >>> >>> On 26 May 2014 08:59, Arjen Stolk wrote: >>> >>>> Hi Ana Laura, >>>> >>>> Have you tried importing the .RAW file directly? That is, by specifying >>>> cfg.dataset = 'XXX.raw'? >>>> >>>> Best regards, >>>> Arjen >>>> >>>> >>>> 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini >>> >: >>>> >>>>> Hi all! >>>>> >>>>> This is the .BDF file >>>>> of one >>>>> of my EEG subjects. For my last experiment I used a Biosemi system and now >>>>> I'm using an EGI system which gives me .RAW files. I exported the .RAW file >>>>> with EEGlab to .BDF format and I tried using the scripts I use to analise >>>>> the data of my previous experiment but I realised that it was not reading >>>>> the events: >>>>> >>>>> cfg = []; >>>>> cfg.dataset = ' (location)'; >>>>> cfg.trialdef.eventtype = '?'; >>>>> definetrial(cfg); >>>>> Warning: no trialfun was specified, using trialfun_general >>>>> > In definetrial at 79 >>>>> evaluating trialfunction 'trialfun_general' >>>>> no events were found in the datafile >>>>> no trials have been defined yet, see DEFINETRIAL for further help >>>>> found 0 events >>>>> created 0 trials >>>>> >>>>> EEGlab does read them. Any idea of what could be wrong? >>>>> >>>>> Thank you all!! >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> ---------------------------------------------------------------- >> Chungki Lee, Ph.D. >> Post-doc >> Biomedical Research Institute >> Korea Institute of Science and Technology >> E-mail: chungki at kist.re.kr >> Tel:+82-2-958-5636, C.P: +82-10-5223-7309 >> ---------------------------------------------------------------- >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> PhD Student >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> NL-6525 EN Nijmegen >> The Netherlands >> http://www.ru.nl/people/donders/lozano-soldevilla-d/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From diezmartini at gmail.com Fri Jun 6 04:43:14 2014 From: diezmartini at gmail.com (Ana Laura Diez Martini) Date: Fri, 6 Jun 2014 14:43:14 +1200 Subject: [FieldTrip] Cluster-level permutation test problem Message-ID: Dear all, I'm trying to run a cluster-level permutation test with an old script in which I used the neighbourhood map of a Biosemi cap. The only thing I have changed there is the neighbourhood that is now for a GSN-HydroCel-129 one, so I just re wrote the neighbours for each channel the same way I did for the Biosemi one. I use an old version of Fieldtrip here which was working fine, but even with the newest versions and modifications, it doesn't work. What do you think I could be doing wrong? Thank you!! *This is the output I get:* Selecting and formatting the data. selected 128 channels selected 1000 time bins selected 1 frequency bins Calculating the neighbourhood structure of the channels. Running the statistics engine. Statistic-specific preprocessing (calculating critical values, initializing draws from the randomization distribution, ...). randomization 0 1000 Undefined function 'bwlabeln' for input arguments of type 'double'. Error in findcluster (line 73) [labelmat(spatdimlev, :, :), num] = bwlabeln(reshape(onoff(spatdimlev, :, :), nfreq, ntime), 4); Error in clusterrandstatistics (line 851) [posclusterslabelmat,nposclusters] = findcluster(onoff,data.channeighbstructmat,cfg.minnbchan); Error in clusterrandanalysis (line 462) [clusrand] = clusterrandstatistics(cfg, data); Error in clusterrand_stats_ERP_CW (line 347) [clusrand] = clusterrandanalysis(cfg,GavgI,GavgC); *And this is my script* function [clusrand] = clusterrand_stats_ERP_WC() S = load('4WC_1.avg','-MAT'); avgC41 = S.avgC; avgI41 = S.avgI; S = load('4WC_2.avg','-MAT'); avgC42 = S.avgC; avgI42 = S.avgI; etc... cfg =[]; cfg.keepindividual = 'yes'; GavgC = timelockgrandaverage(cfg,avgC41,avgC42,.....); GavgI = timelockgrandaverage(cfg,avgI41,avgI42.....); save('grand_averages','GavgC','GavgI'); cfg.latency = [0 1]; cfg.channel = {'all'}; cfg.avgovertime = 'no'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusterteststat = 'maxsum'; cfg.makeclusters = 'yes'; cfg.alphathresh = 0.05; cfg.minnbchan = 0; cfg.elecfile = 'GSN-HydroCel-129.sfp'; cfg.neighbours{1}.label = 'E1'; cfg.neighbours{1}.neighblabel = {'E125', 'E8', 'E2', 'E122','E121'}; cfg.neighbours{2}.label = 'E2'; cfg.neighbours{2}.neighblabel = {'E1', 'E8', 'E14', 'E9','E3','E123','122'}; cfg.neighbours{3}.label = 'E3'; cfg.neighbours{3}.neighblabel = {'E2', 'E123', 'E124','E4','E10','E9'}; etc... cfg.nranddraws = 1000; [clusrand] = clusterrandanalysis(cfg,GavgI,GavgC); save clusrand_WC clusrand; end -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jun 6 12:56:11 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 6 Jun 2014 10:56:11 +0000 Subject: [FieldTrip] ft_mvaranalysis In-Reply-To: <1401960997142.37788@flinders.edu.au> References: <1401759539185.62016@flinders.edu.au>, <6A6700A3-E43A-44E7-A0DA-A06FB5A6B624@donders.ru.nl> <1401780746302.15342@flinders.edu.au>, <1401781837723.25460@flinders.edu.au>, <538D8B51.6040508@donders.ru.nl>, <1401842462961.53202@flinders.edu.au> <1401844526765.83574@flinders.edu.au>, <538ECDE3.90803@donders.ru.nl> <1401868365953.99873@flinders.edu.au>, <538ED591.8000108@donders.ru.nl> <1401927624823.94563@flinders.edu.au>, <53903942.8010009@donders.ru.nl>, <1401960997142.37788@flinders.edu.au> Message-ID: <1402052150162.56887@flinders.edu.au> Hey Jorn, I ended up getting it working because mvar wasnt actually in the fieldtrip toolbox, I updated and it came through. Which is great. However, now I am just getting NaNs in my adjacency matrix, is that because of the rank deficiency? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Thursday, 5 June 2014 7:06 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hey jorn, Yeah I tried that, I entered in specific grid points into the leadfield. The rank was still 37 ( out of 116), I still cant really work it out haha. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" Sent: Thursday, 5 June 2014 7:02 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_mvaranalysis Hola, did you read some tutorials on virtual channel extraction? If you follow this one: http://fieldtrip.fcdonders.nl/tutorial/connectivity#connectivity_between_meg_virtual_channel_and_emg You might want to get to where you want. With 'voxel' I basically meant source activity at a specific gridpoint. For some people, fMRI terminology is easier to grasp ;) Best, Jörn On 6/5/2014 2:20 AM, Tyler Grummett wrote: > Hey Jorn, > > First off, thank you and you are a champ. > > I am trying to create a virtual channel for each area of the brain using an atlas. > > Originally I was doing the following to get my grid: > > % compute lead field ( apparently source analysis computes > % lead field anyway > cfg = []; > cfg.elec = timelock.elec; > cfg.vol = vol; > % cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution > % cfg.grid.unit = 'mm'; > cfg.grid.xgrid = atlas_grid.xgrid; > cfg.grid.ygrid = atlas_grid.ygrid; > cfg.grid.zgrid = atlas_grid.zgrid; > % cfg.dim = atlas_grid.dim; > % cfg.pos = pos; > cfg.reducerank = 'yes'; % 3 for EEG, 2 for MEG > cfg.backproject = 'yes'; > cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window > grid = ft_prepare_leadfield( cfg); > > This generates a roughly 4800 dipoles in the brain. I then interpolate with the following code: > > parameter = 'avg.pow'; > cfg = []; > cfg.downsample = 2; > cfg.parameter = parameter; > sourceInt = ft_sourceinterpolate( cfg, source, mri); > > And it gives me a plot where the cross-hair is outside the brain ( see attached). > Ive made sure each step is using the MNI coordinate system. > > I honestly dont know how to create voxels, and how that would translate into channels. > > Kind regards, > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" > Sent: Wednesday, 4 June 2014 5:45 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_mvaranalysis > > Hi Tyler, > > ah I see, so the 'source'-structure you get from the beamforming serves > to create the 'data'-structure to run mvaranalysis. > cfg.reducerank in ft_prepare_leadfield does not reduce the rank of your > data, it reduces the rank of leadfield dimensionality (a dipole has > moments in 3 directions, x,y,z). > The interpolation does not work for you, because you do not have a full > 3D grid anymore but rather individual grid points. Of course one could > interpolate, but it would be far from optimal, so FieldTrip refuses to > do so (imagine you want to interpolate to a 2D grid, e.g. a square, but > you only have a data point of the center of that 2D grid). > Instead of using 116 gridpoints why not lump them together to regions of > interest. That way you'd probably get only a handful of 'voxels', and > you probably get rid of the rank deficiency. However, I am not quite > sure what you want to achieve with this analysis, so I am not sure > whether I give adequate help advise ;) > > Best, > Jörn > > On 6/4/2014 9:53 AM, Tyler Grummett wrote: >> Hey Jorn, >> >> I was just checking to see if I was calculating the beamformer correctly. >> >> Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116. >> What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid >> and Zgrid as the atlas). >> >> I was trying to increase my rank (or decrease rank deficiency by changing my code). >> >> However, no matter what I have tried thus far, nothing has helped. >> >> Tyler. >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >> Sent: Wednesday, 4 June 2014 5:12 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_mvaranalysis >> >> Hi Tyler, >> >> I thought you are talking about mvaranalysis - why is the code you've >> pasted about leadfields and lcmv beamforming? >> >> Best, >> Jörn >> >> On 6/4/2014 3:15 AM, Tyler Grummett wrote: >>> Jorn, >>> >>> There is an additional issue of interpolating the data and then plotting it with ft_sourceplot. >>> >>> I have hit a wall of issues haha >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett >>> Sent: Wednesday, 4 June 2014 10:11 AM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hey Jorn, >>> >>> You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work. >>> >>> My code is as follows: (I used an atlas to get the grid coordinates) >>> >>> % compute lead field ( apparently source analysis computes >>> % lead field anyway >>> cfg = []; >>> cfg.elec = timelock.elec; >>> cfg.vol = vol; >>> cfg.grid.unit = 'mm'; >>> cfg.dim = atlas_grid.dim; >>> cfg.pos = pos; >>> cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG >>> cfg.backproject = 'yes'; >>> cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window >>> grid = ft_prepare_leadfield( cfg); >>> >>> % Source Analysis: without contrasting condition >>> cfg = []; >>> cfg.channel = 'EEG'; >>> cfg.method = 'lcmv'; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> cfg.keepfilter = 'yes'; >>> source = ft_sourceanalysis( cfg, timelock); >>> >>> Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank. >>> >>> Any suggestions? >>> >>> Tyler >>> >>> ************************* >>> >>> Tyler Grummett ( BBSc, BSc(Hons I)) >>> PhD Candidate >>> Brain Signals Laboratory >>> Flinders University >>> Rm 5A301 >>> Ext 66124 >>> >>> ________________________________________ >>> From: fieldtrip-bounces at science.ru.nl on behalf of "Jörn M. Horschig" >>> Sent: Tuesday, 3 June 2014 6:16 PM >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] ft_mvaranalysis >>> >>> Hi Tyler, >>> >>> most likely your data is rank deficient. You can check this by >>> >> rank(data.trial{1}) >>> >>> You probably won't get 116 (#channels) as a result. If I remember >>> correctly your data needs to have full-rank for mvaranalysis. >>> >>> Best, >>> Jörn >>> >>> >>> On 6/3/2014 9:50 AM, Tyler Grummett wrote: >>>> JM, >>>> >>>> >>>> My data has the following format: >>>> >>>> >>>> data = >>>> >>>> >>>> fsample: 500 >>>> sampleinfo: [14x2 double] >>>> trial: {1x14 cell} >>>> time: {1x14 cell} >>>> label: {1x116 cell} >>>> cfg: [1x1 struct] >>>> >>>> I had a look and there are no NaNs or anything. I have tried running >>>> using the coherence method for connectivity analysis (hence I didnt >>>> need to use mvaranalysis) and it seemed to work fine. >>>> >>>> Can you give me any suggestions as to what the problems with my data >>>> could be? >>>> >>>> Tyler >>>> >>>> >>>> >>>> ************************* >>>> >>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>> /PhD Candidate/ >>>> /Brain Signals Laboratory/ >>>> /Flinders University/ >>>> /Rm 5A301/ >>>> /Ext 66124/ >>>> ------------------------------------------------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl >>>> on behalf of jan-mathijs schoffelen >>>> >>>> *Sent:* Tuesday, 3 June 2014 5:06 PM >>>> *To:* FieldTrip discussion list >>>> *Subject:* Re: [FieldTrip] ft_mvaranalysis >>>> This is a low level matlab error and suggests a problem with your data. >>>> >>>> >>>> On Jun 3, 2014, at 9:32 AM, Tyler Grummett >>>> >>> > wrote: >>>> >>>>> Using the same code it generates the error: >>>>> >>>>> Error using chol >>>>> Matrix must be positive definite. >>>>> >>>>> Error in armorf (line 40) >>>>> ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); >>>>> >>>>> Error in ft_mvaranalysis (line 395) >>>>> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), >>>>> size(tmpdata.trial{1},2), >>>>> cfg.order); >>>>> >>>>> >>>>> >>>>> ************************* >>>>> >>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>> /PhD Candidate/ >>>>> /Brain Signals Laboratory/ >>>>> /Flinders University/ >>>>> /Rm 5A301/ >>>>> /Ext 66124/ >>>>> ------------------------------------------------------------------------ >>>>> *From:*fieldtrip-bounces at science.ru.nl >>>>> >>>> > on behalf of jan-mathijs >>>>> schoffelen >>>> > >>>>> *Sent:*Tuesday, 3 June 2014 4:49 PM >>>>> *To:*FieldTrip discussion list >>>>> *Subject:*Re: [FieldTrip] ft_mvaranalysis >>>>> Hi Tyler, >>>>> >>>>> Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for >>>>> ft_mvaranalysis cfg.toolbox = ‘bsmart’ >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 3, 2014, at 3:39 AM, Tyler Grummett >>>>> >>>> > wrote: >>>>> >>>>>> Hello fieldtrippers, >>>>>> >>>>>> Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] = >>>>>> mvar(dat', cfg.order, cfg.mvarmethod); >>>>>> >>>>>> The error message is: >>>>>> >>>>>> Undefined function 'mvar' for input arguments of type 'double'. >>>>>> >>>>>> ​ Ive tried looking for the function, but I cant find it. Is it >>>>>> likely that it is hidden or absent? >>>>>> >>>>>> I swear this has worked before on old data, and I didnt update the >>>>>> toolbox between trying it >>>>>> with the old data and with the new data. I have now updated the >>>>>> fieldtrip toolbox and I have >>>>>> tried running the code again, but no luck. >>>>>> >>>>>> Tyler >>>>>> >>>>>> ************************* >>>>>> >>>>>> /Tyler Grummett ( BBSc, BSc(Hons I))/ >>>>>> /PhD Candidate/ >>>>>> /Brain Signals Laboratory/ >>>>>> /Flinders University/ >>>>>> /Rm 5A301/ >>>>>> /Ext 66124/ >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From giulia.rizza at tiscali.it Fri Jun 6 15:58:39 2014 From: giulia.rizza at tiscali.it (giulia.rizza at tiscali.it) Date: Fri, 06 Jun 2014 15:58:39 +0200 Subject: [FieldTrip] help for ICA on thermal signals Message-ID: <5c03e7ae27f2c24d84412d6cdd71f31a@tiscali.it> Dear FieldTrippers I know this is not a usual topic but maybe you can give me some advice, I would like to ask you some help for the correction of ocular artifacts on facial thermal imaging signals. The temperature of the periorbital areas is very informative about the sympathetic system activity, but we realized that blinks and saccades also influence the temperature in these regions Our signal is sampled at 10 Hz and the time course is extracted from 10 regions of interest, one of which is placed exactly on the right eye. Thus we have 10 channels (ROIs). We preprocessed the signal by using a band pass filter (Butt 0.01 - 4 Hz) and by demeaning it. Then we used ICA (runica or fastica) to detect the ocular components. A component was defined as "artefactual ocular" when its face distribution was mostly around the eye and the periorbital channels. After subtracting that component from the original signal, we saw that the signal was very well corrected on the eye channel itself but it got worst in the channel of interest (the periorbitals) by introducing some artefacts. Further we noticed that the unmixing matrix was close to singular (det(A) = 10^-13). We thought that this could be due to the number of channels so we also tried to export more (64) ROIs but nothing changed. Do you have any idea about why this would happen? We thought that ICA could work on any type of wave, but maybe there is something we are missing. Should we use another method? Do you have any suggestion? Any suggestion is pretty much appreciated Thanks in advance for any help. Giulia Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 [1] Links: ------ [1] http://www.istella.it?wtk=amc138614816829636 Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ncota at mrn.org Fri Jun 6 20:03:18 2014 From: ncota at mrn.org (Navin Cota) Date: Fri, 6 Jun 2014 12:03:18 -0600 Subject: [FieldTrip] IEEE 2014 Schizophrenia Classification Challenge Message-ID: Dear All: Good day !! The IEEE International Workshop on Machine Learning for Signal Processing is proud to announce. *2014 Schizophrenia Classification Challenge* Please visit the below website for full details about the competition and submission instructions.Competition flyer attached. *https://www.kaggle.com/c/mlsp-2014-mri * Have a nice week ahead. Thanks Navin Postdoctoral Fellow Medical Imaging Analysis(MIA) lab The Mind Research Network Albuquerque,New Mexico USA http://mialab.mrn.org/lab-members/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: flyer_mlsp2014.pdf Type: application/pdf Size: 430775 bytes Desc: not available URL: From Laura.Rueda at faber.kuleuven.be Mon Jun 9 16:44:29 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Mon, 9 Jun 2014 14:44:29 +0000 Subject: [FieldTrip] Error in ft_sourceanalysis: DICS In-Reply-To: <538DD898.8050801@donders.ru.nl> References: , <538DD898.8050801@donders.ru.nl> Message-ID: Dear Jörn, Thank you for your suggestion. I used the template BEM model with the corresponding MRI template and the code works fine. In the end, the problem was the capital letters on the labels of the electrodes on the different structures. So at least for the sanity check, everything seems fine with the algorithm and the EEG data. Now I'm using an individual MRI from one of my subjects. I realigned according to the fiducials. I tried to reslice after this with a resolution of 1mm, and keeping the original dimensions, because the voxel size of my images is 1x1.1x1 mm, but this resulted in the head not being in the center of the box and the head tilted downwards, so I skipped this step to move on a bit (although I would kindly request some tip in this regard as well). Then I segmented the brain compartments (brain, skull and scalp) with tissue probability maps first, and I adjusted the size of the 3D shape used for dilating the brainmask (on strel_bol) to obtain the skull mask because the default value assigned points to the skull on the scalp, and they were clearly intersecting. After doing this, I checked the segmented compartments and the meshes. At least visually, these looked fine. When running ft_prepare_headmodel, I get a warning and the vol.mat is filled with NaNs. The warning is this one: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. > In ft_headmodel_bemcp at 184 In ft_prepare_headmodel at 253 I read in another thread that visual inspection does not guarantee the creation of a head model. So, I wonder, is there other way of checking that the meshes are correctly formed? Best regards, Laura Rueda ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: 03 June 2014 16:15 To: FieldTrip discussion list Subject: Re: [FieldTrip] Error in ft_sourceanalysis: DICS Hi Laura, the problem could be in the segmentation - you have to have closed boundaries of all tissues for the BEM model, otherwise the computation can result in only nans. It requires a bit more work to check for this, so I would first start with using the standard BEM model that is in the FieldTrip/template/headmodel directory to check whether (a) your code runs smoothly then and (b) your results make sense. Even though results are less optimal than when using individual MRs, you can get a first glimpse and it's a good sanity check for everything you are doing. If these two things work well, then I can help you with checking your segmentation (also on this mailinglist). Note though that that would be more hacking than real fieldtrippin'... ;) Best, Jörn On 6/3/2014 3:30 PM, Laura Rueda Delgado wrote: > > Dear Kousik, > > I found that thread and made some tests on my data as well. The > solution that is proposed there (reject the vertices of C11st/C22st > where the NaN values are present) is not feasible in my case because I > would need to reject 2908 vertices from the 3000 ones present in the > brain compartment. Also, the xyz coordinates of these critical > vertices (vol.bnd(1).pnt) and their corresponding triangles > (vol.bnd(1).tri) do not converge into a single point, which would be > the reason to reject them in the first place. > > I’ve checked and re-checked the segmented volumes and meshes (errors > at these steps seem to be the most common problem), but all the > compartments are closed surfaces and do not intersect. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *kousik sarathy > *Sent:* dinsdag 3 juni 2014 14:47 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I'm not very familiar with BEM's. I assumed the problem to be more > superficial and it is not. > > So I re-ran some codes and I too have a vol.vol that has only NaN's. I > think the problem has been previously raised here. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-February/002618.html > > Let's wait to see if someone more experienced has something to say. > > > -- > > Regards, > > Kousik Sarathy, S > > On Tue, Jun 3, 2014 at 10:28 AM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > The solution that you propose requires the use of Freesurfer to create > the sourcespace. If I’d like to restrict to use Fieldtrip and its > toolboxes, how could I constrain it to calculate leadfields for points > inside the brain? I tried to restrict the ft_sourceanalysis by > including only the points of the grid that are inside the brain, but I > still get the SVD error. > > I checked the NaN values of vol.mat and all the elements on this > matrix are NaN. I suppose that’s where the error is, however I don’t > know how to correct for it, because I just generate the volume > structure from the mesh (see first message). > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 18:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Oh. Yes. > > FT puts NaN's into sourcespace points outside the brain. You can > constrain FT to only calculate leadfields for sourcespace points > inside the brain. I generally do this. I don't know how FT handles > those outside the brain source points really. You could give this a try. > > Check this tutorial/code: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#forward_solution > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 6:01 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked for NaN and Inf values in powspctrm and crsspctrm of > freqAll. There are none. However, I checked for NaN values in > grid.leadfield and it has some. I thought that these were NaN values > in the points of the grid outside a brain region, but I might be > mistaken. > > grid = > > xgrid: [-58 -48 -38 -28 -18 -8 2 12 22 32 42 52 62 72 82 92 102] > > ygrid: [-61 -51 -41 -31 -21 -11 -1 9 19 29 39 49 59] > > zgrid: [-13 -3 7 17 27 37 47 57 67 77 87 97 107 117] > > dim: [17 13 14] > > pos: [3094x3 double] > > unit: 'mm' > > inside: [1x1516 double] > > outside: [1x1578 double] > > cfg: [1x1 struct] > > leadfield: {1x3094 cell} > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:37 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Ah. Interesting. Good that error changes. So that was the problem before. > > Now, can you check if your Freq matrices contain any NaN's > (isnan(freqAll))? It can happen sometimes. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 5:31 PM, Laura Rueda Delgado > > > wrote: > > Dear Kousik, > > I checked the labels and they were the same, except for whether they > were in capital letters. So I added the following before > ft_sourceanalysis: > > freqAll.label=cellfun(@upper, freqAll.label, 'UniformOutput', 0); > > freqAll.labelcmb=cellfun(@upper, freqAll.labelcmb, 'UniformOutput', 0); > > This way the labels of the elec structure and freqAll are in capital > letters. > > And now I get a different error (although still within the function > beamformer_dics): > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > What could it be? > > Best regards, > > Laura > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *kousik sarathy > *Sent:* woensdag 28 mei 2014 17:10 > > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hey Laura, > > I too had the same suggestion as Johanna's. > > Another thing to check would be if the labels that you used for the > leadfield estimation are the same as the freq data. I guess FT at some > point would also check this to extract the indices. > > > -- > > Regards, > > Kousik Sarathy, S > > On Wed, May 28, 2014 at 4:51 PM, Laura Rueda Delgado > > > wrote: > > Dear Johanna, > > Thank you for your suggestion. > > On step 2 in the code, I select from the elec structure the channels > that are included in the frequency data. So the elec structure used > for preparing the leadfield has 128 electrodes, the same as the data > (data_rs, data 4, and therefore freqAll). I checked this precisely > because I read a previous thread discussing that issue. > > Best regards, > > Laura Rueda Delgado > > *From:*fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl > ] *On Behalf Of *Johanna Zumer > *Sent:* woensdag 28 mei 2014 16:42 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Error in ft_sourceanalysis: DICS > > Hi Laura, > > Does your data have the same channels as the leadfield (as the > electrodes that went in to compute the leadfield)? I often see that > error when there is a mismatch of channels in that way. > > Best, > > Johanna > > 2014-05-28 15:29 GMT+01:00 Laura Rueda Delgado > >: > > Dear Fieldtrip users, > > I’m following the tutorial of beamformers (Source Analysis: Contrast > activity to another interval > ) to estimate > oscillatory sources using DICS. I’ve checked the surface created after > segmentation and the grid generated from the electrode positions and > the headmodel. That seems to work ok. However, at the step of source > analysis, I get the following error: > > Error using * > > Inner matrix dimensions must agree. > > 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 567) > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > Does anybody have an idea of what I’m doing wrong? > > Thank you in advance for any help or suggestion! > > ----------------------------------------------------------------- > > This is my code: > > %% 1 - Preparation of MRI- source space > > % Read MRI > > mrifile = 'Subject01\Subject01.mri'; > > mri = ft_read_mri(mrifile); > > % Reslice to reorient images > > cfg = []; > > cfg.dim = [256 256 256]; > > mri = ft_volumereslice(cfg,mri); > > % Segment compartments > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > segmentedmri = ft_volumesegment(cfg, mri); > > % Prepare mesh > > cfg=[]; > > cfg.tissue={'brain', 'skull','scalp'}; > > cfg.numvertices = [3000 2000 1000]; > > bnd=ft_prepare_mesh(cfg,segmentedmri); > > % Prepare headmodel > > cfg = []; > > cfg.method ='bemcp'; > > vol = ft_prepare_headmodel(cfg, bnd); > > %% 2- Prepare leadfield - Creating grid > > load elec_aligned2% Obtained after adjusting electrodes on scalp > surface interactively > > % Three fiducial markers were added to the electrode file, and now they're > > % removed so that the electrode structure has the same number of > channels as the data > > elec_aligned2.chanpos = elec_aligned2.chanpos(1:128, :); > > elec_aligned2.elecpos = elec_aligned2.elecpos(1:128, :); > > elec_aligned2.label = elec_aligned2.label(1:128, :); > > cfg =[]; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.grid.resolution = 10; > > cfg.grid.unit = 'mm'; > > [grid] = ft_prepare_leadfield(cfg); > > %% 3- Join rest and task data > > % data_rs: resting state data > > % data4: data during task > > dataAll = ft_appenddata([], data_rs, data4); > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [18 18]; > > freqAll = ft_freqanalysis(cfg, dataAll); > > %---------------------------------- > > % all seems normal until here > > %---------------------------------- > > %% 4- Estimate source of all data > > cfg = []; > > cfg.method = 'dics'; > > cfg.frequency = 18; > > cfg.grid = grid; > > cfg.vol = vol; > > cfg.elec = elec_aligned2; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.lambda = '5%'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.realfilter = 'yes'; > > sourceAll = ft_sourceanalysis(cfg, freqAll); > > Cheers, > > Laura Rueda Delgado > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lysne at unm.edu Mon Jun 9 22:04:38 2014 From: lysne at unm.edu (Per Arnold Lysne) Date: Mon, 9 Jun 2014 20:04:38 +0000 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality Message-ID: <1402344273485.6601@unm.edu> Hello, I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) y(t) = 0.53*y(t-1) - 0.80*y(t-2) z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). Thank you for your help, Per A. Lysne University of New Mexico lysne at unm.edu The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. [cid:898dbd0d-1330-430a-8327-bd9a95f2b7fe] [cid:889457b8-d09d-4655-bac6-e3da92b8be20][cid:f640ae0e-d04f-451c-87ab-0f93aaa79870] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.NonCondGranger.jpg Type: image/jpeg Size: 24031 bytes Desc: MVAR2.NonCondGranger.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.Spectra.jpg Type: image/jpeg Size: 24742 bytes Desc: MVAR2.Spectra.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MVAR2.CondGranger.jpg Type: image/jpeg Size: 23915 bytes Desc: MVAR2.CondGranger.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pal_test_ft_granger_cond.m URL: From gamaliel.ghu at gmail.com Tue Jun 10 03:16:11 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Mon, 9 Jun 2014 21:16:11 -0400 Subject: [FieldTrip] Question co-registration Message-ID: Greetings to all I read the tutorial to generate a forward model, however fiedltrip am beginner and I have some doubts: 1-If I have a patient IMRs but I have not scanned the electrodes, it is possible to use generic templates as shown in the tutorial (FieldTrip/template/electrode/standard_1020.elc.)? 2-If you can use these templates (FieldTrip/template/electrode/standard_1020.elc.), Can modify decreasing the number of electrodes that want to use? 3-I would do a head model for children, so the number of electrodes should be lower. 4-sources can be simulated fieldtrip? PD: sorry my English am Chilean, and I do not speak much English regards -- *Gamaliel Huerta* *Ingeniería Civil Biomédica* *Universidad de Valparaíso* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 10 10:15:57 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 10 Jun 2014 10:15:57 +0200 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality In-Reply-To: <1402344273485.6601@unm.edu> References: <1402344273485.6601@unm.edu> Message-ID: <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> Dear Per, Thanks for sending along the very clear code, makes it easy to run and verify ;-). I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values. Best wishes, Jan-Mathijs On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne wrote: > Hello, > > I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: > > x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) > y(t) = 0.53*y(t-1) - 0.80*y(t-2) > z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) > > This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). > > In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. > > The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. > > My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). > > Thank you for your help, > > Per A. Lysne > University of New Mexico > lysne at unm.edu > > > > > The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lysne at unm.edu Tue Jun 10 18:58:31 2014 From: lysne at unm.edu (Per Arnold Lysne) Date: Tue, 10 Jun 2014 16:58:31 +0000 Subject: [FieldTrip] Non-Parametric Conditional Granger Causality In-Reply-To: <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> References: <1402344273485.6601@unm.edu>, <4BDF7904-42E2-4DD3-8AE3-4F4CDF571B28@donders.ru.nl> Message-ID: <1402419505182.71464@unm.edu> Hi Jan-Mathijs, Thank you for the quick response and for pointing out my problem with scaling the y-axis. Your suggestion pointed be to another issue: while the Granger spectra output from the non-conditional calculation is organized as 3x3xNFreqs (for a trivariate system), the conditional Granger output is a flat list of 6xNFreqs. I am now getting the correct, frequency resolved results in both cases. I will attach my code in case it can be of help in the future. If there is a convenient reference for the calculation in blockwise_conditionalgranger.m, I would still be interested in seeing it. Thanks again, -Per ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of jan-mathijs schoffelen Sent: Tuesday, June 10, 2014 2:15 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Non-Parametric Conditional Granger Causality Dear Per, Thanks for sending along the very clear code, makes it easy to run and verify ;-). I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values. Best wishes, Jan-Mathijs On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne > wrote: Hello, I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system: x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1) y(t) = 0.53*y(t-1) - 0.80*y(t-2) z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1) This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used). In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero. The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases. My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods). Thank you for your help, Per A. Lysne University of New Mexico lysne at unm.edu The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pal_test_ft_granger_cond.m URL: From tyler.grummett at flinders.edu.au Thu Jun 12 10:07:43 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 12 Jun 2014 08:07:43 +0000 Subject: [FieldTrip] error when running ft_timelockanalysis Message-ID: <1402560435810.17433@flinders.edu.au> Hello fieldtrippers, I got the following error when trying to run ft_timelockanalysis. Undefined function 'mxSerialize_cpp' for input arguments of type 'struct'. Error in mxSerialize (line 35) argout = mxSerialize_cpp(argin); Error in ft_preamble_provenance (line 74) cfg.callinfo.inputhash{iargin} = CalcMD5(mxSerialize(tmparg)); Error in ft_preamble (line 54) evalin('caller', ['ft_preamble_' cmd]); Error in ft_timelockanalysis (line 95) ft_preamble provenance data I have no idea what the problem is, I tried looking for the function in my fieldtrip folder. I have just recently installed matlab 2014a if that is any help. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Thu Jun 12 10:29:34 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Thu, 12 Jun 2014 10:29:34 +0200 Subject: [FieldTrip] error when running ft_timelockanalysis In-Reply-To: <1402560435810.17433@flinders.edu.au> References: <1402560435810.17433@flinders.edu.au> Message-ID: <20140612102934.7vrsaal80swsscg4@arco.cib.na.cnr.it> Hi Tyler this problem has already been solved by Jörn M. Horschig. I attach here the answer he gave to me some time ago Best regards Sara ----- Messaggio inoltrato da jm.horschig at donders.ru.nl ----- Data: Wed, 14 May 2014 10:35:03 +0200 Da: "Jörn M. Horschig" Rispondi-A:FieldTrip discussion list Oggetto: ***SPAM*** Re: [FieldTrip] problem occurs when using ft_timelockanalysis A: FieldTrip discussion list Hi Sara, I guess you are not using a mac. What you describe concerns bug 2452 on our Bugzilla page: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2452 which pertains to some undocumented change in Matlab. Therefore it is necessary to use a different mxserialize function that from matlab 2014a onwards than before. This is a c++ function, which requires to be compiled for each platform independently. In FieldTrip, this file exists e.g. in fileio/private but only for MacOS 64-bit platforms. Apparently, we still need to compile it for MacOS 32bit, Windows and Linux platforms. I guess we should do that quite soon ;) I'll bring it up in today's FT meeting so that hopefully from tomorrow onwards it should work. btw, for you it will help to go to the FieldTrip/src directory in Matlab and type >> mex mxSerialize_cpp.cpp Then Matlab will mex (~compile) the file for you. You can then copy that file to your matlab code directory and everything should work out fine for you. I'll keep you updated on this. Best, Jörn On 5/13/2014 4:15 PM, s.rombetto at cib.na.cnr.it wrote: > Any suggestion concerning this problem? > > it works finewith Matlab 2013 > > > Hello fieldtrippers, > > > I got the following error when trying to run ft_timelockanalysis. > > > Undefined function 'mxSerialize_cpp' for input arguments of type 'struct'. > > Error in mxSerialize (line 35) > argout = mxSerialize_cpp(argin); > > Error in ft_preamble_provenance (line 74) > cfg.callinfo.inputhash{iargin} = CalcMD5(mxSerialize(tmparg)); > > Error in ft_preamble (line 54) > evalin('caller', ['ft_preamble_' cmd]); > > Error in ft_timelockanalysis (line 95) > ft_preamble provenance data > > I have no idea what the problem is, I tried looking for the function > in my fieldtrip folder. > > I have just recently installed matlab 2014a if that is any help. > > Tyler > > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 Lab MEG 0817483511 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From mahjoory86 at gmail.com Thu Jun 12 13:10:14 2014 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Thu, 12 Jun 2014 13:10:14 +0200 Subject: [FieldTrip] Grey Matter Message-ID: I want to restrict the source reconstruction to the grey matter. I am using this template head model. (load 'standard_bem.mat') Also I used ft_volumesegment to segmente the template mri (single_subj_T1_1mm.nii), But I don't know how to use seg.gray for creating grid? How should I set the parameters to have the same resolotion? Best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jun 12 15:32:04 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 12 Jun 2014 15:32:04 +0200 (CEST) Subject: [FieldTrip] Grey Matter In-Reply-To: Message-ID: <45574063.3239152.1402579924719.JavaMail.root@draco.zimbra.ru.nl> Dear Keyvan, Please have a look at our Frequently Asked Questions , you might find this one particularly helpful: Can I restrict the source reconstruction to the grey matter? Best, Jim ----- Oorspronkelijk bericht ----- > Van: "Keyvan Mahjoory" > Aan: "FieldTrip discussion list" > Verzonden: Donderdag 12 juni 2014 13:10:14 > Onderwerp: [FieldTrip] Grey Matter > I want to restrict the source reconstruction to the grey matter. I am > using this template head model. (load 'standard_bem.mat' ) > Also I used ft_volumesegment to segmente the template mri > (single_subj_T1_1mm.nii), > But I don't know how to use seg.gray for creating grid? > How should I set the parameters to have the same resolotion? > Best, > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jim Herring, MSc. Neuronal Oscillations Group Centre for Cognitive Neuroimaging Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Fri Jun 13 13:08:30 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Fri, 13 Jun 2014 13:08:30 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? Message-ID: Hi, It seems that ft_resample applies to all of the channels in the data structure. During resampling fieldtrip applies a filter, which adds artifacts to the step function in the trigger channels. For downsampling at least it would be great if you could specify a subset of channels to be downsampled by simple decimation (i.e. skip the lowpass filter). Is there any built-in way to do this? Thanks! Aaron -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From jan.schoffelen at donders.ru.nl Fri Jun 13 13:33:54 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jun 2014 13:33:54 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: <224529F4-9E51-4ECB-BAE1-44A6727E3944@donders.ru.nl> Hi Aaron, You can use cfg.method = ‘nearest’ when downsampling the trigger channels. I suspect that in this case no filtering will be applied. Thus, call ft_resampledata twice (each time with a different method: once for the functional data, the other time for the trigger(s)), and call ft_appenddata afterwards. Best, Jan-Mathijs On Jun 13, 2014, at 1:08 PM, Aaron Schurger wrote: > Hi, > It seems that ft_resample applies to all of the channels in the data > structure. During resampling fieldtrip applies a filter, which adds > artifacts to the step function in the trigger channels. For > downsampling at least it would be great if you could specify a subset > of channels to be downsampled by simple decimation (i.e. skip the > lowpass filter). Is there any built-in way to do this? > Thanks! > Aaron > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Jun 13 16:36:11 2014 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 13 Jun 2014 10:36:11 -0400 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: Dear Aaron, Note that the decimation process is indeed the use of a low-pass filter and subsequent downsampling. As you may already know, this is to avoid aliasing. Otherwise is just an interpolation. "Decimation reduces the original sampling rate for a sequence to a lower rate, the opposite of interpolation. The decimation process filters the input data with a lowpass filter and then resamples the resulting smoothed signal at a lower rate." Best, Rodrigo On Fri, Jun 13, 2014 at 7:08 AM, Aaron Schurger wrote: > Hi, > It seems that ft_resample applies to all of the channels in the data > structure. During resampling fieldtrip applies a filter, which adds > artifacts to the step function in the trigger channels. For > downsampling at least it would be great if you could specify a subset > of channels to be downsampled by simple decimation (i.e. skip the > lowpass filter). Is there any built-in way to do this? > Thanks! > Aaron > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Sat Jun 14 01:35:44 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Sat, 14 Jun 2014 01:35:44 +0200 Subject: [FieldTrip] How do you prevent ft_resample from filtering your trigger channels? In-Reply-To: References: Message-ID: Hi, Rodrigo, You are right - in fact I meant downsampling instead of decimation. I get the two words confused sometimes. Anyway, what I mean was just taking every n-th sample. You want to avoid doing any kind of filtering on your trigger channels! Best wishes, Aaron On Fri, Jun 13, 2014 at 4:36 PM, Rodrigo Montefusco wrote: > Dear Aaron, > > Note that the decimation process is indeed the use of a low-pass filter and > subsequent downsampling. As you may already know, this is to avoid aliasing. > Otherwise is just an interpolation. > > "Decimation reduces the original sampling rate for a sequence to a lower > rate, the opposite of interpolation. The decimation process filters the > input data with a lowpass filter and then resamples the resulting smoothed > signal at a lower rate." > > > Best, > > Rodrigo > > > On Fri, Jun 13, 2014 at 7:08 AM, Aaron Schurger > wrote: >> >> Hi, >> It seems that ft_resample applies to all of the channels in the data >> structure. During resampling fieldtrip applies a filter, which adds >> artifacts to the step function in the trigger channels. For >> downsampling at least it would be great if you could specify a subset >> of channels to be downsampled by simple decimation (i.e. skip the >> lowpass filter). Is there any built-in way to do this? >> Thanks! >> Aaron >> >> -- >> Aaron Schurger, PhD >> Senior researcher >> Laboratory of Cognitive Neuroscience >> Brain-Mind Institute, Department of Life Sciences >> École Polytechnique Fédérale de Lausanne >> Station 19, AI 2101 >> 1015 Lausanne, Switzerland >> +41 21 693 1771 >> aaron.schurger at epfl.ch >> http://lnco.epfl.ch/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From sib_ozr at yahoo.com Mon Jun 16 08:23:17 2014 From: sib_ozr at yahoo.com (Sibel OZER) Date: Sun, 15 Jun 2014 23:23:17 -0700 Subject: [FieldTrip] ft_databrowser Message-ID: <1402899797.30216.YahooMailNeo@web120103.mail.ne1.yahoo.com> Dear Fieldtrippers, I have one question, one problem. Question is I would like to remove the trials which include eye-blinks just at the time of target presentation. How can I do that in fieldtrip? In ft_rejectvisual, is it possible to put time indices, at least to do that rejection visually? My problem is that I applied Dr Schouwenburg's solution to correct ft_databrowser Matlab error, it worked, however, it does not plot components, but raw data despite explicitly stating viewmode as component. Did anybody encounter the same problem? thank you, best Sibel -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.hipp at cin.uni-tuebingen.de Mon Jun 16 11:05:15 2014 From: joerg.hipp at cin.uni-tuebingen.de (Joerg Hipp) Date: Mon, 16 Jun 2014 11:05:15 +0200 Subject: [FieldTrip] =?iso-8859-15?q?2014_T=FCbingen_MEG_Symposium?= Message-ID: <539EB34B.80007@cin.uni-tuebingen.de> The MEG Center Tübingen is pleased to announce the: 2014 Tübingen MEG Symposium The symposium takes place on October 27 and 28, 2014. It brings together leading researchers in the field of MEG and related disciplines. Join us in Tübingen to learn about the latest advances in MEG research and beyond. For more information and registration, please visit http://meg.medizin.uni-tuebingen.de/2014/ -------------- next part -------------- A non-text attachment was scrubbed... Name: poster.pdf Type: application/pdf Size: 498360 bytes Desc: not available URL: From eijlers at rsm.nl Mon Jun 16 16:35:16 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Mon, 16 Jun 2014 14:35:16 +0000 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis Message-ID: Dear community, Although I’ve seen other questions related to this topic, I still have some questions regarding baseline correction when executing a time-frequency analysis: After time-frequency analysis, I want to use the trial output either to compare (within participants) trials from different conditions or to put the datapoints of different trials into a regression (also on participant level). The question for me is how to deal with a baseline correction in this situation? The data before each trial of interest is in reaction to viewing a fixation cross. 1. If I understand it correctly, with the default config setting for cfg.polyremoval the mean of the whole trial is subtracted (prior to spectral analysis) to get rid of the offset in oscillations. 2. Does it mean that since I’m doing analyses on a participant level first, I only need to do this kind of baseline correction (from stimulus onset on)? 3. I thought that I should not subtract the mean of a window prior to stimulus onset, from the raw trial data before doing time-frequency analysis (the kind of baseline correction you would do with ERP analyses), but I see this happening in some articles. Did I not get it right, or is this related to the distinction between evoked and induced power, or something else? 4. Or is it an option (and should I) subtract the mean of a window prior to stimulus onset only after decomposition of the data in the power spectrum, for all trials? Thanks a lot! Best, Esther Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jun 17 09:46:47 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 17 Jun 2014 09:46:47 +0200 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis In-Reply-To: References: Message-ID: <539FF267.3000803@donders.ru.nl> Hi Esther, > 1. If I understand it correctly, with the default config setting for > cfg.polyremoval the mean of the whole trial is subtracted (prior > to spectral analysis) to get rid of the offset in oscillations. > 'Getting rid of the offset in oscillations' is not the purpose of demeaning prior to doing a frequency analysis. See here: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > 1. Does it mean that since I’m doing analyses on a participant level > first, I only need to do this kind of baseline correction (from > stimulus onset on)? > No, this is not a baseline correction as you are thinking of here. Remember that a power spectrum is obtained by squaring the fourier coefficients, i.e. power is always positive. Also, you want to baseline correct per frequency, because of the 1/f characteristic. > 1. I thought that I should /not/subtract the mean of a window prior > to stimulus onset, from the raw trial data before doing > time-frequency analysis (the kind of baseline correction you would > do with ERP analyses), but I see this happening in some articles. > Did I not get it right, or is this related to the distinction > between evoked and induced power, or something else? > As mentioned in the link above, you should demean the whole trial in FieldTrip because of the way the mtmconvol method is implemented. Any other "baseline correction" in the time-domain will only affect the DC bin (ie 0Hz), but not the estimatoin at individual frequencies. This is because baseline correction in the time-domain is a mere subtraction of a your data by a single number. Hence, the frequency content of your data stays unchanged. > 1. Or is it an option (and should I) subtract the mean of a window > prior to stimulus onset only after decomposition of the data in > the power spectrum, for all trials? > Yes, in any plotting function, you can set cfg.baseline and cfg.baselinetype. You can also call ft_freqbaseline. Note baselining is also not a trivial thing here. You can serious harm (i.e. invalidate) your statistics if you're doing it wrong (but that depends on your experimental design and question). Usually, if you compare conditions you should not do a baseline correction at all (otherwise any statistical difference might show up due to a difference in baseline to start with). Best, Jörn On 6/16/2014 4:35 PM, Esther Eijlers wrote: > Dear community, > > Although I’ve seen other questions related to this topic, I still have > some questions regarding baseline correction when executing a > time-frequency analysis: > > After time-frequency analysis, I want to use the trial output either > to compare (within participants) trials from different conditions or > to put the datapoints of different trials into a regression (also on > participant level). > The question for me is how to deal with a baseline correction in this > situation? The data before each trial of interest is in reaction to > viewing a fixation cross. > > 1. If I understand it correctly, with the default config setting for > cfg.polyremoval the mean of the whole trial is subtracted (prior > to spectral analysis) to get rid of the offset in oscillations. > 2. Does it mean that since I’m doing analyses on a participant level > first, I only need to do this kind of baseline correction (from > stimulus onset on)? > 3. I thought that I should /not/subtract the mean of a window prior > to stimulus onset, from the raw trial data before doing > time-frequency analysis (the kind of baseline correction you would > do with ERP analyses), but I see this happening in some articles. > Did I not get it right, or is this related to the distinction > between evoked and induced power, or something else? > 4. Or is it an option (and should I) subtract the mean of a window > prior to stimulus onset only after decomposition of the data in > the power spectrum, for all trials? > > Thanks a lot! > > Best, > Esther > > > Disclaimer > ------------------------------------------------------------------------ > De informatie verzonden in dit e-mail bericht is vertrouwelijk en is > uitsluitend bestemd voor de geadresseerde van dit bericht. Lees > verder: www.eur.nl/email-disclaimer > The information in this e-mail message is confidential and may be > legally privileged. Read more: www.eur.nl/english/email-disclaimer > > ------------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eijlers at rsm.nl Tue Jun 17 13:44:57 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Tue, 17 Jun 2014 11:44:57 +0000 Subject: [FieldTrip] What kind of baseline correction to use for time-frequency analysis In-Reply-To: <539FF267.3000803@donders.ru.nl> References: <539FF267.3000803@donders.ru.nl> Message-ID: Dear Jorn, Thanks a lot for the clarification! Best, Esther On 17/06/14 09:46, ""Jörn M. Horschig"" wrote: >Hi Esther, > >> 1. If I understand it correctly, with the default config setting for >> cfg.polyremoval the mean of the whole trial is subtracted (prior >> to spectral analysis) to get rid of the offset in oscillations. >> >'Getting rid of the offset in oscillations' is not the purpose of >demeaning prior to doing a frequency analysis. See here: >http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > >> 1. Does it mean that since I¹m doing analyses on a participant level >> first, I only need to do this kind of baseline correction (from >> stimulus onset on)? >> > >No, this is not a baseline correction as you are thinking of here. >Remember that a power spectrum is obtained by squaring the fourier >coefficients, i.e. power is always positive. Also, you want to baseline >correct per frequency, because of the 1/f characteristic. > >> 1. I thought that I should /not/subtract the mean of a window prior >> to stimulus onset, from the raw trial data before doing >> time-frequency analysis (the kind of baseline correction you would >> do with ERP analyses), but I see this happening in some articles. >> Did I not get it right, or is this related to the distinction >> between evoked and induced power, or something else? >> >As mentioned in the link above, you should demean the whole trial in >FieldTrip because of the way the mtmconvol method is implemented. Any >other "baseline correction" in the time-domain will only affect the DC >bin (ie 0Hz), but not the estimatoin at individual frequencies. This is >because baseline correction in the time-domain is a mere subtraction of >a your data by a single number. Hence, the frequency content of your >data stays unchanged. > >> 1. Or is it an option (and should I) subtract the mean of a window >> prior to stimulus onset only after decomposition of the data in >> the power spectrum, for all trials? >> >Yes, in any plotting function, you can set cfg.baseline and >cfg.baselinetype. You can also call ft_freqbaseline. Note baselining is >also not a trivial thing here. You can serious harm (i.e. invalidate) >your statistics if you're doing it wrong (but that depends on your >experimental design and question). Usually, if you compare conditions >you should not do a baseline correction at all (otherwise any >statistical difference might show up due to a difference in baseline to >start with). > >Best, >Jörn > >On 6/16/2014 4:35 PM, Esther Eijlers wrote: >> Dear community, >> >> Although I¹ve seen other questions related to this topic, I still have >> some questions regarding baseline correction when executing a >> time-frequency analysis: >> >> After time-frequency analysis, I want to use the trial output either >> to compare (within participants) trials from different conditions or >> to put the datapoints of different trials into a regression (also on >> participant level). >> The question for me is how to deal with a baseline correction in this >> situation? The data before each trial of interest is in reaction to >> viewing a fixation cross. >> >> 1. If I understand it correctly, with the default config setting for >> cfg.polyremoval the mean of the whole trial is subtracted (prior >> to spectral analysis) to get rid of the offset in oscillations. >> 2. Does it mean that since I¹m doing analyses on a participant level >> first, I only need to do this kind of baseline correction (from >> stimulus onset on)? >> 3. I thought that I should /not/subtract the mean of a window prior >> to stimulus onset, from the raw trial data before doing >> time-frequency analysis (the kind of baseline correction you would >> do with ERP analyses), but I see this happening in some articles. >> Did I not get it right, or is this related to the distinction >> between evoked and induced power, or something else? >> 4. Or is it an option (and should I) subtract the mean of a window >> prior to stimulus onset only after decomposition of the data in >> the power spectrum, for all trials? >> >> Thanks a lot! >> >> Best, >> Esther >> >> >> Disclaimer >> ------------------------------------------------------------------------ >> De informatie verzonden in dit e-mail bericht is vertrouwelijk en is >> uitsluitend bestemd voor de geadresseerde van dit bericht. Lees >> verder: www.eur.nl/email-disclaimer >> The information in this e-mail message is confidential and may be >> legally privileged. Read more: www.eur.nl/english/email-disclaimer >> >> ------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >-- >Jörn M. Horschig >PhD Student >Donders Institute for Brain, Cognition and Behaviour >Centre for Cognitive Neuroimaging >Radboud University Nijmegen >Neuronal Oscillations Group >FieldTrip Development Team > >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Contact: >E-Mail: jm.horschig at donders.ru.nl >Tel: +31-(0)24-36-68493 >Web: http://www.ru.nl/donders > >Visiting address: >Trigon, room 2.30 >Kapittelweg 29 >NL-6525 EN Nijmegen >The Netherlands > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ From michelic72 at gmail.com Tue Jun 17 17:26:22 2014 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 17 Jun 2014 17:26:22 +0200 Subject: [FieldTrip] PhD Lyon, France Message-ID: Dear List, here's a PhD position I'd like to advertise. Please find a detailed description in attachment. Cristiano *Funded PhD position at the Lyon Neuroscience Research Center, Brain Dynamics and Cognition Team *starting in October 2014 *Supervisors: Aurélie Bidet-Caulet, Olivier Bertrand* *Title: Brain mechanisms of distractibility during normal ageing and after frontal damage* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BidetCaulet_Phdposting.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 12681 bytes Desc: not available URL: From k.kessler at aston.ac.uk Tue Jun 17 18:43:46 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Tue, 17 Jun 2014 16:43:46 +0000 Subject: [FieldTrip] PhD in Birmingham Message-ID: Dear Fieldtrippers, We would be grateful if you could disseminate information about a PhD scholarship supervised by Craig McAllister (Birmingham University) and Klaus Kessler (Aston University). The project will involve MEG and TMS/tES in the context of the action-observation-execution-matching system (mirroring). The scholarship includes fees (to university) a as well as a stipend (living costs) for UK and EU students. Further details can be found here: http://www.findaphd.com/search/ProjectDetails.aspx?PJID=54268 Many thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Wed Jun 18 14:22:16 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Wed, 18 Jun 2014 12:22:16 +0000 Subject: [FieldTrip] Psychology Lectureship at Aston University Message-ID: Dear All We would be grateful if you could disseminate information about a Lecturer post in Psychology at Aston University (permanent member of staff) to potential candidates. Application deadline is the 11/07/2014. Further information: http://jobs.aston.ac.uk/Vacancy.aspx?ref=R140149 Many thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominic.depke at rub.de Wed Jun 18 15:58:25 2014 From: dominic.depke at rub.de (Dominic Depke) Date: Wed, 18 Jun 2014 15:58:25 +0200 Subject: [FieldTrip] ft_freqanalysis using wavelets, problems with trialdef Message-ID: <53A19B01.9050201@rub.de> Dear all, Actually I am analyzing EEG data containing epileptic seizure-like activity in Fieldtrip. Data is read in continuous mode and segments of interest are visually identified using the databrowser and a trial-structure (cfg.trl) is made from the information in the 'cfg.artfctdef.visual.artifact' field. After the trial-definition ft_preprocessing is called a second time with the option 'cfg.continuous' set to 'no'. Now I tried to use ft_frequanalysis using wavelets to get information about power-spectral densities for every single trial and every single channel ( in terms of individual 'seizure' events) but the output structure is filled with NaNs. I read the tutorial documentations and changed the values for cfg.toi and width but the result remained the same. Further, my datastructure does not contain a .trialinfo field so how should the trialdefinition look like (e.g. if you create cfg.trials) for use with ft_freqanalysis? There is only a cfg.trl and a data.trial field in the datastructure. Moreover, my data does not contain any stimulus codes. Best, Dominic From sib_ozr at yahoo.com Wed Jun 18 20:44:23 2014 From: sib_ozr at yahoo.com (Sibel OZER) Date: Wed, 18 Jun 2014 11:44:23 -0700 Subject: [FieldTrip] binica ICA Message-ID: <1403117063.40565.YahooMailNeo@web120105.mail.ne1.yahoo.com> Hi all, How can I use binica ICA? When I run the function  ft_componentanalysis with cfg.method = 'binica';, I get the following error(my OS is Windows): Running ica from script file binica6324.sc The system cannot find the file specified. Error using floatread (line 168) floatread() fopen() error. Error in binica (line 325)     wts = floatread(weightsfile,[ncomps Inf],[],0); Error in ft_componentanalysis (line 486)     [weights, sphere] = binica(dat, optarg{:}); best, Sibel -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.fransen at donders.ru.nl Thu Jun 19 11:19:16 2014 From: a.fransen at donders.ru.nl (Anne Fransen) Date: Thu, 19 Jun 2014 11:19:16 +0200 Subject: [FieldTrip] ft_sourceplot is now forced to be interactive Message-ID: Hi, I use ft_sourceplots to make orthoplots, however, recently I cannot make multiple graphs anymore without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. Thank you, Best regards, Anne Fransen -- Anne M.M. Fransen Neurophysiology of Active Perception Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen E-mail: a.fransen at donders.ru.nl Phone: 0031 (0)24 36 55933 Visiting Address: Room B3.43 Montessorilaan 3 Mail address: Anne Fransen Dep. Bio- en NeuroPsychologie Postbus 9104 6500 HE Nijmegen the Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Thu Jun 19 11:58:03 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 19 Jun 2014 02:58:03 -0700 Subject: [FieldTrip] error in==> prepare_mesh_segmentation Message-ID: <1403171883.77499.YahooMailNeo@web124905.mail.ne1.yahoo.com> Hello, I was following the tutorial in page http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a head model for EEG, I've done the same steps explained in the tutorial but when I reach the meshing stage and use: bnd=ft_prepare_mesh(cfg,segmentedmri); I get the following error: ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. error in ==> triangulate_seg at 73 seg = myvolumefillholes(seg); error in ==> prepare_mesh_segmentation at 101 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); error in ==> ft_prepare_mesh at 178 bnd = prepare_mesh_segmentation(cfg, mri); ----------------------------------------------------------------------------- although I'm geting the same results for the data structure as in the tutorial: disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] skull: [256x256x256 logical] scalp: [256x256x256 logical] cfg: [1x1 struct] ---------------------------------------------------------- can any one help in this matter please? Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From emanuelvandenbroeke at hotmail.com Thu Jun 19 14:11:31 2014 From: emanuelvandenbroeke at hotmail.com (emanuel vandenbroeke) Date: Thu, 19 Jun 2014 14:11:31 +0200 Subject: [FieldTrip] Cluster-based permutation test Message-ID: Dear Eric Maris or other fieldtrippers, In my experiment (a 2x2x6 design) I want to test whether ERP waveforms are significant different between conditions. There is no a priori assumption about the effects.In this experiment I apply a somatosensory stimulus on both arms before and after an intervention on one arm. The somatosensory stimulus consists of 6 different intensities. So it is a within-subject design with 3 factors: Time (T0 and T1), Arm (intervention, control) and Intensity (6 different intensities). I'm interested in the MAIN effect of INTENSITY, and the INTERACTION effects (TIME x ARM) and (TIME x ARM x INTENSITY).For the Interaction effect TIME x ARM, I first calculated difference-waves (postcontrol - precontrol and postintervention - preintervention) in Matlab en then applied the permutation test on these difference-waves to test whether the two arms are different. I hope this is correct? But now my question, how to test the TIME x ARM x INTENSITY interaction? One possibility might be to calculate an ANOVA F statistic for this interaction effect (so perform a full factorial ANOVA) and perform the permutation test? Is this justified? Very much thanks,Best wishes,Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Thu Jun 19 15:29:50 2014 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Thu, 19 Jun 2014 13:29:50 +0000 Subject: [FieldTrip] Marie-Curie Postdoctoral Fellowship at Aston University Message-ID: Dear Fieldtrippers Please disseminate to potential candidates the opportunity of a Marie-Curie Postroctoral Research Fellowship at Aston University to work with Prof Joel Talcott and Dr Caroline Witton. The fellowship offers an excellent salary (£53,765 per annum) for an early-career researcher who meets the Marie-Curie requirements (see below). Joel and Caroline are particularly looking for someone with experience in MEG data collection and analysis, and who is interested in becoming part of a vibrant EU-funded Initial Training Network which provides many opportunities for travel and networking. Prior experience with language research would be welcome but is not a requirement. To meet the Marie Curie requirements, you need to be within the first five years of your research career, and not resident in the UK for more than 12 months in the last 3 years. Further details can be found here: https://jobs.aston.ac.uk/Vacancy.aspx?id=1239&forced=1 Please contact Caroline (c.witton at aston.ac.uk) or Joel Talcott (j.b.talcott at aston.ac.uk) directly with any enquiries. Thanks Klaus __________________________ Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 Email: k.kessler at aston.ac.uk __________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eijlers at rsm.nl Thu Jun 19 16:32:17 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Thu, 19 Jun 2014 14:32:17 +0000 Subject: [FieldTrip] Strange output for ft_freqanalysis using wavelets? Message-ID: Dear all, I recently started working on time-frequency analyses, and my code is working. However, it seems to me that something is going wrong; Using the code below to calculate TFRs using wavelets, the output in .powerspectrum is in the range of hundreds and sometimes even up to a thousand (can also be seen from the plot). Trying multitapers (also in the code below), the range seems to be more normal (maybe up to 20). I cannot find out what I’m doing wrong (I guess such outcomes are impossible?). I preprocessed the data in BVA and transferred it to FT structures, but that shouldn’t be a problem right? A final question considers NaNs, is it true that ft_freqanalysis can not handle them, so that the output for elektrode 16 e.g. is set to NaN when it contained artefacts (i.e. NaNs in my case) in just one trial? I would appreciate it a lot if anyone could help me out. Best, Esther Data from 1 participant (it was also the case with other participants), 1 condition can be found here: https://www.dropbox.com/s/8vjcfid5p1i0o2t/FTav.mat load('FTav.mat') cfg = []; %% wavelet %cfg.keeptrials = 'yes'; %not when you want to use ft_freqgrandaverage and permutation testing thereafter cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:2:100; cfg.toi = -0.5:0.05:2.0; %% OR multitapers %{ cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:100; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; %} TFRav = ft_freqanalysis(cfg, FTav); % plot the results cfg = []; cfg.baseline = [-0.5 0]; cfg.baselinetype = 'absolute'; cfg.zlim = 'maxabs'; cfg.showlabels = 'yes'; cfg.layout = 'biosemi64.lay'; cfg.interactive = 'yes'; cfg.colorbar = 'yes'; figure ft_multiplotTFR(cfg, TFRav); Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 19 17:23:07 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 19 Jun 2014 17:23:07 +0200 Subject: [FieldTrip] ft_sourceplot is now forced to be interactive In-Reply-To: References: Message-ID: <54A92888-F4F3-4807-A211-0E5D55E17605@donders.ru.nl> Hi Anne, Could you please file this as a bug on our bugzilla.fcdonders.nl page? Thanks, Jan-Mathijs On Jun 19, 2014, at 11:19 AM, Anne Fransen wrote: > Hi, > > I use ft_sourceplots to make orthoplots, however, recently I cannot make multiple graphs anymore without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. > This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. > > Thank you, > > Best regards, > Anne Fransen > -- > Anne M.M. Fransen > Neurophysiology of Active Perception > Donders Institute for Brain, Cognition and Behaviour > Radboud University Nijmegen > > E-mail: a.fransen at donders.ru.nl > Phone: 0031 (0)24 36 55933 > > Visiting Address: > Room B3.43 > Montessorilaan 3 > > Mail address: > Anne Fransen > Dep. Bio- en NeuroPsychologie > Postbus 9104 > 6500 HE Nijmegen > the Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jun 20 08:10:09 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 19 Jun 2014 23:10:09 -0700 Subject: [FieldTrip] error in (ft_prepare_mesh) Message-ID: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> Hello every one I was following the tutorial in page http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a head model for EEG, I've done the same steps explained in the tutorial but when I reach the meshing stage and use: bnd=ft_prepare_mesh(cfg,segmentedmri); I get the following error: ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. error in ==> triangulate_seg at 73 seg = myvolumefillholes(seg); error in ==> prepare_mesh_segmentation at 101 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); error in ==> ft_prepare_mesh at 178 bnd = prepare_mesh_segmentation(cfg, mri); ----------------------------------------------------------------------------- although I'm geting the same results for the data structure as in the tutorial: disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] skull: [256x256x256 logical] scalp: [256x256x256 logical] cfg: [1x1 struct] ---------------------------------------------------------- can any one help in this matter please? Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 20 08:45:11 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 20 Jun 2014 08:45:11 +0200 Subject: [FieldTrip] error in (ft_prepare_mesh) In-Reply-To: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> References: <1403244609.50303.YahooMailNeo@web124905.mail.ne1.yahoo.com> Message-ID: <53A3D877.7090200@donders.ru.nl> Hi Rasha, could you update to the latest FT version? The function should be called "volumefillholes" and is located in FieldTrip/private. "myvolumefillholes" does indeed not exist and it appears that you or someone else modified the file to call a different function at that location. Best, Jörn On 6/20/2014 8:10 AM, Rasha Haider wrote: > Hello every one > I was following the tutorial in page > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg to construct a > head model for EEG, I've done the same steps explained in the tutorial > but when I reach the meshing stage and use: > bnd=ft_prepare_mesh(cfg,segmentedmri); > > I get the following error: > > ??? Undefined function or method 'myvolumefillholes' for input arguments of type 'logical'. > > > error in ==> triangulate_seg at 73 > seg = myvolumefillholes(seg); > > > > error in ==> prepare_mesh_segmentation at 101 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > > error in ==> ft_prepare_mesh at 178 > bnd = prepare_mesh_segmentation(cfg, mri); > ----------------------------------------------------------------------------- > although I'm geting the same results for the data structure as in the tutorial: > > disp(segmentedmri) > > dim: [256 256 256] > > transform: [4x4 double] > > coordsys: 'ctf' > > unit: 'mm' > > brain: [256x256x256 logical] > > skull: [256x256x256 logical] > > scalp: [256x256x256 logical] > > cfg: [1x1 struct] > ---------------------------------------------------------- > can any one help in this matter > please? > > Regards > Rasha > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From emanuelvandenbroeke at hotmail.com Fri Jun 20 11:17:21 2014 From: emanuelvandenbroeke at hotmail.com (emanuel vandenbroeke) Date: Fri, 20 Jun 2014 11:17:21 +0200 Subject: [FieldTrip] Cluster-based permutation test - Help please :-) In-Reply-To: References: Message-ID: Dear Eric Maris, On the website I found a solution for calculating the interaction effect with permutation testing!For my three way interaction I was thinking of the following solution and would like to know if this is statistically sound to do (perhaps also interesting for other people with the same design): First I calculated the differences as proposed by you for an interaction effect, for each intensity separately:Thus: T0 T1 Control arm A B Intervention arm C D B-A (with new variable difference_B-A) and C-D (with new variable difference_C-D). Instead of testing the interaction for these two new variables, I calculate the difference between variable difference_C-D and variable difference_B-A and use an F-statistic to express the differences across the 6 intensities and subsequently perform the permutation test. Does this sound valid to you?I'm really stuck, so hope that you will answer my question! Best wishes,Emanuel From: emanuelvandenbroeke at hotmail.com To: fieldtrip at science.ru.nl Subject: Cluster-based permutation test Date: Thu, 19 Jun 2014 14:11:31 +0200 Dear Eric Maris or other fieldtrippers, In my experiment (a 2x2x6 design) I want to test whether ERP waveforms are significant different between conditions. There is no a priori assumption about the effects.In this experiment I apply a somatosensory stimulus on both arms before and after an intervention on one arm. The somatosensory stimulus consists of 6 different intensities. So it is a within-subject design with 3 factors: Time (T0 and T1), Arm (intervention, control) and Intensity (6 different intensities). I'm interested in the MAIN effect of INTENSITY, and the INTERACTION effects (TIME x ARM) and (TIME x ARM x INTENSITY).For the Interaction effect TIME x ARM, I first calculated difference-waves (postcontrol - precontrol and postintervention - preintervention) in Matlab en then applied the permutation test on these difference-waves to test whether the two arms are different. I hope this is correct? But now my question, how to test the TIME x ARM x INTENSITY interaction? One possibility might be to calculate an ANOVA F statistic for this interaction effect (so perform a full factorial ANOVA) and perform the permutation test? Is this justified? Very much thanks,Best wishes,Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ma.bijanzadeh at gmail.com Sat Jun 21 00:42:08 2014 From: ma.bijanzadeh at gmail.com (Maryam Bijanzadeh) Date: Fri, 20 Jun 2014 16:42:08 -0600 Subject: [FieldTrip] LFP data Message-ID: Dear all, This is Maryam from University of Utah. I would like to test the time frequency script of Fieldtrip with a simple vector. I was wondering if you could help me for the data format to pass to the function as an input. in reality I analyzed my LFP data in a matrix format : Channel by time points . Best Regards, Maryam Bijanzadeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Sat Jun 21 09:47:37 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sat, 21 Jun 2014 09:47:37 +0200 Subject: [FieldTrip] LFP data In-Reply-To: References: Message-ID: Dear Maryam, This FAQ might be of relevance for you: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat Best, Eelke On 21 June 2014 00:42, Maryam Bijanzadeh wrote: > Dear all, > > This is Maryam from University of Utah. I would like to test the time > frequency script of Fieldtrip with a simple vector. I was wondering if you > could help me for the data format to pass to the function as an input. > > in reality I analyzed my LFP data in a matrix format : Channel by time > points . > > > Best Regards, > > Maryam Bijanzadeh > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gamaliel.ghu at gmail.com Mon Jun 23 02:15:20 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Sun, 22 Jun 2014 20:15:20 -0400 Subject: [FieldTrip] Simulation of eeg source Message-ID: Hi all I am beginner in brainstorm My question is this. I need to simulate an outbreak of electrical activity in a realistic head model, and acquire the EEG tracing the source (focus) dummy. The aim is to build different head models, and compare the error to locate the source you have simulated, but for this I need the layout or activity of the simulated source. Any information is helpful. Anyone know how to simulate a realistic source model?, And acquire their electrical activity? Thanks regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 23 11:45:44 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 23 Jun 2014 11:45:44 +0200 Subject: [FieldTrip] Simulation of eeg source In-Reply-To: References: Message-ID: <53A7F748.6080807@donders.ru.nl> Hi Gamaliel, are you aware that this is a fieldtrip and not brainstorm mailinglist? In case you want to use FieldTrip, have a look at ft_dipolesimulation. Otherwise I cannot be of help. Best, Jörn On 6/23/2014 2:15 AM, gamaliel huerta urrea wrote: > Hi all > > I am beginner in brainstorm > > My question is this. > I need to simulate an outbreak of electrical activity in a realistic > head model, and acquire the EEG tracing the source (focus) dummy. The > aim is to build different head models, and compare the error to locate > the source you have simulated, but for this I need the layout or > activity of the simulated source. > > Any information is helpful. > > Anyone know how to simulate a realistic source model?, And acquire > their electrical activity? > > Thanks regards > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From luke.bloy at gmail.com Mon Jun 23 14:56:51 2014 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 23 Jun 2014 08:56:51 -0400 Subject: [FieldTrip] ctf mri tools Message-ID: Hi list, I'm wondering if anyone knows of any tools for writing ctf .mri files that can be read by MRIViewer. Thanks, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.postorino at gmail.com Mon Jun 23 16:14:41 2014 From: martina.postorino at gmail.com (Martina Postorino) Date: Mon, 23 Jun 2014 16:14:41 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting Message-ID: Dear all, I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset. I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels. Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically? I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed. This is the code I use: [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); %plotting cfgp = []; cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; cfgp.avgoverchan = 'no'; cfgp.latency = [-1 1]; ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); % average data across subjects cfgp = []; cfgp.keepindividual = 'no'; ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red); % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); ERP_pain_bp_GA_avg.mask = stat.mask; ERP_buttonpress_GA_avg.mask = stat.mask; % ERP_pain_GA_avg.mask = stat.mask; % do the plotting cfgp = []; cfgp.maskparameter = 'mask'; cfgp.maskstyle = 'box'; cfgp.layout = layout_easycap_painlabmunich; ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); Thanks in advance! ___________________________________________ Martina Postorino, M.Sc Phd program in Medical Life Science and Technology Neuroimaging Center (TUM-NIC) Technische Universität München, Klinikum Rechts der Isar -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Mon Jun 23 16:53:55 2014 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Mon, 23 Jun 2014 16:53:55 +0200 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <1ADF28F5-5205-4B8F-8863-C36E0899567A@gmail.com> Dear All, here's a PhD position in Aachen, Germany I'd like to advertise. Please find a detailed description in the attachment. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. Please spread the word. Best Leo Zizlsperger -------------- next part -------------- A non-text attachment was scrubbed... Name: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE RWTH_TH_JF.doc Type: application/msword Size: 29696 bytes Desc: not available URL: From gamaliel.ghu at gmail.com Mon Jun 23 19:57:36 2014 From: gamaliel.ghu at gmail.com (gamaliel huerta urrea) Date: Mon, 23 Jun 2014 13:57:36 -0400 Subject: [FieldTrip] Simulation of eeg source In-Reply-To: References: Message-ID: Sorry for my previous mistake, I understand that the above is fieldtrip was just wrong. Please, I would like more information about Hi all I am beginner in Fieldtrip My question is this. I need to simulate an outbreak of electrical activity in a realistic head model, and acquire the EEG tracing the source (focus) dummy. The aim is to build different head models, and compare the mistake to locate the source You have simulated, but for this I need the layout or activity of the simulated source. Any information is helpful. Anyone know how to simulate a realistic source model?, And Their acquire electrical activity? Thanks regards 2014-06-22 20:15 GMT-04:00 gamaliel huerta urrea : > Hi all > > I am beginner in brainstorm > > My question is this. > I need to simulate an outbreak of electrical activity in a realistic head > model, and acquire the EEG tracing the source (focus) dummy. The aim is to > build different head models, and compare the error to locate the source you > have simulated, but for this I need the layout or activity of the simulated > source. > > Any information is helpful. > > Anyone know how to simulate a realistic source model?, And acquire their > electrical activity? > > Thanks regards > -- *Gamaliel Huerta* *Ingeniería Civil Biomédica* *Universidad de Valparaíso* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Tue Jun 24 00:24:31 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 23 Jun 2014 18:24:31 -0400 Subject: [FieldTrip] using AAL atlas on sourcemodel Message-ID: Hi all, I am trying to use AAL atlas on cortical mesh generated for individual subjects using freesurfer. When I do it on standard (template) sourcemodel, it works fine. aal = ft_read_atlas( '/Users/gopalar/Documents/MATLAB/fieldtrip-20140430/template/atlas/aal/ROI_MNI_V4.nii' ); sourcemodel=ft_read_headshape('cortex_8196.surf.gii'); sourcemodel2=ft_sourceinterpolate(cfg,atlas,sourcemodel); sourcemodel2.tissue has all the parcellations numbered and indexed. when sourcemodel was generated for individual subjects, the above steps does not work well. ft_sourceinterpolate do not yield all parcellations and they are anatomically skewed. I guess some co-registration of individual cortical mesh with standard template needed. Or are grids are the only other option. I really would like to use the cortical mesh instead of grids in my analysis. Thanks for your help Raghavan -- *Raghavan Gopalakrishnan,* *Principal Research Engineer, * *Cleveland Clinic* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Tue Jun 24 00:46:13 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Mon, 23 Jun 2014 23:46:13 +0100 Subject: [FieldTrip] Phase Lag Index Message-ID: Hi everyone, I would like to compute a classic phase lag index between pairs of MEG time series. So far I only found a wieghted phase lag index method implemented in ft and as far as I understand it is a directed measure so it gives the values from -1 to 1. Has anyone have an idea how to transform it so it computes absolute values from 0 to 1??? Many thanks in advance. Regards, Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 24 09:05:49 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 24 Jun 2014 09:05:49 +0200 Subject: [FieldTrip] Phase Lag Index In-Reply-To: References: Message-ID: Hi Lidia, Transforming a number that is bounded between -1 and 1 into a number that has absolute value and is bounded between 0 and 1 can be achieved by taking the abs(). Alternatively, you could compute the classic PLI from a time series of complex-valued cross-spectral density estimates by abs(mean(sign(angle(x)))); Best, Jan-Mathijs On Jun 24, 2014, at 12:46 AM, Lidia Mijas wrote: > Hi everyone, > > I would like to compute a classic phase lag index between pairs of MEG time series. > > So far I only found a wieghted phase lag index method implemented in ft and as far as I understand it is a directed measure so it gives the values from -1 to 1. Has anyone have an idea how to transform it so it computes absolute values from 0 to 1??? > > Many thanks in advance. > > Regards, > Lidia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Tue Jun 24 11:44:32 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Tue, 24 Jun 2014 10:44:32 +0100 Subject: [FieldTrip] Phase Lag Index In-Reply-To: References: Message-ID: Thank you Jan-Mathijs, So abs(x) will give me absolute value of x. But how can I use it considering that my data is in spm/fieldtrip format? This is my code for wpli. 'fd' stores WPLI values so values from -1 to 1 but taking abs(fd) doesn't work. Also not sure how to use just matlab to compute pli in the same way as the code below. Any tips? listfiles=ls('C:\Users\Lid\Documents\a_project\Controls\sources [40 80]\both_m1s\BceRdfspm8_*.mat'); for j=1:size(listfiles,1) spmfilename=deblank(listfiles(j,:)); D= spm_eeg_load(spmfilename); data = D.ftraw(0); % % megchan1 = 'lm1'; megchan2 = 'rm1'; emgchan = 'EEG061'; % meg1 = ft_selectdata(data, 'channel', megchan1, 'toilim', [1 3], 'avgoverrpt', 'no'); % meg1.label{1} = 'LM1'; meg2 = ft_selectdata(data, 'channel', megchan2, 'toilim', [1 3], 'avgoverrpt', 'no'); meg2.label{1} = 'RM1'; emg = ft_selectdata(data, 'channel', emgchan, 'toilim', [1 3], 'avgoverrpt', 'no'); emg.label{1} = 'EMG'; %emg.time = meg.time; inp = ft_appenddata([],emg, meg2); % cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; %cfg.taper = 'hanning'; cfg.foilim = [5 100]; cfg.toi = [1 3]; cfg.tapsmofrq = 7; % was 2.5 cfg.keeptrials = 'yes'; cfg.channel = {'EMG', 'RM1'};%'EMG'; cfg.channelcmb = {'RM1','EMG'}; %'EMG' 'RM1'; 'LM1' 'RM1' }; freq = ft_freqanalysis(cfg, inp); % cfg = []; cfg.method = 'wpli'; cfg.channelcmb = {'RM1', 'EMG'}; fd = ft_connectivityanalysis(cfg, freq); % cfg = []; cfg.xparam = 'freq'; cfg.zparam = 'wplispctrm'; cfg.xlim = [5 100]; cfg.ylim = [-1 1]; cfg.channel = 'EMG'; cfg.refchannel = 'RM1'; cfg.showlabels = 'yes'; figure; ft_singleplotER(cfg,fd); L = 120; c95 = 1-0.05^(1/(L-1)); x = get(gca,'xlim'); xlabel('frequency'); ylabel('cortico-muscular PLI'); hold on, line(x,[c95,c95],'linestyle','--','color','k'), hold off % eval(['print -dpng beta_ppc_emg_rm1_patient_' LW240492 '.png']); eval(['print -dpng gamma_pli_emg_rm1_control_' num2str(spmfilename(12:19)) '.png']); close(gcf); % % mean(fd.ppcspctrm(fd.freq>=15 & fd.freq<=30)) % % ffreq = fd.freq(fd.freq>=15 & fd.freq<=30); % [m, ind] = max(fd.ppcspctrm(ismember(fd.freq, ffreq))); % disp(['Max ' num2str(m) ' at ' num2str(ffreq(ind)) ' Hz']); end %% Many thanks!! 2014-06-24 8:05 GMT+01:00 jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl>: > Hi Lidia, > > Transforming a number that is bounded between -1 and 1 into a number that > has absolute value and is bounded between 0 and 1 can be achieved by taking > the abs(). > Alternatively, you could compute the classic PLI from a time series of > complex-valued cross-spectral density estimates by > abs(mean(sign(angle(x)))); > > Best, > Jan-Mathijs > > > On Jun 24, 2014, at 12:46 AM, Lidia Mijas wrote: > > Hi everyone, > > I would like to compute a classic phase lag index between pairs of MEG > time series. > > So far I only found a wieghted phase lag index method implemented in ft > and as far as I understand it is a directed measure so it gives the values > from -1 to 1. Has anyone have an idea how to transform it so it computes > absolute values from 0 to 1??? > > Many thanks in advance. > > Regards, > Lidia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From taosong at ucsd.edu Tue Jun 24 22:19:07 2014 From: taosong at ucsd.edu (Song, Tao) Date: Tue, 24 Jun 2014 20:19:07 +0000 Subject: [FieldTrip] MEG Engineer Position Message-ID: Dear Colleagues: Elekta Inc is hiring a MEG service engineer in US. If you are interested and have the working permission in US, or you know someone might be interested, pls send me an email at: tao.song at elekta.com Thanks so much! Tao -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 08:37:12 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 24 Jun 2014 23:37:12 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 25 08:55:08 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jun 2014 08:55:08 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting In-Reply-To: References: Message-ID: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> Hi Martina, I agree that the sorting of the channels is somewhat annoying, and an unexpected feature in the coding. Presently we are looking into how to address this. Yet, the sorting that is applied to the list of channels is consistently applied to all fields that contain numeric data. In your case I don’t understand your statement that the mask stays unsorted. Is there any way you are able to verify that? If I run the following simple simulation everything is reordered, also the ‘mask’-field. stat.label={‘B’;’A’;’C’}; stat.stat=repmat([1:3]’,[1 2]); stat.mask=stat.stat; stat.prob=stat.stat; stat.time=[1 2]; stat.dimord=‘chan_time’; stat2=ft_selectdata([],stat); If I now do: stat2.label I get ans = ‘A’ ‘B’ ‘C’ and when I do: stat2.stat I get ans = 2 2 1 1 3 3 and when I do: stat2.mask I get ans = 2 2 1 1 3 3 Conslusion: the mask is also re-ordered. In other words, the rows in the numeric data fields are still consistent with respect to one another. If you want to stay informed about this issue, I suggest you to create an account on bugzilla.fcdonders.nl, and add yourself to the cc-list of bug #2597. Best wishes, Jan-Mathijs On Jun 23, 2014, at 4:14 PM, Martina Postorino wrote: > Dear all, > > I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset. > > I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels. > > Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically? > > I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed. > > This is the code I use: > > [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); > > %plotting > > cfgp = []; > cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; > cfgp.avgoverchan = 'no'; > cfgp.latency = [-1 1]; > ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); > ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); > > % average data across subjects > > cfgp = []; > cfgp.keepindividual = 'no'; > ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); > ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red); > % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); > > ERP_pain_bp_GA_avg.mask = stat.mask; > ERP_buttonpress_GA_avg.mask = stat.mask; > % ERP_pain_GA_avg.mask = stat.mask; > > % do the plotting > > cfgp = []; > cfgp.maskparameter = 'mask'; > cfgp.maskstyle = 'box'; > cfgp.layout = layout_easycap_painlabmunich; > > ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); > > Thanks in advance! > > ___________________________________________ > > Martina Postorino, M.Sc > Phd program in Medical Life Science and Technology > > Neuroimaging Center (TUM-NIC) > Technische Universität München, Klinikum Rechts der Isar > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 08:56:35 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 24 Jun 2014 23:56:35 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel In-Reply-To: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> References: <1403678232.56469.YahooMailNeo@web124902.mail.ne1.yahoo.com> Message-ID: <1403679395.95135.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From eijlers at rsm.nl Wed Jun 25 10:20:57 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Wed, 25 Jun 2014 08:20:57 +0000 Subject: [FieldTrip] Large values for output ft_freqanalysis using wavelets Message-ID: Dear all, Could someone please tell me whether the large values in my power spectrum (in the range of hundreds and sometimes even up to a thousand), can be correct values, or whether something must be going wrong? I am using the same settings as specified in the time frequency tutorial. Thanks a lot, Esther Disclaimer ________________________________ De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder: www.eur.nl/email-disclaimer The information in this e-mail message is confidential and may be legally privileged. Read more: www.eur.nl/english/email-disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Wed Jun 25 10:38:24 2014 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Wed, 25 Jun 2014 10:38:24 +0200 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <1BB666E0-72F7-44DB-863F-6647EC7104E8@gmail.com> Dear All, here's a PhD position I'd like to advertise: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE, RWTH Aachen, GERMANY A research position (PhD student, 50% TV-L 13) is available to study the impact of stroke on visual perception using behavioral methodology combined with fMRI methods. In particular, the research aims to depict the plastic changes in the visual network that are induced by ischemic stroke. Experiments performed with healthy human subjects and directed at studying the neuronal mechanisms underlying sensory decision making will be combined with studies of patients suffering from circumscribed lesions in striate and extrastriate cortex. The project will be conducted at the Departments of Neurology and Neuroradiology and is part of an IZKF funded collaborative project within the Medical faculty of RWTH Aachen University. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. The successful candidate will work within an interdisciplinary team of young researchers at a well-known research institution (www.rwth-aachen.de). The candidate will design and conduct behavioral as well as functional imaging experiments, collect data, perform statistical data analysis (SPSS, Matlab, BrainVoyager and SPM), present the results at national and international meetings and publish research manuscripts. Candidates (Ph.D. students, Ph.D., or M.D.) interested in visual perception, cognitive psychology, or clinical psychology are particularly encouraged to apply. Very good English communication and writing skills are expected. The position requires a strong interest in research questions and experimental skills combined with a high level of motivation, team-orientation as well as the ability to solve problems independently. Programming skills in Matlab are considered a plus. Qualified women are explicitly invited to apply and handicapped candidates with equal qualification will be given preference. Please send your CV, publication record, and the names of two references (preferably by e-mail) to: Prof. Dr. Thomas Haarmeier Department of Neurology, University of Aachen Pauwelsstraße 30, 52074 Aachen, Germany Phone: +49 241 80-89603 Secr: +49 241 80-89601 Fax: +49 241 80-82582 e-mail: thaarmeier at web.de and Prof. Dr. Jessica Freiherr Diagnostic and Interventional Neuroradiology, University of Aachen Pauwelsstr. 30, 52074 Aachen, Germany Pager: +49 241 80 35688 Phone.: +49 241 80 80976 Fax: +49 241 80 3335688 eMail: jfreiherr at ukaachen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 11:39:30 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Wed, 25 Jun 2014 02:39:30 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403689170.25454.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Wed Jun 25 12:12:31 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Wed, 25 Jun 2014 03:12:31 -0700 Subject: [FieldTrip] error in ft_prepare_headmodel Message-ID: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, I'm trying to construct a head model following the tutorial, but when I apply the function (ft_prepare_headmodel): vol        = ft_prepare_headmodel (cfg, segmentedmri); I'm having this error: Error in ==> ft_prepare_headmodel>prepare_shells at 352 tissue      = ft_getopt(cfg,'tissue'); ??? Output argument "bnd" (and maybe others) not assigned during call to "/Volumes/My Passport/my work/untitled folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". Error in ==> ft_prepare_headmodel at 205         geometry = prepare_shells(cfg,data); although I'm following the tutorial step be step, I think it could be a bug in the function, can any one help pls. Regards rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Wed Jun 25 13:41:21 2014 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Wed, 25 Jun 2014 13:41:21 +0200 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip Message-ID: Hello, I was checking the one of the Fieldtrip's pages to perform an have change the coordinate system of my electrodes position The page: http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel For doing an alignment, the fiducials positions should be given, I did not have them first, so I use the brainstorm toolbox to get them from the patient MRI. In brainstrom I found this equation for transforming from voxel to mm. (given the voxel size) Position_mm = Position_voxel .* Voxel_size. While in fieldtrip I found another statement which gives (given the transformation matrix) a different answer: warp_apply(vox2head, vox_Nas, 'homogenous'); For example using brainstorm equation I got: NAS = [117.1920 215.8287 118.9998] And using the fieldtrip function, I got: NAS = [14.3973 49.3926 49.6322] What is the difference between the two? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 25 16:10:11 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 25 Jun 2014 16:10:11 +0200 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip In-Reply-To: References: Message-ID: <53AAD843.80208@donders.ru.nl> Dear Hamzi, this might be related to different coordinate systems, see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined FieldTrip is using whatever coordinate system the data was spceified in, and it seems that brainstorm is using some fixed coordinate system and applied a transformation beforehands. you could e.g. notice that in Brainstorm the coordinates for the first and third dimension have about the same value, where in FieldTrip this happens for the second and third value. So I would assume the difference is due to a difference in coordinate systems. Best, Jörn On 6/25/2014 1:41 PM, Hamza Fawzi Altakroury (Alumni) wrote: > Hello, > > I was checking the one of the Fieldtrip's pages to perform an have > change the coordinate system of my electrodes position > > The page: > http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel > > For doing an alignment, the fiducials positions should be given, I did > not have them first, so I use the brainstorm toolbox to get them from > the patient MRI. > > In brainstrom I found this equation for transforming from voxel to mm. > (given the voxel size) > > Position_mm = Position_voxel .* Voxel_size. > > While in fieldtrip I found another statement which gives (given the > transformation matrix) a different answer: > > warp_apply(vox2head, vox_Nas, 'homogenous'); > > > For example using brainstorm equation I got: > > NAS = [117.1920215.8287118.9998] > > > And using the fieldtrip function, I got: > > NAS = [14.397349.392649.6322] > > > What is the difference between the two? > > > Thank you > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jun 25 16:11:49 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 25 Jun 2014 16:11:49 +0200 Subject: [FieldTrip] Large values for output ft_freqanalysis using wavelets In-Reply-To: References: Message-ID: <53AAD8A5.30508@donders.ru.nl> Hi Esther, yes, this can very well be. Note that the time frequency tutorial is on MEG data, where data is usually in the order of 10^-29. Best, Jörn On 6/25/2014 10:20 AM, Esther Eijlers wrote: > Dear all, > > Could someone please tell me whether the large values in my power > spectrum (in the range of hundreds and sometimes even up to a > thousand), can be correct values, or whether something must be going > wrong? > I am using the same settings as specified in the time frequency tutorial. > > Thanks a lot, > Esther > > Disclaimer > ------------------------------------------------------------------------ > De informatie verzonden in dit e-mail bericht is vertrouwelijk en is > uitsluitend bestemd voor de geadresseerde van dit bericht. Lees > verder: www.eur.nl/email-disclaimer > The information in this e-mail message is confidential and may be > legally privileged. Read more: www.eur.nl/english/email-disclaimer > > ------------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jun 25 16:13:38 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 25 Jun 2014 16:13:38 +0200 Subject: [FieldTrip] error in ft_prepare_headmodel In-Reply-To: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> References: <1403691151.99915.YahooMailNeo@web124905.mail.ne1.yahoo.com> Message-ID: <53AAD912.7010801@donders.ru.nl> Hi Rasha, could you paste a part of your script and the full error message? Then we would be better able to provide any assistance. Best, Jörn PS: the mail server can be a bit slow sometimes, so please be patient when a mail is not instantaneously delivered. On 6/25/2014 12:12 PM, Rasha Haider wrote: > Dear fieldtrip experts, > I'm trying to construct a head model following the tutorial, but when > I apply the function (ft_prepare_headmodel): > > vol = ft_prepare_headmodel (cfg, segmentedmri); > > I'm having this error: > > Error in ==> ft_prepare_headmodel>prepare_shells at 352 > tissue = ft_getopt(cfg,'tissue'); > > ??? Output argument "bnd" (and maybe others) not assigned during call > to "/Volumes/My Passport/my work/untitled > folder/rasha/fieldtrip/ft_prepare_headmodel.m>prepare_shells". > > Error in ==> ft_prepare_headmodel at 205 > geometry = prepare_shells(cfg,data); > > although I'm following the tutorial step be step, I think it could be > a bug in the function, can any one help pls. > > Regards > rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From gopalar.ccf at gmail.com Wed Jun 25 19:17:28 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Wed, 25 Jun 2014 13:17:28 -0400 Subject: [FieldTrip] problem with coordsys - neuromag data Message-ID: Dear all, My aim is to use MEG data collected on a neuromag system, perform MNE source analysis and use AAL atlas to extract time series of the anatomical areas. However there seems to be conflicting problems with the coordsys. I tried the following: 1. Kept everything (mri, headmodel, volume) in MNI/SPM coordinate. However, when computing leadfield the gradstruct seems to be in neuromag coordinate. There is no way to change the grad structure from neuromag to spm/mni 2. I tried keeping everything (mri, headmodel, volume) in Neuromag coordinate, and performed source resonstruction. However, to use AAL atlas and source interpolate I need the sources in MNI/SPM coordinates. However, ft_convert_coordsys only supports atlas and mri. I am not sure how to proceed. Any help would be appreciated. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jun 26 10:00:31 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 26 Jun 2014 08:00:31 +0000 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403766371589.36361@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> Message-ID: <1403769631013.86820@flinders.edu.au> ?Hello Fieldtrip, I have been using the LCMV beamformer in fieldtrip for some time now, so I have experience with it. I am facing an issue where whatever data I process I get an image identical to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, tactile tasks etc. Also, whatever I do with the data, the same issue occurs (filtering etc). Attachment 'original_data.png' shows the data before going into the beamformer, and 'virtual_data.png' shows the data after it has run through beamformer. We have tried filtering in every possible combination ie lowpass = 40/30/20, highpass = 1/10/20, we even did a highpass of 100 and it was still identical. We dont think this is a fault of the beamformer, but we cant work out how to get rid of the issue. It is overpowering the other data. We have also had a look at some spectra of the brain region with the high power and a brain region that doesnt have the high power and it appears as though there is higher power over all frequencies. Before asking: -There isnt any muscle, the data was recorded from a paralysed person. -We have tried it on CAR'd data and data that hasnt been CAR'd We are all out of ideas. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original_data.png Type: image/png Size: 341653 bytes Desc: original_data.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source_plot.png Type: image/png Size: 97370 bytes Desc: source_plot.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_data.png Type: image/png Size: 287260 bytes Desc: virtual_data.png URL: From hamzaf at sabanciuniv.edu Thu Jun 26 10:08:55 2014 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Thu, 26 Jun 2014 11:08:55 +0300 Subject: [FieldTrip] Coordinate System (Align electrode positions) Brainstrom VS fieldtrip In-Reply-To: <53AAD843.80208@donders.ru.nl> References: <53AAD843.80208@donders.ru.nl> Message-ID: Thank you Dr. Horschig, I am sorry for writing the first line of my letter wrongly. Hamza On Wed, Jun 25, 2014 at 5:10 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Hamzi, > > this might be related to different coordinate systems, see > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_ > head_and_mri_coordinate_systems_defined > > FieldTrip is using whatever coordinate system the data was spceified in, > and it seems that brainstorm is using some fixed coordinate system and > applied a transformation beforehands. you could e.g. notice that in > Brainstorm the coordinates for the first and third dimension have about the > same value, where in FieldTrip this happens for the second and third value. > So I would assume the difference is due to a difference in coordinate > systems. > > Best, > Jörn > > > On 6/25/2014 1:41 PM, Hamza Fawzi Altakroury (Alumni) wrote: > >> Hello, >> >> I was checking the one of the Fieldtrip's pages to perform an have change >> the coordinate system of my electrodes position >> >> The page: >> http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_ >> positions_to_bem_headmodel >> >> For doing an alignment, the fiducials positions should be given, I did >> not have them first, so I use the brainstorm toolbox to get them from the >> patient MRI. >> >> In brainstrom I found this equation for transforming from voxel to mm. >> (given the voxel size) >> >> Position_mm = Position_voxel .* Voxel_size. >> >> While in fieldtrip I found another statement which gives (given the >> transformation matrix) a different answer: >> >> warp_apply(vox2head, vox_Nas, 'homogenous'); >> >> >> For example using brainstorm equation I got: >> >> NAS = [117.1920215.8287118.9998] >> >> >> And using the fieldtrip function, I got: >> >> NAS = [14.397349.392649.6322] >> >> >> What is the difference between the two? >> >> >> Thank you >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimparkinson at me.com Thu Jun 26 15:12:32 2014 From: jimparkinson at me.com (Jim Parkinson) Date: Thu, 26 Jun 2014 14:12:32 +0100 Subject: [FieldTrip] Possible bug with 'outline' option in ft_singleplotTFR Message-ID: Hi I have been using ft_singleplotTFR along with the 'outline' option to mask areas of the plot as given by an ft_freqstatistics output. I started to notice that the outline didn't match up with what (by eyeball!) should be outlined. So I checked the function by using ft_singleplotTFR cfg = []; cfg.parameter = 'mask'; cfg.channel = 'Cz'; cfg.zlim = [0 1]; % masks cfg.maskparameter = 'mask'; cfg.maskstyle = 'outline'; cfg.renderer = 'opengl'; ft_singleplotTFR(cfg,td); therefore I am plotting the mask data (zeros or ones) and also using that data as the outline parameter - so the outline should be EXACTLY around the RED area (ones), right? This doesn't happen (screencap here: https://www.dropbox.com/s/3lnu4f63wq0zdg2/OutlineDemo.png). However, the 'opacity' and 'saturation' methods work fine, and perfectly bounds the mask area. Has anyone else had this issue with 'outline', have any pointers, or alternatives that are easy to implement. p.s., I've replicated this with all rendering options, on both Mac and Linux Thanks for any help Jim -- Dr Jim Parkinson, D.Phil Postdoctoral Research Fellow Sackler Centre For Consciousness Science School of Psychology University of Sussex Brighton BN1 9QH jimparkinson at me.com j.m.parkinson at sussex.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 26 15:47:07 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 26 Jun 2014 15:47:07 +0200 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403769631013.86820@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> Message-ID: Hi Tyler, You write that you end up with the same result "whatever data you process", so I suspect the raw EEG/MEG data is not to blame. Rather, I suspect something is wrong with your leadfield or one of its ingredients: the volume conductor model, source model, or electrode/gradiometer definitions. It's probably a good idea to check whether these three ingredients all line up. Could you plot them in one set of axes, as described at the end of this section: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel ? Best, Eelke On 26 June 2014 10:00, Tyler Grummett wrote: > Hello Fieldtrip, > > > I have been using the LCMV beamformer in fieldtrip for some time now, so I > have experience with it. > > > I am facing an issue where whatever data I process I get an image identical > to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, > tactile tasks etc. > > Also, whatever I do with the data, the same issue occurs (filtering etc). > > > Attachment 'original_data.png' shows the data before going into the > beamformer, and 'virtual_data.png' shows the data after it has run through > beamformer. > > > We have tried filtering in every possible combination ie lowpass = 40/30/20, > highpass = 1/10/20, we even did a highpass of 100 and it > > was still identical. > > > We dont think this is a fault of the beamformer, but we cant work out how to > get rid of the issue. It is overpowering the other data. > > > We have also had a look at some spectra of the brain region with the high > power and a brain region that doesnt have the high power and it appears > > as though there is higher power over all frequencies. > > > Before asking: > > -There isnt any muscle, the data was recorded from a paralysed person. > > -We have tried it on CAR'd data and data that hasnt been CAR'd > > > We are all out of ideas. > > > Kind regards, > > > Tyler > > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.vicente.grab at gmail.com Thu Jun 26 17:14:48 2014 From: a.vicente.grab at gmail.com (Alejandro Vicente Grabovetsky) Date: Thu, 26 Jun 2014 17:14:48 +0200 Subject: [FieldTrip] Realtime Buffer error from Matlab but not in terminal Message-ID: Dear FT, I'm attempting to test the realtime at the DCCN from within the simple tutorial at: http://fieldtrip.fcdonders.nl/faq/how_should_i_get_started_with_the_fieldtrip_realtime_buffer The tutorial works very well from within the terminal, but when I attempt to start an interactive matlab session and do while true hdr = ft_read_header('buffer://localhost:1972') pause(1) end it gives me an error from the "buffer" mex: ERROR: failed to create socket (1) Thanks in advance, Sasha -- Vicente Grabovetsky, Alejandro (Sasha) Postdoctoral researcher Donders Centre for Cognitive Neuroimaging http://www.doellerlab.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From evaladez at psych.udel.edu Thu Jun 26 19:41:15 2014 From: evaladez at psych.udel.edu (Emilio Valadez) Date: Thu, 26 Jun 2014 13:41:15 -0400 Subject: [FieldTrip] Outputting peak z-values from artifact detection Message-ID: <8DC1EA0EB7E3FD419D9B3BE76BD403862C545B6AFB@razor.psych.udel.edu> Hello fieldtrippers! I'm trying to create a simple plot showing the number of trials that will be retained in my data set at various artifact z-value thresholds. To do this, I'll need an output with the peak z-value of every trial. I've tried using ft_artifact_zvalue with the cfg setting "cfg.artfctdef.zvalue.artfctpeak='yes'" but this seems to fill cfg.artfctdef.zvalue.peaks with values that are much, much larger than the peak z-values I see in the interactive window. In fact, the values in cfg.artfctdef.zvalue.peaks look more like time or sample points than z-values, as they are in ascending order and range all the way up to the hundred thousands. I feel I must be missing something obvious. Any suggestions? Thanks in advance for any help! Best, Emilio -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Thu Jun 26 21:29:31 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Thu, 26 Jun 2014 21:29:31 +0200 (CEST) Subject: [FieldTrip] Realtime Buffer error from Matlab but not in terminal In-Reply-To: Message-ID: <2094728179.7647534.1403810971108.JavaMail.root@sculptor.zimbra.ru.nl> Hi Sasha, You are trying to read the header in realtime from the machine where you started the matlab session, i.e. localhost:1972. Is this the same machine where you wrote that header? Best, Arjen ----- Oorspronkelijk bericht ----- > Van: "Alejandro Vicente Grabovetsky" > Aan: fieldtrip at science.ru.nl > Verzonden: Donderdag 26 juni 2014 17:14:48 > Onderwerp: [FieldTrip] Realtime Buffer error from Matlab but not in > terminal > Dear FT, > I'm attempting to test the realtime at the DCCN from within the simple > tutorial at: > http://fieldtrip.fcdonders.nl/faq/how_should_i_get_started_with_the_fieldtrip_realtime_buffer > The tutorial works very well from within the terminal, but when I > attempt to start an interactive matlab session and do > while true > hdr = ft_read_header('buffer://localhost:1972') > pause(1) > end > it gives me an error from the "buffer" mex: > ERROR: failed to create socket (1) > Thanks in advance, > Sasha > -- > Vicente Grabovetsky, Alejandro (Sasha) > Postdoctoral researcher > Donders Centre for Cognitive Neuroimaging > http://www.doellerlab.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jun 27 07:40:51 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jun 2014 07:40:51 +0200 Subject: [FieldTrip] Beamformer confusion In-Reply-To: <1403831209671.90701@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, so I >> have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image identical >> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >> tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run through >> beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = 40/30/20, >> highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out how to >> get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the high >> power and a brain region that doesnt have the high power and it appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jun 27 07:41:55 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jun 2014 07:41:55 +0200 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: PS: Forwarding your figure to the list. ---------- Forwarded message ---------- From: Eelke Spaak Date: 27 June 2014 07:40 Subject: Re: [FieldTrip] Beamformer confusion To: Email discussion list for the FieldTrip project Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, so I >> have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image identical >> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >> tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run through >> beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = 40/30/20, >> highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out how to >> get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the high >> power and a brain region that doesnt have the high power and it appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel.fig Type: application/octet-stream Size: 60726 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Fri Jun 27 09:16:30 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 27 Jun 2014 09:16:30 +0200 (CEST) Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: <023801cf91d7$b837e220$28a7a660$@herring@fcdonders.ru.nl> Hi Tyler, Although I cannot comment on whether or not something went wrong, as far as I know you shouldn't use single-sphere models in EEG as they do not take into account the difference in conductivity of the various tissue types. At least use a triple sphere model or preferably a BEM of FEM model. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: vrijdag 27 juni 2014 7:42 To: Email discussion list for the FieldTrip project Subject: [FieldTrip] Fwd: Beamformer confusion PS: Forwarding your figure to the list. ---------- Forwarded message ---------- From: Eelke Spaak Date: 27 June 2014 07:40 Subject: Re: [FieldTrip] Beamformer confusion To: Email discussion list for the FieldTrip project Hi Tyler, First, please send your messages to the list, so that others may benefit (now or in the future through the archives). Then, regarding your plot, indeed I think there might be something wrong (though I am not sure). You are looking for a proper alignment between the sensors (I have colored them red to be able to better see), the source model (grid points for beamforming) and the volume conductor model (translucent mesh; sphere in your case). I have never used a single sphere model myself, so I cannot really comment on whether the sphere aligns properly. However, I would suspect not, since there are grid points located outside the sphere. Also, the sensors might not be properly located, some are intersecting the body of grid points. But I do seem to recall that sensors are automatically projected to the volume conductor surface in the case of EEG. Maybe someone who has EEG source modelling experience can comment on this (and your figure)? I usually only work with MEG, so I don't have the same intuition for your kind of plot as with an analogous plot for MEG. The following tutorial might be very helpful for you, by the way: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg Best, Eelke On 27 June 2014 03:06, Tyler Grummett wrote: > Hello Eelke, > > Thank you for replying to my email. > > I have attached an image with the requested sourcemodel positions and > sensor positions. > > I dont really know how to interpret the figures to be honest. > > I have attached a .fig figure so that you can have a play with it. > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl > on behalf of Eelke Spaak > > Sent: Thursday, 26 June 2014 11:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Beamformer confusion > > Hi Tyler, > > You write that you end up with the same result "whatever data you > process", so I suspect the raw EEG/MEG data is not to blame. > > Rather, I suspect something is wrong with your leadfield or one of its > ingredients: the volume conductor model, source model, or > electrode/gradiometer definitions. It's probably a good idea to check > whether these three ingredients all line up. Could you plot them in > one set of axes, as described at the end of this section: > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_t > he_sourcemodel > ? > > Best, > Eelke > > On 26 June 2014 10:00, Tyler Grummett > wrote: >> Hello Fieldtrip, >> >> >> I have been using the LCMV beamformer in fieldtrip for some time now, >> so I have experience with it. >> >> >> I am facing an issue where whatever data I process I get an image >> identical to attachment 'sourceplot.png'. We have tried visual SSR, >> memory tasks, tactile tasks etc. >> >> Also, whatever I do with the data, the same issue occurs (filtering etc). >> >> >> Attachment 'original_data.png' shows the data before going into the >> beamformer, and 'virtual_data.png' shows the data after it has run >> through beamformer. >> >> >> We have tried filtering in every possible combination ie lowpass = >> 40/30/20, highpass = 1/10/20, we even did a highpass of 100 and it >> >> was still identical. >> >> >> We dont think this is a fault of the beamformer, but we cant work out >> how to get rid of the issue. It is overpowering the other data. >> >> >> We have also had a look at some spectra of the brain region with the >> high power and a brain region that doesnt have the high power and it >> appears >> >> as though there is higher power over all frequencies. >> >> >> Before asking: >> >> -There isnt any muscle, the data was recorded from a paralysed person. >> >> -We have tried it on CAR'd data and data that hasnt been CAR'd >> >> >> We are all out of ideas. >> >> >> Kind regards, >> >> >> Tyler >> >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lzizlsperger at ukaachen.de Fri Jun 27 12:09:16 2014 From: lzizlsperger at ukaachen.de (Zizlsperger, Leopold) Date: Fri, 27 Jun 2014 10:09:16 +0000 Subject: [FieldTrip] PhD position at Aachen University, Germany Message-ID: <362E90FB-1198-4D7F-9E73-349E95B0672C@ukaachen.de> Dear All, here's a PhD position I'd like to advertise: RESEARCH POSITION IN COGNITIVE NEUROSCIENCE, RWTH Aachen, GERMANY A research position (PhD student, 50% TV-L 13) is available to study the impact of stroke on visual perception using behavioral methodology combined with fMRI methods. In particular, the research aims to depict the plastic changes in the visual network that are induced by ischemic stroke. Experiments performed with healthy human subjects and directed at studying the neuronal mechanisms underlying sensory decision making will be combined with studies of patients suffering from circumscribed lesions in striate and extrastriate cortex. The project will be conducted at the Departments of Neurology and Neuroradiology and is part of an IZKF funded collaborative project within the Medical faculty of RWTH Aachen University. The position is available starting August 1st, 2014 or later. Funding for this position can be provided for three years. The successful candidate will work within an interdisciplinary team of young researchers at a well-known research institution (www.rwth-aachen.de). The candidate will design and conduct behavioral as well as functional imaging experiments, collect data, perform statistical data analysis (SPSS, Matlab, BrainVoyager and SPM), present the results at national and international meetings and publish research manuscripts. Candidates (Ph.D. students, Ph.D., or M.D.) interested in visual perception, cognitive psychology, or clinical psychology are particularly encouraged to apply. Very good English communication and writing skills are expected. The position requires a strong interest in research questions and experimental skills combined with a high level of motivation, team-orientation as well as the ability to solve problems independently. Programming skills in Matlab are considered a plus. Qualified women are explicitly invited to apply and handicapped candidates with equal qualification will be given preference. Please send your CV, publication record, and the names of two references (preferably by e-mail) to: Prof. Dr. Thomas Haarmeier Department of Neurology, University of Aachen Pauwelsstraße 30, 52074 Aachen, Germany Phone: +49 241 80-89603 Secr: +49 241 80-89601 Fax: +49 241 80-82582 e-mail: thaarmeier at web.de and Prof. Dr. Jessica Freiherr Diagnostic and Interventional Neuroradiology, University of Aachen Pauwelsstr. 30, 52074 Aachen, Germany Pager: +49 241 80 35688 Phone.: +49 241 80 80976 Fax: +49 241 80 3335688 eMail: jfreiherr at ukaachen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Fri Jun 27 12:51:11 2014 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Fri, 27 Jun 2014 11:51:11 +0100 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> Message-ID: <53AD4C9F.90809@uni-leipzig.de> Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock From tyler.grummett at flinders.edu.au Mon Jun 30 03:42:53 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 01:42:53 +0000 Subject: [FieldTrip] ft_sensorrealign Message-ID: <1404092572773.3933@flinders.edu.au> Hello fieldtrip, I dont know if this is a bug or not, but I am trying to use the electrode positions from a template file in fieldtrip using the following code: cfg = []; cfg.method = 'template'; cfg.target = 'fieldtrip\template\electrode\standard_1005.elec' ft_sensorrealign( cfg, data.elec) and I get the following error: Reference to non-existent field 'pnt'. Error in ft_sensorrealign (line 306) template(i).pnt = template(i).pnt(datsel,:); Am I using this wrong? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jun 30 04:17:53 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 02:17:53 +0000 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <53AD4C9F.90809@uni-leipzig.de> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> , <53AD4C9F.90809@uni-leipzig.de> Message-ID: <1404094672818.50881@flinders.edu.au> Hello all, Thank you for the quick replies, I greatly appreciate it. I recalculated vol using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); cfg = []; cfg.write = 'no'; cfg.coordsys = 'mni'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! Mesh Info : # points : 3000 # triangles : 5996 Euler characteristic : 2 Min Area : 2.44949 Max Area : 58.4166 Self intersection for mesh number 0 C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 | ------ om_minverser | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin | ----------------------- Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... Error using fread Invalid file identifier. Use fopen to generate a valid file identifier. the call to "ft_prepare_headmodel" took 21 seconds I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better. I just tried to prepare the leadfield and got the following error: ************************* No system matrix is present, calling the Nemo Lab pipeline... om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 Not enough arguments Please try "om_assemble -h" or "om_assemble --help " Writing sensor coordinates... Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 113) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Error in ft_compute_leadfield (line 442) lf = ft_leadfield_openmeeg(pos, vol, sens); Error in ft_prepare_leadfield (line 187) lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam); ************************* So it looks like I need to sort this issue out before I can proceed. Thank you for all your help again! Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Matt Craddock Sent: Friday, 27 June 2014 8:21 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.fig Type: application/octet-stream Size: 47769 bytes Desc: sensor positions_sourcemodel_new.fig URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.png Type: image/png Size: 6055 bytes Desc: sensor positions_sourcemodel_new.png URL: From roeysc at gmail.com Mon Jun 30 08:47:02 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 30 Jun 2014 09:47:02 +0300 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <1404094672818.50881@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> <53AD4C9F.90809@uni-leipzig.de> <1404094672818.50881@flinders.edu.au> Message-ID: Dear Tyler, Perhaps you'll find this old post helpful: http://mailman.science.ru.nl/pipermail/fieldtrip/2014-January/007437.html it holds a piece of code that uses the iso2mesh option added by Daniel Wong, Sarang Dalal, and Robert Oostenveld, that solves such cases of intersecting meshes. Hope this helps! Best, roey On Mon, Jun 30, 2014 at 5:17 AM, Tyler Grummett < tyler.grummett at flinders.edu.au> wrote: > Hello all, > > Thank you for the quick replies, I greatly appreciate it. > > I recalculated vol using the following code: > > mri = ft_read_mri( 'Subject01.mri'); > mri = ft_volumenormalise( [], mri); > mri = ft_volumereslice([], mri); > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'mni'; > segmentedmri = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.method = 'openmeeg'; > vol = ft_prepare_headmodel(cfg, segmentedmri); > > However I got the following error when using openmeeg (I followed the > instructions on how to install the binary files from openmeeg). > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > !!!!!!!!!!! WARNING !!!!!!!!!!! > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Mesh is self intersecting ! > Mesh Info : > # points : 3000 > # triangles : 5996 > Euler characteristic : 2 > Min Area : 2.44949 > Max Area : 58.4166 > Self intersection for mesh number 0 > > C:\Users\grum0003\AppData\Local\Temp>om_minverser > ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin > ./tp844032d5_1439_4794_b28e_c554e265bca8.bin > om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 > > > | ------ om_minverser > | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin > | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin > | ----------------------- > Exception: Unable to open the file > ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... > Error using fread > Invalid file identifier. Use fopen to generate a valid file identifier. > the call to "ft_prepare_headmodel" took 21 seconds > > > I am still able to generate a boundary element model (see attached). > Please inform me if they are correct. I had some issues with > ft_sensorrealign and using openmeeg. However it is looking a lot better. > > I just tried to prepare the leadfield and got the following error: > > ************************* > > No system matrix is present, calling the Nemo Lab pipeline... > om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 > > Not enough arguments > Please try "om_assemble -h" or "om_assemble --help " > > Writing sensor coordinates... > Error using fprintf > Invalid file identifier. Use fopen to generate a valid file identifier. > > Error in ft_leadfield_openmeeg (line 113) > fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, > sens.chanpos(ii,:)); > > Error in ft_compute_leadfield (line 442) > lf = ft_leadfield_openmeeg(pos, vol, sens); > > Error in ft_prepare_leadfield (line 187) > lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, > 'reducerank', > cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', > cfg.normalizeparam); > ************************* > > So it looks like I need to sort this issue out before I can proceed. > > Thank you for all your help again! > > Tyler > > ************************* > > Tyler Grummett ( BBSc, BSc(Hons I)) > PhD Candidate > Brain Signals Laboratory > Flinders University > Rm 5A301 > Ext 66124 > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl > on behalf of Matt Craddock > Sent: Friday, 27 June 2014 8:21 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Fwd: Beamformer confusion > > Hi Tyler, > > From the plot, it looks like the volume conductor is singlesphere but > the sourcemodel is derived from the standard boundary element model, and > the electrodes are then not aligned to either of them. First up, I'd > suggest using the standard BEM as your volume conductor and see if that > helps. The electrode positions may be the next thing to fix - they might > re-align automatically properly, in which case you won't need to do > anything. If they have standard 1020/1005 co-ordinates, they should be > aligned fine already, but if not you could try replacing the positions > in your dataset with the standard positions (i.e. if you have an Fp1, > take the Fp1 co-ordinates from the templates in the > fieldtrip\template\electrode directory). > > Cheers, > Matt > > On 27/06/2014 06:41, Eelke Spaak wrote: > > PS: Forwarding your figure to the list. > > > > > > ---------- Forwarded message ---------- > > From: Eelke Spaak > > Date: 27 June 2014 07:40 > > Subject: Re: [FieldTrip] Beamformer confusion > > To: Email discussion list for the FieldTrip project < > fieldtrip at donders.ru.nl> > > > > > > Hi Tyler, > > > > First, please send your messages to the list, so that others may > > benefit (now or in the future through the archives). > > > > Then, regarding your plot, indeed I think there might be something > > wrong (though I am not sure). You are looking for a proper alignment > > between the sensors (I have colored them red to be able to better > > see), the source model (grid points for beamforming) and the volume > > conductor model (translucent mesh; sphere in your case). I have never > > used a single sphere model myself, so I cannot really comment on > > whether the sphere aligns properly. However, I would suspect not, > > since there are grid points located outside the sphere. Also, the > > sensors might not be properly located, some are intersecting the body > > of grid points. > > > > But I do seem to recall that sensors are automatically projected to > > the volume conductor surface in the case of EEG. Maybe someone who has > > EEG source modelling experience can comment on this (and your figure)? > > I usually only work with MEG, so I don't have the same intuition for > > your kind of plot as with an analogous plot for MEG. > > > > The following tutorial might be very helpful for you, by the way: > > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > > > Best, > > Eelke > > > > On 27 June 2014 03:06, Tyler Grummett > wrote: > >> Hello Eelke, > >> > >> Thank you for replying to my email. > >> > >> I have attached an image with the requested sourcemodel positions and > sensor positions. > >> > >> I dont really know how to interpret the figures to be honest. > >> > >> I have attached a .fig figure so that you can have a play with it. > >> > >> Tyler > >> > >> ************************* > >> > >> Tyler Grummett ( BBSc, BSc(Hons I)) > >> PhD Candidate > >> Brain Signals Laboratory > >> Flinders University > >> Rm 5A301 > >> Ext 66124 > >> > >> ________________________________________ > >> From: fieldtrip-bounces at science.ru.nl > on behalf of Eelke Spaak > >> Sent: Thursday, 26 June 2014 11:17 PM > >> To: FieldTrip discussion list > >> Subject: Re: [FieldTrip] Beamformer confusion > >> > >> Hi Tyler, > >> > >> You write that you end up with the same result "whatever data you > >> process", so I suspect the raw EEG/MEG data is not to blame. > >> > >> Rather, I suspect something is wrong with your leadfield or one of its > >> ingredients: the volume conductor model, source model, or > >> electrode/gradiometer definitions. It's probably a good idea to check > >> whether these three ingredients all line up. Could you plot them in > >> one set of axes, as described at the end of this section: > >> > http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel > >> ? > >> > >> Best, > >> Eelke > >> > >> On 26 June 2014 10:00, Tyler Grummett > wrote: > >>> Hello Fieldtrip, > >>> > >>> > >>> I have been using the LCMV beamformer in fieldtrip for some time now, > so I > >>> have experience with it. > >>> > >>> > >>> I am facing an issue where whatever data I process I get an image > identical > >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, > >>> tactile tasks etc. > >>> > >>> Also, whatever I do with the data, the same issue occurs (filtering > etc). > >>> > >>> > >>> Attachment 'original_data.png' shows the data before going into the > >>> beamformer, and 'virtual_data.png' shows the data after it has run > through > >>> beamformer. > >>> > >>> > >>> We have tried filtering in every possible combination ie lowpass = > 40/30/20, > >>> highpass = 1/10/20, we even did a highpass of 100 and it > >>> > >>> was still identical. > >>> > >>> > >>> We dont think this is a fault of the beamformer, but we cant work out > how to > >>> get rid of the issue. It is overpowering the other data. > >>> > >>> > >>> We have also had a look at some spectra of the brain region with the > high > >>> power and a brain region that doesnt have the high power and it appears > >>> > >>> as though there is higher power over all frequencies. > >>> > >>> > >>> Before asking: > >>> > >>> -There isnt any muscle, the data was recorded from a paralysed person. > >>> > >>> -We have tried it on CAR'd data and data that hasnt been CAR'd > >>> > >>> > >>> We are all out of ideas. > >>> > >>> > >>> Kind regards, > >>> > >>> > >>> Tyler > > > > -- > Dr. Matt Craddock > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jun 30 08:54:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 30 Jun 2014 06:54:17 +0000 Subject: [FieldTrip] Fwd: Beamformer confusion In-Reply-To: <1404094672818.50881@flinders.edu.au> References: <1403766371589.36361@flinders.edu.au> <1403769631013.86820@flinders.edu.au> <1403831209671.90701@flinders.edu.au> , <53AD4C9F.90809@uni-leipzig.de>,<1404094672818.50881@flinders.edu.au> Message-ID: <1404111256856.12754@flinders.edu.au> Hello all, An update on this is that the openmeeg download page in the fieldtrip page: http://fieldtrip.fcdonders.nl/faq/how_can_i_use_openmeeg_for_forward_modelling https://gforge.inria.fr/frs/?group_id=435 should be: http://openmeeg.gforge.inria.fr/download/ because I downloaded the latest version, which was more up to date relative to the first website. I have checked and everything is now running smoothly. See attached, my only concern is that the there are some inside positions that are clearly located outside of the headmodel. Could this be the cause of the noisy data? I calculate the sourcemodel using the following code: template = load( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', 'template', 'sourcemodel', 'standard_sourcemodel3d10mm.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; sourcemodel = ft_prepare_sourcemodel( cfg); I then calculate the headmodel using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); mri.coordsys = 'spm'; cfg = []; cfg.write = 'no'; segmentedmri = ft_volumesegment(cfg, mri); Just to check I am doing it right (as per the tutorial) segmentedmri.transform = mri.transform; segmentedmri.anatomy = mri.anatomy; figure cfg = []; ft_sourceplot(cfg,segmentedmri); %only mri figure cfg.funparameter = 'gray'; ft_sourceplot(cfg,segmentedmri); %segmented gray matter on top figure cfg.funparameter = 'white'; ft_sourceplot(cfg,segmentedmri); %segmented white matter on top figure cfg.funparameter = 'csf'; ft_sourceplot(cfg,segmentedmri); %segmented csf matter on top cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); vol = ft_convert_units( vol, 'cm'); And then I get the attached source plot Also attached is the data that comes out of it, I evidently still have a problem. I am all out of ideas. Thank you again. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Tyler Grummett Sent: Monday, 30 June 2014 11:47 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hello all, Thank you for the quick replies, I greatly appreciate it. I recalculated vol using the following code: mri = ft_read_mri( 'Subject01.mri'); mri = ft_volumenormalise( [], mri); mri = ft_volumereslice([], mri); cfg = []; cfg.write = 'no'; cfg.coordsys = 'mni'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, segmentedmri); However I got the following error when using openmeeg (I followed the instructions on how to install the binary files from openmeeg). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! Mesh Info : # points : 3000 # triangles : 5996 Euler characteristic : 2 Min Area : 2.44949 Max Area : 58.4166 Self intersection for mesh number 0 C:\Users\grum0003\AppData\Local\Temp>om_minverser ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin ./tp844032d5_1439_4794_b28e_c554e265bca8.bin om_minverser version 2.1.0 (799) compiled at Aug 17 2011 19:50:11 | ------ om_minverser | ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin | ./tp844032d5_1439_4794_b28e_c554e265bca8.bin | ----------------------- Exception: Unable to open the file ./tp6461637d_b0c5_4880_9da7_46771d35b5bc.bin for reading Doing my best.... Error using fread Invalid file identifier. Use fopen to generate a valid file identifier. the call to "ft_prepare_headmodel" took 21 seconds I am still able to generate a boundary element model (see attached). Please inform me if they are correct. I had some issues with ft_sensorrealign and using openmeeg. However it is looking a lot better. I just tried to prepare the leadfield and got the following error: ************************* No system matrix is present, calling the Nemo Lab pipeline... om_assemble version 2.1.0 (799) compiled at Aug 17 2011 19:50:41 Not enough arguments Please try "om_assemble -h" or "om_assemble --help " Writing sensor coordinates... Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 113) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Error in ft_compute_leadfield (line 442) lf = ft_leadfield_openmeeg(pos, vol, sens); Error in ft_prepare_leadfield (line 187) lf = ft_compute_leadfield(grid.pos(grid.inside(batch),:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize, 'normalizeparam', cfg.normalizeparam); ************************* So it looks like I need to sort this issue out before I can proceed. Thank you for all your help again! Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Matt Craddock Sent: Friday, 27 June 2014 8:21 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Fwd: Beamformer confusion Hi Tyler, From the plot, it looks like the volume conductor is singlesphere but the sourcemodel is derived from the standard boundary element model, and the electrodes are then not aligned to either of them. First up, I'd suggest using the standard BEM as your volume conductor and see if that helps. The electrode positions may be the next thing to fix - they might re-align automatically properly, in which case you won't need to do anything. If they have standard 1020/1005 co-ordinates, they should be aligned fine already, but if not you could try replacing the positions in your dataset with the standard positions (i.e. if you have an Fp1, take the Fp1 co-ordinates from the templates in the fieldtrip\template\electrode directory). Cheers, Matt On 27/06/2014 06:41, Eelke Spaak wrote: > PS: Forwarding your figure to the list. > > > ---------- Forwarded message ---------- > From: Eelke Spaak > Date: 27 June 2014 07:40 > Subject: Re: [FieldTrip] Beamformer confusion > To: Email discussion list for the FieldTrip project > > > Hi Tyler, > > First, please send your messages to the list, so that others may > benefit (now or in the future through the archives). > > Then, regarding your plot, indeed I think there might be something > wrong (though I am not sure). You are looking for a proper alignment > between the sensors (I have colored them red to be able to better > see), the source model (grid points for beamforming) and the volume > conductor model (translucent mesh; sphere in your case). I have never > used a single sphere model myself, so I cannot really comment on > whether the sphere aligns properly. However, I would suspect not, > since there are grid points located outside the sphere. Also, the > sensors might not be properly located, some are intersecting the body > of grid points. > > But I do seem to recall that sensors are automatically projected to > the volume conductor surface in the case of EEG. Maybe someone who has > EEG source modelling experience can comment on this (and your figure)? > I usually only work with MEG, so I don't have the same intuition for > your kind of plot as with an analogous plot for MEG. > > The following tutorial might be very helpful for you, by the way: > http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg > > Best, > Eelke > > On 27 June 2014 03:06, Tyler Grummett wrote: >> Hello Eelke, >> >> Thank you for replying to my email. >> >> I have attached an image with the requested sourcemodel positions and sensor positions. >> >> I dont really know how to interpret the figures to be honest. >> >> I have attached a .fig figure so that you can have a play with it. >> >> Tyler >> >> ************************* >> >> Tyler Grummett ( BBSc, BSc(Hons I)) >> PhD Candidate >> Brain Signals Laboratory >> Flinders University >> Rm 5A301 >> Ext 66124 >> >> ________________________________________ >> From: fieldtrip-bounces at science.ru.nl on behalf of Eelke Spaak >> Sent: Thursday, 26 June 2014 11:17 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Beamformer confusion >> >> Hi Tyler, >> >> You write that you end up with the same result "whatever data you >> process", so I suspect the raw EEG/MEG data is not to blame. >> >> Rather, I suspect something is wrong with your leadfield or one of its >> ingredients: the volume conductor model, source model, or >> electrode/gradiometer definitions. It's probably a good idea to check >> whether these three ingredients all line up. Could you plot them in >> one set of axes, as described at the end of this section: >> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#computing_the_sourcemodel >> ? >> >> Best, >> Eelke >> >> On 26 June 2014 10:00, Tyler Grummett wrote: >>> Hello Fieldtrip, >>> >>> >>> I have been using the LCMV beamformer in fieldtrip for some time now, so I >>> have experience with it. >>> >>> >>> I am facing an issue where whatever data I process I get an image identical >>> to attachment 'sourceplot.png'. We have tried visual SSR, memory tasks, >>> tactile tasks etc. >>> >>> Also, whatever I do with the data, the same issue occurs (filtering etc). >>> >>> >>> Attachment 'original_data.png' shows the data before going into the >>> beamformer, and 'virtual_data.png' shows the data after it has run through >>> beamformer. >>> >>> >>> We have tried filtering in every possible combination ie lowpass = 40/30/20, >>> highpass = 1/10/20, we even did a highpass of 100 and it >>> >>> was still identical. >>> >>> >>> We dont think this is a fault of the beamformer, but we cant work out how to >>> get rid of the issue. It is overpowering the other data. >>> >>> >>> We have also had a look at some spectra of the brain region with the high >>> power and a brain region that doesnt have the high power and it appears >>> >>> as though there is higher power over all frequencies. >>> >>> >>> Before asking: >>> >>> -There isnt any muscle, the data was recorded from a paralysed person. >>> >>> -We have tried it on CAR'd data and data that hasnt been CAR'd >>> >>> >>> We are all out of ideas. >>> >>> >>> Kind regards, >>> >>> >>> Tyler > -- Dr. Matt Craddock _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: sensor positions_sourcemodel_new.fig Type: application/octet-stream Size: 193506 bytes Desc: sensor positions_sourcemodel_new.fig URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_data.png Type: image/png Size: 184000 bytes Desc: virtual_data.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source_plot_new.png Type: image/png Size: 45643 bytes Desc: source_plot_new.png URL: From eelke.spaak at donders.ru.nl Mon Jun 30 09:09:15 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 30 Jun 2014 09:09:15 +0200 Subject: [FieldTrip] Possible bug with 'outline' option in ft_singleplotTFR In-Reply-To: References: Message-ID: Hi Jim, That indeed sounds like a possible bug. I have filed it on our bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2627 I tried to add you as CC on the bug, but it seems to have failed. Please register an account there and add yourself as CC to keep up to date on the bug. Thanks for letting us know. Best, Eelke On 26 June 2014 15:12, Jim Parkinson wrote: > Hi > > I have been using ft_singleplotTFR along with the 'outline' option to mask > areas of the plot as given by an ft_freqstatistics output. I started to > notice that the outline didn't match up with what (by eyeball!) should be > outlined. > > So I checked the function by using ft_singleplotTFR > cfg = []; > cfg.parameter = 'mask'; > cfg.channel = 'Cz'; > cfg.zlim = [0 1]; > > % masks > cfg.maskparameter = 'mask'; > cfg.maskstyle = 'outline'; > > cfg.renderer = 'opengl'; > ft_singleplotTFR(cfg,td); > > therefore I am plotting the mask data (zeros or ones) and also using that > data as the outline parameter - so the outline should be EXACTLY around the > RED area (ones), right? This doesn't happen (screencap here: > https://www.dropbox.com/s/3lnu4f63wq0zdg2/OutlineDemo.png). > > However, the 'opacity' and 'saturation' methods work fine, and perfectly > bounds the mask area. Has anyone else had this issue with 'outline', have > any pointers, or alternatives that are easy to implement. > > p.s., I've replicated this with all rendering options, on both Mac and Linux > > Thanks for any help > > Jim > > > > -- > > Dr Jim Parkinson, D.Phil > > Postdoctoral Research Fellow > > Sackler Centre For Consciousness Science > > School of Psychology > > University of Sussex > > Brighton > > BN1 9QH > > > jimparkinson at me.com > > j.m.parkinson at sussex.ac.uk > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Mon Jun 30 11:19:25 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 30 Jun 2014 11:19:25 +0200 Subject: [FieldTrip] re-referencing EEG signals Message-ID: Dear all, I was wondering if re-referencing of EEG signals should be done before trial definition or after all the preprocessing have been done. Would it make a difference in terms of statistical analyses? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 30 15:26:37 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 30 Jun 2014 15:26:37 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: Message-ID: <53B1658D.40003@donders.ru.nl> Dear Hweeling, re-referencing is a linear step and can be done at any time preceding any non-linear transformation, e.g. computing a power spectrum. So it depends on what type of preprocessing you have planned, but for the most usual preprocessing steps the answer is that it would not make any difference when exactly you are doing this. Best, Jörn On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before > trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mcantor at umich.edu Mon Jun 30 15:02:16 2014 From: mcantor at umich.edu (Max Cantor) Date: Mon, 30 Jun 2014 09:02:16 -0400 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: Message-ID: Re-referencing is a linear operation, so it shouldn't matter if you do it in the preprocessing or epoching steps. Hope that helps, Max On Mon, Jun 30, 2014 at 5:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before > trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Mon Jun 30 17:15:52 2014 From: david.m.groppe at gmail.com (David Groppe) Date: Mon, 30 Jun 2014 11:15:52 -0400 Subject: [FieldTrip] Postdoc opening in multimodal human brain mapping/modulation & epilepsy Message-ID: Post doctoral position available for research using a multimodal approach to investigate brain organization and function at the Hofstra University-North Shore LIJ School of Medicine in partnership with the Feinstein Institute for Medical Research. Studies involve surgical epilepsy patients undergoing intracranial electrophysiological monitoring for seizure detection and functional electrical stimulation mapping. Ongoing research projects include: 1) Validation of task-based and resting state fMRI and DTI using electrical stimulation mapping, electrocorticography and corticocortical evoked potentials; 2) Investigation of the neuronal dynamics underlying selective attention and active sensing, language, object identification and auditory stream analysis; 3) Modulation of neuronal function by direct cortical stimulation and investigation of the mechanisms of TMS, tDCS and tACS; 4) Prediction of seizure spread using electrophysiological and MRI markers. Responsibilities will include designing fMRI, ECoG and neurostimulation experiments and data analysis and the coordination of access to patients for research studies. Located in Long Island, 10 miles from Manhattan, there is tremendous opportunity for involvement with collaborative effort with multiple research groups the area with similar interests. Candidates should have M.D. and/or Ph.D. degrees and have some background in fMRI, electrophysiology, and/or data analysis (Matlab). Ideal start date would be between 9/2014-1/2015. For more information about the lab see: http://www.feinsteininstitute.org/faculty/ashesh-mehta-md-phd/ If interested, please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Jun 30 22:57:06 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 30 Jun 2014 22:57:06 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: <53B1658D.40003@donders.ru.nl> References: <53B1658D.40003@donders.ru.nl> Message-ID: Hi, Thanks, Max and Joern. Another question, is there an easier way to re-reference the EEG signals to an averaged montage? Cheers, Hweeling On 30 June 2014 15:26, "Jörn M. Horschig" wrote: > Dear Hweeling, > > re-referencing is a linear step and can be done at any time preceding any > non-linear transformation, e.g. computing a power spectrum. So it depends > on what type of preprocessing you have planned, but for the most usual > preprocessing steps the answer is that it would not make any difference > when exactly you are doing this. > > Best, > Jörn > > > On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > >> Dear all, >> >> I was wondering if re-referencing of EEG signals should be done before >> trial definition or after all the preprocessing have been done. >> >> Would it make a difference in terms of statistical analyses? >> >> Thanks. >> >> Best regards, >> Hweeling >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Jun 30 23:13:06 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 30 Jun 2014 23:13:06 +0200 Subject: [FieldTrip] re-referencing EEG signals In-Reply-To: References: <53B1658D.40003@donders.ru.nl> Message-ID: <0875E786-4FAC-441F-91A2-099ACAE2443C@uni-konstanz.de> Hi Hweeling, > > > Another question, is there an easier way to re-reference the EEG signals to an averaged montage? yes quite easy. Just specify cfg.reref = ‘yes’; and cfg.refchannel = ‘all’; during the call to ft_preprocessing. best tzvetan > > Cheers, > Hweeling > > > > On 30 June 2014 15:26, "Jörn M. Horschig" wrote: > Dear Hweeling, > > re-referencing is a linear step and can be done at any time preceding any non-linear transformation, e.g. computing a power spectrum. So it depends on what type of preprocessing you have planned, but for the most usual preprocessing steps the answer is that it would not make any difference when exactly you are doing this. > > Best, > Jörn > > > On 6/30/2014 11:19 AM, Hwee Ling Lee wrote: > Dear all, > > I was wondering if re-referencing of EEG signals should be done before trial definition or after all the preprocessing have been done. > > Would it make a difference in terms of statistical analyses? > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: