From B.Mouthaan at neuro.umcn.nl Tue Nov 1 15:16:35 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Tue, 1 Nov 2011 15:16:35 +0100 Subject: [FieldTrip] Plotting dipole moment in 3D Message-ID: Dear Fieldtrippers, Does anyone know how to plot the orientationvector of the dipole? I tried it with quiver3 but this makes it unable to project the dipole vector on the BEM model while using hold on. Any ideas? here my script to make i more clear: ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 for i=1:21 quiver3(dipole.dip.pos(1),dipole.dip.pos(2),dipole.dip.pos(3),dipole.dip.mom(1,i),dipole.dip.mom(2,i),dipole.dip.mom(3,i),'r*', 'MarkerSize', 10) pause (1) end Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Tue Nov 1 15:47:04 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Tue, 1 Nov 2011 15:47:04 +0100 (CET) Subject: [FieldTrip] Plotting dipole moment in 3D In-Reply-To: Message-ID: <2021623992.175631.1320158824319.JavaMail.root@draco.zimbra.ru.nl> Hi Brain try this: figure,ft_plot_dipole(dip.pos,dip.ori,'color','g') How does it look? Best, Cristiano ----- "B Mouthaan" schreef: > Van: "B Mouthaan" > Aan: fieldtrip at donders.ru.nl > Verzonden: Dinsdag 1 november 2011 15:16:35 > Onderwerp: [FieldTrip] Plotting dipole moment in 3D > > Plotting dipole moment in 3D Dear Fieldtrippers, > > Does anyone know how to plot the orientationvector of the dipole? I tried it with quiver3 but this makes it unable to project the dipole vector on the BEM model while using hold on. > > Any ideas? > > here my script to make i more clear: > > ft_plot_mesh(vol.bnd(3)) > hold on > alpha 0.5 > > for i=1:21 > > quiver3(dipole.dip.pos(1),dipole.dip.pos(2),dipole.dip.pos(3),dipole.dip.mom(1,i),dipole.dip.mom(2,i),dipole.dip.mom(3,i),'r*', 'MarkerSize', 10) > pause (1) > end > > Thanks! > > Brian > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > 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 explena at gmail.com Wed Nov 2 10:07:12 2011 From: explena at gmail.com (Shen-Mou Hsu) Date: Wed, 2 Nov 2011 17:07:12 +0800 Subject: [FieldTrip] problems with reading the data in yopkogawa format Message-ID: Hi, I encountered a problem while reading the data in yokogawa format from a single channel. The message is as follows: "Warning: The P-code file GetMeg160MriInfoM.p was generated prior to MATLAB version 7.5 (R2007b) and will not be supported in a future release. Use pcode to regenerate GetMeg160MriInfoM.p using MATLAB R2007b or later". I plotted the data and found that there was a rectangular band covering the real data. Any help in this issue will be much appreciated. Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Nov 2 12:58:25 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 2 Nov 2011 12:58:25 +0100 Subject: [FieldTrip] Plotting dipole moment in 3D Message-ID: Dear Christiano, Is don't have a field called .ori So it does not recognize it as exciting field This is my script: figure(10) ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 ft_plot_dipole(dipole.dip.pos, dipole.dip.ori,'color', 'g') When I replace dipole.dip.ori with dipole.dip.mom, the BEM model is plotted although its a bit darker now. Hope you know what this means? Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Nov 2 14:34:57 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 2 Nov 2011 14:34:57 +0100 Subject: [FieldTrip] [Solution] Plotting dipole moment in 3D Message-ID: In response to my earlier posts. The problem is solved. It was correct that dipole.dip.ori was not existing, because ori is created when calling ft_plot_dipole. [ori] contains the three parameters of dipole.dip.mom. So I used the following code to create the vector: figure(10) ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 for j=1:21 ft_plot_dipole(dipole.dip.pos, dipole.dip.mom(:,j),'color', 'r', 'units', 'mm') pause (1) end I used an iteration, because the moment of the dipole changes every timepoint. My previous figure became dark, and i didn't see the vector. The reason for this is that my units were not defined. No putting the units similarly as in the BEM-model, the figure shows a clear dipole vector. Thanks for the help you all! Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Wed Nov 2 18:34:43 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Wed, 02 Nov 2011 18:34:43 +0100 Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Message-ID: <4EB18D43020000570000B544@gwsmtp1.uni-regensburg.de> Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clusterstats.png Type: image/png Size: 61313 bytes Desc: Portable Network Graphics Format URL: From B.Mouthaan at neuro.umcn.nl Thu Nov 3 14:51:56 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 3 Nov 2011 14:51:56 +0100 Subject: [FieldTrip] Dipole at surface of head Message-ID: Hello all, I am calculating dipoles with use of the BEM headmodel. Before calculating the dipole I hypothesize with help of the current distribution topography in MultiplotER where the dipole will be placed. Most of the times the dipole location corresponds with my expectations. However often this dipole is locate at the surface of the head. This does not sound logic to me. Does anyone have experienced this problem earlier? And if so does anybody has a solution? Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Thu Nov 3 16:57:36 2011 From: michael.wibral at web.de (Michael Wibral) Date: Thu, 3 Nov 2011 16:57:36 +0100 (CET) Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Message-ID: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Thu Nov 3 18:20:56 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Thu, 03 Nov 2011 18:20:56 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> Message-ID: <4EB2DB88020000570000B5A8@gwsmtp1.uni-regensburg.de> Hi Michael, thanks a lot for your response. Yes, I kept everything the same, the only difference beeing the Matlab path pointing to the old vs new FT version. I will keep on searching for a possible flaw in my code and will tell so if I found one. Thanks again, best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Michael Wibral" 11/3/2011 4:57 PM >>> Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Sat Nov 5 17:55:13 2011 From: karl.doron at gmail.com (Karl Doron) Date: Sat, 5 Nov 2011 09:55:13 -0700 Subject: [FieldTrip] ft_plot_topo3d crash Message-ID: Hello, I'm trying to use a 3d plot function and experiencing matlab crashes. As arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a vector of t values for each sensor. The plot appears correctly on the first attempt; however, any second attempts to use the function, i.e., to plot a different time point, cause the entire matlab session to crash. Since the whole session crashes, I don't have any error message to report. I'm using Matlab R2009B and Mac OSx Lion. Thanks for any feedback. karl Karl Doron, Ph.D. Department of Psychological and Brain Sciences University of California, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Nov 6 07:54:20 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Sun, 6 Nov 2011 14:54:20 +0800 (CST) Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1E8C4628-FC2B-497E-82B6-CDE4D4482CE6@psi.ucm.es> Message-ID: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> Dear Stephan,       Thanks for your help. I've tried the toolbox, and test my data using both Augmented Dickey Fuller (ADF) and KPSS method, but the results are inconsistent.  ADF'result is the data is  not stationary, but KPSS'result is stationary. Have you met problem as this?     Best,   Weina     --- 11年10月31日,周一, smoratti at psi.ucm.es 写道: 发件人: smoratti at psi.ucm.es 主题: Re: [FieldTrip] Is there a function for testing time series stationary or not? 收件人: "Email discussion list for the FieldTrip project" 日期: 2011年10月31日,周一,下午10:21 Dear Weina, Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm There several easy to use tests for covariance stationarity. Best, Stephan El 31/10/2011, a las 14:15, 李卫娜 escribió: Dear all,   Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary.   Best regards.     Weina  _______________________________________________ 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 r.oostenveld at donders.ru.nl Sun Nov 6 09:40:40 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sun, 6 Nov 2011 09:40:40 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: <819342DB-D94F-4CD7-B266-E64C3FAC0AFE@donders.ru.nl> Dear Karl, Sorry to hear about the problem, it surprises me that your whole MATLAB crahes. Can you please report the problem as bug on http://bugzilla.fcdonders.nl (i.e. copy your email message) and attach a mat file in bugzilla with the exact input variables as you are using it? best regards, Robert On 5 Nov 2011, at 17:55, Karl Doron wrote: > Hello, > > I'm trying to use a 3d plot function and experiencing matlab crashes. As arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a vector of t values for each sensor. > > The plot appears correctly on the first attempt; however, any second attempts to use the function, i.e., to plot a different time point, cause the entire matlab session to crash. Since the whole session crashes, I don't have any error message to report. > > I'm using Matlab R2009B and Mac OSx Lion. > > Thanks for any feedback. > > karl > > > > > Karl Doron, Ph.D. > Department of Psychological and Brain Sciences > University of California, Santa Barbara > > > _______________________________________________ > 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 g.piantoni at nin.knaw.nl Sun Nov 6 11:04:29 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Sun, 6 Nov 2011 11:04:29 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: Hi Karl, To me, it sounds like a problem with the OpenGL drivers. There was a discussion on that about VNC crashing on Linux, but maybe it applies to your Mac configuration as well. See: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html Please, report back if you find a solution. Best, Gio On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: > Hello, > I'm trying to use a 3d plot function and experiencing matlab crashes. As > arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a > vector of t values for each sensor. > The plot appears correctly on the first attempt; however, any second > attempts to use the function, i.e., to plot a different time point, cause > the entire matlab session to crash. Since the whole session crashes, I don't > have any error message to report. > I'm using Matlab R2009B and Mac OSx Lion. > Thanks for any feedback. > karl > > > > Karl Doron, Ph.D. > Department of Psychological and Brain Sciences > University of California, Santa Barbara > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From julian.wang at ucl.ac.uk Sun Nov 6 18:52:32 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Sun, 6 Nov 2011 17:52:32 -0000 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> Message-ID: <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I'm having. I'm trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it's coming up with this error and I'm not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesig n". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I'm trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I'm not sure if I've got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it's only expecting one row in the design matrix. If it's run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I'm not sure if it is. Is what I've done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I'm uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I'm using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 Don.Rojas at ucdenver.edu Sun Nov 6 20:17:02 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Sun, 6 Nov 2011 12:17:02 -0700 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> Message-ID: <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes). Sent from my iPad On Nov 6, 2011, at 11:19 AM, "Julian Wang" > wrote: Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it’s coming up with this error and I’m not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 smoratti at psi.ucm.es Sun Nov 6 21:00:38 2011 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Sun, 06 Nov 2011 21:00:38 +0100 Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> References: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> Message-ID: Dear Weina, That happened to me as well and occurs also in the example of the manual. You could lower the p value of the ADF test and see if it goes in the same direction as the KPSS test. I think the KPSS is correct and less stringent. Best, Stephan El 06/11/2011, a las 07:54, 李卫娜 escribió: > Dear Stephan, > > Thanks for your help. I've tried the toolbox, and test my data using both Augmented Dickey Fuller (ADF) and KPSS method, but the results are inconsistent. ADF'result is the data is not stationary, but KPSS'result is stationary. Have you met problem as this? > > > Best, > > Weina > > > --- 11年10月31日,周一, smoratti at psi.ucm.es 写道: > > 发件人: smoratti at psi.ucm.es > 主题: Re: [FieldTrip] Is there a function for testing time series stationary or not? > 收件人: "Email discussion list for the FieldTrip project" > 日期: 2011年10月31日,周一,下午10:21 > > Dear Weina, > > Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm > > There several easy to use tests for covariance stationarity. > > Best, > > Stephan > > El 31/10/2011, a las 14:15, 李卫娜 escribió: > >> Dear all, >> >> Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary. >> >> Best regards. >> >> >> Weina >> >> _______________________________________________ >> 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 julian.wang at ucl.ac.uk Sun Nov 6 21:05:49 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Sun, 6 Nov 2011 20:05:49 -0000 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> Message-ID: <00ca01cc9cbf$7b77b0f0$726712d0$@ucl.ac.uk> Even in your unsure state, you seem to have all the answers! Removing the quotes made it work perfectly. Again, thank you so much for your help. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 06 November 2011 07:17 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes). Sent from my iPad On Nov 6, 2011, at 11:19 AM, "Julian Wang" wrote: Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it’s coming up with this error and I’m not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 davidig at hotmail.es Mon Nov 7 02:29:15 2011 From: davidig at hotmail.es (=?iso-8859-1?B?RGF2aWQgSWdsZXNpYXMgTPNwZXo=?=) Date: Mon, 7 Nov 2011 02:29:15 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> Message-ID: Hi, I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? I don't know how to chop my data correctly. Thank, David From: r.oostenveld at donders.ru.nl Date: Sun, 20 Mar 2011 14:41:41 +0100 To: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Trigger channel for edf Hi Ivano Good that it works. The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses). FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. bestRobert On 20 Mar 2011, at 13:24, Ivano Triggiani wrote:Hi, just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called "number of data records" ( http://www.edfplus.info/specs/edf.html ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) Thanks to all. Ivano ------------------------------------------------------------------------ "No man can wear one face to himself and another to the multitude, without finally getting bewildered as to which one is true." Nathaniel Hawthorne _______________________________________________ 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 a.stolk at fcdonders.ru.nl Mon Nov 7 08:13:40 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 7 Nov 2011 08:13:40 +0100 (CET) Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <245840274.700839.1320649995936.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <333620380.700845.1320650020258.JavaMail.root@sculptor.zimbra.ru.nl> Dear  David, You'll need to determine your user-specific events, i.e. not the 'trial' type events that are automatically stored in your dataset by your acquisition software. Does your event matrix contain types anything else than 'trial'? For instance, try: event = ft_read_head(filename) unique({event.type}) Yours, Arjen ----- "David Iglesias López" schreef: > Van: "David Iglesias López" > Aan: fieldtrip at donders.ru.nl > Verzonden: Maandag 7 november 2011 02:29:15 > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > Hi, > I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. > The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. > I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > I don't know how to chop my data correctly. > Thank, > David > From: r.oostenveld at donders.ru.nl > Date: Sun, 20 Mar 2011 14:41:41 +0100 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Trigger channel for edf > Hi Ivano > Good that it works. > The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses).  > FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. > best Robert  > On 20 Mar 2011, at 13:24, Ivano Triggiani wrote: > Hi, > just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. > However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called " number of data records"   (   http://www.edfplus.info/specs/edf.html   ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) > Thanks to all. > Ivano > ------------------------------------------------------------------------ > > "No man can wear one face to himself   > and another to the multitude, > without finally getting bewildered   > as to which one is true." > > Nathaniel Hawthorne > > > _______________________________________________ > 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 a.stolk at fcdonders.ru.nl Mon Nov 7 08:17:04 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 7 Nov 2011 08:17:04 +0100 (CET) Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <333620380.700845.1320650020258.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1197843141.700863.1320650224971.JavaMail.root@sculptor.zimbra.ru.nl> Sorry, correction, make that ft_read_header ----- "A. Stolk" schreef: > Van: "A. Stolk" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Maandag 7 november 2011 08:13:40 > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > Dear David, You'll need to determine your user-specific events, i.e. not the 'trial' type events that are automatically stored in your dataset by your acquisition software. Does your event matrix contain types anything else than 'trial'? For instance, try: event = ft_read_head(filename) unique({event.type}) Yours, Arjen > > ----- "David Iglesias López" schreef: > > Van: "David Iglesias López" > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Maandag 7 november 2011 02:29:15 > > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > > > > Hi, > > I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. > > The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. > > I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > > I don't know how to chop my data correctly. > > Thank, > > David > > From: r.oostenveld at donders.ru.nl > > Date: Sun, 20 Mar 2011 14:41:41 +0100 > > To: fieldtrip at donders.ru.nl > > Subject: Re: [FieldTrip] Trigger channel for edf > > Hi Ivano > > Good that it works. > > The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses).  > > FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. > > best Robert  > > On 20 Mar 2011, at 13:24, Ivano Triggiani wrote: > > Hi, > > just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. > > However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called " number of data records"   (   http://www.edfplus.info/specs/edf.html   ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) > > Thanks to all. > > Ivano > > ------------------------------------------------------------------------ > > > > "No man can wear one face to himself   > > and another to the multitude, > > without finally getting bewildered   > > as to which one is true." > > > > Nathaniel Hawthorne > > > > > > _______________________________________________ > > 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 r.oostenveld at donders.ru.nl Mon Nov 7 10:22:27 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 7 Nov 2011 10:22:27 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> Message-ID: Hi David On 7 Nov 2011, at 2:29, David Iglesias López wrote: > I would like like to simply make all my data as continuous cfg = []; cfg.dataset = 'filename.edf' cfg.continuous = 'yes' data = ft_preprocessing(cfg) should do that for you. See also http://fieldtrip.fcdonders.nl/faq/how_can_i_process_continuous_data_without_triggers > and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > I don't know how to chop my data correctly. Once the data is in memory (either segmented in many small pieces or one large piece), you can use ft_redefinetrial to change the segmentation (e.g. cut trials into shorter pieces or change from stimulus locked to response locked). In your case you can pass the trl to ft_redefinetrial. best Robert From drivolta81 at gmail.com Mon Nov 7 12:37:19 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 7 Nov 2011 12:37:19 +0100 Subject: [FieldTrip] sourceplot - beamforming Message-ID: Dear Fieldtrippers, I have a question about ft_sourceplot (version 20111009). I am following the tutorial on the reverse grid transformation ( http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization ). I can get to the end of the script and try to plot the relative change in power of the stimulus condition again the baseline (visual task). I have attached the figures I get from one subject only. First of all, it is upside-down. Is it correct? How to change this? Here is the script I use: mri = ft_read_mri(mri_name); cfg = []; cfg.downsample = 1; sourceDiff.dim = [17 20 17]; sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.units = 'mm'; cfg.opacitylim = [0.2 1.3]; ft_sourceplot(cfg,sourceDiff_Int); This is the structure of sourceDiff_Int: sourceDiff_Int = inside: [256x256x256 logical] avg: [1x1 struct] dim: [256 256 256] transform: [4x4 double] anatomy: [256x256x256 int16] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Thanks for the help, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ortho.jpg Type: image/jpeg Size: 25496 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: slice.jpg Type: image/jpeg Size: 23662 bytes Desc: not available URL: From davidig at hotmail.es Mon Nov 7 16:06:54 2011 From: davidig at hotmail.es (=?iso-8859-1?B?RGF2aWQgSWdsZXNpYXMgTPNwZXo=?=) Date: Mon, 7 Nov 2011 16:06:54 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, , <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl>, , Message-ID: Hi Robert, And the end I got it before like this: cfg = []; cfg.dataset = filename; cfg.continuous = 'yes'; cfg.trialfun = 'trialfun_david'; cfg = ft_definetrial(cfg); dataout = ft_preprocessing(cfg); And it worked nicely. Thank you, David > From: r.oostenveld at donders.ru.nl > Date: Mon, 7 Nov 2011 10:22:27 +0100 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Trigger channel for edf > > Hi David > > On 7 Nov 2011, at 2:29, David Iglesias López wrote: > > I would like like to simply make all my data as continuous > > cfg = []; > cfg.dataset = 'filename.edf' > cfg.continuous = 'yes' > data = ft_preprocessing(cfg) > > should do that for you. See also > http://fieldtrip.fcdonders.nl/faq/how_can_i_process_continuous_data_without_triggers > > > and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > > I don't know how to chop my data correctly. > > > Once the data is in memory (either segmented in many small pieces or one large piece), you can use ft_redefinetrial to change the segmentation (e.g. cut trials into shorter pieces or change from stimulus locked to response locked). In your case you can pass the trl to ft_redefinetrial. > > best > Robert > > > _______________________________________________ > 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 julian.keil at gmail.com Mon Nov 7 16:12:36 2011 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Nov 2011 16:12:36 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: Hi, I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. The problem is, that switching to software-openGL is not supported: >> opengl software Warning: Switching to software OpenGL rendering is not supported on the MAC platform Does anyone have a hint how to change the renderer? Best, Julian Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > Hi Karl, > > To me, it sounds like a problem with the OpenGL drivers. > There was a discussion on that about VNC crashing on Linux, but maybe > it applies to your Mac configuration as well. See: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html > > Please, report back if you find a solution. > > Best, > > Gio > > On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >> Hello, >> I'm trying to use a 3d plot function and experiencing matlab crashes. As >> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >> vector of t values for each sensor. >> The plot appears correctly on the first attempt; however, any second >> attempts to use the function, i.e., to plot a different time point, cause >> the entire matlab session to crash. Since the whole session crashes, I don't >> have any error message to report. >> I'm using Matlab R2009B and Mac OSx Lion. >> Thanks for any feedback. >> karl >> >> >> >> Karl Doron, Ph.D. >> Department of Psychological and Brain Sciences >> University of California, Santa Barbara >> >> >> >> _______________________________________________ >> 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 BelluscB at ninds.nih.gov Mon Nov 7 17:41:35 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Mon, 7 Nov 2011 11:41:35 -0500 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: , Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> I ran into this problem a couple of months ago using a VNC connection on a PC platform. I used the following command: opengl neverselect at the prompt to force Matlab to use a different function. It hasn't crashed since. I assume this would work for a mac platform as well. good luck! Beth. ________________________________________ From: Julian Keil [julian.keil at gmail.com] Sent: Monday, November 07, 2011 10:12 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_plot_topo3d crash Hi, I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. The problem is, that switching to software-openGL is not supported: >> opengl software Warning: Switching to software OpenGL rendering is not supported on the MAC platform Does anyone have a hint how to change the renderer? Best, Julian Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > Hi Karl, > > To me, it sounds like a problem with the OpenGL drivers. > There was a discussion on that about VNC crashing on Linux, but maybe > it applies to your Mac configuration as well. See: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html > > Please, report back if you find a solution. > > Best, > > Gio > > On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >> Hello, >> I'm trying to use a 3d plot function and experiencing matlab crashes. As >> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >> vector of t values for each sensor. >> The plot appears correctly on the first attempt; however, any second >> attempts to use the function, i.e., to plot a different time point, cause >> the entire matlab session to crash. Since the whole session crashes, I don't >> have any error message to report. >> I'm using Matlab R2009B and Mac OSx Lion. >> Thanks for any feedback. >> karl >> >> >> >> Karl Doron, Ph.D. >> Department of Psychological and Brain Sciences >> University of California, Santa Barbara >> >> >> >> _______________________________________________ >> 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 julian.keil at gmail.com Mon Nov 7 18:24:16 2011 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Nov 2011 18:24:16 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> References: , <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> Message-ID: <64A977BA-4EAE-4CE3-AA91-CCFC08CFFF23@gmail.com> Hi, thanks for your reply, unfortunately this did not help. However, setting all the bug-workarounds in opengl to '1' did the trick. If anyone else has this problem, here's how it worked for me: * use "opengl info" to see if the workarounds are enabled * set the workarounds to '1': opengl('OpenGLBitmapZbufferBug',1) opengl('OpenGLWobbleTesselatorBug',1) opengl('OpenGLLineSmoothingBug',1) opengl('OpenGLClippedImageBug',1) Best, Julian Am 07.11.2011 um 17:41 schrieb Belluscio, Beth (NIH/NINDS) [E]: > I ran into this problem a couple of months ago using a VNC connection on a PC platform. I used the following command: opengl neverselect at the prompt to force Matlab to use a different function. It hasn't crashed since. I assume this would work for a mac platform as well. > > good luck! > Beth. > > ________________________________________ > From: Julian Keil [julian.keil at gmail.com] > Sent: Monday, November 07, 2011 10:12 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] ft_plot_topo3d crash > > Hi, > > I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. > The problem is, that switching to software-openGL is not supported: > >>> opengl software > Warning: Switching to software OpenGL rendering is not supported on the MAC platform > > Does anyone have a hint how to change the renderer? > > Best, > Julian > > > Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > >> Hi Karl, >> >> To me, it sounds like a problem with the OpenGL drivers. >> There was a discussion on that about VNC crashing on Linux, but maybe >> it applies to your Mac configuration as well. See: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html >> >> Please, report back if you find a solution. >> >> Best, >> >> Gio >> >> On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >>> Hello, >>> I'm trying to use a 3d plot function and experiencing matlab crashes. As >>> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >>> vector of t values for each sensor. >>> The plot appears correctly on the first attempt; however, any second >>> attempts to use the function, i.e., to plot a different time point, cause >>> the entire matlab session to crash. Since the whole session crashes, I don't >>> have any error message to report. >>> I'm using Matlab R2009B and Mac OSx Lion. >>> Thanks for any feedback. >>> karl >>> >>> >>> >>> Karl Doron, Ph.D. >>> Department of Psychological and Brain Sciences >>> University of California, Santa Barbara >>> >>> >>> >>> _______________________________________________ >>> 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 jan.schoffelen at donders.ru.nl Tue Nov 8 10:58:40 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 8 Nov 2011 10:58:40 +0100 Subject: [FieldTrip] sourceplot - beamforming In-Reply-To: References: Message-ID: Hi Davide, Apart from putting your computer monitor upside down you could reslice your anatomy prior to doing the interpolation (using ft_volumereslice). Best, Jan-Mathijs On Nov 7, 2011, at 12:37 PM, Davide Rivolta wrote: > > Dear Fieldtrippers, > > I have a question about ft_sourceplot (version 20111009). > > I am following the tutorial on the reverse grid transformation (http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization). > > I can get to the end of the script and try to plot the relative change in power of the stimulus condition again the baseline (visual task). > > I have attached the figures I get from one subject only. > > First of all, it is upside-down. Is it correct? How to change this? > > > Here is the script I use: > > mri = ft_read_mri(mri_name); > cfg = []; > cfg.downsample = 1; > sourceDiff.dim = [17 20 17]; > sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); > > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.units = 'mm'; > cfg.opacitylim = [0.2 1.3]; > ft_sourceplot(cfg,sourceDiff_Int); > > > > > > This is the structure of sourceDiff_Int: > > sourceDiff_Int = > > inside: [256x256x256 logical] > avg: [1x1 struct] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 int16] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > > Thanks for the help, > > Davide > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.dipompeo at unich.it Tue Nov 8 17:14:01 2011 From: f.dipompeo at unich.it (f.dipompeo at unich.it) Date: Tue, 08 Nov 2011 17:14:01 +0100 Subject: [FieldTrip] Power Time Course Message-ID: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> I would like to know if there is a ft function to calculate the Time Course of Power of Electric and Magnetic Channels and IC coming from ft_componentanalysis in the case of continuous resting state data. I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a "toi" large as my whole acquisition time window (the script is below). Time Course of Power should be obtained by summing up the results over all the frequencies. Thank you very much, Francesco ------------------------------------------------------- cfg=[]; cfg.method = 'mtmconvol'; cfg.output = 'powandcsd'; cfg.taper = 'hanning'; cfg.trials = 'all'; cfg.foi = 1:150; cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; cfg.t_ftimwin = 4./cfg.foi; [freq_comp_tr] = ft_freqanalysis(cfg,comp); From eelke.spaak at donders.ru.nl Tue Nov 8 17:33:13 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 8 Nov 2011 17:33:13 +0100 Subject: [FieldTrip] Power Time Course In-Reply-To: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> References: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> Message-ID: Dear Francesco, Your question is not entirely clear to me. Do you want to estimate the timecourse of the total (i.e. non-frequency-resolved) power in your signal? In that case, frequency analysis is not the way to go; basically your signal itself contains this information already (you may want to rectify (abs()) it first, or apply a hilbert transform). Also, I don't understand the reference to ft_componentanalysis. Furthermore, the code you paste in your email seems valid to me. (You could possibly simplify it by using cfg.toi = comp.time{1}; to get an estimate of power at each time point in your signal. ) What does not seem to work, in your case? Best, Eelke 2011/11/8 : > I would like to know if there is a ft function to calculate the Time Course > of Power of Electric and Magnetic Channels and IC coming from > ft_componentanalysis in the case of continuous resting state data. > > I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a > "toi" large as my whole acquisition time window (the script is below). > Time Course of Power should be obtained by summing up the results over all > the frequencies. > > Thank you very much, > > Francesco > > ------------------------------------------------------- > > cfg=[]; > cfg.method = 'mtmconvol'; > cfg.output = 'powandcsd'; > cfg.taper = 'hanning'; > cfg.trials = 'all'; > cfg.foi = 1:150; > cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; > cfg.t_ftimwin = 4./cfg.foi; > [freq_comp_tr] = ft_freqanalysis(cfg,comp); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From r.vandermeij at donders.ru.nl Tue Nov 8 23:09:16 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 08 Nov 2011 17:09:16 -0500 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: <4EB9A88C.5070103@donders.ru.nl> Hi Julian, As a sort of last-resort workaround: If you're not using it for publication quality figures, but for e.g. databrowsing, you could create a set of nasty looking figures by setting the renderer to zbuffer, instead of opengl. You can do it while creating a fig by figure('renderer','zbuffer'). Zbuffer doesn't work with transparency, which is essential for masking. If you don't use masking, it might actually look fine I think, but not entirely sure. At least you can get some workable figures now, maybe create publication quality on a different machine? Hope it's a bit useful, Cheers, Roemer On 07/11/2011 10:12, Julian Keil wrote: > Hi, > > I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. > The problem is, that switching to software-openGL is not supported: > >>> opengl software > Warning: Switching to software OpenGL rendering is not supported on the MAC platform > > Does anyone have a hint how to change the renderer? > > Best, > Julian > > > Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > >> Hi Karl, >> >> To me, it sounds like a problem with the OpenGL drivers. >> There was a discussion on that about VNC crashing on Linux, but maybe >> it applies to your Mac configuration as well. See: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html >> >> Please, report back if you find a solution. >> >> Best, >> >> Gio >> >> On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >>> Hello, >>> I'm trying to use a 3d plot function and experiencing matlab crashes. As >>> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >>> vector of t values for each sensor. >>> The plot appears correctly on the first attempt; however, any second >>> attempts to use the function, i.e., to plot a different time point, cause >>> the entire matlab session to crash. Since the whole session crashes, I don't >>> have any error message to report. >>> I'm using Matlab R2009B and Mac OSx Lion. >>> Thanks for any feedback. >>> karl >>> >>> >>> >>> Karl Doron, Ph.D. >>> Department of Psychological and Brain Sciences >>> University of California, Santa Barbara >>> >>> >>> >>> _______________________________________________ >>> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Tue Nov 8 23:19:35 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 08 Nov 2011 17:19:35 -0500 Subject: [FieldTrip] Power Time Course In-Reply-To: References: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> Message-ID: <4EB9AAF7.3010606@donders.ru.nl> Hi Francesco, I don't entirely understand what you referring to either, but it sounds at least like a within channel phenomenon? In that case, you can use cfg.output = 'pow', or 'fourier', which do not compute the between channel CSD, saving quite a bit memory. If you are interested in the total energy over time of your signal, but only for the 1-150 Hz part, it might be easier to do a bandpass, and taking the square of your raw signal (energy is usually squared amplitude I thought?). If that is what your intending though. Cheers, Roemer On 08/11/2011 11:33, Eelke Spaak wrote: > Dear Francesco, > > Your question is not entirely clear to me. Do you want to estimate the > timecourse of the total (i.e. non-frequency-resolved) power in your > signal? In that case, frequency analysis is not the way to go; > basically your signal itself contains this information already (you > may want to rectify (abs()) it first, or apply a hilbert transform). > Also, I don't understand the reference to ft_componentanalysis. > > Furthermore, the code you paste in your email seems valid to me. (You > could possibly simplify it by using cfg.toi = comp.time{1}; to get an > estimate of power at each time point in your signal. ) What does not > seem to work, in your case? > > Best, > Eelke > > > 2011/11/8: >> I would like to know if there is a ft function to calculate the Time Course >> of Power of Electric and Magnetic Channels and IC coming from >> ft_componentanalysis in the case of continuous resting state data. >> >> I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a >> "toi" large as my whole acquisition time window (the script is below). >> Time Course of Power should be obtained by summing up the results over all >> the frequencies. >> >> Thank you very much, >> >> Francesco >> >> ------------------------------------------------------- >> >> cfg=[]; >> cfg.method = 'mtmconvol'; >> cfg.output = 'powandcsd'; >> cfg.taper = 'hanning'; >> cfg.trials = 'all'; >> cfg.foi = 1:150; >> cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; >> cfg.t_ftimwin = 4./cfg.foi; >> [freq_comp_tr] = ft_freqanalysis(cfg,comp); >> >> >> _______________________________________________ >> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Nov 9 12:49:18 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 9 Nov 2011 12:49:18 +0100 Subject: [FieldTrip] sourceplot - beamforming In-Reply-To: References: Message-ID: Dear Jan-Mathijs, Thank you for your email. I have done as you said. I ran ft_volumereslice. As you can see from the piture (source2) I get something really weird. I am using the correct cfg.dim, however I am not sure about the cfg.resolution. Where can I pick the correct value? In the case of the picture I used 1. After this, I run ft_sourceinterpolate and then ft_sourceplot. Is this the correct sequence? Source1 represents the source before running ft_volumereslice. Thanks for the advice, Davide On Tue, Nov 8, 2011 at 10:58 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > Apart from putting your computer monitor upside down you could reslice > your anatomy prior to doing the interpolation (using ft_volumereslice). > > Best, > > Jan-Mathijs > > On Nov 7, 2011, at 12:37 PM, Davide Rivolta wrote: > > > Dear Fieldtrippers, > > I have a question about ft_sourceplot (version 20111009). > > I am following the tutorial on the reverse grid transformation ( > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization > ). > > I can get to the end of the script and try to plot the relative change in > power of the stimulus condition again the baseline (visual task). > > I have attached the figures I get from one subject only. > > First of all, it is upside-down. Is it correct? How to change this? > > > Here is the script I use: > > mri = ft_read_mri(mri_name); > cfg = []; > cfg.downsample = 1; > sourceDiff.dim = [17 20 17]; > sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); > > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.units = 'mm'; > cfg.opacitylim = [0.2 1.3]; > ft_sourceplot(cfg,sourceDiff_Int); > > > > > > This is the structure of sourceDiff_Int: > > sourceDiff_Int = > > inside: [256x256x256 logical] > avg: [1x1 struct] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 int16] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > > Thanks for the help, > > Davide > _______________________________________________ > 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 > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Nov 9 16:00:30 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 09 Nov 2011 16:00:30 +0100 Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? In-Reply-To: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> Message-ID: <4EBA958E.8070300@donders.ru.nl> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: > Hi Gregor, > > in principle the first level statistics that determine cluster > membership (and thereby cluster shapes etc.) can also vary from one > set of permutations to the next, esp. on the borders of a cluster > (this is why it is typically said that the localization of a cluster > is not as trustworthy as its existence). Other resaons for differences > are differing number of permutations - did you set everything the same? > > This said there might well be another problem - I hope the cluster > people can have a look into it. > > Best , > Michael > > > ------------------------------------------------------------------------ > *Von:* "Gregor Volberg" > *Gesendet:* Nov 2, 2011 6:34:43 PM > *An:* fieldtrip at donders.ru.nl > *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer FT > versions? > > Dear fieldtrip community, > > > I just encountered an unexpected behavior of FT that I would like > to share with the list. It is that the cluster permutation test > formed incorrect clusters from a given set of significant > electrodes in newer FT versions (ft-20111012; I also tried with > ft-20111028). > > > For example, when using an old ft version (ft-20100810) and > freqstatistics I get a negative cluster with 17 contiguous > electrodes. With the newer ft version, using the same data and the > same cfg, three significant electrodes that are spatially > contiguous to the other significant electrodes are not included in > the cluster. Also, three electrodes that are spatially seperated > and are actually part of the first cluster are grouped into a > separate cluster. I attached a picture with the respective > clusterplots where differences are marked with red arrows. > > I am aware that the permutation p-value for a given cluster can be > different in two separate analyses, but the grouping of > significant electrodes into clusters should always be the same, am > i right? I double-checked the cfg.neighbours, after conversion to > new 'struct' style, and they were identical in the "old ft" and > "new ft" analysis. Also, the stat.stat field and the > stat.cfg.clustercritval were the same for both analyses. Thus, the > same neighbourhood relations and the same significant electrodes > should be used for grouping. Yet I get different results... > > > I am almost sure that this is trivial, but I could not yet > replicate my old results with new FT and this makes me nervous. > Has someone made a similar experience? Or do newer versions of ft > use some further information besides cfg.neighbours for > clustering, somewhere in the *cfg.previuous perhaps, that I am not > aware of? Any comments are highly welcome. > > > Best regards, > > Gregor > > > cfg = []; > > cfg.neighbours = neighbours; > > cfg.minnbchan=1; > > cfg.avgoverfreq = 'yes'; > > cfg.avgovertime = 'yes'; > > cfg.method = 'montecarlo'; > > cfg.correctm = 'cluster'; > > cfg.statistic = 'depsamplesT'; > > cfg.tail = 0; > > cfg.alpha = 0.05; > > cfg.clusteralpha = 0.05; > > cfg.numrandomization = 1000; > > cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; > > cfg.uvar = 1; > > cfg.ivar = 2; > > cfg.latency = [2.24 2.53]; > > cfg.frequency = [17 21];% > > stat = ft_freqstatistics(cfg, DC, TC); > > > -- > Dr. rer. nat. Gregor Volberg > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > > _______________________________________________ > 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From olgafelso at googlemail.com Wed Nov 9 16:01:42 2011 From: olgafelso at googlemail.com (Olga Felsovalyi) Date: Wed, 9 Nov 2011 07:01:42 -0800 Subject: [FieldTrip] Granger Causality In-Reply-To: References: Message-ID: Hello, I am following the connectivity tutorial to perform granger causality analysis on iEEG data. Please help me understand a few things: 1. Please clarify exactly what the output values of the granger matrix represent. If I understand correctly, it is the log(variance of predicted time course/variance of actual time course). 2. What range of values should I be getting for granger causality for iEEG data? I am getting values ranging from 0 to 2.5. Values I see reported in papers seem to report peaks barley higher than 1. Thank you for your help! Olga -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.dipompeo at unich.it Wed Nov 9 19:18:42 2011 From: f.dipompeo at unich.it (f.dipompeo at unich.it) Date: Wed, 09 Nov 2011 19:18:42 +0100 Subject: [FieldTrip] Power time Course (Re: fieldtrip Digest, Vol 12, Issue 13) Message-ID: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> Dear Eelke and Roemer, thank you very much... Concerning your questions: > Your question is not entirely clear to me. Do you want to estimate the > timecourse of the total (i.e. non-frequency-resolved) power in your > signal? yes.. > Furthermore, the code you paste in your email seems valid to me. (You > could possibly simplify it by using cfg.toi = comp.time{1}; to get an > estimate of power at each time point in your signal. ) What does not > seem to work, in your case? The strange thing is that while the 'powspctrm' output field of ft_freqanalysis contains "NaN" values, I see its content by plotting it using ft_singleplotTFR.. Also summing up over all the frequencies in this way cfg=[]; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.trials = 'all'; cfg.foi = 1:150; cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; cfg.t_ftimwin = 4./cfg.foi; [freq_comp_tr] = ft_freqanalysis(cfg,comp); pow_f=sum(freq_comp_tr.powspctrm,2); pelec= squeeze(pow_f); both pow_f and pelec contain NaN values, but plotting it I see the content!? > I don't entirely understand what you referring to either, but it sounds > at least like a within channel phenomenon? In that case, you can use > cfg.output = 'pow', or 'fourier', which do not compute the between > channel CSD, saving quite a bit memory. Ok > If you are interested in the total energy over time of your signal, but > only for the 1-150 Hz part, it might be easier to do a bandpass, and > taking the square of your raw signal (energy is usually squared > amplitude I thought?). If that is what your intending though. Right, this is the way I do it in general.. It was just to try using field trip functions... Thank you very much, Francesco From r.oostenveld at donders.ru.nl Wed Nov 9 21:48:12 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 9 Nov 2011 21:48:12 +0100 Subject: [FieldTrip] Power time Course (Re: fieldtrip Digest, Vol 12, Issue 13) In-Reply-To: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> References: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> Message-ID: <5E92D500-C3C5-4285-930C-1F2A033B8B26@donders.ru.nl> Hi Francesco, > The strange thing is that > while the 'powspctrm' output field of ft_freqanalysis contains "NaN" values, > I see its content by plotting it using ft_singleplotTFR.. At the edges of your time axis for the lower frequencies where the wavelet does not fully fit in the data window you'll get nans. That is for example what you see in the figure http://fieldtrip.fcdonders.nl/_detail/tutorial/timefrequencyanalysis/tfrhann7_24_mrt_2009.png?id=tutorial%3Atimefrequencyanalysis > Also summing up over all the frequencies in this way > > cfg=[]; > cfg.method = 'mtmconvol'; > cfg.output = 'pow'; > cfg.taper = 'hanning'; > cfg.trials = 'all'; > cfg.foi = 1:150; > cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; > cfg.t_ftimwin = 4./cfg.foi; > [freq_comp_tr] = ft_freqanalysis(cfg,comp); > > pow_f=sum(freq_comp_tr.powspctrm,2); > pelec= squeeze(pow_f); > > both pow_f and pelec contain NaN values, but plotting it I see the content!? Doing normal math with nans does not work, i.e. nan+1=nan. You might want to use nansum instead of sum. But the FT plotting functions know how to plot the nans. >> If you are interested in the total energy over time of your signal, but >> only for the 1-150 Hz part, it might be easier to do a bandpass, and >> taking the square of your raw signal (energy is usually squared >> amplitude I thought?). If that is what your intending though. > > Right, this is the way I do it in general.. It was just to try using field trip functions... that is also possible (well, almost that is). Do ft_preprocessing on your data with a bandpassfilter and specify cfg.hilbert=yes. That will give you the amplitude envelope. It is not squared however, so it you want ft^2 you'll still have to do a little in matlab yourself for i=1:numel(data.trial), data.trial{i} = data.trial{i}.^2; end best Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.buiatti at gmail.com Thu Nov 10 12:31:39 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Thu, 10 Nov 2011 12:31:39 +0100 Subject: [FieldTrip] ft_neighbourplot Message-ID: Dear Fieldtrippers, I have a problem with ft_neighbourplot. Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 Neighbours in the Fieldtrip layout seem ok to me. However, when plotting them with ft_neighbourplot, the layout is clearly incorrect, it includes only about one third of the channels and when clicking on single channels, the output is incorrect (it always displays the same channel labels). I think this is a very useful command, so I would like to be able to use it! Below I have copied the corresponding commands. Am I doing anything wrong? Any help? Thanks Marco >> data data = hdr: [1x1 struct] label: {306x1 cell} time: {1x300 cell} trial: {1x300 cell} fsample: 1000 sampleinfo: [300x2 double] trialinfo: [300x1 double] grad: [1x1 struct] cfg: [1x1 struct] >> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >> neighbours = ft_prepare_neighbours(cfg, data) Trying to load sensor neighbours from a template Successfully loaded neighbour structure from /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat there are on average 6.9 neighbours per channel the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB neighbours = 1x104 struct array with fields: label neighblabel >> cfg=[];cfg.neighbours=neighbours; >> ft_neighbourplot(cfg,data) Using the gradiometer configuration from the dataset. the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191 FRANCE Ph: +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From jm.horschig at donders.ru.nl Thu Nov 10 14:48:45 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 10 Nov 2011 14:48:45 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: Message-ID: <4EBBD63D.9000000@donders.ru.nl> Dear Marco, thanks for reporting this, I will have a look to see what is going wrong there. I'll let you know when I found the cause for your problem. Best regards, Jörn On 11/10/2011 12:31 PM, Marco Buiatti wrote: > Dear Fieldtrippers, > > I have a problem with ft_neighbourplot. > > Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 > > Neighbours in the Fieldtrip layout seem ok to me. > > However, when plotting them with ft_neighbourplot, the layout is > clearly incorrect, it includes only about one third of the channels > and when clicking on single channels, the output is incorrect (it > always displays the same channel labels). > > I think this is a very useful command, so I would like to be able to use it! > > Below I have copied the corresponding commands. > > Am I doing anything wrong? Any help? > > Thanks > > Marco > >>> data > data = > > hdr: [1x1 struct] > label: {306x1 cell} > time: {1x300 cell} > trial: {1x300 cell} > fsample: 1000 > sampleinfo: [300x2 double] > trialinfo: [300x1 double] > grad: [1x1 struct] > cfg: [1x1 struct] > >>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>> neighbours = ft_prepare_neighbours(cfg, data) > Trying to load sensor neighbours from a template > Successfully loaded neighbour structure from > /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat > there are on average 6.9 neighbours per channel > the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB > > neighbours = > > 1x104 struct array with fields: > label > neighblabel > >>> cfg=[];cfg.neighbours=neighbours; >>> ft_neighbourplot(cfg,data) > Using the gradiometer configuration from the dataset. > the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB > Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 tobias.staudigl at uni-konstanz.de Thu Nov 10 15:24:48 2011 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Thu, 10 Nov 2011 15:24:48 +0100 Subject: [FieldTrip] Granger Causality In-Reply-To: References: Message-ID: <4EBBDEB0.1030308@uni-konstanz.de> Hi Olga, 1. i think it should be -log (1 - (noise_covariance*transfer_matrix / spectral_matrix)). For details, I recommend this article (if you are using the bsmart toolbox as implemented in fieldtrip): Cui et al., 2008, Neural Networks http://www.ncbi.nlm.nih.gov/pubmed/18599267 2. i get granger values from 0 to 0.3 in my iEEG data. I am also not aware of studies getting granger values much higher than 1 (although there might be some) in real data, however, simulation studies do show much higher values. hope this helps a little, best, Tobias Am 09.11.2011 16:01, schrieb Olga Felsovalyi: > Hello, > > I am following the connectivity tutorial to perform granger causality > analysis on iEEG data. Please help me understand a few things: > > 1. Please clarify exactly what the output values of the granger matrix > represent. If I understand correctly, it is the log(variance of > predicted time course/variance of actual time course). > > 2. What range of values should I be getting for granger causality for > iEEG data? I am getting values ranging from 0 to 2.5. Values I see > reported in papers seem to report peaks barley higher than 1. > > Thank you for your help! > Olga > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 10 15:37:28 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 10 Nov 2011 15:37:28 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: Message-ID: <4EBBE1A8.80700@donders.ru.nl> Hi Marco, I analyzed your problem, here's the result ;) 1) You are choosing neuromag306mag_neighb as the template for your neighbours. This template is based on the neuromag306mag two-dimensional layout, *not* on the three dimensional data that you pur it. In general, 2D layouts should only be used for neighbour selection when no 3D gradiometer information is available, because these two do not coincide, and quite honestly, I do not know what the precise relationship between these two is (it's some projection on a 2D plane). This explains why the neighbours you defined look good when you use the 2D layout, but look ugly for the 3D gradiometer data. 2) When you are using neuromag306 data, you should use neuromag306_neighb as the template. This template is based on the 3D gradiometer information of our neuromag306 test data. This way, the neighbours are defined based on 3D information, the same space that your gradiometer information is in. Note however, that not all templates are optimized, yet, and also it might be a bit confusing that there are so many templates for the neuromag system. We might reconsider this. 3) An alternative would be, if you have gradiometer information at hand, to call prepare_neighbours with cfg.method='distance' or 'triangulation'. This ensures that your neighbours chosen are based on the same space than your sensors are in. Anyway, it is good that you checked with ft_neighbourplot, otherwise you might have received crappy results - so note to all of you, always check your neighbourselection ;) 4) There was indeed a bug in ft_neighbourplot causing always the same sensor names to show up in the command window. This is resolved in the newest version now (downloadable from tomorrow on). I changed some other things as well, hope I did not break anything crucial ;) I hope this helps! Should you have any other questions, feel free to ask! Best, Jörn On 11/10/2011 12:31 PM, Marco Buiatti wrote: > Dear Fieldtrippers, > > I have a problem with ft_neighbourplot. > > Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 > > Neighbours in the Fieldtrip layout seem ok to me. > > However, when plotting them with ft_neighbourplot, the layout is > clearly incorrect, it includes only about one third of the channels > and when clicking on single channels, the output is incorrect (it > always displays the same channel labels). > > I think this is a very useful command, so I would like to be able to use it! > > Below I have copied the corresponding commands. > > Am I doing anything wrong? Any help? > > Thanks > > Marco > >>> data > data = > > hdr: [1x1 struct] > label: {306x1 cell} > time: {1x300 cell} > trial: {1x300 cell} > fsample: 1000 > sampleinfo: [300x2 double] > trialinfo: [300x1 double] > grad: [1x1 struct] > cfg: [1x1 struct] > >>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>> neighbours = ft_prepare_neighbours(cfg, data) > Trying to load sensor neighbours from a template > Successfully loaded neighbour structure from > /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat > there are on average 6.9 neighbours per channel > the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB > > neighbours = > > 1x104 struct array with fields: > label > neighblabel > >>> cfg=[];cfg.neighbours=neighbours; >>> ft_neighbourplot(cfg,data) > Using the gradiometer configuration from the dataset. > the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB > Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 r.oostenveld at donders.ru.nl Thu Nov 10 16:53:33 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 10 Nov 2011 16:53:33 +0100 Subject: [FieldTrip] positions available at the Donders Institute Message-ID: Dear FieldTrip list members, We currently have 3 positions available in the Donders Centre for Neuroscience, which is part of the Donders Institute. The closing date is January 1st 2012. 1. assistant professor of cognitive neuroscience key words: neuronal processing, chemical biology, viral delivery systems, ion channels and pumps 2. assistant professor of molecular and cellular neuroimaging key words: neuronal processing, optogenetics, gene delivery systems, "on-off switch". 3. professor of cellular neurophysiology key words: in vivo and in vivo rodent For more information, please visit: http://www.ru.nl/vacatures/details/details_afdeling_0?ond_ext=8 best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- From Gregor.Volberg at psychologie.uni-regensburg.de Fri Nov 11 18:08:50 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 11 Nov 2011 18:08:50 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EBA958E.8070300@donders.ru.nl> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> Message-ID: <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> Hi Jörn, thanks a lot for your response. I meanwhile checked some possible reasons for the different clusterings and I am coming closer. I could reproduce the described error with two different datasets (62 channel and 29 channel EEG), on two different computers and with two different versions of fieldtrip (2011 versions). First of all, I checked the neighbourhood structures. They are identical in my two analyses - same number of electrodes, same order, same neighbours. I checked that before and after entering neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are the same. I then searched through the code and found the channeighbstructmat that is constructed during the call of "clusterstat.m". I saved these matrices during the call of ft_freqstatistics and found that, with the same neighbourhood structures, the channeighbstructmat looked completely different in the old and new version. I then changed the code of the new FT "clusterstat.m" so that it reads in the channeighbstructmat obtained with the old FT version - then everything works perfect. Thus, the problem is most likely an incorrect channeighbstructmat. I figured out that in my case, FT calls an SPM8 function spm_bwlabeln during construction of the channeighbstructmat, which older version do not do. However, if I understood the code correctly, the SPM function should only be called for source data?! Could it be that, because my data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), FT assumes source data? Thanks again for your help, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" ( mailto:Gregor.Volberg at psychologie.uni-regensburg.de ) Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A ) _______________________________________________ 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From farsun at gmail.com Mon Nov 14 03:56:42 2011 From: farsun at gmail.com (Faraz Akram) Date: Mon, 14 Nov 2011 11:56:42 +0900 Subject: [FieldTrip] Need help in real time EEG Message-ID: Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr = ft_read_header('buffer://localhost:51244') it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Nov 14 09:51:55 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 14 Nov 2011 09:51:55 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> Message-ID: <4EC0D6AB.8090907@donders.ru.nl> Hi Gregor, that sounds indeed odd - although I am glad that I did not mess up something in prepare_neighbours ;) However, when I look at the code, it seems that channeighbstructmat will only be used when ~issource, and the call to the spm function will only be when issource, so I cannot see a direct relation between these two. Could you provide some more information, e.g. in what line and function you observed the call to the spm function? If you like you could also create a bugreport on http://bugzilla.fcdonders.nl/ for this. In any case, one of us will then tackle your problem as soon as possible and try to solve it. I hope that we can reproduce your bug here, else we might ask for a snippet of your data/workspace. Thanks in any case for having a precise look at what is going on! Best, Jörn On 11/11/2011 6:08 PM, Gregor Volberg wrote: > > Hi Jörn, > > > thanks a lot for your response. I meanwhile checked some possible > reasons for the different clusterings and I am coming closer. > > I could reproduce the described error with two different datasets (62 > channel and 29 channel EEG), on two different computers and with two > different versions of fieldtrip (2011 versions). First of all, I > checked the neighbourhood structures. They are identical in my two > analyses - same number of electrodes, same order, same neighbours. I > checked that before and after entering neighbours into the analyses > (by comparing the stat.cfg.neighbours) - they are the same. > > I then searched through the code and found the channeighbstructmat > that is constructed during the call of "clusterstat.m". I saved these > matrices during the call of ft_freqstatistics and found that, with the > same neighbourhood structures, the channeighbstructmat looked > completely different in the old and new version. I then changed the > code of the new FT "clusterstat.m" so that it reads in the > channeighbstructmat obtained with the old FT version - then everything > works perfect. > > > Thus, the problem is most likely an incorrect channeighbstructmat. I > figured out that in my case, FT calls an SPM8 function spm_bwlabeln > during construction of the channeighbstructmat, which older version do > not do. However, if I understood the code correctly, the SPM function > should only be called for source data?! Could it be that, because my > data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), > FT assumes source data? > > > Thanks again for your help, > > Gregor > > > > > > -- > Dr. rer. nat. Gregor Volberg > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> > Hi Gregor, > > did you check your neighbourselection? Maybe something is going wrong > there, given that a lot in this code has changed since 2010. Could you > check that using ft_neighbourplot? This would be the most logical > explanation why the results differ. It does not really make sense that > these three sensors form one cluster, because they should not be > neighbours of each other. So i would suppose that something is going > wrong there. > > Best, > Jörn > > > On 11/3/2011 4:57 PM, Michael Wibral wrote: > >> Hi Gregor, >> >> in principle the first level statistics that determine cluster >> membership (and thereby cluster shapes etc.) can also vary from one >> set of permutations to the next, esp. on the borders of a cluster >> (this is why it is typically said that the localization of a cluster >> is not as trustworthy as its existence). Other resaons for >> differences are differing number of permutations - did you set >> everything the same? >> >> This said there might well be another problem - I hope the cluster >> people can have a look into it. >> >> Best , >> Michael >> >> >> ------------------------------------------------------------------------ >> *Von:* "Gregor Volberg" >> >> *Gesendet:* Nov 2, 2011 6:34:43 PM >> *An:* fieldtrip at donders.ru.nl >> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer FT >> versions? >> >> Dear fieldtrip community, >> >> >> I just encountered an unexpected behavior of FT that I would like >> to share with the list. It is that the cluster permutation test >> formed incorrect clusters from a given set of significant >> electrodes in newer FT versions (ft-20111012; I also tried with >> ft-20111028). >> >> >> For example, when using an old ft version (ft-20100810) and >> freqstatistics I get a negative cluster with 17 contiguous >> electrodes. With the newer ft version, using the same data and >> the same cfg, three significant electrodes that are spatially >> contiguous to the other significant electrodes are not included >> in the cluster. Also, three electrodes that are spatially >> seperated and are actually part of the first cluster are grouped >> into a separate cluster. I attached a picture with the >> respective clusterplots where differences are marked with red >> arrows. >> >> I am aware that the permutation p-value for a given cluster can >> be different in two separate analyses, but the grouping of >> significant electrodes into clusters should always be the same, >> am i right? I double-checked the cfg.neighbours, after conversion >> to new 'struct' style, and they were identical in the "old ft" >> and "new ft" analysis. Also, the stat.stat field and the >> stat.cfg.clustercritval were the same for both analyses. Thus, >> the same neighbourhood relations and the same significant >> electrodes should be used for grouping. Yet I get different >> results... >> >> >> I am almost sure that this is trivial, but I could not yet >> replicate my old results with new FT and this makes me nervous. >> Has someone made a similar experience? Or do newer versions of ft >> use some further information besides cfg.neighbours for >> clustering, somewhere in the *cfg.previuous perhaps, that I am >> not aware of? Any comments are highly welcome. >> >> >> Best regards, >> >> Gregor >> >> >> cfg = []; >> >> cfg.neighbours = neighbours; >> >> cfg.minnbchan=1; >> >> cfg.avgoverfreq = 'yes'; >> >> cfg.avgovertime = 'yes'; >> >> cfg.method = 'montecarlo'; >> >> cfg.correctm = 'cluster'; >> >> cfg.statistic = 'depsamplesT'; >> >> cfg.tail = 0; >> >> cfg.alpha = 0.05; >> >> cfg.clusteralpha = 0.05; >> >> cfg.numrandomization = 1000; >> >> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >> >> cfg.uvar = 1; >> >> cfg.ivar = 2; >> >> cfg.latency = [2.24 2.53]; >> >> cfg.frequency = [17 21];% >> >> stat = ft_freqstatistics(cfg, DC, TC); >> >> >> -- >> Dr. rer. nat. Gregor Volberg >> ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >> _______________________________________________ >> >> >> >> >> 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 > > > > > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Nov 14 11:16:10 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 14 Nov 2011 11:16:10 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF@smkexch02.maartenskliniek.nl> Hi Faram I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] Sent: Monday, November 14, 2011 3:56 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Need help in real time EEG Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr = ft_read_header('buffer://localhost:51244') it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From mcoskun at mail.uh.edu Mon Nov 14 13:42:08 2011 From: mcoskun at mail.uh.edu (Mehmet-Akif Coskun) Date: Mon, 14 Nov 2011 06:42:08 -0600 Subject: [FieldTrip] Automatic artifact rejection after manual artifact rejection Message-ID: <723091d5a1f03.4ec0b840@mail.uh.edu> Dear Fieldtrippers, I would like to get some suggestions and comments on two issues. 1) Is that a good idea to do an automatic artifact rejection (using ft_artifact_zvalue) after a visual rejection+ICA? I am wondering whether any problems occur by doing so (such as removing useful data, adding noise). 2) The second issue is about visual rejection of continuous rest data. While doing a visual artifact rejection on continuous data using ft_browser and removing the artifacts, the long continuous data is automatically chopped off. For example if your data is 0-10 seconds and data between 1-2s are artifacts and you remove it, you will end up with tho segments (from 0-1s and 2-10s). Is it okay to just simply append the two portions since its resting data or will it cause a discontinuity. In case of a discontinuity, what should be done? Any suggestions will be greatly appreciated. Thanks in advance Best Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Mon Nov 14 16:19:17 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Mon, 14 Nov 2011 16:19:17 +0100 Subject: [FieldTrip] change in filter order for 'fir' type Message-ID: Dear FieldTrip users, As of tonight's FT version, the filter order for the 'fir' filter will change. It used to be set to 25 by default, but now will be a 'smarter' value based on your data and filter requests. You can still override this by setting, for example, cfg.bpfiltord=25; in order to obtain equivalent results as before if you typically used the default. By default, filtering in FT uses the Butterworth filter ('butter') instead of 'fir'; this default filter-type has not changed, and the filter-order for 'butter' has not changed either. Best, Johanna -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Mon Nov 14 17:46:26 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Mon, 14 Nov 2011 17:46:26 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EC0D6AB.8090907@donders.ru.nl> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> Message-ID: <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> Hi Jörn, yes, sure I can provide you with some more information. I hope to do so due Wednesday. Thanks a lot again for your kind support! Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> Hi Gregor, that sounds indeed odd - although I am glad that I did not mess up something in prepare_neighbours ;) However, when I look at the code, it seems that channeighbstructmat will only be used when ~issource, and the call to the spm function will only be when issource, so I cannot see a direct relation between these two. Could you provide some more information, e.g. in what line and function you observed the call to the spm function? If you like you could also create a bugreport on http://bugzilla.fcdonders.nl/ for this. In any case, one of us will then tackle your problem as soon as possible and try to solve it. I hope that we can reproduce your bug here, else we might ask for a snippet of your data/workspace. Thanks in any case for having a precise look at what is going on! Best, Jörn On 11/11/2011 6:08 PM, Gregor Volberg wrote: Hi Jörn, thanks a lot for your response. I meanwhile checked some possible reasons for the different clusterings and I am coming closer. I could reproduce the described error with two different datasets (62 channel and 29 channel EEG), on two different computers and with two different versions of fieldtrip (2011 versions). First of all, I checked the neighbourhood structures. They are identical in my two analyses - same number of electrodes, same order, same neighbours. I checked that before and after entering neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are the same. I then searched through the code and found the channeighbstructmat that is constructed during the call of "clusterstat.m". I saved these matrices during the call of ft_freqstatistics and found that, with the same neighbourhood structures, the channeighbstructmat looked completely different in the old and new version. I then changed the code of the new FT "clusterstat.m" so that it reads in the channeighbstructmat obtained with the old FT version - then everything works perfect. Thus, the problem is most likely an incorrect channeighbstructmat. I figured out that in my case, FT calls an SPM8 function spm_bwlabeln during construction of the channeighbstructmat, which older version do not do. However, if I understood the code correctly, the SPM function should only be called for source data?! Could it be that, because my data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), FT assumes source data? Thanks again for your help, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0D ) >>> "Jörn M. Horschig" ( mailto:jm.horschig at donders.ru.nl ) 11/9/2011 4:00 PM >>> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" ( mailto:Gregor.Volberg at psychologie.uni-regensburg.de ) Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A ) _______________________________________________ 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 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 listfieldtrip at donders.ru.nlhttp://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 P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nlTel: +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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dimitri.papadopoulos at cea.fr Mon Nov 14 18:07:13 2011 From: dimitri.papadopoulos at cea.fr (Dimitri Papadopoulos Orfanos) Date: Mon, 14 Nov 2011 18:07:13 +0100 Subject: [FieldTrip] fileparts() : 4th argument and Matlab R2011b Message-ID: <4EC14AC1.4010303@cea.fr> Hello, Starting with Matlab R2010a, the fourth output argument of fileparts() is no longer supported and has been removed. Calling the function with more than three output arguments has been generating a warning since that version R2010a: http://www.mathworks.fr/help/techdoc/rn/br_bpq8-1.html#bsdnyvb-1 http://www.mathworks.fr/help/techdoc/ref/fileparts.html Although this is not clearly documented and starting with Matlab R2011b, calling the function with more than three output arguments does error. I've found a single occurrences of fileparts() being called with 4 arguments in ft_qualitycheck.m: [pathstr,name,extr,versn] = fileparts(exportname); Can you please fix it? Removing the spurious 4th argument should be enough since neither the 3rd not the 4th argument are used. There are actually a few other occurrences in subdirectories external/spm2 and external/spm8 but : - SPM8 will be fixed soon: the FIL maintainer is aware of the problem, has fixed it and a patch should be released before next January, - SPM2 is not maintained by the FIL anymore but I am in the process of fixing it here: http://sourceforge.net/projects/spm2/ Regards, -- Dimitri Papadopoulos CEA/Saclay I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France From dimitri.papadopoulos at cea.fr Mon Nov 14 22:22:23 2011 From: dimitri.papadopoulos at cea.fr (Dimitri Papadopoulos Orfanos) Date: Mon, 14 Nov 2011 22:22:23 +0100 Subject: [FieldTrip] fileio/README Message-ID: <4EC1868F.8010609@cea.fr> Hi, File fileio/README reads: The following files were downloaded from http://www.koders.com base64.c base64.h I cannot find these files anywhere. Have they been removed? Has the source code been integrated elsewhere? For what it's worth I've found Matlab files that could have replaced that C code: external/gifti/@gifti/private/base64decode.m external/gifti/@gifti/private/base64encode.m Please fix the README. Regards, -- Dimitri Papadopoulos CEA/Saclay I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France From b.reuderink at donders.ru.nl Tue Nov 15 10:44:28 2011 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Tue, 15 Nov 2011 10:44:28 +0100 Subject: [FieldTrip] fileio/README In-Reply-To: <4EC1868F.8010609@cea.fr> References: <4EC1868F.8010609@cea.fr> Message-ID: Dear Dimitri Papadopoulos, I have filed bug report #1157 for your request. You can track it's progress at http://bugzilla.fcdonders.nl/show_bug.cgi?id=1157 . Best regards, Boris On Mon, Nov 14, 2011 at 10:22 PM, Dimitri Papadopoulos Orfanos wrote: > Hi, > > File fileio/README reads: > >        The following files were downloaded from http://www.koders.com >          base64.c >          base64.h > > I cannot find these files anywhere. Have they been removed? Has the source > code been integrated elsewhere? For what it's worth I've found Matlab files > that could have replaced that C code: >        external/gifti/@gifti/private/base64decode.m >        external/gifti/@gifti/private/base64encode.m > > Please fix the README. > > Regards, > -- > Dimitri Papadopoulos > CEA/Saclay > I2BM, NeuroSpin > 91191 Gif-sur-Yvette cedex, France > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From farsun at gmail.com Wed Nov 16 04:52:56 2011 From: farsun at gmail.com (Faraz Akram) Date: Wed, 16 Nov 2011 12:52:56 +0900 Subject: [FieldTrip] Need help in real time EEG Message-ID: Dear Marianne Thanks for your reply. Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. Now i dont know exactly how to read that buffer. I think there will be no difference in reading from buffer due to difference of amplifier Kindly Guide me how you access data from buffer. Thanks Regards Faraz Akram On Mon, Nov 14, 2011 at 8:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Need help in real time EEG (Severens, Marianne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Nov 2011 11:16:10 +0100 > From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Need help in real time EEG > Message-ID: > < > 70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> > > Content-Type: text/plain; charset="us-ascii" > > Hi Faram > > I have a different amplifier, so I'm not sure if it works exactly the > same, but I can try to help you. > > Did you first start the fieldtrip buffer that 'reads' the data from the > amplifier? You can look up which one you have to use for your amplifier > here: http://fieldtrip.fcdonders.nl/development/realtime > > Best, Marianne > > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Faraz Akram [farsun at gmail.com] > Sent: Monday, November 14, 2011 3:56 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Need help in real time EEG > > Hi > > I am new to FieldTrip. > > I want to acess realtime EEG data in matlab from my BrainVision recorder. > when i use > > > > hdr = ft_read_header('buffer://localhost:51244') > > it gives an error > > Trying to close socket 3956 > ??? Error using ==> buffer > ERROR: tcp connection to buffer failed. > > Error in ==> ft_read_header at 815 > orig = buffer('get_hdr', [], host, port); > > > > Kindly Guide me what will i have to do > > > > Disclaimer > Vrijgave van de informatie verzonden met dit e-mail bericht is > geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking > van deze informatie is conform het Privacy reglement van de Sint > Maartenskliniek. De informatie is uitsluitend bestemd voor de > geadresseerde. Gebruik van deze informatie door anderen dan de > geadresseerde is, zonder voorafgaande schriftelijke toestemming van de > rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de > juiste en volledige overbrenging van de inhoud van een gezonden e-mail, > noch voor de ontvangst daarvan. > > Sint Maartenskliniek > Hengstdal 3, > 6574 NA Ubbergen (bij Nijmegen) > Telefoon 024-3659 911 > Telefax 024-3659 204 > KvK nummer 41055111 > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 12, Issue 19 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vitoria.piai at gmail.com Wed Nov 16 12:21:53 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 16 Nov 2011 12:21:53 +0100 Subject: [FieldTrip] Setting up MNE Message-ID: <4EC39CD1.1000109@gmail.com> Hi, I'm following the tutorial on MNE on the Wiki. I'm now at export MNE_ROOT= cd $MNE_ROOT/bin . ./mne_setup_sh export SUBJECTS_DIR= export SUBJECT=Subject01 When creating the source space, I get the error "/Could not find the MRI data//directory ..." /I now have to the same directory as I had it for Freesurfer a few steps later: export SUBJECTS_DIR= On another Wiki page, I found the following: MNE requires to set up the same environmental variables as FS. It is because MNE will look for the MRI data that is processed by FS (therefore, it will look for directories that are made by FS). Therefore, *SUBJECTS_DIR* environmental variable should refer to that directory where the anatomical data is (pre-processed by FS), and *SUBJECT* should refer to the sub-directory of SUBJECTS_DIR where the anatomical data is from the person whose data is analyzed. /subjects/: contains the output from FS I thought I had it right but I'm a bit confused now. What does MNE need exactly? I can't really figure out where it goes wrong from the MNE tutorial either. Thanx a lot, Vitória -- ** Please consider the environment - do you really need to print? ** -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Nov 16 12:21:40 2011 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 16 Nov 2011 12:21:40 +0100 Subject: [FieldTrip] Brainvision recorder RDA Message-ID: Dear all, I'm trying to connect to Brainvision recorder using the built-in RDA system and the rda2ft-files. I've got two computers; one with recorder and the rda2ft-files, and one with the rest of fieldtrip which should connect to the fieldtrip buffer. The goal is to get the secondary computer to show the subject its performance (for example; the rms of a single channel) within the task constraints. When running rda2ft.exe (with the parameters localhost and 51244) it does seem to connect; it shows the list of channels (all channels), their resolution, and their names, and some other assorted stuff. However, it then says: "Unrecognized packet type (10000), has size 24 - exiting" What does this mean, and how can I fix it? I've tried messing with the settings of recorder, but nothing I do seems to make a difference. Sincerely, Casper van Heck -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Wed Nov 16 14:33:17 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Wed, 16 Nov 2011 08:33:17 -0500 Subject: [FieldTrip] Setting up MNE In-Reply-To: <4EC39CD1.1000109@gmail.com> References: <4EC39CD1.1000109@gmail.com> Message-ID: Hello Vitória, it's probably more relevant to ask your question about MNE on the MNE mailing list: http://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis you can also find the MNE manual and tutorials online: http://martinos.org/mne/ Best, Alex disclaimer : I am one of the MNE developers. -- Alexandre Gramfort, PhD gramfort at nmr.mgh.harvard.edu Dept. of Radiology MGH Martinos Center / Harvard Medical School http://www-sop.inria.fr/members/Alexandre.Gramfort/ 2011/11/16 Vitória Magalhães Piai : > Hi, > > I'm following the tutorial on MNE on the Wiki. I'm now at > > export MNE_ROOT= > cd $MNE_ROOT/bin > . ./mne_setup_sh > export SUBJECTS_DIR= > export SUBJECT=Subject01 > > When creating the source space, I get the error "Could not find the MRI data > directory ..." > I now have to the same directory as I had it for Freesurfer a few steps > later:   export SUBJECTS_DIR= > > On another Wiki page, I found the following: > > MNE requires to set up the same environmental variables as FS. It is because > MNE will look for the MRI data that is processed by FS (therefore, it will > look for directories that are made by FS). Therefore, SUBJECTS_DIR > environmental variable should refer to that directory where the anatomical > data is (pre-processed by FS), and SUBJECT should refer to the sub-directory > of SUBJECTS_DIR where the anatomical data is from the person whose data is > analyzed. > > /subjects/: contains the output from FS > > I thought I had it right but I'm a bit confused now. What does MNE need > exactly? I can't really figure out where it goes wrong from the MNE tutorial > either. > > Thanx a lot, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > _______________________________________________ > 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 Graham.Little at nrc-cnrc.gc.ca Wed Nov 16 14:51:37 2011 From: Graham.Little at nrc-cnrc.gc.ca (Little, Graham) Date: Wed, 16 Nov 2011 05:51:37 -0800 Subject: [FieldTrip] Fitting a Magnetic Dipole Message-ID: Hi all, I am currently trying to Fit a dipole to HPI coil locations to perform head position correction in fieldtrip. Currently I am using the ft_dipolefitting function to generate the coil locations from a section of MEG data. Before running ft_dipolefitting I do an fft on the data to measure the complex valued MEG topography for each coil frequency. The topographies look great for each coil, you can definitely see where each dipole should be fitted, however when using ft_dipolefitting the locations I get back are incorrect. I believe this is due to the fact that ft_dipolefitting assumes an Equivalent Current Dipole, but the coils generate a Magnetic Dipole. Anyway to tell ft_dipolefitting to fit a Magnetic Dipole rather than the ECD solution. Any information would be helpful. Thanks, Graham From marco.buiatti at gmail.com Wed Nov 16 16:16:10 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Wed, 16 Nov 2011 16:16:10 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: <4EBBE1A8.80700@donders.ru.nl> References: <4EBBE1A8.80700@donders.ru.nl> Message-ID: Dear Jorn, thanks a lot for your feedback. Still I'm afraid the problem is not solved yet, and this is maybe due to the fact that Neuromag data are composed by three different types of sensors (two orthogonally oriented gradiometers and one magnetometer) for each location on the scalp. Therefore, though we have 306 sensors, we have 102 sensor locations only. In our lab, when we analyse the data in the sensor space, we perform statistical analysis either on each sensor separately or on magnetometers and on the norm of the two gradiometers (discussion on alternatives would be worth another thread...). This is the reason why I choose neuromag306mag_neighb. Concerning the two neighbours templates I have found the following: 1) As you also said, neuromag306mag_neighb contains a meaningful set of neighbours for each sensor. (a simple command to display them: for i=1:102 disp([neighbours(i).label 'neighbours:' neighbours(i).neighblabel']); end;) so I would use this for cluster-based statistical analysis in Fieldtrip (for any type of sensors). Neuromag users, do you agree? However, when plotting it with ft_neighbourplot, as you said the configuration is clearly uncorrect (though now neighbours are correctly listed on the command line as you said). It would be very useful to have a correct 3D representation of this. 2) The neighbours template neuromag306_neighb has the correct 3D form but what I get from my data is a mislabeling of all the sensors. Also, neighbours are clearly wrong (many sensors do not have any neighbours). Since as far as I understand sensors locations are in data.grad, I wonder whether sensor locations in my data are originally wrong... Below I have copied the commands I use to import my neuromag data in Fieldtrip, any help on this would be welcome, of course I can send you data if needed. Thanks again for you help, Marco cfg = []; cfg.continuous = 'yes'; cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; cfg.trialfun =par.trialfun; cfg.trialdef.channel='STI101'; cfg.trialdef.eventvalue=par.eventvalue; cfg.trialdef.prestim=-par.prestim; cfg.trialdef.poststim=par.poststim; cfg.delay = par.delay; cfg.channel = {'MEG'}; cfg.baselinewindow=[par.begt par.endt]; cfg.dataset = ['test_sss.fif']; cfg_loc = ft_definetrial(cfg); data= ft_preprocessing(cfg_loc); On 10 November 2011 15:37, "Jörn M. Horschig" wrote: > Hi Marco, > > I analyzed your problem, here's the result ;) > > 1) You are choosing neuromag306mag_neighb as the template for your > neighbours. This template is based on the neuromag306mag two-dimensional > layout, *not* on the three dimensional data that you pur it. In general, 2D > layouts should only be used for neighbour selection when no 3D gradiometer > information is available, because these two do not coincide, and quite > honestly, I do not know what the precise relationship between these two is > (it's some projection on a 2D plane). This explains why the neighbours you > defined look good when you use the 2D layout, but look ugly for the 3D > gradiometer data. > > 2) When you are using neuromag306 data, you should use neuromag306_neighb as > the template. This template is based on the 3D gradiometer information of > our neuromag306 test data. This way, the neighbours are defined based on 3D > information, the same space that your gradiometer information is in. > Note however, that not all templates are optimized, yet, and also it might > be a bit confusing that there are so many templates for the neuromag system. > We might reconsider this. > > 3) An alternative would be, if you have gradiometer information at hand, to > call prepare_neighbours with cfg.method='distance' or 'triangulation'. This > ensures that your neighbours chosen are based on the same space than your > sensors are in. Anyway, it is good that you checked with ft_neighbourplot, > otherwise you might have received crappy results - so note to all of you, > always check your neighbourselection ;) > > 4) There was indeed a bug in ft_neighbourplot causing always the same sensor > names to show up in the command window. This is resolved in the newest > version now (downloadable from tomorrow on). I changed some other things as > well, hope I did not break anything crucial ;) > > I hope this helps! Should you have any other questions, feel free to ask! > > Best, > Jörn > > On 11/10/2011 12:31 PM, Marco Buiatti wrote: >> >> Dear Fieldtrippers, >> >> I have a problem with ft_neighbourplot. >> >> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version >> 7.12.0 >> >> Neighbours in the Fieldtrip layout seem ok to me. >> >> However, when plotting them with ft_neighbourplot, the layout is >> clearly incorrect, it includes only about one third of the channels >> and when clicking on single channels, the output is incorrect (it >> always displays the same channel labels). >> >> I think this is a very useful command, so I would like to be able to use >> it! >> >> Below I have copied the corresponding commands. >> >> Am I doing anything wrong? Any help? >> >> Thanks >> >> Marco >> >>>> data >> >> data = >> >> hdr: [1x1 struct] >> label: {306x1 cell} >> time: {1x300 cell} >> trial: {1x300 cell} >> fsample: 1000 >> sampleinfo: [300x2 double] >> trialinfo: [300x1 double] >> grad: [1x1 struct] >> cfg: [1x1 struct] >> >>>> cfg=[]; cfg.method='template'; >>>> cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>>> neighbours = ft_prepare_neighbours(cfg, data) >> >> Trying to load sensor neighbours from a template >> Successfully loaded neighbour structure from >> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat >> there are on average 6.9 neighbours per channel >> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB >> >> neighbours = >> >> 1x104 struct array with fields: >> label >> neighblabel >> >>>> cfg=[];cfg.neighbours=neighbours; >>>> ft_neighbourplot(cfg,data) >> >> Using the gradiometer configuration from the dataset. >> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB >> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 r.oostenveld at donders.ru.nl Wed Nov 16 16:57:38 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 16:57:38 +0100 Subject: [FieldTrip] Brainvision recorder RDA In-Reply-To: References: Message-ID: <2FB69C66-2F40-484C-AB6A-46A48E8BC1D1@donders.ru.nl> Dear Casper, The message did not sound familiar so I whad to go into the code to look it up. In fieldtrip/realtime/acquisition/brainamp/rda2ft.c there is this section switch(header.nType) { case RDA_START_MSG: handleStartPacket(ftSocket, header.nSize, buf); break; case RDA_INT_MSG: case RDA_FLOAT_MSG: handleDataPacket(ftSocket, header.nSize, buf); break; case RDA_STOP_MSG: printf("\nRemote Data Acquisition stopped\n\n"); break; default: fprintf(stderr, "Unrecognized packet type (%i), has size %i - exiting\n", header.nType, header.nSize); keepRunning = 0; break; } where the last case pertains to your message. So shat seens to happen is that rda2ft receives a packet from Recorder and subsequently has to interpret its content. The expected values are #define RDA_START_MSG 1 #define RDA_INT_MSG 2 #define RDA_STOP_MSG 3 #define RDA_FLOAT_MSG 4 but apparently your Recorder sends a different package of type "1000". I don't know why that happens. Perhaps it is a different version of the software. My first suggested solution would be to change keepRunning = 0; into keepRunning = 1; and then hope that dropping this particular packet does not cause problems later. Better would be to try to identify what the packet contains and actually deal with it, but I would not know where to get accessible documentation for this. I hope that you are able to make the change and recompile this yourself. If not, please file a request for the code enhancement at http://bugzilla.fcdonders.nl (create account, file new bug, change status in "enhancement") and one of us will look at it. best regards, Robert On 16 Nov 2011, at 12:21, Casper van Heck wrote: > Dear all, > > I'm trying to connect to Brainvision recorder using the built-in RDA system and the rda2ft-files. I've got two computers; one with recorder and the rda2ft-files, and one with the rest of fieldtrip which should connect to the fieldtrip buffer. The goal is to get the secondary computer to show the subject its performance (for example; the rms of a single channel) within the task constraints. > > When running rda2ft.exe (with the parameters localhost and 51244) it does seem to connect; it shows the list of channels (all channels), their resolution, and their names, and some other assorted stuff. However, it then says: > "Unrecognized packet type (10000), has size 24 - exiting" > > What does this mean, and how can I fix it? I've tried messing with the settings of recorder, but nothing I do seems to make a difference. > > Sincerely, > > Casper van Heck > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Wed Nov 16 17:06:54 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 17:06:54 +0100 Subject: [FieldTrip] Fitting a Magnetic Dipole In-Reply-To: References: Message-ID: <0FD87660-0CCE-4C90-B501-78C4C748F51B@donders.ru.nl> Hi Graham If you specify cfg.vol = []; cfg.vol.type = 'infinite'; and pass a gradiometer structure(*) along to ft_dipolefitting (or ft_sourceanalysis, ft_prepare_leadfield or similar function), it will be interpreted as a magnetic dipole in an infinite vacuum. So this allows you to localize the magnetic HPI coil. Fitting the complex-valued topography after ft_freqanalysis is in principle also supported in the ft_dipolefitting function, but I should admit that that has not been used a lot (and certainly not recently). The dipole fit implementation of the Fourier data has been more or less hacked into the code and is therefore also not documented (but you can look in the code to see how it works). In case it fails on the frequency data, you are probably better off to work your way around it and convert the topography into a datastructure that resembles the output of ft_timelockanalysis before feeding it into ft_dipolefitting. best regards, Robert PS *) Note that with the same vol structure and an eeg electrode structure it would have been interpreted as an electric current dipole in an infinite homogenous conduction medium On 16 Nov 2011, at 14:51, Little, Graham wrote: > Hi all, > > I am currently trying to Fit a dipole to HPI coil locations to perform head position correction in fieldtrip. Currently I am using the ft_dipolefitting function to generate the coil locations from a section of MEG data. Before running ft_dipolefitting I do an fft on the data to measure the complex valued MEG topography for each coil frequency. The topographies look great for each coil, you can definitely see where each dipole should be fitted, however when using ft_dipolefitting the locations I get back are incorrect. > > I believe this is due to the fact that ft_dipolefitting assumes an Equivalent Current Dipole, but the coils generate a Magnetic Dipole. Anyway to tell ft_dipolefitting to fit a Magnetic Dipole rather than the ECD solution. > > Any information would be helpful. > Thanks, > Graham > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Wed Nov 16 17:29:59 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 17:29:59 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <43639A6D-3655-4ED7-AC3F-D9FB5664A1A2@donders.ru.nl> Dear Faraz, For a brainamp I would recommend the rda2ft.exe application instead of the matlab-based ft_realtime_brainampproxy implementation. This page has more details: http://fieldtrip.fcdonders.nl/development/realtime/rda Furthermore, I suggest you work your way through the specific getting started section at http://fieldtrip.fcdonders.nl/getting_started/realtime, starting from a simulated data stream and simlply visualizing the data, before you move on to realtime EEG and more serious analyses. best regards, Robert On 16 Nov 2011, at 4:52, Faraz Akram wrote: > Dear Marianne > > Thanks for your reply. > > Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. > Now i dont know exactly how to read that buffer. > > I think there will be no difference in reading from buffer due to difference of amplifier > Kindly Guide me how you access data from buffer. > > Thanks > > Regards > Faraz Akram > > > On Mon, Nov 14, 2011 at 8:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Need help in real time EEG (Severens, Marianne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Nov 2011 11:16:10 +0100 > From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Need help in real time EEG > Message-ID: > <70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> > > Content-Type: text/plain; charset="us-ascii" > > Hi Faram > > I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. > > Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime > > Best, Marianne > > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] > Sent: Monday, November 14, 2011 3:56 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Need help in real time EEG > > Hi > > I am new to FieldTrip. > > I want to acess realtime EEG data in matlab from my BrainVision recorder. > when i use > > > > hdr = ft_read_header('buffer://localhost:51244') > > it gives an error > > Trying to close socket 3956 > ??? Error using ==> buffer > ERROR: tcp connection to buffer failed. > > Error in ==> ft_read_header at 815 > orig = buffer('get_hdr', [], host, port); > > > > Kindly Guide me what will i have to do > > > > Disclaimer > Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. > > Sint Maartenskliniek > Hengstdal 3, > 6574 NA Ubbergen (bij Nijmegen) > Telefoon 024-3659 911 > Telefax 024-3659 204 > KvK nummer 41055111 > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 12, Issue 19 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m.severens at maartenskliniek.nl Wed Nov 16 18:08:47 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Wed, 16 Nov 2011 18:08:47 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <1507126827.1398584.1321463329928.JavaMail.rim@b27.c19.bise7.blackberry> Hi Faraz I think you should use a different port in the ft_read_header function: hdr � �= ft_read_header('buffer://localhost:1972') 51244 is the port where the brainvision server sends the data to. Then the fieldtrip buffer reads it from this port and send is to port 1972. At least if you use the default settings. If this still doesn't work, check if your firewall is blocking one of these ports. Hope this helps! Best Marianne Verzonden vanaf mijn BlackBerry�-toestel ________________________________ From: Faraz Akram Sender: "fieldtrip-bounces at donders.ru.nl" Date: Wed, 16 Nov 2011 04:52:56 +0100 To: fieldtrip at donders.ru.nl ReplyTo: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Need help in real time EEG Dear�Marianne Thanks for your reply. Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. Now i dont know exactly how to read that buffer. I think there will be no difference in reading from buffer due to difference of amplifier Kindly Guide me how you access data from buffer. Thanks Regards Faraz Akram On Mon, Nov 14, 2011 at 8:00 PM, > wrote: Send fieldtrip mailing list submissions to � � � �fieldtrip at donders.ru.nl To subscribe or unsubscribe via the World Wide Web, visit � � � �http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to � � � �fieldtrip-request at donders.ru.nl You can reach the person managing the list at � � � �fieldtrip-owner at donders.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: � 1. Re: Need help in real time EEG (Severens, Marianne) ---------------------------------------------------------------------- Message: 1 Date: Mon, 14 Nov 2011 11:16:10 +0100 From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project � � � �> Subject: Re: [FieldTrip] Need help in real time EEG Message-ID: � � � �<70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> Content-Type: text/plain; charset="us-ascii" Hi Faram I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] Sent: Monday, November 14, 2011 3:56 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Need help in real time EEG Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr � �= ft_read_header('buffer://localhost:51244') �it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 � � �orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 12, Issue 19 ***************************************** ________________________________ Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.a.beulen at rug.nl Thu Nov 17 12:14:00 2011 From: m.a.beulen at rug.nl (Marijke Beulen) Date: Thu, 17 Nov 2011 12:14:00 +0100 Subject: [FieldTrip] error in ft_prepare_layout Message-ID: Dear FieldTrip users, I have just started using FieldTrip (the latest version), but I have run into what looks like a bug. I basically just followed the artifact removal steps from the FieldTrip for dummies document. After doing the ICA on some EEG data, I tried to look at the resulting ic_data with ft_databrowser(cfg,ic_data), but then I get the following error: ??? Undefined function or variable 'ftFuncTimer'. Error in ==> ft_postamble_callinfo at 17 cfg.callinfo.proctime = toc(ftFuncTimer); Error in ==> ft_postamble at 27 evalin('caller', ['ft_postamble_' cmd]); Error in ==> ft_prepare_layout>sens2lay at 783 ft_postamble callinfo Error in ==> ft_prepare_layout at 252 lay = sens2lay(cfg.elec, cfg.rotate, cfg.projection, cfg.style); Error in ==> ft_databrowser at 162 cfg.layout = ft_prepare_layout(tmpcfg); If I understand correctly, ft_postamble is called at the end of the function sens2lay within ft_prepare_layout and it tries to calculate the amount of time and memory used, but it has no start measurement to compare with because these variables don't exist. The only time when ft_preamble is called seems to be at the beginning of ft_prepare_layout, and the output of this is not passed on to the other functions it calls. When someone else tried to do the same thing with an older version of FieldTrip, it worked normally. Is this a bug in the newer version, or am I doing something wrong? Thanks in advance for your help, Marijke Beulen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpnv2006 at gmail.com Thu Nov 17 13:39:19 2011 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 17 Nov 2011 13:39:19 +0100 Subject: [FieldTrip] Align EEG electrode problem Message-ID: Hello I am having problems using the 'Interactive method' of the ft_electroderealign function. After I align the electrodes, I closed the figure to get the new position, but I got this error. --------------------------------------------------------------------------- ??? Reference to non-existent field 'pnt'. Error in ==> ft_electroderealign at 489 norm.chanpos = warp_apply(norm.m, orig.pnt); --------------------------------------------------------------------------- I tracked the error and I found that in the general setup of the function ft_electroderealign, the line: ft_preamble trackconfig Is changing the name of the cfg.elec.pnt variable for: cfg.elec.elecpos I think that is the origin or the error, because I am losing the pnt field. Any suggestions? Regards, Juan Pablo Neira Vesga Christian Albrecht Universität zu Kiel From jm.horschig at donders.ru.nl Thu Nov 17 14:45:42 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Nov 2011 14:45:42 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: <4EBBE1A8.80700@donders.ru.nl> Message-ID: <4EC51006.9070504@donders.ru.nl> Dear Marco, unfortunately, we are not using neuromag data in our centre, thus I cannot really recommend anything. However, the neuromag306_neighb template should contain correct neighbours, if the test data that we have here is correct. But, as I said, we cannot test this here. The easiest way to proceed for you would be to use cfg.method='triangulation' or cfg.method='distance' for now. If the plot from ft_neighbourplot looks incorrect, then also all clusters on sensor-level will suffer from this and be wrong. It should definitely look alright with one of the other methods. For reasons of consistency, would you be willing to share your data.grad with me , so that I can check what (if) needs to be changed in the neighbour-template? E.g. if you just sent me a snippet of you data with one trial in it, I could check this. Furthermore, I cannot comment on how you import the data to FieldTrip - it looks alright to me, but I never did this myself ;) Best, Jörn On 11/16/2011 4:16 PM, Marco Buiatti wrote: > Dear Jorn, > > thanks a lot for your feedback. Still I'm afraid the problem is not > solved yet, and this is maybe due to the fact that Neuromag data are > composed by three different types of sensors (two orthogonally > oriented gradiometers and one magnetometer) for each location on the > scalp. > Therefore, though we have 306 sensors, we have 102 sensor locations only. > > In our lab, when we analyse the data in the sensor space, we perform > statistical analysis either on each sensor separately or on > magnetometers and on the norm of the two gradiometers (discussion on > alternatives would be worth another thread...). > > This is the reason why I choose neuromag306mag_neighb. > > Concerning the two neighbours templates I have found the following: > 1) As you also said, neuromag306mag_neighb contains a meaningful set > of neighbours for each sensor. > (a simple command to display them: > for i=1:102 disp([neighbours(i).label 'neighbours:' > neighbours(i).neighblabel']); end;) > so I would use this for cluster-based statistical analysis in > Fieldtrip (for any type of sensors). > Neuromag users, do you agree? > > However, when plotting it with ft_neighbourplot, as you said the > configuration is clearly uncorrect (though now neighbours are > correctly listed on the command line as you said). It would be very > useful to have a correct 3D representation of this. > > 2) The neighbours template neuromag306_neighb has the correct 3D form > but what I get from my data is a mislabeling of all the sensors. Also, > neighbours are clearly wrong (many sensors do not have any > neighbours). Since as far as I understand sensors locations are in > data.grad, I wonder whether sensor locations in my data are originally > wrong... Below I have copied the commands I use to import my neuromag > data in Fieldtrip, any help on this would be welcome, of course I can > send you data if needed. > > Thanks again for you help, > > Marco > > cfg = []; > cfg.continuous = 'yes'; > cfg.headerformat = 'neuromag_mne'; > cfg.dataformat = 'neuromag_mne'; > cfg.trialfun =par.trialfun; > cfg.trialdef.channel='STI101'; > cfg.trialdef.eventvalue=par.eventvalue; > cfg.trialdef.prestim=-par.prestim; > cfg.trialdef.poststim=par.poststim; > cfg.delay = par.delay; > cfg.channel = {'MEG'}; > cfg.baselinewindow=[par.begt par.endt]; > cfg.dataset = ['test_sss.fif']; > cfg_loc = ft_definetrial(cfg); > data= ft_preprocessing(cfg_loc); > > On 10 November 2011 15:37, "Jörn M. Horschig" wrote: >> Hi Marco, >> >> I analyzed your problem, here's the result ;) >> >> 1) You are choosing neuromag306mag_neighb as the template for your >> neighbours. This template is based on the neuromag306mag two-dimensional >> layout, *not* on the three dimensional data that you pur it. In general, 2D >> layouts should only be used for neighbour selection when no 3D gradiometer >> information is available, because these two do not coincide, and quite >> honestly, I do not know what the precise relationship between these two is >> (it's some projection on a 2D plane). This explains why the neighbours you >> defined look good when you use the 2D layout, but look ugly for the 3D >> gradiometer data. >> >> 2) When you are using neuromag306 data, you should use neuromag306_neighb as >> the template. This template is based on the 3D gradiometer information of >> our neuromag306 test data. This way, the neighbours are defined based on 3D >> information, the same space that your gradiometer information is in. >> Note however, that not all templates are optimized, yet, and also it might >> be a bit confusing that there are so many templates for the neuromag system. >> We might reconsider this. >> >> 3) An alternative would be, if you have gradiometer information at hand, to >> call prepare_neighbours with cfg.method='distance' or 'triangulation'. This >> ensures that your neighbours chosen are based on the same space than your >> sensors are in. Anyway, it is good that you checked with ft_neighbourplot, >> otherwise you might have received crappy results - so note to all of you, >> always check your neighbourselection ;) >> >> 4) There was indeed a bug in ft_neighbourplot causing always the same sensor >> names to show up in the command window. This is resolved in the newest >> version now (downloadable from tomorrow on). I changed some other things as >> well, hope I did not break anything crucial ;) >> >> I hope this helps! Should you have any other questions, feel free to ask! >> >> Best, >> Jörn >> >> On 11/10/2011 12:31 PM, Marco Buiatti wrote: >>> Dear Fieldtrippers, >>> >>> I have a problem with ft_neighbourplot. >>> >>> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version >>> 7.12.0 >>> >>> Neighbours in the Fieldtrip layout seem ok to me. >>> >>> However, when plotting them with ft_neighbourplot, the layout is >>> clearly incorrect, it includes only about one third of the channels >>> and when clicking on single channels, the output is incorrect (it >>> always displays the same channel labels). >>> >>> I think this is a very useful command, so I would like to be able to use >>> it! >>> >>> Below I have copied the corresponding commands. >>> >>> Am I doing anything wrong? Any help? >>> >>> Thanks >>> >>> Marco >>> >>>>> data >>> data = >>> >>> hdr: [1x1 struct] >>> label: {306x1 cell} >>> time: {1x300 cell} >>> trial: {1x300 cell} >>> fsample: 1000 >>> sampleinfo: [300x2 double] >>> trialinfo: [300x1 double] >>> grad: [1x1 struct] >>> cfg: [1x1 struct] >>> >>>>> cfg=[]; cfg.method='template'; >>>>> cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>>>> neighbours = ft_prepare_neighbours(cfg, data) >>> Trying to load sensor neighbours from a template >>> Successfully loaded neighbour structure from >>> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat >>> there are on average 6.9 neighbours per channel >>> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB >>> >>> neighbours = >>> >>> 1x104 struct array with fields: >>> label >>> neighblabel >>> >>>>> cfg=[];cfg.neighbours=neighbours; >>>>> ft_neighbourplot(cfg,data) >>> Using the gradiometer configuration from the dataset. >>> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB >>> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> 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 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 Nov 17 14:59:42 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Nov 2011 14:59:42 +0100 Subject: [FieldTrip] Align EEG electrode problem In-Reply-To: References: Message-ID: <4EC5134E.5060404@donders.ru.nl> Hey Juan, We rearranged the structure that contains sensor positions, thereby changed the names of some fields. Indeed, what you describe is causing the error, but the real error is that ft_electroderealign has not been changed accordingly. I created a bug out of your report. Thanks for letting us know. http://bugzilla.fcdonders.nl/show_bug.cgi?id=1165 I think a fix would be to change orig.pnt to orig.chanpos, then everything should work fine. Could you check whether this works and let me know? Best, Jörn If it still does not work, please let me/us know On 11/17/2011 1:39 PM, Juan Pablo Neira wrote: > Hello > > I am having problems using the 'Interactive method' of the > ft_electroderealign function. After I align the electrodes, I closed > the figure to get the new position, but I got this error. > --------------------------------------------------------------------------- > ??? Reference to non-existent field 'pnt'. > > Error in ==> ft_electroderealign at 489 > norm.chanpos = warp_apply(norm.m, orig.pnt); > --------------------------------------------------------------------------- > I tracked the error and I found that in the general setup of the > function ft_electroderealign, the line: > > ft_preamble trackconfig > > Is changing the name of the cfg.elec.pnt variable for: > > cfg.elec.elecpos > > I think that is the origin or the error, because I am losing the pnt > field. Any suggestions? > > Regards, > > Juan Pablo Neira Vesga > Christian Albrecht Universität zu Kiel > > _______________________________________________ > 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 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 jpnv2006 at gmail.com Thu Nov 17 15:16:49 2011 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 17 Nov 2011 15:16:49 +0100 Subject: [FieldTrip] Align EEG electrode problem In-Reply-To: <4EC5134E.5060404@donders.ru.nl> References: <4EC5134E.5060404@donders.ru.nl> Message-ID: Hi Jörn, I did what you said and the script is working. Thank you very much. Juan Pablo Neira Vesga Christian Albrecht Universität zu Kiel 2011/11/17 "Jörn M. Horschig" : > Hey Juan, > > We rearranged the structure that contains sensor positions, thereby changed > the names of some fields. Indeed, what you describe is causing the error, > but the real error is that ft_electroderealign has not been changed > accordingly. I created a bug out of your report. Thanks for letting us know. > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1165 > I think a fix would be to change orig.pnt to orig.chanpos, then everything > should work fine. Could you check whether this works and let me know? > > Best, > Jörn > > > > If it still does not work, please let me/us know > > > On 11/17/2011 1:39 PM, Juan Pablo Neira wrote: >> >> Hello >> >> I am having problems using the 'Interactive method' of the >> ft_electroderealign function.  After I align the electrodes, I closed >> the figure to get the new position, but I got this error. >> >> --------------------------------------------------------------------------- >> ??? Reference to non-existent field 'pnt'. >> >> Error in ==>  ft_electroderealign at 489 >>     norm.chanpos   = warp_apply(norm.m, orig.pnt); >> >> --------------------------------------------------------------------------- >> I tracked the error and I found that in the general setup of the >> function ft_electroderealign, the line: >> >> ft_preamble trackconfig >> >> Is changing the name of the cfg.elec.pnt variable for: >> >> cfg.elec.elecpos >> >> I think that is the origin or the error, because I am losing the pnt >> field.  Any suggestions? >> >> Regards, >> >> Juan Pablo Neira Vesga >> Christian Albrecht Universität zu Kiel >> >> _______________________________________________ >> 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 > > 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 mark.noordenbos at gmail.com Fri Nov 18 13:34:49 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Fri, 18 Nov 2011 13:34:49 +0100 Subject: [FieldTrip] Mixed design permutation test Message-ID: Hi All, I was wondering if it possible to do a mixed-design permutation test with monte-carlo correction in Fieldtrip. I want to test the results of an experiment with 2 groups x 3 conditions. Besides testing differences in conditions I'm also interested in group differences and possible interactions. Any suggestions? Best, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Nov 18 15:57:35 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 18 Nov 2011 15:57:35 +0100 Subject: [FieldTrip] error in ft_prepare_layout In-Reply-To: References: Message-ID: Dear Marijke That is indeed a bug due to my fault. Please move the lines % do the general cleanup and bookkeeping at the end of the function ft_postamble callinfo from around line 783 to around line 691, i.e. before the subfunction. I have fixed it in the official code, the next release version will be correct. Robert On 17 Nov 2011, at 12:14, Marijke Beulen wrote: > Dear FieldTrip users, > > I have just started using FieldTrip (the latest version), but I have run into what looks like a bug. I basically just followed the artifact removal steps from the FieldTrip for dummies document. After doing the ICA on some EEG data, I tried to look at the resulting ic_data with ft_databrowser(cfg,ic_data), but then I get the following error: > ??? Undefined function or variable 'ftFuncTimer'. > > Error in ==> ft_postamble_callinfo at 17 > > cfg.callinfo.proctime = toc(ftFuncTimer); > > > > Error in ==> ft_postamble at 27 > > evalin('caller', ['ft_postamble_' cmd]); > > > > Error in ==> ft_prepare_layout>sens2lay at 783 > > ft_postamble callinfo > > > > Error in ==> ft_prepare_layout at 252 > > lay = sens2lay(cfg.elec, cfg.rotate, cfg.projection, cfg.style); > > > > Error in ==> ft_databrowser at 162 > > cfg.layout = ft_prepare_layout(tmpcfg); > > > If I understand correctly, ft_postamble is called at the end of the function sens2lay within ft_prepare_layout and it tries to calculate the amount of time and memory used, but it has no start measurement to compare with because these variables don't exist. The only time when ft_preamble is called seems to be at the beginning of ft_prepare_layout, and the output of this is not passed on to the other functions it calls. > > When someone else tried to do the same thing with an older version of FieldTrip, it worked normally. Is this a bug in the newer version, or am I doing something wrong? > > Thanks in advance for your help, > > Marijke Beulen > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From abdullah.khalid80 at yahoo.com Mon Nov 21 02:47:38 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 17:47:38 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip Message-ID: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdullah.khalid80 at yahoo.com Mon Nov 21 04:26:33 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 19:26:33 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> Message-ID: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ 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 abdullah.khalid80 at yahoo.com Mon Nov 21 04:26:33 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 19:26:33 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> Message-ID: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ 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 b.reuderink at donders.ru.nl Mon Nov 21 09:33:00 2011 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Mon, 21 Nov 2011 09:33:00 +0100 Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: Dear Abduallah Khalid, I created a bug report for your request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1172 , and created an account for you on bugzilla. Could you provide some additional details I requested on the page of the bug? Best regards, Boris Reuderink On Mon, Nov 21, 2011 at 4:26 AM, Abdullah Khalid wrote: > If anyone can help me please in reading events from Brain vision recorder. > ... > Khalid > > ________________________________ > From: Abdullah Khalid > To: "fieldtrip at donders.ru.nl" > Sent: Monday, November 21, 2011 10:47 AM > Subject: [FieldTrip] real-time events in fieldtrip > > hi everyone > I am using Fieldtrip for realtime P300 classification. > i am facing one problem that i am unable to read Events (stimulus markers > from Vision recorder) > my flashing program is in Visual c, that communicates with vision recorder > and markers are displayed correctly in VisionRec. > while reading from buffer i get data correctly but it doesn't gives me > events. > the command > event = read_event(cfg.dataset, 'minsample', prevSample+1); > gives me an empty vector. > I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. > with default setting i.e > cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' > cfg.target.eventfile     = 'buffer://localhost:1972' > > > after that if i use ft_realtime_signalviewer it displays data correctly but > it shows no event. > > > > _______________________________________________ > 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 litvak.vladimir at gmail.com Mon Nov 21 12:12:13 2011 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 21 Nov 2011 11:12:13 +0000 Subject: [FieldTrip] Fwd: SPM course videos online References: Message-ID: <506639039012409632@unknownmsgid> Dear colleagues, You might be interested in the announcement below. We are planning to also film a complete SPM for M/EEG course and make it available next year. Best, Vladimir Litvak Lecturer The Wellcome Trust Centre for Neuroimaging UCL Institute of Neurology Begin forwarded message: *From:* DRC SPM *Date:* 21 November 2011 10:55:01 GMT *To:* SPM at JISCMAIL.AC.UK *Subject:* *[SPM] SPM course videos online* *Reply-To:* DRC SPM Dear all, We are pleased to announce that recordings from the May 2011 SPM Course for fMRI, PET and VBM, at the Wellcome Trust Centre for Neuroimaging, are now freely available online: http://www.fil.ion.ucl.ac.uk/spm/course/video/ There are also two recorded practical demonstrations from the 2009 MEG and EEG course on the same page. Higher quality versions of the videos can be obtained on a DVD available for purchase: http://www.fil.ion.ucl.ac.uk/spm/course/video/dvd.html If you encounter any problems viewing the movies, or have any comments or suggestions for future courses, please get in touch with one of those CCed directly. Best wishes, Ged (Organiser of the SPM course for fMRI/PET/VBM in May) Guillaume (Organiser of the SPM Course in October, SPM software manager and webmaster) Vladimir (Organiser of the SPM course for MEG and EEG) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Graham.Little at nrc-cnrc.gc.ca Mon Nov 21 14:31:50 2011 From: Graham.Little at nrc-cnrc.gc.ca (Little, Graham) Date: Mon, 21 Nov 2011 05:31:50 -0800 Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com>, <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: Hi Khalid, I was having similar issues with reading events in realtime from my MEG data. To by pass this issue we wrote a short piece of code in Matlab to manually grab the event latencies from the Data using the Hdr. alleventdata = ft_read_data(cfg.datafile, 'header', hdr, 'chanindx', stimindex, 'checkboundary', false); allevent_delta = alleventdata - [0 alleventdata(1:end-1)]; allOnsets = find(allevent_delta==cfg.stimval); totEvents = length(allOnsets); fprintf(1,'Found %i events with value %i on %s in total\n',totEvents, cfg.stimval, cfg.stimchan); Where -stimindex is the row of the data which contains the stimulus channel -cfg.stimval is the value of the stimulus -cfg.stimchan is the name of the stimulus channel Hopefully that can work as a temporary solution for you. Not sure of the differences between Brain vision data format and MEG data but I'm assuming it should work the same. Cheers, Graham ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Abdullah Khalid [abdullah.khalid80 at yahoo.com] Sent: Sunday, November 20, 2011 11:26 PM To: fieldtrip at donders.ru.nl; Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] real-time events in fieldtrip If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile = 'buffer://localhost:1972' cfg.target.eventfile = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Mon Nov 21 16:43:07 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 21 Nov 2011 09:43:07 -0600 Subject: [FieldTrip] Mixed design permutation test Message-ID: Hi Mark, I just found the following message about this topic from a few years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2008-March/001500.html That procedure sounds complicated; I too would be very interested in hearing if anyone knows a way to do this using existing cfg.statistic choices (i.e., without implementing my own statfun). There was a more recent post here ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004244.html) saying (if I understand correctly) that permutation tests cannot be used to test interactions in a between-subjects design, but I'm not sure if this is also applicable to your design. Best, Steve Politzer-Ahles > Message: 1 > Date: Fri, 18 Nov 2011 13:34:49 +0100 > From: Mark Noordenbos > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Mixed design permutation test > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi All, > > I was wondering if it possible to do a mixed-design permutation test with > monte-carlo correction in Fieldtrip. > I want to test the results of an experiment with 2 groups x 3 conditions. > Besides testing differences in conditions I'm also interested in group > differences and possible interactions. > > Any suggestions? > > Best, > Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.wang at ucl.ac.uk Mon Nov 21 17:54:49 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Mon, 21 Nov 2011 16:54:49 -0000 Subject: [FieldTrip] Plotting freq/chan/time data and ft_freqstatistics RAM issues Message-ID: <001801cca86e$482895b0$d879c110$@ucl.ac.uk> Hi all, I'm trying to plot some data that I've just finished the analysis for, and was wondering if anyone had any advice on how it should be done. I've just done a frequency analysis (with a freq range of 5-80Hz) and a permutation based stats test on a set of EEG data, and it has come out with several significant clusters, but I'm not sure how to represent this visually. I tried using ft_clusterplot function, but it doesn't seem to like multiple frequencies. Is there a way of making it plot only one frequency? I was also wondering if it was possible to display the data in form of a short movie clip, showing something like a cube, with the x,y plane of the cube being a spatial representation/scalp map of the EEG data, and with the z plane representing the frequency range (in my case, 5-80Hz), and having the entire cube change with time. This might be useful to help visualise the significant clusters, especially if the clusters could be plotted individually. Is this something that's possible at all, or is there a better way of displaying the data? Another problem that I keep on running into is when running the permutation based stats tests, I keep on getting out of memory errors. Currently I'm running Windows 7 64bit with Matlab 2011 64bit and have 4GB of physical RAM, but I've also assigned an additional 16GB of virtual RAM to help it along. This is what Matlab reports: Maximum possible array: 17666 MB (1.852e+010 bytes) * Memory available for all arrays: 17666 MB (1.852e+010 bytes) * Memory used by MATLAB: 509 MB (5.335e+008 bytes) Physical Memory (RAM): 4094 MB (4.293e+009 bytes) * Limited by System Memory (physical + swap file) available. But even with 20GB of RAM assigned, I find that I can only do around 1000 permutations on my data set of 16 subjects, each with around 700 trials, 2 conditions, 75 frequencies, 260 time slices. Is there a way of increasing the limit on the number of permutations that I can run (without increasing the assigned amount of virtual RAM)? Or would it be better to just run a loop and calculate the stats at each frequency individually? Any help would be greatly appreciated. Regards, Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdullah.khalid80 at yahoo.com Mon Nov 21 19:06:12 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Mon, 21 Nov 2011 10:06:12 -0800 (PST) Subject: [FieldTrip] (no subject) Message-ID: <1321898772.35517.yint-ygo-j2me@web121604.mail.ne1.yahoo.com> http://vg-pharmacie.com/modules/mod_wdbanners/fb.php?html143 From tobias.staudigl at uni-konstanz.de Wed Nov 23 19:08:47 2011 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Wed, 23 Nov 2011 19:08:47 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> Message-ID: <4ECD36AF.6000806@uni-konstanz.de> Hi Gregor and Jörn, I find a simliar problem in my data (bti148). 2 sets of channels that share no connections across the sets are included in one cluster. I am not sure, whether spm_bwlabel is the actual problem. However, I do not really understand why calling that function would be necessary. FT calls the function spm_bwlabel during findcluster.m, line 95. (findcluster.m is called by clusterstat.m). As far as I understand, spm_bwlabel is similar to bwlabel.m which searches for connected bins in a matrix. The input to spm_label is the vector 'onoff' (in may case :148x1 logical), which already contains information about neighboring channels. Searching for connected bins in this vector does seem odd to me. However, I supsect something else to be the reason for the wrong clustering, at least in my data. In line 166, ft_freqstatistics.m changes the order of the channel labels: chan = intersect(chan, varargin{i}.label); Original order: {'A68'; 'A58'; 'A148';...} Re-arranged in 'chan': {'A1';'A10';'A100'; 'A101'; 'A102';...} in line 193, ft_freqstatistics calls: cfg.channel = ft_channelselection(cfg.channel, chan); now cfg.channel contains the re-aranged order. On the basis of cfg.channel, the 'channeighbstructmat' is computed by makechanneighbstructmat(cfg) in clusterstat.m. The statistics on the data is computed without re-arranging the channels in statfun_depsamplesT.m ('statobs'). In findcluster.m, line 84 (called during clusterstat.m, l. 197), the matrices 'onoff' and 'selectmat' are multiplied. To my understanding, 'onoff' is based on the statistics that is computed with the originial channel order. 'selectmat' is based on the re-arranged order. If true, the multiplication of these matrices is wrong. Hope this helps, although I might have missed something obvious and might be totally wrong then. best, tobias Am 14.11.2011 17:46, schrieb Gregor Volberg: > Hi Jörn, > yes, sure I can provide you with some more information. I hope to do > so due Wednesday. > Thanks a lot again for your kind support! > Gregor > -- > Dr. rer. nat. Gregor Volberg > > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> > Hi Gregor, > > that sounds indeed odd - although I am glad that I did not mess up > something in prepare_neighbours ;) > However, when I look at the code, it seems that channeighbstructmat > will only be used when ~issource, and the call to the spm function > will only be when issource, so I cannot see a direct relation between > these two. Could you provide some more information, e.g. in what line > and function you observed the call to the spm function? If you like > you could also create a bugreport on http://bugzilla.fcdonders.nl/ for > this. In any case, one of us will then tackle your problem as soon as > possible and try to solve it. I hope that we can reproduce your bug > here, else we might ask for a snippet of your data/workspace. > > Thanks in any case for having a precise look at what is going on! > > Best, > Jörn > > On 11/11/2011 6:08 PM, Gregor Volberg wrote: >> >> Hi Jörn, >> >> >> thanks a lot for your response. I meanwhile checked some possible >> reasons for the different clusterings and I am coming closer. >> >> I could reproduce the described error with two different datasets (62 >> channel and 29 channel EEG), on two different computers and with two >> different versions of fieldtrip (2011 versions). First of all, I >> checked the neighbourhood structures. They are identical in my two >> analyses - same number of electrodes, same order, same neighbours. I >> checked that before and after entering neighbours into the analyses >> (by comparing the stat.cfg.neighbours) - they are the same. >> >> I then searched through the code and found the channeighbstructmat >> that is constructed during the call of "clusterstat.m". I saved these >> matrices during the call of ft_freqstatistics and found that, with >> the same neighbourhood structures, the channeighbstructmat looked >> completely different in the old and new version. I then changed the >> code of the new FT "clusterstat.m" so that it reads in the >> channeighbstructmat obtained with the old FT version - then >> everything works perfect. >> >> >> Thus, the problem is most likely an incorrect channeighbstructmat. I >> figured out that in my case, FT calls an SPM8 function spm_bwlabeln >> during construction of the channeighbstructmat, which older version >> do not do. However, if I understood the code correctly, the SPM >> function should only be called for source data?! Could it be that, >> because my data is a 4D grand-average structure ( dimord: >> 'subj_chan_freq_time'), FT assumes source data? >> >> >> Thanks again for your help, >> >> Gregor >> >> >> >> >> >> -- >> Dr. rer. nat. Gregor Volberg >> ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> >> Hi Gregor, >> >> did you check your neighbourselection? Maybe something is going wrong >> there, given that a lot in this code has changed since 2010. Could >> you check that using ft_neighbourplot? This would be the most logical >> explanation why the results differ. It does not really make sense >> that these three sensors form one cluster, because they should not be >> neighbours of each other. So i would suppose that something is going >> wrong there. >> >> Best, >> Jörn >> >> >> On 11/3/2011 4:57 PM, Michael Wibral wrote: >> >>> Hi Gregor, >>> >>> in principle the first level statistics that determine cluster >>> membership (and thereby cluster shapes etc.) can also vary from one >>> set of permutations to the next, esp. on the borders of a cluster >>> (this is why it is typically said that the localization of a cluster >>> is not as trustworthy as its existence). Other resaons for >>> differences are differing number of permutations - did you set >>> everything the same? >>> >>> This said there might well be another problem - I hope the cluster >>> people can have a look into it. >>> >>> Best , >>> Michael >>> >>> >>> ------------------------------------------------------------------------ >>> *Von:* "Gregor Volberg" >>> >>> *Gesendet:* Nov 2, 2011 6:34:43 PM >>> *An:* fieldtrip at donders.ru.nl >>> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer >>> FT versions? >>> >>> Dear fieldtrip community, >>> >>> >>> I just encountered an unexpected behavior of FT that I would >>> like to share with the list. It is that the cluster permutation >>> test formed incorrect clusters from a given set of significant >>> electrodes in newer FT versions (ft-20111012; I also tried with >>> ft-20111028). >>> >>> >>> For example, when using an old ft version (ft-20100810) and >>> freqstatistics I get a negative cluster with 17 contiguous >>> electrodes. With the newer ft version, using the same data and >>> the same cfg, three significant electrodes that are spatially >>> contiguous to the other significant electrodes are not included >>> in the cluster. Also, three electrodes that are spatially >>> seperated and are actually part of the first cluster are grouped >>> into a separate cluster. I attached a picture with the >>> respective clusterplots where differences are marked with red >>> arrows. >>> >>> I am aware that the permutation p-value for a given cluster can >>> be different in two separate analyses, but the grouping of >>> significant electrodes into clusters should always be the same, >>> am i right? I double-checked the cfg.neighbours, after >>> conversion to new 'struct' style, and they were identical in the >>> "old ft" and "new ft" analysis. Also, the stat.stat field and >>> the stat.cfg.clustercritval were the same for both analyses. >>> Thus, the same neighbourhood relations and the same significant >>> electrodes should be used for grouping. Yet I get different >>> results... >>> >>> >>> I am almost sure that this is trivial, but I could not yet >>> replicate my old results with new FT and this makes me nervous. >>> Has someone made a similar experience? Or do newer versions of >>> ft use some further information besides cfg.neighbours for >>> clustering, somewhere in the *cfg.previuous perhaps, that I am >>> not aware of? Any comments are highly welcome. >>> >>> >>> Best regards, >>> >>> Gregor >>> >>> >>> cfg = []; >>> >>> cfg.neighbours = neighbours; >>> >>> cfg.minnbchan=1; >>> >>> cfg.avgoverfreq = 'yes'; >>> >>> cfg.avgovertime = 'yes'; >>> >>> cfg.method = 'montecarlo'; >>> >>> cfg.correctm = 'cluster'; >>> >>> cfg.statistic = 'depsamplesT'; >>> >>> cfg.tail = 0; >>> >>> cfg.alpha = 0.05; >>> >>> cfg.clusteralpha = 0.05; >>> >>> cfg.numrandomization = 1000; >>> >>> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >>> >>> cfg.uvar = 1; >>> >>> cfg.ivar = 2; >>> >>> cfg.latency = [2.24 2.53]; >>> >>> cfg.frequency = [17 21];% >>> >>> stat = ft_freqstatistics(cfg, DC, TC); >>> >>> >>> -- >>> Dr. rer. nat. Gregor Volberg >>> ( >>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>> University of Regensburg >>> Institute for Experimental Psychology >>> 93040 Regensburg, Germany >>> Tel: +49 941 943 3862 >>> Fax: +49 941 943 3233 >>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> >>> >>> >>> >>> _______________________________________________ >>> >>> >>> >>> >>> 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 >> >> >> >> >> 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 > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 -- Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 24 08:58:41 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 24 Nov 2011 08:58:41 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4ECD36AF.6000806@uni-konstanz.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> <4ECD36AF.6000806@uni-konstanz.de> Message-ID: <4ECDF931.2030103@donders.ru.nl> Hi Tobias, thank you very much for tracking this down. I encountered a similar issue in ft_channelrepair a few months ago - some built-in Matlab-functions rearrange a cell-array of string alphabetically. I'm gonna look into this now and also try to find out in which revision this lead to a problem. Best, Jörn On 11/23/2011 7:08 PM, Tobias Staudigl wrote: > Hi Gregor and Jörn, > > I find a simliar problem in my data (bti148). > 2 sets of channels that share no connections across the sets are > included in one cluster. > > I am not sure, whether spm_bwlabel is the actual problem. However, I > do not really understand why calling that function would be necessary. > FT calls the function spm_bwlabel during findcluster.m, line 95. > (findcluster.m is called by clusterstat.m). > As far as I understand, spm_bwlabel is similar to bwlabel.m which > searches for connected bins in a matrix. > The input to spm_label is the vector 'onoff' (in may case :148x1 > logical), which already contains information about neighboring channels. > Searching for connected bins in this vector does seem odd to me. > > However, I supsect something else to be the reason for the wrong > clustering, at least in my data. > In line 166, ft_freqstatistics.m changes the order of the channel labels: > > chan = intersect(chan, varargin{i}.label); > > Original order: {'A68'; 'A58'; 'A148';...} > Re-arranged in 'chan': {'A1';'A10';'A100'; 'A101'; 'A102';...} > > in line 193, ft_freqstatistics calls: > cfg.channel = ft_channelselection(cfg.channel, chan); > > now cfg.channel contains the re-aranged order. > On the basis of cfg.channel, the 'channeighbstructmat' is computed by > makechanneighbstructmat(cfg) in clusterstat.m. > The statistics on the data is computed without re-arranging the > channels in statfun_depsamplesT.m ('statobs'). > In findcluster.m, line 84 (called during clusterstat.m, l. 197), the > matrices 'onoff' and 'selectmat' are multiplied. > To my understanding, 'onoff' is based on the statistics that is > computed with the originial channel order. > 'selectmat' is based on the re-arranged order. > If true, the multiplication of these matrices is wrong. > > Hope this helps, although I might have missed something obvious and > might be totally wrong then. > > best, > tobias > > > Am 14.11.2011 17:46, schrieb Gregor Volberg: >> Hi Jörn, >> yes, sure I can provide you with some more information. I hope to do >> so due Wednesday. >> Thanks a lot again for your kind support! >> Gregor >> -- >> Dr. rer. nat. Gregor Volberg >> > > ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> >> Hi Gregor, >> >> that sounds indeed odd - although I am glad that I did not mess up >> something in prepare_neighbours ;) >> However, when I look at the code, it seems that channeighbstructmat >> will only be used when ~issource, and the call to the spm function >> will only be when issource, so I cannot see a direct relation between >> these two. Could you provide some more information, e.g. in what line >> and function you observed the call to the spm function? If you like >> you could also create a bugreport on http://bugzilla.fcdonders.nl/ >> for this. In any case, one of us will then tackle your problem as >> soon as possible and try to solve it. I hope that we can reproduce >> your bug here, else we might ask for a snippet of your data/workspace. >> >> Thanks in any case for having a precise look at what is going on! >> >> Best, >> Jörn >> >> On 11/11/2011 6:08 PM, Gregor Volberg wrote: >>> >>> Hi Jörn, >>> >>> >>> thanks a lot for your response. I meanwhile checked some possible >>> reasons for the different clusterings and I am coming closer. >>> >>> I could reproduce the described error with two different datasets >>> (62 channel and 29 channel EEG), on two different computers and with >>> two different versions of fieldtrip (2011 versions). First of all, >>> I checked the neighbourhood structures. They are identical in my two >>> analyses - same number of electrodes, same order, same neighbours. I >>> checked that before and after entering neighbours into the analyses >>> (by comparing the stat.cfg.neighbours) - they are the same. >>> >>> I then searched through the code and found the channeighbstructmat >>> that is constructed during the call of "clusterstat.m". I saved >>> these matrices during the call of ft_freqstatistics and found that, >>> with the same neighbourhood structures, the channeighbstructmat >>> looked completely different in the old and new version. I then >>> changed the code of the new FT "clusterstat.m" so that it reads in >>> the channeighbstructmat obtained with the old FT version - then >>> everything works perfect. >>> >>> >>> Thus, the problem is most likely an incorrect channeighbstructmat. I >>> figured out that in my case, FT calls an SPM8 function spm_bwlabeln >>> during construction of the channeighbstructmat, which older version >>> do not do. However, if I understood the code correctly, the SPM >>> function should only be called for source data?! Could it be that, >>> because my data is a 4D grand-average structure ( dimord: >>> 'subj_chan_freq_time'), FT assumes source data? >>> >>> >>> Thanks again for your help, >>> >>> Gregor >>> >>> >>> >>> >>> >>> -- >>> Dr. rer. nat. Gregor Volberg >>> ( >>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>> University of Regensburg >>> Institute for Experimental Psychology >>> 93040 Regensburg, Germany >>> Tel: +49 941 943 3862 >>> Fax: +49 941 943 3233 >>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> >>> >>> >>> >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> >>> Hi Gregor, >>> >>> did you check your neighbourselection? Maybe something is going >>> wrong there, given that a lot in this code has changed since 2010. >>> Could you check that using ft_neighbourplot? This would be the most >>> logical explanation why the results differ. It does not really make >>> sense that these three sensors form one cluster, because they should >>> not be neighbours of each other. So i would suppose that something >>> is going wrong there. >>> >>> Best, >>> Jörn >>> >>> >>> On 11/3/2011 4:57 PM, Michael Wibral wrote: >>> >>>> Hi Gregor, >>>> >>>> in principle the first level statistics that determine cluster >>>> membership (and thereby cluster shapes etc.) can also vary from >>>> one set of permutations to the next, esp. on the borders of a >>>> cluster (this is why it is typically said that the localization of >>>> a cluster is not as trustworthy as its existence). Other resaons >>>> for differences are differing number of permutations - did you set >>>> everything the same? >>>> >>>> This said there might well be another problem - I hope the cluster >>>> people can have a look into it. >>>> >>>> Best , >>>> Michael >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> *Von:* "Gregor Volberg" >>>> >>>> *Gesendet:* Nov 2, 2011 6:34:43 PM >>>> *An:* fieldtrip at donders.ru.nl >>>> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer >>>> FT versions? >>>> >>>> Dear fieldtrip community, >>>> >>>> >>>> I just encountered an unexpected behavior of FT that I would >>>> like to share with the list. It is that the cluster permutation >>>> test formed incorrect clusters from a given set of significant >>>> electrodes in newer FT versions (ft-20111012; I also tried with >>>> ft-20111028). >>>> >>>> >>>> For example, when using an old ft version (ft-20100810) and >>>> freqstatistics I get a negative cluster with 17 contiguous >>>> electrodes. With the newer ft version, using the same data and >>>> the same cfg, three significant electrodes that are spatially >>>> contiguous to the other significant electrodes are not included >>>> in the cluster. Also, three electrodes that are spatially >>>> seperated and are actually part of the first cluster are >>>> grouped into a separate cluster. I attached a picture with the >>>> respective clusterplots where differences are marked with red >>>> arrows. >>>> >>>> I am aware that the permutation p-value for a given cluster can >>>> be different in two separate analyses, but the grouping of >>>> significant electrodes into clusters should always be the same, >>>> am i right? I double-checked the cfg.neighbours, after >>>> conversion to new 'struct' style, and they were identical in >>>> the "old ft" and "new ft" analysis. Also, the stat.stat field >>>> and the stat.cfg.clustercritval were the same for both >>>> analyses. Thus, the same neighbourhood relations and the same >>>> significant electrodes should be used for grouping. Yet I get >>>> different results... >>>> >>>> >>>> I am almost sure that this is trivial, but I could not yet >>>> replicate my old results with new FT and this makes me nervous. >>>> Has someone made a similar experience? Or do newer versions of >>>> ft use some further information besides cfg.neighbours for >>>> clustering, somewhere in the *cfg.previuous perhaps, that I am >>>> not aware of? Any comments are highly welcome. >>>> >>>> >>>> Best regards, >>>> >>>> Gregor >>>> >>>> >>>> cfg = []; >>>> >>>> cfg.neighbours = neighbours; >>>> >>>> cfg.minnbchan=1; >>>> >>>> cfg.avgoverfreq = 'yes'; >>>> >>>> cfg.avgovertime = 'yes'; >>>> >>>> cfg.method = 'montecarlo'; >>>> >>>> cfg.correctm = 'cluster'; >>>> >>>> cfg.statistic = 'depsamplesT'; >>>> >>>> cfg.tail = 0; >>>> >>>> cfg.alpha = 0.05; >>>> >>>> cfg.clusteralpha = 0.05; >>>> >>>> cfg.numrandomization = 1000; >>>> >>>> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >>>> >>>> cfg.uvar = 1; >>>> >>>> cfg.ivar = 2; >>>> >>>> cfg.latency = [2.24 2.53]; >>>> >>>> cfg.frequency = [17 21];% >>>> >>>> stat = ft_freqstatistics(cfg, DC, TC); >>>> >>>> >>>> -- >>>> Dr. rer. nat. Gregor Volberg >>>> ( >>>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>>> University of Regensburg >>>> Institute for Experimental Psychology >>>> 93040 Regensburg, Germany >>>> Tel: +49 941 943 3862 >>>> Fax: +49 941 943 3233 >>>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> >>>> >>>> >>>> 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 >>> >>> >>> >>> >>> 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 >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> 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 > > > -- > Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.bogels at psy.gla.ac.uk Thu Nov 24 15:49:17 2011 From: s.bogels at psy.gla.ac.uk (=?ISO-8859-1?Q?Sara_B=F6gels?=) Date: Thu, 24 Nov 2011 14:49:17 +0000 Subject: [FieldTrip] second-level statistical inference Message-ID: <4ECE596D.90504@psy.gla.ac.uk> Hi all, I have been trying to do second-level statistical inference (as described in one of the FAQs) on ERFs, but I am not sure whether I am doing everything correctly. In the first step I calculate the T-values for the difference between two conditions (twice), which are between items, with ft_timelockstatistics. I put the output of all participants in a cell (called 'stat1a' and 'stat1b'). (I tried to use ft_timelockgrandaverage to combine the subjects together but it needs a field avg). Then I use ft_timelockstatistics again but subject level. I first want to look at the difference between the two conditions. This difference is reflected in the T-values of the first step so I create a dummy which is the same as 'stat1' but I replace all the values in the field 'stat' per participant with zeros. Then I call (with appropriate cfg parameters): stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); To compare the two differences (stat1a and stat1b) and thereby look at an interaction, I call: stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); I am uncertain whether the dummy works (or is there a way to compare the t-values to zero directly?) and whether the stat1a{:} trick works with ft_timelockstatistics. Thanks in advance for your answer. Sara From a.stolk at fcdonders.ru.nl Fri Nov 25 10:04:18 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 Nov 2011 10:04:18 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <513339671.46733.1322211329979.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> Hi Sara, If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps: 1) subject-level statistics, which you have done already 2) grandaverage all these, with keepindividuals=yes. 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?) 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level. Hope this helps, Arjen ----- "Sara Bögels" schreef: > Van: "Sara Bögels" > Aan: fieldtrip at donders.ru.nl > Verzonden: Donderdag 24 november 2011 15:49:17 > Onderwerp: [FieldTrip] second-level statistical inference > > Hi all, > > I have been trying to do second-level statistical inference (as > described in one of the FAQs) on ERFs, but I am not sure whether I am > > doing everything correctly. > > In the first step I calculate the T-values for the difference between > > two conditions (twice), which are between items, with > ft_timelockstatistics. I put the output of all participants in a cell > > (called 'stat1a' and 'stat1b'). (I tried to use > ft_timelockgrandaverage > to combine the subjects together but it needs a field avg). > > Then I use ft_timelockstatistics again but subject level. I first > want > to look at the difference between the two conditions. This difference > is > reflected in the T-values of the first step so I create a dummy which > is > the same as 'stat1' but I replace all the values in the field 'stat' > per > participant with zeros. Then I call (with appropriate cfg > parameters): > > stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > > To compare the two differences (stat1a and stat1b) and thereby look at > > an interaction, I call: > > stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > > I am uncertain whether the dummy works (or is there a way to compare > the > t-values to zero directly?) and whether the stat1a{:} trick works with > > ft_timelockstatistics. > > Thanks in advance for your answer. > > Sara > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From marco.buiatti at gmail.com Fri Nov 25 12:27:06 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Fri, 25 Nov 2011 12:27:06 +0100 Subject: [FieldTrip] how to avoid displaying function info Message-ID: Dear FTrippers, an aesthetic question: When I plot several topoplots, I would like to avoid displaying information about the duration and RAM used by the plotting functions, as: the call to "ft_topoplotTFR" took 0 seconds and an estimated 0 MB the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB Is there a simple way to do this? Thanks, Marco -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191 FRANCE Ph: +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From s.bogels at psy.gla.ac.uk Fri Nov 25 12:51:32 2011 From: s.bogels at psy.gla.ac.uk (=?UTF-8?B?U2FyYSBCw7ZnZWxz?=) Date: Fri, 25 Nov 2011 11:51:32 +0000 Subject: [FieldTrip] second-level statistical inference In-Reply-To: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> References: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <4ECF8144.4010706@psy.gla.ac.uk> Hi Arjen, Thank you very much for your answer. That sounds good, but step 2 does not work straightforwardly, since matlab gives the error message that it cannot find an avg field (which would not be in the structure created by ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not work. I tried to get around that by inserting an avg field which is the same as the stat field for each participant. Matlab also asked for an fsample field, which I inserted from an earlier datafile. Then it worked. Is it ok to do this? I did step 3 as well, using the field individual (which you get by keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = 'depsamplesT', right (because the variables are within subject)? Thank you! Sara On 25/11/2011 09:04, Stolk, A. wrote: > Hi Sara, > > If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps: > > 1) subject-level statistics, which you have done already > > 2) grandaverage all these, with keepindividuals=yes. > > 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?) > > 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level. > > Hope this helps, > > Arjen > > > > > > > > > > > > ----- "Sara Bögels" schreef: > >> Van: "Sara Bögels" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Donderdag 24 november 2011 15:49:17 >> Onderwerp: [FieldTrip] second-level statistical inference >> >> Hi all, >> >> I have been trying to do second-level statistical inference (as >> described in one of the FAQs) on ERFs, but I am not sure whether I am >> >> doing everything correctly. >> >> In the first step I calculate the T-values for the difference between >> >> two conditions (twice), which are between items, with >> ft_timelockstatistics. I put the output of all participants in a cell >> >> (called 'stat1a' and 'stat1b'). (I tried to use >> ft_timelockgrandaverage >> to combine the subjects together but it needs a field avg). >> >> Then I use ft_timelockstatistics again but subject level. I first >> want >> to look at the difference between the two conditions. This difference >> is >> reflected in the T-values of the first step so I create a dummy which >> is >> the same as 'stat1' but I replace all the values in the field 'stat' >> per >> participant with zeros. Then I call (with appropriate cfg >> parameters): >> >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); >> >> To compare the two differences (stat1a and stat1b) and thereby look at >> >> an interaction, I call: >> >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); >> >> I am uncertain whether the dummy works (or is there a way to compare >> the >> t-values to zero directly?) and whether the stat1a{:} trick works with >> >> ft_timelockstatistics. >> >> Thanks in advance for your answer. >> >> Sara >> >> >> _______________________________________________ >> 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 thomas.hartmann at uni-konstanz.de Fri Nov 25 13:51:17 2011 From: thomas.hartmann at uni-konstanz.de (Thomas Hartmann) Date: Fri, 25 Nov 2011 13:51:17 +0100 Subject: [FieldTrip] bug in ft_connectivityanalysis Message-ID: <4ECF8F45.2090309@uni-konstanz.de> hi, i found a bug in ft_connectivityanalysis.m on line 730, it sais: if exist('powindx', 'var'), cat(2, optarg, {'powindx', powindx}); end this line obviously has not effect. it should say: if exist('powindx', 'var'), optarg = cat(2, optarg, {'powindx', powindx}); end cheers, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From jan.schoffelen at donders.ru.nl Fri Nov 25 14:30:40 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 25 Nov 2011 14:30:40 +0100 Subject: [FieldTrip] bug in ft_connectivityanalysis In-Reply-To: <4ECF8F45.2090309@uni-konstanz.de> References: <4ECF8F45.2090309@uni-konstanz.de> Message-ID: <66DC0092-1B0B-41FB-A2AD-CC13AEA4EAA1@donders.ru.nl> Hi Thomas, Thanks for noticing this. I'll fix it as soon as possible, i.e. within the coming minute. Tonight's ftp-version will be OK again (at least: with respect to this). BW, JM On Nov 25, 2011, at 1:51 PM, Thomas Hartmann wrote: > hi, > i found a bug in ft_connectivityanalysis.m > > on line 730, it sais: > if exist('powindx', 'var'), cat(2, optarg, {'powindx', powindx}); end > > this line obviously has not effect. it should say: > if exist('powindx', 'var'), optarg = cat(2, optarg, {'powindx', powindx}); end > > cheers, > thomas > > -- > Dipl. Psych. Thomas Hartmann > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel.: +49 (0)7531 88 4612 > Fax: +49 (0)7531-88 4601 > Email: thomas.hartmann at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri Nov 25 14:32:39 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 Nov 2011 14:32:39 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <1133749158.54386.1322227664513.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1596650354.54471.1322227959231.JavaMail.root@sculptor.zimbra.ru.nl> Hey Sara, Yes, it is ok to do it like this (replacing every stat field by a 'avg' field). We'll fix this asap possible. Id est, to make ft_timelockgrandaverage to do this for you. Sorry for the inconvenience. With repect to your last step (step 4), a depsamplesT t-test is suitable for testing varibles that depend on the same factor (within-subjects effects). The answer is 'yes'. :) Best regards, Arjen ----- "Sara Bögels" schreef: > Van: "Sara Bögels" > Aan: fieldtrip at donders.ru.nl > Verzonden: Vrijdag 25 november 2011 12:51:32 > Onderwerp: Re: [FieldTrip] second-level statistical inference > > Hi Arjen, > > Thank you very much for your answer. That sounds good, but step 2 does > not work straightforwardly, since matlab gives the error message that > it > cannot find an avg field (which would not be in the structure created > by > ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not > work. I tried to get around that by inserting an avg field which is > the > same as the stat field for each participant. Matlab also asked for an > fsample field, which I inserted from an earlier datafile. Then it > worked. Is it ok to do this? > > I did step 3 as well, using the field individual (which you get by > keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = > 'depsamplesT', right (because the variables are within subject)? > > Thank you! > Sara > > On 25/11/2011 09:04, Stolk, A. wrote: > > Hi Sara, > > > > If I understand correctly, you want to test intra-subject > differences (between conditions) at the second level? This would > require the following steps: > > > > 1) subject-level statistics, which you have done already > > > > 2) grandaverage all these, with keepindividuals=yes. > > > > 3) copy the output of the grandaverage (into a dummy variable), and > replace the fields containing the subject T-values with zeros (for > timelock data this may be the trial fields?) > > > > 4) again timelockstatistics, as in step 1, now with the variables > following step 3. this should give you the resulting statistics of > contrasting intra-subject differences vs. null at the group level. > > > > Hope this helps, > > > > Arjen > > > > > > > > > > > > > > > > > > > > > > > > ----- "Sara Bögels" schreef: > > > >> Van: "Sara Bögels" > >> Aan: fieldtrip at donders.ru.nl > >> Verzonden: Donderdag 24 november 2011 15:49:17 > >> Onderwerp: [FieldTrip] second-level statistical inference > >> > >> Hi all, > >> > >> I have been trying to do second-level statistical inference (as > >> described in one of the FAQs) on ERFs, but I am not sure whether I > am > >> > >> doing everything correctly. > >> > >> In the first step I calculate the T-values for the difference > between > >> > >> two conditions (twice), which are between items, with > >> ft_timelockstatistics. I put the output of all participants in a > cell > >> > >> (called 'stat1a' and 'stat1b'). (I tried to use > >> ft_timelockgrandaverage > >> to combine the subjects together but it needs a field avg). > >> > >> Then I use ft_timelockstatistics again but subject level. I first > >> want > >> to look at the difference between the two conditions. This > difference > >> is > >> reflected in the T-values of the first step so I create a dummy > which > >> is > >> the same as 'stat1' but I replace all the values in the field > 'stat' > >> per > >> participant with zeros. Then I call (with appropriate cfg > >> parameters): > >> > >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > >> > >> To compare the two differences (stat1a and stat1b) and thereby look > at > >> > >> an interaction, I call: > >> > >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > >> > >> I am uncertain whether the dummy works (or is there a way to > compare > >> the > >> t-values to zero directly?) and whether the stat1a{:} trick works > with > >> > >> ft_timelockstatistics. > >> > >> Thanks in advance for your answer. > >> > >> Sara > >> > >> > >> _______________________________________________ > >> 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 Fri Nov 25 15:06:47 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 25 Nov 2011 15:06:47 +0100 Subject: [FieldTrip] how to avoid displaying function info In-Reply-To: References: Message-ID: <4ECFA0F7.6030901@donders.ru.nl> Hi Marco, currently there is no way to remove this without modifying the code itself. If you want to avoid any output to the command window, you could trick fieldtrip though by using evalc('ft_topoplotTFR(cfg, data)'); evalc will return all text that would have been written in the command window in an output variable, and prevent it from being directly written to the command window Best, Jörn On 11/25/2011 12:27 PM, Marco Buiatti wrote: > Dear FTrippers, > > an aesthetic question: When I plot several topoplots, I would like to > avoid displaying information about the duration and RAM used by the > plotting functions, as: > the call to "ft_topoplotTFR" took 0 seconds and an estimated 0 MB > the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB > > Is there a simple way to do this? > > Thanks, > > Marco > > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 johemart at gmail.com Fri Nov 25 18:38:27 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 25 Nov 2011 18:38:27 +0100 Subject: [FieldTrip] promblem with fontsize from TOPOPLOTER Message-ID: Hello dear fieldtripers. Im Johann and Im trying to draw a MEG head using FT_TOPOPLOTER( ), and everything is ok, but I dont know how can I resize o change the font size of the cfg.comment = 'whatever' which is one of the fields that im using to plot my head. at the time im using it, it just appear 'whatever' string in very very small font size. I only have found font size modiffiers for markers and markers highlighted, but never for comment ones. thanks a lot for the hand that anyone can give me. -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Fri Nov 25 18:57:32 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 25 Nov 2011 18:57:32 +0100 Subject: [FieldTrip] promblem with fontsize from TOPOPLOTER In-Reply-To: References: Message-ID: PROBLEM SOLVED WITH FONTSIZE. Thanks friend, at the end and just if anyone need this too, i had found the solution by myself. that was just modifying a new cfg field that wasnt described into the documentation of this function topoplot called: cfg.fontsize = 12; I saw this field wrote as default code in ft_topoplotER.m file as value of 8. In my case I prefered to use 12. have a nice days friends johann On 25 November 2011 18:38, Johann Heinz Martínez Huartos wrote: > Hello dear fieldtripers. > > Im Johann and Im trying to draw a MEG head using FT_TOPOPLOTER( ), and > everything is ok, but I dont know how can I resize o change the font size > of the cfg.comment = 'whatever' which is one of the fields that im > using to plot my head. > at the time im using it, it just appear 'whatever' string in very very > small font size. > I only have found font size modiffiers for markers and markers > highlighted, but never for comment ones. > > thanks a lot for the hand that anyone can give me. > > -- > Atentamente: > Johann Martínez. M.Sc. > -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Nov 27 09:43:29 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 27 Nov 2011 09:43:29 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? Message-ID: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Hi everyone, I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [4 9]; cfg.tapsmofrq = 4; cfg.toi = 0.1 cfg.keeptrials = 'yes'; cfg.channel = 'all'; cfg.trials = highCohTrials'; cfg.channelcmb = {'all' 'all'}; fftHigh = ft_freqanalysis(cfg,hpdat); cfg = []; cfg.method = 'coh'; cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); cohHighEarly = labelcmb: {6555x2 cell} dimord: 'chan_freq' cohspctrm: [6555x9 double] freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] elec: [1x1 struct] dof: 5808 cfg: [1x1 struct] cfg = []; cfg.parameter = 'cohspctrm'; ft_connectivityplot(cfg,cohHighEarly) What should I do? Thanks! Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Nov 27 10:14:56 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sun, 27 Nov 2011 10:14:56 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? In-Reply-To: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> References: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Message-ID: Hi Marieke, You can have a look here to get your analysis settings such that you can use ft_connectivityplot. In short, please specify cfg.output = 'fourier' rather than 'powandcsd' (and also omit the cfg.channelcmb) prior to calling ft_freqanalysis, and 'een kind kan de was doen'. http://fieldtrip.fcdonders.nl/tutorial/connectivity Best wishes, Jan-Mathijs On Nov 27, 2011, at 9:43 AM, Marieke van Vugt wrote: > Hi everyone, > I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: > > cfg = []; > cfg.output = 'powandcsd'; > cfg.method = 'mtmfft'; > cfg.foilim = [4 9]; > cfg.tapsmofrq = 4; > cfg.toi = 0.1 > cfg.keeptrials = 'yes'; > cfg.channel = 'all'; > cfg.trials = highCohTrials'; > cfg.channelcmb = {'all' 'all'}; > fftHigh = ft_freqanalysis(cfg,hpdat); > > cfg = []; > cfg.method = 'coh'; > cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); > > cohHighEarly = > > labelcmb: {6555x2 cell} > dimord: 'chan_freq' > cohspctrm: [6555x9 double] > freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] > elec: [1x1 struct] > dof: 5808 > cfg: [1x1 struct] > > cfg = []; > cfg.parameter = 'cohspctrm'; > ft_connectivityplot(cfg,cohHighEarly) > > > > > What should I do? > Thanks! > Marieke > > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Nov 27 11:39:18 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 27 Nov 2011 11:39:18 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? In-Reply-To: References: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Message-ID: Super! That works! Marieke On Nov 27, 2011, at 10:14 , jan-mathijs schoffelen wrote: > Hi Marieke, > > You can have a look here to get your analysis settings such that you can use ft_connectivityplot. In short, please specify cfg.output = 'fourier' rather than 'powandcsd' (and also omit the cfg.channelcmb) prior to calling ft_freqanalysis, and 'een kind kan de was doen'. > > http://fieldtrip.fcdonders.nl/tutorial/connectivity > > Best wishes, > > Jan-Mathijs > > On Nov 27, 2011, at 9:43 AM, Marieke van Vugt wrote: > >> Hi everyone, >> I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: >> >> cfg = []; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmfft'; >> cfg.foilim = [4 9]; >> cfg.tapsmofrq = 4; >> cfg.toi = 0.1 >> cfg.keeptrials = 'yes'; >> cfg.channel = 'all'; >> cfg.trials = highCohTrials'; >> cfg.channelcmb = {'all' 'all'}; >> fftHigh = ft_freqanalysis(cfg,hpdat); >> >> cfg = []; >> cfg.method = 'coh'; >> cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); >> >> cohHighEarly = >> >> labelcmb: {6555x2 cell} >> dimord: 'chan_freq' >> cohspctrm: [6555x9 double] >> freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] >> elec: [1x1 struct] >> dof: 5808 >> cfg: [1x1 struct] >> >> cfg = []; >> cfg.parameter = 'cohspctrm'; >> ft_connectivityplot(cfg,cohHighEarly) >> >> >> >> >> What should I do? >> Thanks! >> Marieke >> >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.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 > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From caulveil at gmail.com Mon Nov 28 22:38:56 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 16:38:56 -0500 Subject: [FieldTrip] mysql interface files Message-ID: Hello, I was considering buffering data to a MySQL database using the ft_write_data and ft_read_date mysql interfaces. However, the files db_connect.m, db_insert.m, db_insert_blob.m, etc.. are all missing. Does anyone know where I might be able to download these? Thanks very much Jacob Martin From caulveil at gmail.com Tue Nov 29 00:10:52 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 18:10:52 -0500 Subject: [FieldTrip] Error in Java buffer reader and fakebiosemiclient.cc Message-ID: Hi, After letting the server run for a while (see below size at 512hz), I get an "err3": data: size = 176960 x 34 dmarequest: err3 Exception in thread "main" java.io.IOException: Error returned from FieldTrip buffer server. at nl.fcdonders.fieldtrip.BufferClient.readResponse(BufferClient.java:646) at nl.fcdonders.fieldtrip.BufferClient.getEvents(BufferClient.java:386) at testclient.main(testclient.java:71) Any ideas? Thanks, Jake From caulveil at gmail.com Tue Nov 29 00:13:26 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 18:13:26 -0500 Subject: [FieldTrip] Error in Java buffer reader and fakebiosemiclient.cc In-Reply-To: References: Message-ID: Ok, seems like it has to do with exceeding the maximum number of samples. Not sure what to do here though yet: http://code.google.com/p/fieldtrip/source/browse/trunk/realtime/buffer/src/dmarequest.c?r=1218#413 On Mon, Nov 28, 2011 at 6:10 PM, Jacob Martin wrote: > Hi, > > After letting the server run for a while (see below size at 512hz), I > get an "err3": > > data: > size = 176960 x 34 > dmarequest: err3 > Exception in thread "main" java.io.IOException: Error returned from > FieldTrip buffer server. >        at nl.fcdonders.fieldtrip.BufferClient.readResponse(BufferClient.java:646) >        at nl.fcdonders.fieldtrip.BufferClient.getEvents(BufferClient.java:386) >        at testclient.main(testclient.java:71) > > > > Any ideas? > > Thanks, > Jake > From vitoria.piai at gmail.com Wed Nov 30 09:40:15 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 30 Nov 2011 09:40:15 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis Message-ID: <4ED5EBEF.8000503@gmail.com> Dear all, When using ft_sourceanalysis, I used to obtain a subfield data.avg.filter. Yesterday, I tried using the same script I used to run until 2 weeks ago, but now I only get data.avg.pow as a subfield after using ft_sourceanalysis. I'm using the version with the last change from 25th Nov. Has something been changed recently or is this just a bug? Cheers, Vitória -- ** Please consider the environment - do you really need to print? ** From thomas.hartmann at uni-konstanz.de Wed Nov 30 10:51:13 2011 From: thomas.hartmann at uni-konstanz.de (Thomas Hartmann) Date: Wed, 30 Nov 2011 10:51:13 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis In-Reply-To: <4ED5EBEF.8000503@gmail.com> References: <4ED5EBEF.8000503@gmail.com> Message-ID: <4ED5FC91.5070606@uni-konstanz.de> dear vitoria, its working with me. have you checked for cfg.keepfilter = 'yes'; ? regards, thomas On 30.11.2011 09:40, Vitória Magalhães Piai wrote: > Dear all, > > When using ft_sourceanalysis, I used to obtain a subfield > data.avg.filter. > > Yesterday, I tried using the same script I used to run until 2 weeks > ago, but now I only get data.avg.pow as a subfield after using > ft_sourceanalysis. > I'm using the version with the last change from 25th Nov. > > Has something been changed recently or is this just a bug? > > Cheers, Vitória > -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From jan.schoffelen at donders.ru.nl Wed Nov 30 11:50:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 30 Nov 2011 11:50:29 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis In-Reply-To: <4ED5EBEF.8000503@gmail.com> References: <4ED5EBEF.8000503@gmail.com> Message-ID: <5B349698-54ED-4EC5-AD94-BA0413E1B4AE@donders.ru.nl> Hi Vitória, Could you change your settings of cfg.keepfilter = 'yes' to cfg.mne.keepfilter = 'yes' and report back to me (not necessarily to the list) whether this solves it? BW, JM On Nov 30, 2011, at 9:40 AM, Vitória Magalhães Piai wrote: > Dear all, > > When using ft_sourceanalysis, I used to obtain a subfield data.avg.filter. > > Yesterday, I tried using the same script I used to run until 2 weeks ago, but now I only get data.avg.pow as a subfield after using ft_sourceanalysis. > I'm using the version with the last change from 25th Nov. > > Has something been changed recently or is this just a bug? > > Cheers, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Wed Nov 30 17:43:25 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Wed, 30 Nov 2011 18:43:25 +0200 Subject: [FieldTrip] Granger convention In-Reply-To: References: Message-ID: Hi all, I'm resurrecting an old post, because I found the answer in ft_connectivityplot and it might useful to other people: line 122: % use the convention of the row-channel causing the column-channel I updated the wiki as well. Please, correct me if this is not the correct convention. Best, Gio On Wed, Aug 17, 2011 at 13:43, Gio Piantoni wrote: > > Hi all, > > The connectivity toolbox is very powerful and straightforward to use, > thanks for that! However, I did not find any information about the > convention used by Fieldtrip to represent asymmetrical connectivity > measures (such as granger causality), f.e. in the help of the > functions, in http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > nor in http://fieldtrip.fcdonders.nl/development/connectivity_tutorial > > Do the values in data.grangerspctrm(1, 2, :) represent the > granger-causality values from channel 1 to channel 2 or the other way > round? > > BTW, is it possible to run time-domain granger causality in Fieldtrip? > > Thanks! > > Gio > > -- > Giovanni Piantoni, Ph.D. student > Dept. Sleep & Cognition > Netherlands Institute for Neuroscience > Meibergdreef 47 > 1105 BA Amsterdam (NL) > > +31 (0)20 5665492 > g.piantoni at nin.knaw.nl > www.giovannipiantoni.com From jan.schoffelen at donders.ru.nl Wed Nov 30 18:56:42 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 30 Nov 2011 18:56:42 +0100 Subject: [FieldTrip] Granger convention In-Reply-To: References: Message-ID: <6D635ADB-E5BC-4EBD-A96B-400D14EB329C@donders.ru.nl> Yes Giovanni, that's correct. Thanks for posting this, I was already hoping that somebody would notice ;-). a presto, JM On Nov 30, 2011, at 5:43 PM, Gio Piantoni wrote: > Hi all, > > I'm resurrecting an old post, because I found the answer in > ft_connectivityplot and it might useful to other people: > > line 122: > % use the convention of the row-channel causing the column-channel > > I updated the wiki as well. Please, correct me if this is not the > correct convention. > > Best, > > Gio > > On Wed, Aug 17, 2011 at 13:43, Gio Piantoni wrote: >> >> Hi all, >> >> The connectivity toolbox is very powerful and straightforward to use, >> thanks for that! However, I did not find any information about the >> convention used by Fieldtrip to represent asymmetrical connectivity >> measures (such as granger causality), f.e. in the help of the >> functions, in http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip >> nor in http://fieldtrip.fcdonders.nl/development/connectivity_tutorial >> >> Do the values in data.grangerspctrm(1, 2, :) represent the >> granger-causality values from channel 1 to channel 2 or the other way >> round? >> >> BTW, is it possible to run time-domain granger causality in Fieldtrip? >> >> Thanks! >> >> Gio >> >> -- >> Giovanni Piantoni, Ph.D. student >> Dept. Sleep & Cognition >> Netherlands Institute for Neuroscience >> Meibergdreef 47 >> 1105 BA Amsterdam (NL) >> >> +31 (0)20 5665492 >> g.piantoni at nin.knaw.nl >> www.giovannipiantoni.com > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at psych.ru.nl Wed Nov 30 20:21:55 2011 From: e.maris at psych.ru.nl (Eric Maris) Date: Wed, 30 Nov 2011 20:21:55 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <4ECF8144.4010706@psy.gla.ac.uk> References: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> <4ECF8144.4010706@psy.gla.ac.uk> Message-ID: <007e01ccaf95$536c0dc0$fa442940$@maris@psych.ru.nl> Hi Sara, I'm replying to your initial question (somewhere below in this email). Why don't you calculate per-subject averages in the two within-subject experimental conditions (using timelockgrandaverage with keepindividual='yes'), and then do your second-level inference on these averages? See also the Fieldtrip statistics tutorials. Best, Eric Maris > -----Original Message----- > From: Sara Bögels [mailto:s.bogels at psy.gla.ac.uk] > Sent: vrijdag 25 november 2011 12:52 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] second-level statistical inference > > Hi Arjen, > > Thank you very much for your answer. That sounds good, but step 2 does > not work straightforwardly, since matlab gives the error message that it > cannot find an avg field (which would not be in the structure created by > ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not > work. I tried to get around that by inserting an avg field which is the > same as the stat field for each participant. Matlab also asked for an > fsample field, which I inserted from an earlier datafile. Then it > worked. Is it ok to do this? > > I did step 3 as well, using the field individual (which you get by > keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = > 'depsamplesT', right (because the variables are within subject)? > > Thank you! > Sara > > On 25/11/2011 09:04, Stolk, A. wrote: > > Hi Sara, > > > > If I understand correctly, you want to test intra-subject differences > (between conditions) at the second level? This would require the following > steps: > > > > 1) subject-level statistics, which you have done already > > > > 2) grandaverage all these, with keepindividuals=yes. > > > > 3) copy the output of the grandaverage (into a dummy variable), and > replace the fields containing the subject T-values with zeros (for > timelock > data this may be the trial fields?) > > > > 4) again timelockstatistics, as in step 1, now with the variables > > following > step 3. this should give you the resulting statistics of contrasting > intra- > subject differences vs. null at the group level. > > > > Hope this helps, > > > > Arjen > > > > > > > > > > > > > > > > > > > > > > > > ----- "Sara Bögels" schreef: > > > >> Van: "Sara Bögels" > >> Aan: fieldtrip at donders.ru.nl > >> Verzonden: Donderdag 24 november 2011 15:49:17 > >> Onderwerp: [FieldTrip] second-level statistical inference > >> > >> Hi all, > >> > >> I have been trying to do second-level statistical inference (as > >> described in one of the FAQs) on ERFs, but I am not sure whether I am > >> > >> doing everything correctly. > >> > >> In the first step I calculate the T-values for the difference between > >> > >> two conditions (twice), which are between items, with > >> ft_timelockstatistics. I put the output of all participants in a cell > >> > >> (called 'stat1a' and 'stat1b'). (I tried to use > >> ft_timelockgrandaverage > >> to combine the subjects together but it needs a field avg). > >> > >> Then I use ft_timelockstatistics again but subject level. I first > >> want > >> to look at the difference between the two conditions. This difference > >> is > >> reflected in the T-values of the first step so I create a dummy which > >> is > >> the same as 'stat1' but I replace all the values in the field 'stat' > >> per > >> participant with zeros. Then I call (with appropriate cfg > >> parameters): > >> > >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > >> > >> To compare the two differences (stat1a and stat1b) and thereby look at > >> > >> an interaction, I call: > >> > >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > >> > >> I am uncertain whether the dummy works (or is there a way to compare > >> the > >> t-values to zero directly?) and whether the stat1a{:} trick works with > >> > >> ft_timelockstatistics. > >> > >> Thanks in advance for your answer. > >> > >> Sara > >> > >> > >> _______________________________________________ > >> 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 B.Mouthaan at neuro.umcn.nl Tue Nov 1 15:16:35 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Tue, 1 Nov 2011 15:16:35 +0100 Subject: [FieldTrip] Plotting dipole moment in 3D Message-ID: Dear Fieldtrippers, Does anyone know how to plot the orientationvector of the dipole? I tried it with quiver3 but this makes it unable to project the dipole vector on the BEM model while using hold on. Any ideas? here my script to make i more clear: ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 for i=1:21 quiver3(dipole.dip.pos(1),dipole.dip.pos(2),dipole.dip.pos(3),dipole.dip.mom(1,i),dipole.dip.mom(2,i),dipole.dip.mom(3,i),'r*', 'MarkerSize', 10) pause (1) end Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Tue Nov 1 15:47:04 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Tue, 1 Nov 2011 15:47:04 +0100 (CET) Subject: [FieldTrip] Plotting dipole moment in 3D In-Reply-To: Message-ID: <2021623992.175631.1320158824319.JavaMail.root@draco.zimbra.ru.nl> Hi Brain try this: figure,ft_plot_dipole(dip.pos,dip.ori,'color','g') How does it look? Best, Cristiano ----- "B Mouthaan" schreef: > Van: "B Mouthaan" > Aan: fieldtrip at donders.ru.nl > Verzonden: Dinsdag 1 november 2011 15:16:35 > Onderwerp: [FieldTrip] Plotting dipole moment in 3D > > Plotting dipole moment in 3D Dear Fieldtrippers, > > Does anyone know how to plot the orientationvector of the dipole? I tried it with quiver3 but this makes it unable to project the dipole vector on the BEM model while using hold on. > > Any ideas? > > here my script to make i more clear: > > ft_plot_mesh(vol.bnd(3)) > hold on > alpha 0.5 > > for i=1:21 > > quiver3(dipole.dip.pos(1),dipole.dip.pos(2),dipole.dip.pos(3),dipole.dip.mom(1,i),dipole.dip.mom(2,i),dipole.dip.mom(3,i),'r*', 'MarkerSize', 10) > pause (1) > end > > Thanks! > > Brian > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > 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 explena at gmail.com Wed Nov 2 10:07:12 2011 From: explena at gmail.com (Shen-Mou Hsu) Date: Wed, 2 Nov 2011 17:07:12 +0800 Subject: [FieldTrip] problems with reading the data in yopkogawa format Message-ID: Hi, I encountered a problem while reading the data in yokogawa format from a single channel. The message is as follows: "Warning: The P-code file GetMeg160MriInfoM.p was generated prior to MATLAB version 7.5 (R2007b) and will not be supported in a future release. Use pcode to regenerate GetMeg160MriInfoM.p using MATLAB R2007b or later". I plotted the data and found that there was a rectangular band covering the real data. Any help in this issue will be much appreciated. Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Nov 2 12:58:25 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 2 Nov 2011 12:58:25 +0100 Subject: [FieldTrip] Plotting dipole moment in 3D Message-ID: Dear Christiano, Is don't have a field called .ori So it does not recognize it as exciting field This is my script: figure(10) ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 ft_plot_dipole(dipole.dip.pos, dipole.dip.ori,'color', 'g') When I replace dipole.dip.ori with dipole.dip.mom, the BEM model is plotted although its a bit darker now. Hope you know what this means? Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Nov 2 14:34:57 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 2 Nov 2011 14:34:57 +0100 Subject: [FieldTrip] [Solution] Plotting dipole moment in 3D Message-ID: In response to my earlier posts. The problem is solved. It was correct that dipole.dip.ori was not existing, because ori is created when calling ft_plot_dipole. [ori] contains the three parameters of dipole.dip.mom. So I used the following code to create the vector: figure(10) ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 for j=1:21 ft_plot_dipole(dipole.dip.pos, dipole.dip.mom(:,j),'color', 'r', 'units', 'mm') pause (1) end I used an iteration, because the moment of the dipole changes every timepoint. My previous figure became dark, and i didn't see the vector. The reason for this is that my units were not defined. No putting the units similarly as in the BEM-model, the figure shows a clear dipole vector. Thanks for the help you all! Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Wed Nov 2 18:34:43 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Wed, 02 Nov 2011 18:34:43 +0100 Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Message-ID: <4EB18D43020000570000B544@gwsmtp1.uni-regensburg.de> Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clusterstats.png Type: image/png Size: 61313 bytes Desc: Portable Network Graphics Format URL: From B.Mouthaan at neuro.umcn.nl Thu Nov 3 14:51:56 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 3 Nov 2011 14:51:56 +0100 Subject: [FieldTrip] Dipole at surface of head Message-ID: Hello all, I am calculating dipoles with use of the BEM headmodel. Before calculating the dipole I hypothesize with help of the current distribution topography in MultiplotER where the dipole will be placed. Most of the times the dipole location corresponds with my expectations. However often this dipole is locate at the surface of the head. This does not sound logic to me. Does anyone have experienced this problem earlier? And if so does anybody has a solution? Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Thu Nov 3 16:57:36 2011 From: michael.wibral at web.de (Michael Wibral) Date: Thu, 3 Nov 2011 16:57:36 +0100 (CET) Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Message-ID: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Thu Nov 3 18:20:56 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Thu, 03 Nov 2011 18:20:56 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> Message-ID: <4EB2DB88020000570000B5A8@gwsmtp1.uni-regensburg.de> Hi Michael, thanks a lot for your response. Yes, I kept everything the same, the only difference beeing the Matlab path pointing to the old vs new FT version. I will keep on searching for a possible flaw in my code and will tell so if I found one. Thanks again, best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Michael Wibral" 11/3/2011 4:57 PM >>> Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Sat Nov 5 17:55:13 2011 From: karl.doron at gmail.com (Karl Doron) Date: Sat, 5 Nov 2011 09:55:13 -0700 Subject: [FieldTrip] ft_plot_topo3d crash Message-ID: Hello, I'm trying to use a 3d plot function and experiencing matlab crashes. As arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a vector of t values for each sensor. The plot appears correctly on the first attempt; however, any second attempts to use the function, i.e., to plot a different time point, cause the entire matlab session to crash. Since the whole session crashes, I don't have any error message to report. I'm using Matlab R2009B and Mac OSx Lion. Thanks for any feedback. karl Karl Doron, Ph.D. Department of Psychological and Brain Sciences University of California, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Nov 6 07:54:20 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Sun, 6 Nov 2011 14:54:20 +0800 (CST) Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1E8C4628-FC2B-497E-82B6-CDE4D4482CE6@psi.ucm.es> Message-ID: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> Dear Stephan,       Thanks for your help. I've tried the toolbox, and test my data using both Augmented Dickey Fuller (ADF) and KPSS method, but the results are inconsistent.  ADF'result is the data is  not stationary, but KPSS'result is stationary. Have you met problem as this?     Best,   Weina     --- 11年10月31日,周一, smoratti at psi.ucm.es 写道: 发件人: smoratti at psi.ucm.es 主题: Re: [FieldTrip] Is there a function for testing time series stationary or not? 收件人: "Email discussion list for the FieldTrip project" 日期: 2011年10月31日,周一,下午10:21 Dear Weina, Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm There several easy to use tests for covariance stationarity. Best, Stephan El 31/10/2011, a las 14:15, 李卫娜 escribió: Dear all,   Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary.   Best regards.     Weina  _______________________________________________ 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 r.oostenveld at donders.ru.nl Sun Nov 6 09:40:40 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sun, 6 Nov 2011 09:40:40 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: <819342DB-D94F-4CD7-B266-E64C3FAC0AFE@donders.ru.nl> Dear Karl, Sorry to hear about the problem, it surprises me that your whole MATLAB crahes. Can you please report the problem as bug on http://bugzilla.fcdonders.nl (i.e. copy your email message) and attach a mat file in bugzilla with the exact input variables as you are using it? best regards, Robert On 5 Nov 2011, at 17:55, Karl Doron wrote: > Hello, > > I'm trying to use a 3d plot function and experiencing matlab crashes. As arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a vector of t values for each sensor. > > The plot appears correctly on the first attempt; however, any second attempts to use the function, i.e., to plot a different time point, cause the entire matlab session to crash. Since the whole session crashes, I don't have any error message to report. > > I'm using Matlab R2009B and Mac OSx Lion. > > Thanks for any feedback. > > karl > > > > > Karl Doron, Ph.D. > Department of Psychological and Brain Sciences > University of California, Santa Barbara > > > _______________________________________________ > 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 g.piantoni at nin.knaw.nl Sun Nov 6 11:04:29 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Sun, 6 Nov 2011 11:04:29 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: Hi Karl, To me, it sounds like a problem with the OpenGL drivers. There was a discussion on that about VNC crashing on Linux, but maybe it applies to your Mac configuration as well. See: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html Please, report back if you find a solution. Best, Gio On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: > Hello, > I'm trying to use a 3d plot function and experiencing matlab crashes. As > arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a > vector of t values for each sensor. > The plot appears correctly on the first attempt; however, any second > attempts to use the function, i.e., to plot a different time point, cause > the entire matlab session to crash. Since the whole session crashes, I don't > have any error message to report. > I'm using Matlab R2009B and Mac OSx Lion. > Thanks for any feedback. > karl > > > > Karl Doron, Ph.D. > Department of Psychological and Brain Sciences > University of California, Santa Barbara > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From julian.wang at ucl.ac.uk Sun Nov 6 18:52:32 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Sun, 6 Nov 2011 17:52:32 -0000 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> Message-ID: <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I'm having. I'm trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it's coming up with this error and I'm not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesig n". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I'm trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I'm not sure if I've got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it's only expecting one row in the design matrix. If it's run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I'm not sure if it is. Is what I've done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I'm uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I'm using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 Don.Rojas at ucdenver.edu Sun Nov 6 20:17:02 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Sun, 6 Nov 2011 12:17:02 -0700 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> Message-ID: <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes). Sent from my iPad On Nov 6, 2011, at 11:19 AM, "Julian Wang" > wrote: Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it’s coming up with this error and I’m not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 smoratti at psi.ucm.es Sun Nov 6 21:00:38 2011 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Sun, 06 Nov 2011 21:00:38 +0100 Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> References: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> Message-ID: Dear Weina, That happened to me as well and occurs also in the example of the manual. You could lower the p value of the ADF test and see if it goes in the same direction as the KPSS test. I think the KPSS is correct and less stringent. Best, Stephan El 06/11/2011, a las 07:54, 李卫娜 escribió: > Dear Stephan, > > Thanks for your help. I've tried the toolbox, and test my data using both Augmented Dickey Fuller (ADF) and KPSS method, but the results are inconsistent. ADF'result is the data is not stationary, but KPSS'result is stationary. Have you met problem as this? > > > Best, > > Weina > > > --- 11年10月31日,周一, smoratti at psi.ucm.es 写道: > > 发件人: smoratti at psi.ucm.es > 主题: Re: [FieldTrip] Is there a function for testing time series stationary or not? > 收件人: "Email discussion list for the FieldTrip project" > 日期: 2011年10月31日,周一,下午10:21 > > Dear Weina, > > Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm > > There several easy to use tests for covariance stationarity. > > Best, > > Stephan > > El 31/10/2011, a las 14:15, 李卫娜 escribió: > >> Dear all, >> >> Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary. >> >> Best regards. >> >> >> Weina >> >> _______________________________________________ >> 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 julian.wang at ucl.ac.uk Sun Nov 6 21:05:49 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Sun, 6 Nov 2011 20:05:49 -0000 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> Message-ID: <00ca01cc9cbf$7b77b0f0$726712d0$@ucl.ac.uk> Even in your unsure state, you seem to have all the answers! Removing the quotes made it work perfectly. Again, thank you so much for your help. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 06 November 2011 07:17 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes). Sent from my iPad On Nov 6, 2011, at 11:19 AM, "Julian Wang" wrote: Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it’s coming up with this error and I’m not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 davidig at hotmail.es Mon Nov 7 02:29:15 2011 From: davidig at hotmail.es (=?iso-8859-1?B?RGF2aWQgSWdsZXNpYXMgTPNwZXo=?=) Date: Mon, 7 Nov 2011 02:29:15 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> Message-ID: Hi, I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? I don't know how to chop my data correctly. Thank, David From: r.oostenveld at donders.ru.nl Date: Sun, 20 Mar 2011 14:41:41 +0100 To: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Trigger channel for edf Hi Ivano Good that it works. The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses). FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. bestRobert On 20 Mar 2011, at 13:24, Ivano Triggiani wrote:Hi, just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called "number of data records" ( http://www.edfplus.info/specs/edf.html ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) Thanks to all. Ivano ------------------------------------------------------------------------ "No man can wear one face to himself and another to the multitude, without finally getting bewildered as to which one is true." Nathaniel Hawthorne _______________________________________________ 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 a.stolk at fcdonders.ru.nl Mon Nov 7 08:13:40 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 7 Nov 2011 08:13:40 +0100 (CET) Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <245840274.700839.1320649995936.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <333620380.700845.1320650020258.JavaMail.root@sculptor.zimbra.ru.nl> Dear  David, You'll need to determine your user-specific events, i.e. not the 'trial' type events that are automatically stored in your dataset by your acquisition software. Does your event matrix contain types anything else than 'trial'? For instance, try: event = ft_read_head(filename) unique({event.type}) Yours, Arjen ----- "David Iglesias López" schreef: > Van: "David Iglesias López" > Aan: fieldtrip at donders.ru.nl > Verzonden: Maandag 7 november 2011 02:29:15 > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > Hi, > I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. > The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. > I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > I don't know how to chop my data correctly. > Thank, > David > From: r.oostenveld at donders.ru.nl > Date: Sun, 20 Mar 2011 14:41:41 +0100 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Trigger channel for edf > Hi Ivano > Good that it works. > The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses).  > FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. > best Robert  > On 20 Mar 2011, at 13:24, Ivano Triggiani wrote: > Hi, > just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. > However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called " number of data records"   (   http://www.edfplus.info/specs/edf.html   ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) > Thanks to all. > Ivano > ------------------------------------------------------------------------ > > "No man can wear one face to himself   > and another to the multitude, > without finally getting bewildered   > as to which one is true." > > Nathaniel Hawthorne > > > _______________________________________________ > 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 a.stolk at fcdonders.ru.nl Mon Nov 7 08:17:04 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 7 Nov 2011 08:17:04 +0100 (CET) Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <333620380.700845.1320650020258.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1197843141.700863.1320650224971.JavaMail.root@sculptor.zimbra.ru.nl> Sorry, correction, make that ft_read_header ----- "A. Stolk" schreef: > Van: "A. Stolk" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Maandag 7 november 2011 08:13:40 > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > Dear David, You'll need to determine your user-specific events, i.e. not the 'trial' type events that are automatically stored in your dataset by your acquisition software. Does your event matrix contain types anything else than 'trial'? For instance, try: event = ft_read_head(filename) unique({event.type}) Yours, Arjen > > ----- "David Iglesias López" schreef: > > Van: "David Iglesias López" > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Maandag 7 november 2011 02:29:15 > > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > > > > Hi, > > I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. > > The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. > > I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > > I don't know how to chop my data correctly. > > Thank, > > David > > From: r.oostenveld at donders.ru.nl > > Date: Sun, 20 Mar 2011 14:41:41 +0100 > > To: fieldtrip at donders.ru.nl > > Subject: Re: [FieldTrip] Trigger channel for edf > > Hi Ivano > > Good that it works. > > The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses).  > > FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. > > best Robert  > > On 20 Mar 2011, at 13:24, Ivano Triggiani wrote: > > Hi, > > just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. > > However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called " number of data records"   (   http://www.edfplus.info/specs/edf.html   ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) > > Thanks to all. > > Ivano > > ------------------------------------------------------------------------ > > > > "No man can wear one face to himself   > > and another to the multitude, > > without finally getting bewildered   > > as to which one is true." > > > > Nathaniel Hawthorne > > > > > > _______________________________________________ > > 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 r.oostenveld at donders.ru.nl Mon Nov 7 10:22:27 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 7 Nov 2011 10:22:27 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> Message-ID: Hi David On 7 Nov 2011, at 2:29, David Iglesias López wrote: > I would like like to simply make all my data as continuous cfg = []; cfg.dataset = 'filename.edf' cfg.continuous = 'yes' data = ft_preprocessing(cfg) should do that for you. See also http://fieldtrip.fcdonders.nl/faq/how_can_i_process_continuous_data_without_triggers > and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > I don't know how to chop my data correctly. Once the data is in memory (either segmented in many small pieces or one large piece), you can use ft_redefinetrial to change the segmentation (e.g. cut trials into shorter pieces or change from stimulus locked to response locked). In your case you can pass the trl to ft_redefinetrial. best Robert From drivolta81 at gmail.com Mon Nov 7 12:37:19 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 7 Nov 2011 12:37:19 +0100 Subject: [FieldTrip] sourceplot - beamforming Message-ID: Dear Fieldtrippers, I have a question about ft_sourceplot (version 20111009). I am following the tutorial on the reverse grid transformation ( http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization ). I can get to the end of the script and try to plot the relative change in power of the stimulus condition again the baseline (visual task). I have attached the figures I get from one subject only. First of all, it is upside-down. Is it correct? How to change this? Here is the script I use: mri = ft_read_mri(mri_name); cfg = []; cfg.downsample = 1; sourceDiff.dim = [17 20 17]; sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.units = 'mm'; cfg.opacitylim = [0.2 1.3]; ft_sourceplot(cfg,sourceDiff_Int); This is the structure of sourceDiff_Int: sourceDiff_Int = inside: [256x256x256 logical] avg: [1x1 struct] dim: [256 256 256] transform: [4x4 double] anatomy: [256x256x256 int16] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Thanks for the help, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ortho.jpg Type: image/jpeg Size: 25496 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: slice.jpg Type: image/jpeg Size: 23662 bytes Desc: not available URL: From davidig at hotmail.es Mon Nov 7 16:06:54 2011 From: davidig at hotmail.es (=?iso-8859-1?B?RGF2aWQgSWdsZXNpYXMgTPNwZXo=?=) Date: Mon, 7 Nov 2011 16:06:54 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, , <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl>, , Message-ID: Hi Robert, And the end I got it before like this: cfg = []; cfg.dataset = filename; cfg.continuous = 'yes'; cfg.trialfun = 'trialfun_david'; cfg = ft_definetrial(cfg); dataout = ft_preprocessing(cfg); And it worked nicely. Thank you, David > From: r.oostenveld at donders.ru.nl > Date: Mon, 7 Nov 2011 10:22:27 +0100 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Trigger channel for edf > > Hi David > > On 7 Nov 2011, at 2:29, David Iglesias López wrote: > > I would like like to simply make all my data as continuous > > cfg = []; > cfg.dataset = 'filename.edf' > cfg.continuous = 'yes' > data = ft_preprocessing(cfg) > > should do that for you. See also > http://fieldtrip.fcdonders.nl/faq/how_can_i_process_continuous_data_without_triggers > > > and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > > I don't know how to chop my data correctly. > > > Once the data is in memory (either segmented in many small pieces or one large piece), you can use ft_redefinetrial to change the segmentation (e.g. cut trials into shorter pieces or change from stimulus locked to response locked). In your case you can pass the trl to ft_redefinetrial. > > best > Robert > > > _______________________________________________ > 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 julian.keil at gmail.com Mon Nov 7 16:12:36 2011 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Nov 2011 16:12:36 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: Hi, I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. The problem is, that switching to software-openGL is not supported: >> opengl software Warning: Switching to software OpenGL rendering is not supported on the MAC platform Does anyone have a hint how to change the renderer? Best, Julian Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > Hi Karl, > > To me, it sounds like a problem with the OpenGL drivers. > There was a discussion on that about VNC crashing on Linux, but maybe > it applies to your Mac configuration as well. See: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html > > Please, report back if you find a solution. > > Best, > > Gio > > On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >> Hello, >> I'm trying to use a 3d plot function and experiencing matlab crashes. As >> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >> vector of t values for each sensor. >> The plot appears correctly on the first attempt; however, any second >> attempts to use the function, i.e., to plot a different time point, cause >> the entire matlab session to crash. Since the whole session crashes, I don't >> have any error message to report. >> I'm using Matlab R2009B and Mac OSx Lion. >> Thanks for any feedback. >> karl >> >> >> >> Karl Doron, Ph.D. >> Department of Psychological and Brain Sciences >> University of California, Santa Barbara >> >> >> >> _______________________________________________ >> 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 BelluscB at ninds.nih.gov Mon Nov 7 17:41:35 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Mon, 7 Nov 2011 11:41:35 -0500 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: , Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> I ran into this problem a couple of months ago using a VNC connection on a PC platform. I used the following command: opengl neverselect at the prompt to force Matlab to use a different function. It hasn't crashed since. I assume this would work for a mac platform as well. good luck! Beth. ________________________________________ From: Julian Keil [julian.keil at gmail.com] Sent: Monday, November 07, 2011 10:12 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_plot_topo3d crash Hi, I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. The problem is, that switching to software-openGL is not supported: >> opengl software Warning: Switching to software OpenGL rendering is not supported on the MAC platform Does anyone have a hint how to change the renderer? Best, Julian Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > Hi Karl, > > To me, it sounds like a problem with the OpenGL drivers. > There was a discussion on that about VNC crashing on Linux, but maybe > it applies to your Mac configuration as well. See: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html > > Please, report back if you find a solution. > > Best, > > Gio > > On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >> Hello, >> I'm trying to use a 3d plot function and experiencing matlab crashes. As >> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >> vector of t values for each sensor. >> The plot appears correctly on the first attempt; however, any second >> attempts to use the function, i.e., to plot a different time point, cause >> the entire matlab session to crash. Since the whole session crashes, I don't >> have any error message to report. >> I'm using Matlab R2009B and Mac OSx Lion. >> Thanks for any feedback. >> karl >> >> >> >> Karl Doron, Ph.D. >> Department of Psychological and Brain Sciences >> University of California, Santa Barbara >> >> >> >> _______________________________________________ >> 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 julian.keil at gmail.com Mon Nov 7 18:24:16 2011 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Nov 2011 18:24:16 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> References: , <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> Message-ID: <64A977BA-4EAE-4CE3-AA91-CCFC08CFFF23@gmail.com> Hi, thanks for your reply, unfortunately this did not help. However, setting all the bug-workarounds in opengl to '1' did the trick. If anyone else has this problem, here's how it worked for me: * use "opengl info" to see if the workarounds are enabled * set the workarounds to '1': opengl('OpenGLBitmapZbufferBug',1) opengl('OpenGLWobbleTesselatorBug',1) opengl('OpenGLLineSmoothingBug',1) opengl('OpenGLClippedImageBug',1) Best, Julian Am 07.11.2011 um 17:41 schrieb Belluscio, Beth (NIH/NINDS) [E]: > I ran into this problem a couple of months ago using a VNC connection on a PC platform. I used the following command: opengl neverselect at the prompt to force Matlab to use a different function. It hasn't crashed since. I assume this would work for a mac platform as well. > > good luck! > Beth. > > ________________________________________ > From: Julian Keil [julian.keil at gmail.com] > Sent: Monday, November 07, 2011 10:12 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] ft_plot_topo3d crash > > Hi, > > I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. > The problem is, that switching to software-openGL is not supported: > >>> opengl software > Warning: Switching to software OpenGL rendering is not supported on the MAC platform > > Does anyone have a hint how to change the renderer? > > Best, > Julian > > > Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > >> Hi Karl, >> >> To me, it sounds like a problem with the OpenGL drivers. >> There was a discussion on that about VNC crashing on Linux, but maybe >> it applies to your Mac configuration as well. See: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html >> >> Please, report back if you find a solution. >> >> Best, >> >> Gio >> >> On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >>> Hello, >>> I'm trying to use a 3d plot function and experiencing matlab crashes. As >>> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >>> vector of t values for each sensor. >>> The plot appears correctly on the first attempt; however, any second >>> attempts to use the function, i.e., to plot a different time point, cause >>> the entire matlab session to crash. Since the whole session crashes, I don't >>> have any error message to report. >>> I'm using Matlab R2009B and Mac OSx Lion. >>> Thanks for any feedback. >>> karl >>> >>> >>> >>> Karl Doron, Ph.D. >>> Department of Psychological and Brain Sciences >>> University of California, Santa Barbara >>> >>> >>> >>> _______________________________________________ >>> 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 jan.schoffelen at donders.ru.nl Tue Nov 8 10:58:40 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 8 Nov 2011 10:58:40 +0100 Subject: [FieldTrip] sourceplot - beamforming In-Reply-To: References: Message-ID: Hi Davide, Apart from putting your computer monitor upside down you could reslice your anatomy prior to doing the interpolation (using ft_volumereslice). Best, Jan-Mathijs On Nov 7, 2011, at 12:37 PM, Davide Rivolta wrote: > > Dear Fieldtrippers, > > I have a question about ft_sourceplot (version 20111009). > > I am following the tutorial on the reverse grid transformation (http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization). > > I can get to the end of the script and try to plot the relative change in power of the stimulus condition again the baseline (visual task). > > I have attached the figures I get from one subject only. > > First of all, it is upside-down. Is it correct? How to change this? > > > Here is the script I use: > > mri = ft_read_mri(mri_name); > cfg = []; > cfg.downsample = 1; > sourceDiff.dim = [17 20 17]; > sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); > > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.units = 'mm'; > cfg.opacitylim = [0.2 1.3]; > ft_sourceplot(cfg,sourceDiff_Int); > > > > > > This is the structure of sourceDiff_Int: > > sourceDiff_Int = > > inside: [256x256x256 logical] > avg: [1x1 struct] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 int16] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > > Thanks for the help, > > Davide > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.dipompeo at unich.it Tue Nov 8 17:14:01 2011 From: f.dipompeo at unich.it (f.dipompeo at unich.it) Date: Tue, 08 Nov 2011 17:14:01 +0100 Subject: [FieldTrip] Power Time Course Message-ID: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> I would like to know if there is a ft function to calculate the Time Course of Power of Electric and Magnetic Channels and IC coming from ft_componentanalysis in the case of continuous resting state data. I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a "toi" large as my whole acquisition time window (the script is below). Time Course of Power should be obtained by summing up the results over all the frequencies. Thank you very much, Francesco ------------------------------------------------------- cfg=[]; cfg.method = 'mtmconvol'; cfg.output = 'powandcsd'; cfg.taper = 'hanning'; cfg.trials = 'all'; cfg.foi = 1:150; cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; cfg.t_ftimwin = 4./cfg.foi; [freq_comp_tr] = ft_freqanalysis(cfg,comp); From eelke.spaak at donders.ru.nl Tue Nov 8 17:33:13 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 8 Nov 2011 17:33:13 +0100 Subject: [FieldTrip] Power Time Course In-Reply-To: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> References: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> Message-ID: Dear Francesco, Your question is not entirely clear to me. Do you want to estimate the timecourse of the total (i.e. non-frequency-resolved) power in your signal? In that case, frequency analysis is not the way to go; basically your signal itself contains this information already (you may want to rectify (abs()) it first, or apply a hilbert transform). Also, I don't understand the reference to ft_componentanalysis. Furthermore, the code you paste in your email seems valid to me. (You could possibly simplify it by using cfg.toi = comp.time{1}; to get an estimate of power at each time point in your signal. ) What does not seem to work, in your case? Best, Eelke 2011/11/8 : > I would like to know if there is a ft function to calculate the Time Course > of Power of Electric and Magnetic Channels and IC coming from > ft_componentanalysis in the case of continuous resting state data. > > I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a > "toi" large as my whole acquisition time window (the script is below). > Time Course of Power should be obtained by summing up the results over all > the frequencies. > > Thank you very much, > > Francesco > > ------------------------------------------------------- > > cfg=[]; > cfg.method = 'mtmconvol'; > cfg.output = 'powandcsd'; > cfg.taper = 'hanning'; > cfg.trials = 'all'; > cfg.foi = 1:150; > cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; > cfg.t_ftimwin = 4./cfg.foi; > [freq_comp_tr] = ft_freqanalysis(cfg,comp); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From r.vandermeij at donders.ru.nl Tue Nov 8 23:09:16 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 08 Nov 2011 17:09:16 -0500 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: <4EB9A88C.5070103@donders.ru.nl> Hi Julian, As a sort of last-resort workaround: If you're not using it for publication quality figures, but for e.g. databrowsing, you could create a set of nasty looking figures by setting the renderer to zbuffer, instead of opengl. You can do it while creating a fig by figure('renderer','zbuffer'). Zbuffer doesn't work with transparency, which is essential for masking. If you don't use masking, it might actually look fine I think, but not entirely sure. At least you can get some workable figures now, maybe create publication quality on a different machine? Hope it's a bit useful, Cheers, Roemer On 07/11/2011 10:12, Julian Keil wrote: > Hi, > > I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. > The problem is, that switching to software-openGL is not supported: > >>> opengl software > Warning: Switching to software OpenGL rendering is not supported on the MAC platform > > Does anyone have a hint how to change the renderer? > > Best, > Julian > > > Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > >> Hi Karl, >> >> To me, it sounds like a problem with the OpenGL drivers. >> There was a discussion on that about VNC crashing on Linux, but maybe >> it applies to your Mac configuration as well. See: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html >> >> Please, report back if you find a solution. >> >> Best, >> >> Gio >> >> On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >>> Hello, >>> I'm trying to use a 3d plot function and experiencing matlab crashes. As >>> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >>> vector of t values for each sensor. >>> The plot appears correctly on the first attempt; however, any second >>> attempts to use the function, i.e., to plot a different time point, cause >>> the entire matlab session to crash. Since the whole session crashes, I don't >>> have any error message to report. >>> I'm using Matlab R2009B and Mac OSx Lion. >>> Thanks for any feedback. >>> karl >>> >>> >>> >>> Karl Doron, Ph.D. >>> Department of Psychological and Brain Sciences >>> University of California, Santa Barbara >>> >>> >>> >>> _______________________________________________ >>> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Tue Nov 8 23:19:35 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 08 Nov 2011 17:19:35 -0500 Subject: [FieldTrip] Power Time Course In-Reply-To: References: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> Message-ID: <4EB9AAF7.3010606@donders.ru.nl> Hi Francesco, I don't entirely understand what you referring to either, but it sounds at least like a within channel phenomenon? In that case, you can use cfg.output = 'pow', or 'fourier', which do not compute the between channel CSD, saving quite a bit memory. If you are interested in the total energy over time of your signal, but only for the 1-150 Hz part, it might be easier to do a bandpass, and taking the square of your raw signal (energy is usually squared amplitude I thought?). If that is what your intending though. Cheers, Roemer On 08/11/2011 11:33, Eelke Spaak wrote: > Dear Francesco, > > Your question is not entirely clear to me. Do you want to estimate the > timecourse of the total (i.e. non-frequency-resolved) power in your > signal? In that case, frequency analysis is not the way to go; > basically your signal itself contains this information already (you > may want to rectify (abs()) it first, or apply a hilbert transform). > Also, I don't understand the reference to ft_componentanalysis. > > Furthermore, the code you paste in your email seems valid to me. (You > could possibly simplify it by using cfg.toi = comp.time{1}; to get an > estimate of power at each time point in your signal. ) What does not > seem to work, in your case? > > Best, > Eelke > > > 2011/11/8: >> I would like to know if there is a ft function to calculate the Time Course >> of Power of Electric and Magnetic Channels and IC coming from >> ft_componentanalysis in the case of continuous resting state data. >> >> I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a >> "toi" large as my whole acquisition time window (the script is below). >> Time Course of Power should be obtained by summing up the results over all >> the frequencies. >> >> Thank you very much, >> >> Francesco >> >> ------------------------------------------------------- >> >> cfg=[]; >> cfg.method = 'mtmconvol'; >> cfg.output = 'powandcsd'; >> cfg.taper = 'hanning'; >> cfg.trials = 'all'; >> cfg.foi = 1:150; >> cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; >> cfg.t_ftimwin = 4./cfg.foi; >> [freq_comp_tr] = ft_freqanalysis(cfg,comp); >> >> >> _______________________________________________ >> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Nov 9 12:49:18 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 9 Nov 2011 12:49:18 +0100 Subject: [FieldTrip] sourceplot - beamforming In-Reply-To: References: Message-ID: Dear Jan-Mathijs, Thank you for your email. I have done as you said. I ran ft_volumereslice. As you can see from the piture (source2) I get something really weird. I am using the correct cfg.dim, however I am not sure about the cfg.resolution. Where can I pick the correct value? In the case of the picture I used 1. After this, I run ft_sourceinterpolate and then ft_sourceplot. Is this the correct sequence? Source1 represents the source before running ft_volumereslice. Thanks for the advice, Davide On Tue, Nov 8, 2011 at 10:58 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > Apart from putting your computer monitor upside down you could reslice > your anatomy prior to doing the interpolation (using ft_volumereslice). > > Best, > > Jan-Mathijs > > On Nov 7, 2011, at 12:37 PM, Davide Rivolta wrote: > > > Dear Fieldtrippers, > > I have a question about ft_sourceplot (version 20111009). > > I am following the tutorial on the reverse grid transformation ( > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization > ). > > I can get to the end of the script and try to plot the relative change in > power of the stimulus condition again the baseline (visual task). > > I have attached the figures I get from one subject only. > > First of all, it is upside-down. Is it correct? How to change this? > > > Here is the script I use: > > mri = ft_read_mri(mri_name); > cfg = []; > cfg.downsample = 1; > sourceDiff.dim = [17 20 17]; > sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); > > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.units = 'mm'; > cfg.opacitylim = [0.2 1.3]; > ft_sourceplot(cfg,sourceDiff_Int); > > > > > > This is the structure of sourceDiff_Int: > > sourceDiff_Int = > > inside: [256x256x256 logical] > avg: [1x1 struct] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 int16] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > > Thanks for the help, > > Davide > _______________________________________________ > 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 > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Nov 9 16:00:30 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 09 Nov 2011 16:00:30 +0100 Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? In-Reply-To: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> Message-ID: <4EBA958E.8070300@donders.ru.nl> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: > Hi Gregor, > > in principle the first level statistics that determine cluster > membership (and thereby cluster shapes etc.) can also vary from one > set of permutations to the next, esp. on the borders of a cluster > (this is why it is typically said that the localization of a cluster > is not as trustworthy as its existence). Other resaons for differences > are differing number of permutations - did you set everything the same? > > This said there might well be another problem - I hope the cluster > people can have a look into it. > > Best , > Michael > > > ------------------------------------------------------------------------ > *Von:* "Gregor Volberg" > *Gesendet:* Nov 2, 2011 6:34:43 PM > *An:* fieldtrip at donders.ru.nl > *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer FT > versions? > > Dear fieldtrip community, > > > I just encountered an unexpected behavior of FT that I would like > to share with the list. It is that the cluster permutation test > formed incorrect clusters from a given set of significant > electrodes in newer FT versions (ft-20111012; I also tried with > ft-20111028). > > > For example, when using an old ft version (ft-20100810) and > freqstatistics I get a negative cluster with 17 contiguous > electrodes. With the newer ft version, using the same data and the > same cfg, three significant electrodes that are spatially > contiguous to the other significant electrodes are not included in > the cluster. Also, three electrodes that are spatially seperated > and are actually part of the first cluster are grouped into a > separate cluster. I attached a picture with the respective > clusterplots where differences are marked with red arrows. > > I am aware that the permutation p-value for a given cluster can be > different in two separate analyses, but the grouping of > significant electrodes into clusters should always be the same, am > i right? I double-checked the cfg.neighbours, after conversion to > new 'struct' style, and they were identical in the "old ft" and > "new ft" analysis. Also, the stat.stat field and the > stat.cfg.clustercritval were the same for both analyses. Thus, the > same neighbourhood relations and the same significant electrodes > should be used for grouping. Yet I get different results... > > > I am almost sure that this is trivial, but I could not yet > replicate my old results with new FT and this makes me nervous. > Has someone made a similar experience? Or do newer versions of ft > use some further information besides cfg.neighbours for > clustering, somewhere in the *cfg.previuous perhaps, that I am not > aware of? Any comments are highly welcome. > > > Best regards, > > Gregor > > > cfg = []; > > cfg.neighbours = neighbours; > > cfg.minnbchan=1; > > cfg.avgoverfreq = 'yes'; > > cfg.avgovertime = 'yes'; > > cfg.method = 'montecarlo'; > > cfg.correctm = 'cluster'; > > cfg.statistic = 'depsamplesT'; > > cfg.tail = 0; > > cfg.alpha = 0.05; > > cfg.clusteralpha = 0.05; > > cfg.numrandomization = 1000; > > cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; > > cfg.uvar = 1; > > cfg.ivar = 2; > > cfg.latency = [2.24 2.53]; > > cfg.frequency = [17 21];% > > stat = ft_freqstatistics(cfg, DC, TC); > > > -- > Dr. rer. nat. Gregor Volberg > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > > _______________________________________________ > 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From olgafelso at googlemail.com Wed Nov 9 16:01:42 2011 From: olgafelso at googlemail.com (Olga Felsovalyi) Date: Wed, 9 Nov 2011 07:01:42 -0800 Subject: [FieldTrip] Granger Causality In-Reply-To: References: Message-ID: Hello, I am following the connectivity tutorial to perform granger causality analysis on iEEG data. Please help me understand a few things: 1. Please clarify exactly what the output values of the granger matrix represent. If I understand correctly, it is the log(variance of predicted time course/variance of actual time course). 2. What range of values should I be getting for granger causality for iEEG data? I am getting values ranging from 0 to 2.5. Values I see reported in papers seem to report peaks barley higher than 1. Thank you for your help! Olga -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.dipompeo at unich.it Wed Nov 9 19:18:42 2011 From: f.dipompeo at unich.it (f.dipompeo at unich.it) Date: Wed, 09 Nov 2011 19:18:42 +0100 Subject: [FieldTrip] Power time Course (Re: fieldtrip Digest, Vol 12, Issue 13) Message-ID: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> Dear Eelke and Roemer, thank you very much... Concerning your questions: > Your question is not entirely clear to me. Do you want to estimate the > timecourse of the total (i.e. non-frequency-resolved) power in your > signal? yes.. > Furthermore, the code you paste in your email seems valid to me. (You > could possibly simplify it by using cfg.toi = comp.time{1}; to get an > estimate of power at each time point in your signal. ) What does not > seem to work, in your case? The strange thing is that while the 'powspctrm' output field of ft_freqanalysis contains "NaN" values, I see its content by plotting it using ft_singleplotTFR.. Also summing up over all the frequencies in this way cfg=[]; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.trials = 'all'; cfg.foi = 1:150; cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; cfg.t_ftimwin = 4./cfg.foi; [freq_comp_tr] = ft_freqanalysis(cfg,comp); pow_f=sum(freq_comp_tr.powspctrm,2); pelec= squeeze(pow_f); both pow_f and pelec contain NaN values, but plotting it I see the content!? > I don't entirely understand what you referring to either, but it sounds > at least like a within channel phenomenon? In that case, you can use > cfg.output = 'pow', or 'fourier', which do not compute the between > channel CSD, saving quite a bit memory. Ok > If you are interested in the total energy over time of your signal, but > only for the 1-150 Hz part, it might be easier to do a bandpass, and > taking the square of your raw signal (energy is usually squared > amplitude I thought?). If that is what your intending though. Right, this is the way I do it in general.. It was just to try using field trip functions... Thank you very much, Francesco From r.oostenveld at donders.ru.nl Wed Nov 9 21:48:12 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 9 Nov 2011 21:48:12 +0100 Subject: [FieldTrip] Power time Course (Re: fieldtrip Digest, Vol 12, Issue 13) In-Reply-To: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> References: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> Message-ID: <5E92D500-C3C5-4285-930C-1F2A033B8B26@donders.ru.nl> Hi Francesco, > The strange thing is that > while the 'powspctrm' output field of ft_freqanalysis contains "NaN" values, > I see its content by plotting it using ft_singleplotTFR.. At the edges of your time axis for the lower frequencies where the wavelet does not fully fit in the data window you'll get nans. That is for example what you see in the figure http://fieldtrip.fcdonders.nl/_detail/tutorial/timefrequencyanalysis/tfrhann7_24_mrt_2009.png?id=tutorial%3Atimefrequencyanalysis > Also summing up over all the frequencies in this way > > cfg=[]; > cfg.method = 'mtmconvol'; > cfg.output = 'pow'; > cfg.taper = 'hanning'; > cfg.trials = 'all'; > cfg.foi = 1:150; > cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; > cfg.t_ftimwin = 4./cfg.foi; > [freq_comp_tr] = ft_freqanalysis(cfg,comp); > > pow_f=sum(freq_comp_tr.powspctrm,2); > pelec= squeeze(pow_f); > > both pow_f and pelec contain NaN values, but plotting it I see the content!? Doing normal math with nans does not work, i.e. nan+1=nan. You might want to use nansum instead of sum. But the FT plotting functions know how to plot the nans. >> If you are interested in the total energy over time of your signal, but >> only for the 1-150 Hz part, it might be easier to do a bandpass, and >> taking the square of your raw signal (energy is usually squared >> amplitude I thought?). If that is what your intending though. > > Right, this is the way I do it in general.. It was just to try using field trip functions... that is also possible (well, almost that is). Do ft_preprocessing on your data with a bandpassfilter and specify cfg.hilbert=yes. That will give you the amplitude envelope. It is not squared however, so it you want ft^2 you'll still have to do a little in matlab yourself for i=1:numel(data.trial), data.trial{i} = data.trial{i}.^2; end best Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.buiatti at gmail.com Thu Nov 10 12:31:39 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Thu, 10 Nov 2011 12:31:39 +0100 Subject: [FieldTrip] ft_neighbourplot Message-ID: Dear Fieldtrippers, I have a problem with ft_neighbourplot. Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 Neighbours in the Fieldtrip layout seem ok to me. However, when plotting them with ft_neighbourplot, the layout is clearly incorrect, it includes only about one third of the channels and when clicking on single channels, the output is incorrect (it always displays the same channel labels). I think this is a very useful command, so I would like to be able to use it! Below I have copied the corresponding commands. Am I doing anything wrong? Any help? Thanks Marco >> data data = hdr: [1x1 struct] label: {306x1 cell} time: {1x300 cell} trial: {1x300 cell} fsample: 1000 sampleinfo: [300x2 double] trialinfo: [300x1 double] grad: [1x1 struct] cfg: [1x1 struct] >> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >> neighbours = ft_prepare_neighbours(cfg, data) Trying to load sensor neighbours from a template Successfully loaded neighbour structure from /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat there are on average 6.9 neighbours per channel the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB neighbours = 1x104 struct array with fields: label neighblabel >> cfg=[];cfg.neighbours=neighbours; >> ft_neighbourplot(cfg,data) Using the gradiometer configuration from the dataset. the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191 FRANCE Ph: +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From jm.horschig at donders.ru.nl Thu Nov 10 14:48:45 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 10 Nov 2011 14:48:45 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: Message-ID: <4EBBD63D.9000000@donders.ru.nl> Dear Marco, thanks for reporting this, I will have a look to see what is going wrong there. I'll let you know when I found the cause for your problem. Best regards, Jörn On 11/10/2011 12:31 PM, Marco Buiatti wrote: > Dear Fieldtrippers, > > I have a problem with ft_neighbourplot. > > Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 > > Neighbours in the Fieldtrip layout seem ok to me. > > However, when plotting them with ft_neighbourplot, the layout is > clearly incorrect, it includes only about one third of the channels > and when clicking on single channels, the output is incorrect (it > always displays the same channel labels). > > I think this is a very useful command, so I would like to be able to use it! > > Below I have copied the corresponding commands. > > Am I doing anything wrong? Any help? > > Thanks > > Marco > >>> data > data = > > hdr: [1x1 struct] > label: {306x1 cell} > time: {1x300 cell} > trial: {1x300 cell} > fsample: 1000 > sampleinfo: [300x2 double] > trialinfo: [300x1 double] > grad: [1x1 struct] > cfg: [1x1 struct] > >>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>> neighbours = ft_prepare_neighbours(cfg, data) > Trying to load sensor neighbours from a template > Successfully loaded neighbour structure from > /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat > there are on average 6.9 neighbours per channel > the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB > > neighbours = > > 1x104 struct array with fields: > label > neighblabel > >>> cfg=[];cfg.neighbours=neighbours; >>> ft_neighbourplot(cfg,data) > Using the gradiometer configuration from the dataset. > the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB > Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 tobias.staudigl at uni-konstanz.de Thu Nov 10 15:24:48 2011 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Thu, 10 Nov 2011 15:24:48 +0100 Subject: [FieldTrip] Granger Causality In-Reply-To: References: Message-ID: <4EBBDEB0.1030308@uni-konstanz.de> Hi Olga, 1. i think it should be -log (1 - (noise_covariance*transfer_matrix / spectral_matrix)). For details, I recommend this article (if you are using the bsmart toolbox as implemented in fieldtrip): Cui et al., 2008, Neural Networks http://www.ncbi.nlm.nih.gov/pubmed/18599267 2. i get granger values from 0 to 0.3 in my iEEG data. I am also not aware of studies getting granger values much higher than 1 (although there might be some) in real data, however, simulation studies do show much higher values. hope this helps a little, best, Tobias Am 09.11.2011 16:01, schrieb Olga Felsovalyi: > Hello, > > I am following the connectivity tutorial to perform granger causality > analysis on iEEG data. Please help me understand a few things: > > 1. Please clarify exactly what the output values of the granger matrix > represent. If I understand correctly, it is the log(variance of > predicted time course/variance of actual time course). > > 2. What range of values should I be getting for granger causality for > iEEG data? I am getting values ranging from 0 to 2.5. Values I see > reported in papers seem to report peaks barley higher than 1. > > Thank you for your help! > Olga > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 10 15:37:28 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 10 Nov 2011 15:37:28 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: Message-ID: <4EBBE1A8.80700@donders.ru.nl> Hi Marco, I analyzed your problem, here's the result ;) 1) You are choosing neuromag306mag_neighb as the template for your neighbours. This template is based on the neuromag306mag two-dimensional layout, *not* on the three dimensional data that you pur it. In general, 2D layouts should only be used for neighbour selection when no 3D gradiometer information is available, because these two do not coincide, and quite honestly, I do not know what the precise relationship between these two is (it's some projection on a 2D plane). This explains why the neighbours you defined look good when you use the 2D layout, but look ugly for the 3D gradiometer data. 2) When you are using neuromag306 data, you should use neuromag306_neighb as the template. This template is based on the 3D gradiometer information of our neuromag306 test data. This way, the neighbours are defined based on 3D information, the same space that your gradiometer information is in. Note however, that not all templates are optimized, yet, and also it might be a bit confusing that there are so many templates for the neuromag system. We might reconsider this. 3) An alternative would be, if you have gradiometer information at hand, to call prepare_neighbours with cfg.method='distance' or 'triangulation'. This ensures that your neighbours chosen are based on the same space than your sensors are in. Anyway, it is good that you checked with ft_neighbourplot, otherwise you might have received crappy results - so note to all of you, always check your neighbourselection ;) 4) There was indeed a bug in ft_neighbourplot causing always the same sensor names to show up in the command window. This is resolved in the newest version now (downloadable from tomorrow on). I changed some other things as well, hope I did not break anything crucial ;) I hope this helps! Should you have any other questions, feel free to ask! Best, Jörn On 11/10/2011 12:31 PM, Marco Buiatti wrote: > Dear Fieldtrippers, > > I have a problem with ft_neighbourplot. > > Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 > > Neighbours in the Fieldtrip layout seem ok to me. > > However, when plotting them with ft_neighbourplot, the layout is > clearly incorrect, it includes only about one third of the channels > and when clicking on single channels, the output is incorrect (it > always displays the same channel labels). > > I think this is a very useful command, so I would like to be able to use it! > > Below I have copied the corresponding commands. > > Am I doing anything wrong? Any help? > > Thanks > > Marco > >>> data > data = > > hdr: [1x1 struct] > label: {306x1 cell} > time: {1x300 cell} > trial: {1x300 cell} > fsample: 1000 > sampleinfo: [300x2 double] > trialinfo: [300x1 double] > grad: [1x1 struct] > cfg: [1x1 struct] > >>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>> neighbours = ft_prepare_neighbours(cfg, data) > Trying to load sensor neighbours from a template > Successfully loaded neighbour structure from > /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat > there are on average 6.9 neighbours per channel > the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB > > neighbours = > > 1x104 struct array with fields: > label > neighblabel > >>> cfg=[];cfg.neighbours=neighbours; >>> ft_neighbourplot(cfg,data) > Using the gradiometer configuration from the dataset. > the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB > Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 r.oostenveld at donders.ru.nl Thu Nov 10 16:53:33 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 10 Nov 2011 16:53:33 +0100 Subject: [FieldTrip] positions available at the Donders Institute Message-ID: Dear FieldTrip list members, We currently have 3 positions available in the Donders Centre for Neuroscience, which is part of the Donders Institute. The closing date is January 1st 2012. 1. assistant professor of cognitive neuroscience key words: neuronal processing, chemical biology, viral delivery systems, ion channels and pumps 2. assistant professor of molecular and cellular neuroimaging key words: neuronal processing, optogenetics, gene delivery systems, "on-off switch". 3. professor of cellular neurophysiology key words: in vivo and in vivo rodent For more information, please visit: http://www.ru.nl/vacatures/details/details_afdeling_0?ond_ext=8 best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- From Gregor.Volberg at psychologie.uni-regensburg.de Fri Nov 11 18:08:50 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 11 Nov 2011 18:08:50 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EBA958E.8070300@donders.ru.nl> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> Message-ID: <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> Hi Jörn, thanks a lot for your response. I meanwhile checked some possible reasons for the different clusterings and I am coming closer. I could reproduce the described error with two different datasets (62 channel and 29 channel EEG), on two different computers and with two different versions of fieldtrip (2011 versions). First of all, I checked the neighbourhood structures. They are identical in my two analyses - same number of electrodes, same order, same neighbours. I checked that before and after entering neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are the same. I then searched through the code and found the channeighbstructmat that is constructed during the call of "clusterstat.m". I saved these matrices during the call of ft_freqstatistics and found that, with the same neighbourhood structures, the channeighbstructmat looked completely different in the old and new version. I then changed the code of the new FT "clusterstat.m" so that it reads in the channeighbstructmat obtained with the old FT version - then everything works perfect. Thus, the problem is most likely an incorrect channeighbstructmat. I figured out that in my case, FT calls an SPM8 function spm_bwlabeln during construction of the channeighbstructmat, which older version do not do. However, if I understood the code correctly, the SPM function should only be called for source data?! Could it be that, because my data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), FT assumes source data? Thanks again for your help, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" ( mailto:Gregor.Volberg at psychologie.uni-regensburg.de ) Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A ) _______________________________________________ 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From farsun at gmail.com Mon Nov 14 03:56:42 2011 From: farsun at gmail.com (Faraz Akram) Date: Mon, 14 Nov 2011 11:56:42 +0900 Subject: [FieldTrip] Need help in real time EEG Message-ID: Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr = ft_read_header('buffer://localhost:51244') it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Nov 14 09:51:55 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 14 Nov 2011 09:51:55 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> Message-ID: <4EC0D6AB.8090907@donders.ru.nl> Hi Gregor, that sounds indeed odd - although I am glad that I did not mess up something in prepare_neighbours ;) However, when I look at the code, it seems that channeighbstructmat will only be used when ~issource, and the call to the spm function will only be when issource, so I cannot see a direct relation between these two. Could you provide some more information, e.g. in what line and function you observed the call to the spm function? If you like you could also create a bugreport on http://bugzilla.fcdonders.nl/ for this. In any case, one of us will then tackle your problem as soon as possible and try to solve it. I hope that we can reproduce your bug here, else we might ask for a snippet of your data/workspace. Thanks in any case for having a precise look at what is going on! Best, Jörn On 11/11/2011 6:08 PM, Gregor Volberg wrote: > > Hi Jörn, > > > thanks a lot for your response. I meanwhile checked some possible > reasons for the different clusterings and I am coming closer. > > I could reproduce the described error with two different datasets (62 > channel and 29 channel EEG), on two different computers and with two > different versions of fieldtrip (2011 versions). First of all, I > checked the neighbourhood structures. They are identical in my two > analyses - same number of electrodes, same order, same neighbours. I > checked that before and after entering neighbours into the analyses > (by comparing the stat.cfg.neighbours) - they are the same. > > I then searched through the code and found the channeighbstructmat > that is constructed during the call of "clusterstat.m". I saved these > matrices during the call of ft_freqstatistics and found that, with the > same neighbourhood structures, the channeighbstructmat looked > completely different in the old and new version. I then changed the > code of the new FT "clusterstat.m" so that it reads in the > channeighbstructmat obtained with the old FT version - then everything > works perfect. > > > Thus, the problem is most likely an incorrect channeighbstructmat. I > figured out that in my case, FT calls an SPM8 function spm_bwlabeln > during construction of the channeighbstructmat, which older version do > not do. However, if I understood the code correctly, the SPM function > should only be called for source data?! Could it be that, because my > data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), > FT assumes source data? > > > Thanks again for your help, > > Gregor > > > > > > -- > Dr. rer. nat. Gregor Volberg > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> > Hi Gregor, > > did you check your neighbourselection? Maybe something is going wrong > there, given that a lot in this code has changed since 2010. Could you > check that using ft_neighbourplot? This would be the most logical > explanation why the results differ. It does not really make sense that > these three sensors form one cluster, because they should not be > neighbours of each other. So i would suppose that something is going > wrong there. > > Best, > Jörn > > > On 11/3/2011 4:57 PM, Michael Wibral wrote: > >> Hi Gregor, >> >> in principle the first level statistics that determine cluster >> membership (and thereby cluster shapes etc.) can also vary from one >> set of permutations to the next, esp. on the borders of a cluster >> (this is why it is typically said that the localization of a cluster >> is not as trustworthy as its existence). Other resaons for >> differences are differing number of permutations - did you set >> everything the same? >> >> This said there might well be another problem - I hope the cluster >> people can have a look into it. >> >> Best , >> Michael >> >> >> ------------------------------------------------------------------------ >> *Von:* "Gregor Volberg" >> >> *Gesendet:* Nov 2, 2011 6:34:43 PM >> *An:* fieldtrip at donders.ru.nl >> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer FT >> versions? >> >> Dear fieldtrip community, >> >> >> I just encountered an unexpected behavior of FT that I would like >> to share with the list. It is that the cluster permutation test >> formed incorrect clusters from a given set of significant >> electrodes in newer FT versions (ft-20111012; I also tried with >> ft-20111028). >> >> >> For example, when using an old ft version (ft-20100810) and >> freqstatistics I get a negative cluster with 17 contiguous >> electrodes. With the newer ft version, using the same data and >> the same cfg, three significant electrodes that are spatially >> contiguous to the other significant electrodes are not included >> in the cluster. Also, three electrodes that are spatially >> seperated and are actually part of the first cluster are grouped >> into a separate cluster. I attached a picture with the >> respective clusterplots where differences are marked with red >> arrows. >> >> I am aware that the permutation p-value for a given cluster can >> be different in two separate analyses, but the grouping of >> significant electrodes into clusters should always be the same, >> am i right? I double-checked the cfg.neighbours, after conversion >> to new 'struct' style, and they were identical in the "old ft" >> and "new ft" analysis. Also, the stat.stat field and the >> stat.cfg.clustercritval were the same for both analyses. Thus, >> the same neighbourhood relations and the same significant >> electrodes should be used for grouping. Yet I get different >> results... >> >> >> I am almost sure that this is trivial, but I could not yet >> replicate my old results with new FT and this makes me nervous. >> Has someone made a similar experience? Or do newer versions of ft >> use some further information besides cfg.neighbours for >> clustering, somewhere in the *cfg.previuous perhaps, that I am >> not aware of? Any comments are highly welcome. >> >> >> Best regards, >> >> Gregor >> >> >> cfg = []; >> >> cfg.neighbours = neighbours; >> >> cfg.minnbchan=1; >> >> cfg.avgoverfreq = 'yes'; >> >> cfg.avgovertime = 'yes'; >> >> cfg.method = 'montecarlo'; >> >> cfg.correctm = 'cluster'; >> >> cfg.statistic = 'depsamplesT'; >> >> cfg.tail = 0; >> >> cfg.alpha = 0.05; >> >> cfg.clusteralpha = 0.05; >> >> cfg.numrandomization = 1000; >> >> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >> >> cfg.uvar = 1; >> >> cfg.ivar = 2; >> >> cfg.latency = [2.24 2.53]; >> >> cfg.frequency = [17 21];% >> >> stat = ft_freqstatistics(cfg, DC, TC); >> >> >> -- >> Dr. rer. nat. Gregor Volberg >> ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >> _______________________________________________ >> >> >> >> >> 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 > > > > > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Nov 14 11:16:10 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 14 Nov 2011 11:16:10 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF@smkexch02.maartenskliniek.nl> Hi Faram I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] Sent: Monday, November 14, 2011 3:56 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Need help in real time EEG Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr = ft_read_header('buffer://localhost:51244') it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From mcoskun at mail.uh.edu Mon Nov 14 13:42:08 2011 From: mcoskun at mail.uh.edu (Mehmet-Akif Coskun) Date: Mon, 14 Nov 2011 06:42:08 -0600 Subject: [FieldTrip] Automatic artifact rejection after manual artifact rejection Message-ID: <723091d5a1f03.4ec0b840@mail.uh.edu> Dear Fieldtrippers, I would like to get some suggestions and comments on two issues. 1) Is that a good idea to do an automatic artifact rejection (using ft_artifact_zvalue) after a visual rejection+ICA? I am wondering whether any problems occur by doing so (such as removing useful data, adding noise). 2) The second issue is about visual rejection of continuous rest data. While doing a visual artifact rejection on continuous data using ft_browser and removing the artifacts, the long continuous data is automatically chopped off. For example if your data is 0-10 seconds and data between 1-2s are artifacts and you remove it, you will end up with tho segments (from 0-1s and 2-10s). Is it okay to just simply append the two portions since its resting data or will it cause a discontinuity. In case of a discontinuity, what should be done? Any suggestions will be greatly appreciated. Thanks in advance Best Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Mon Nov 14 16:19:17 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Mon, 14 Nov 2011 16:19:17 +0100 Subject: [FieldTrip] change in filter order for 'fir' type Message-ID: Dear FieldTrip users, As of tonight's FT version, the filter order for the 'fir' filter will change. It used to be set to 25 by default, but now will be a 'smarter' value based on your data and filter requests. You can still override this by setting, for example, cfg.bpfiltord=25; in order to obtain equivalent results as before if you typically used the default. By default, filtering in FT uses the Butterworth filter ('butter') instead of 'fir'; this default filter-type has not changed, and the filter-order for 'butter' has not changed either. Best, Johanna -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Mon Nov 14 17:46:26 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Mon, 14 Nov 2011 17:46:26 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EC0D6AB.8090907@donders.ru.nl> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> Message-ID: <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> Hi Jörn, yes, sure I can provide you with some more information. I hope to do so due Wednesday. Thanks a lot again for your kind support! Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> Hi Gregor, that sounds indeed odd - although I am glad that I did not mess up something in prepare_neighbours ;) However, when I look at the code, it seems that channeighbstructmat will only be used when ~issource, and the call to the spm function will only be when issource, so I cannot see a direct relation between these two. Could you provide some more information, e.g. in what line and function you observed the call to the spm function? If you like you could also create a bugreport on http://bugzilla.fcdonders.nl/ for this. In any case, one of us will then tackle your problem as soon as possible and try to solve it. I hope that we can reproduce your bug here, else we might ask for a snippet of your data/workspace. Thanks in any case for having a precise look at what is going on! Best, Jörn On 11/11/2011 6:08 PM, Gregor Volberg wrote: Hi Jörn, thanks a lot for your response. I meanwhile checked some possible reasons for the different clusterings and I am coming closer. I could reproduce the described error with two different datasets (62 channel and 29 channel EEG), on two different computers and with two different versions of fieldtrip (2011 versions). First of all, I checked the neighbourhood structures. They are identical in my two analyses - same number of electrodes, same order, same neighbours. I checked that before and after entering neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are the same. I then searched through the code and found the channeighbstructmat that is constructed during the call of "clusterstat.m". I saved these matrices during the call of ft_freqstatistics and found that, with the same neighbourhood structures, the channeighbstructmat looked completely different in the old and new version. I then changed the code of the new FT "clusterstat.m" so that it reads in the channeighbstructmat obtained with the old FT version - then everything works perfect. Thus, the problem is most likely an incorrect channeighbstructmat. I figured out that in my case, FT calls an SPM8 function spm_bwlabeln during construction of the channeighbstructmat, which older version do not do. However, if I understood the code correctly, the SPM function should only be called for source data?! Could it be that, because my data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), FT assumes source data? Thanks again for your help, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0D ) >>> "Jörn M. Horschig" ( mailto:jm.horschig at donders.ru.nl ) 11/9/2011 4:00 PM >>> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" ( mailto:Gregor.Volberg at psychologie.uni-regensburg.de ) Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A ) _______________________________________________ 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 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 listfieldtrip at donders.ru.nlhttp://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 P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nlTel: +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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dimitri.papadopoulos at cea.fr Mon Nov 14 18:07:13 2011 From: dimitri.papadopoulos at cea.fr (Dimitri Papadopoulos Orfanos) Date: Mon, 14 Nov 2011 18:07:13 +0100 Subject: [FieldTrip] fileparts() : 4th argument and Matlab R2011b Message-ID: <4EC14AC1.4010303@cea.fr> Hello, Starting with Matlab R2010a, the fourth output argument of fileparts() is no longer supported and has been removed. Calling the function with more than three output arguments has been generating a warning since that version R2010a: http://www.mathworks.fr/help/techdoc/rn/br_bpq8-1.html#bsdnyvb-1 http://www.mathworks.fr/help/techdoc/ref/fileparts.html Although this is not clearly documented and starting with Matlab R2011b, calling the function with more than three output arguments does error. I've found a single occurrences of fileparts() being called with 4 arguments in ft_qualitycheck.m: [pathstr,name,extr,versn] = fileparts(exportname); Can you please fix it? Removing the spurious 4th argument should be enough since neither the 3rd not the 4th argument are used. There are actually a few other occurrences in subdirectories external/spm2 and external/spm8 but : - SPM8 will be fixed soon: the FIL maintainer is aware of the problem, has fixed it and a patch should be released before next January, - SPM2 is not maintained by the FIL anymore but I am in the process of fixing it here: http://sourceforge.net/projects/spm2/ Regards, -- Dimitri Papadopoulos CEA/Saclay I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France From dimitri.papadopoulos at cea.fr Mon Nov 14 22:22:23 2011 From: dimitri.papadopoulos at cea.fr (Dimitri Papadopoulos Orfanos) Date: Mon, 14 Nov 2011 22:22:23 +0100 Subject: [FieldTrip] fileio/README Message-ID: <4EC1868F.8010609@cea.fr> Hi, File fileio/README reads: The following files were downloaded from http://www.koders.com base64.c base64.h I cannot find these files anywhere. Have they been removed? Has the source code been integrated elsewhere? For what it's worth I've found Matlab files that could have replaced that C code: external/gifti/@gifti/private/base64decode.m external/gifti/@gifti/private/base64encode.m Please fix the README. Regards, -- Dimitri Papadopoulos CEA/Saclay I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France From b.reuderink at donders.ru.nl Tue Nov 15 10:44:28 2011 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Tue, 15 Nov 2011 10:44:28 +0100 Subject: [FieldTrip] fileio/README In-Reply-To: <4EC1868F.8010609@cea.fr> References: <4EC1868F.8010609@cea.fr> Message-ID: Dear Dimitri Papadopoulos, I have filed bug report #1157 for your request. You can track it's progress at http://bugzilla.fcdonders.nl/show_bug.cgi?id=1157 . Best regards, Boris On Mon, Nov 14, 2011 at 10:22 PM, Dimitri Papadopoulos Orfanos wrote: > Hi, > > File fileio/README reads: > >        The following files were downloaded from http://www.koders.com >          base64.c >          base64.h > > I cannot find these files anywhere. Have they been removed? Has the source > code been integrated elsewhere? For what it's worth I've found Matlab files > that could have replaced that C code: >        external/gifti/@gifti/private/base64decode.m >        external/gifti/@gifti/private/base64encode.m > > Please fix the README. > > Regards, > -- > Dimitri Papadopoulos > CEA/Saclay > I2BM, NeuroSpin > 91191 Gif-sur-Yvette cedex, France > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From farsun at gmail.com Wed Nov 16 04:52:56 2011 From: farsun at gmail.com (Faraz Akram) Date: Wed, 16 Nov 2011 12:52:56 +0900 Subject: [FieldTrip] Need help in real time EEG Message-ID: Dear Marianne Thanks for your reply. Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. Now i dont know exactly how to read that buffer. I think there will be no difference in reading from buffer due to difference of amplifier Kindly Guide me how you access data from buffer. Thanks Regards Faraz Akram On Mon, Nov 14, 2011 at 8:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Need help in real time EEG (Severens, Marianne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Nov 2011 11:16:10 +0100 > From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Need help in real time EEG > Message-ID: > < > 70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> > > Content-Type: text/plain; charset="us-ascii" > > Hi Faram > > I have a different amplifier, so I'm not sure if it works exactly the > same, but I can try to help you. > > Did you first start the fieldtrip buffer that 'reads' the data from the > amplifier? You can look up which one you have to use for your amplifier > here: http://fieldtrip.fcdonders.nl/development/realtime > > Best, Marianne > > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Faraz Akram [farsun at gmail.com] > Sent: Monday, November 14, 2011 3:56 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Need help in real time EEG > > Hi > > I am new to FieldTrip. > > I want to acess realtime EEG data in matlab from my BrainVision recorder. > when i use > > > > hdr = ft_read_header('buffer://localhost:51244') > > it gives an error > > Trying to close socket 3956 > ??? Error using ==> buffer > ERROR: tcp connection to buffer failed. > > Error in ==> ft_read_header at 815 > orig = buffer('get_hdr', [], host, port); > > > > Kindly Guide me what will i have to do > > > > Disclaimer > Vrijgave van de informatie verzonden met dit e-mail bericht is > geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking > van deze informatie is conform het Privacy reglement van de Sint > Maartenskliniek. De informatie is uitsluitend bestemd voor de > geadresseerde. Gebruik van deze informatie door anderen dan de > geadresseerde is, zonder voorafgaande schriftelijke toestemming van de > rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de > juiste en volledige overbrenging van de inhoud van een gezonden e-mail, > noch voor de ontvangst daarvan. > > Sint Maartenskliniek > Hengstdal 3, > 6574 NA Ubbergen (bij Nijmegen) > Telefoon 024-3659 911 > Telefax 024-3659 204 > KvK nummer 41055111 > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 12, Issue 19 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vitoria.piai at gmail.com Wed Nov 16 12:21:53 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 16 Nov 2011 12:21:53 +0100 Subject: [FieldTrip] Setting up MNE Message-ID: <4EC39CD1.1000109@gmail.com> Hi, I'm following the tutorial on MNE on the Wiki. I'm now at export MNE_ROOT= cd $MNE_ROOT/bin . ./mne_setup_sh export SUBJECTS_DIR= export SUBJECT=Subject01 When creating the source space, I get the error "/Could not find the MRI data//directory ..." /I now have to the same directory as I had it for Freesurfer a few steps later: export SUBJECTS_DIR= On another Wiki page, I found the following: MNE requires to set up the same environmental variables as FS. It is because MNE will look for the MRI data that is processed by FS (therefore, it will look for directories that are made by FS). Therefore, *SUBJECTS_DIR* environmental variable should refer to that directory where the anatomical data is (pre-processed by FS), and *SUBJECT* should refer to the sub-directory of SUBJECTS_DIR where the anatomical data is from the person whose data is analyzed. /subjects/: contains the output from FS I thought I had it right but I'm a bit confused now. What does MNE need exactly? I can't really figure out where it goes wrong from the MNE tutorial either. Thanx a lot, Vitória -- ** Please consider the environment - do you really need to print? ** -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Nov 16 12:21:40 2011 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 16 Nov 2011 12:21:40 +0100 Subject: [FieldTrip] Brainvision recorder RDA Message-ID: Dear all, I'm trying to connect to Brainvision recorder using the built-in RDA system and the rda2ft-files. I've got two computers; one with recorder and the rda2ft-files, and one with the rest of fieldtrip which should connect to the fieldtrip buffer. The goal is to get the secondary computer to show the subject its performance (for example; the rms of a single channel) within the task constraints. When running rda2ft.exe (with the parameters localhost and 51244) it does seem to connect; it shows the list of channels (all channels), their resolution, and their names, and some other assorted stuff. However, it then says: "Unrecognized packet type (10000), has size 24 - exiting" What does this mean, and how can I fix it? I've tried messing with the settings of recorder, but nothing I do seems to make a difference. Sincerely, Casper van Heck -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Wed Nov 16 14:33:17 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Wed, 16 Nov 2011 08:33:17 -0500 Subject: [FieldTrip] Setting up MNE In-Reply-To: <4EC39CD1.1000109@gmail.com> References: <4EC39CD1.1000109@gmail.com> Message-ID: Hello Vitória, it's probably more relevant to ask your question about MNE on the MNE mailing list: http://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis you can also find the MNE manual and tutorials online: http://martinos.org/mne/ Best, Alex disclaimer : I am one of the MNE developers. -- Alexandre Gramfort, PhD gramfort at nmr.mgh.harvard.edu Dept. of Radiology MGH Martinos Center / Harvard Medical School http://www-sop.inria.fr/members/Alexandre.Gramfort/ 2011/11/16 Vitória Magalhães Piai : > Hi, > > I'm following the tutorial on MNE on the Wiki. I'm now at > > export MNE_ROOT= > cd $MNE_ROOT/bin > . ./mne_setup_sh > export SUBJECTS_DIR= > export SUBJECT=Subject01 > > When creating the source space, I get the error "Could not find the MRI data > directory ..." > I now have to the same directory as I had it for Freesurfer a few steps > later:   export SUBJECTS_DIR= > > On another Wiki page, I found the following: > > MNE requires to set up the same environmental variables as FS. It is because > MNE will look for the MRI data that is processed by FS (therefore, it will > look for directories that are made by FS). Therefore, SUBJECTS_DIR > environmental variable should refer to that directory where the anatomical > data is (pre-processed by FS), and SUBJECT should refer to the sub-directory > of SUBJECTS_DIR where the anatomical data is from the person whose data is > analyzed. > > /subjects/: contains the output from FS > > I thought I had it right but I'm a bit confused now. What does MNE need > exactly? I can't really figure out where it goes wrong from the MNE tutorial > either. > > Thanx a lot, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > _______________________________________________ > 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 Graham.Little at nrc-cnrc.gc.ca Wed Nov 16 14:51:37 2011 From: Graham.Little at nrc-cnrc.gc.ca (Little, Graham) Date: Wed, 16 Nov 2011 05:51:37 -0800 Subject: [FieldTrip] Fitting a Magnetic Dipole Message-ID: Hi all, I am currently trying to Fit a dipole to HPI coil locations to perform head position correction in fieldtrip. Currently I am using the ft_dipolefitting function to generate the coil locations from a section of MEG data. Before running ft_dipolefitting I do an fft on the data to measure the complex valued MEG topography for each coil frequency. The topographies look great for each coil, you can definitely see where each dipole should be fitted, however when using ft_dipolefitting the locations I get back are incorrect. I believe this is due to the fact that ft_dipolefitting assumes an Equivalent Current Dipole, but the coils generate a Magnetic Dipole. Anyway to tell ft_dipolefitting to fit a Magnetic Dipole rather than the ECD solution. Any information would be helpful. Thanks, Graham From marco.buiatti at gmail.com Wed Nov 16 16:16:10 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Wed, 16 Nov 2011 16:16:10 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: <4EBBE1A8.80700@donders.ru.nl> References: <4EBBE1A8.80700@donders.ru.nl> Message-ID: Dear Jorn, thanks a lot for your feedback. Still I'm afraid the problem is not solved yet, and this is maybe due to the fact that Neuromag data are composed by three different types of sensors (two orthogonally oriented gradiometers and one magnetometer) for each location on the scalp. Therefore, though we have 306 sensors, we have 102 sensor locations only. In our lab, when we analyse the data in the sensor space, we perform statistical analysis either on each sensor separately or on magnetometers and on the norm of the two gradiometers (discussion on alternatives would be worth another thread...). This is the reason why I choose neuromag306mag_neighb. Concerning the two neighbours templates I have found the following: 1) As you also said, neuromag306mag_neighb contains a meaningful set of neighbours for each sensor. (a simple command to display them: for i=1:102 disp([neighbours(i).label 'neighbours:' neighbours(i).neighblabel']); end;) so I would use this for cluster-based statistical analysis in Fieldtrip (for any type of sensors). Neuromag users, do you agree? However, when plotting it with ft_neighbourplot, as you said the configuration is clearly uncorrect (though now neighbours are correctly listed on the command line as you said). It would be very useful to have a correct 3D representation of this. 2) The neighbours template neuromag306_neighb has the correct 3D form but what I get from my data is a mislabeling of all the sensors. Also, neighbours are clearly wrong (many sensors do not have any neighbours). Since as far as I understand sensors locations are in data.grad, I wonder whether sensor locations in my data are originally wrong... Below I have copied the commands I use to import my neuromag data in Fieldtrip, any help on this would be welcome, of course I can send you data if needed. Thanks again for you help, Marco cfg = []; cfg.continuous = 'yes'; cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; cfg.trialfun =par.trialfun; cfg.trialdef.channel='STI101'; cfg.trialdef.eventvalue=par.eventvalue; cfg.trialdef.prestim=-par.prestim; cfg.trialdef.poststim=par.poststim; cfg.delay = par.delay; cfg.channel = {'MEG'}; cfg.baselinewindow=[par.begt par.endt]; cfg.dataset = ['test_sss.fif']; cfg_loc = ft_definetrial(cfg); data= ft_preprocessing(cfg_loc); On 10 November 2011 15:37, "Jörn M. Horschig" wrote: > Hi Marco, > > I analyzed your problem, here's the result ;) > > 1) You are choosing neuromag306mag_neighb as the template for your > neighbours. This template is based on the neuromag306mag two-dimensional > layout, *not* on the three dimensional data that you pur it. In general, 2D > layouts should only be used for neighbour selection when no 3D gradiometer > information is available, because these two do not coincide, and quite > honestly, I do not know what the precise relationship between these two is > (it's some projection on a 2D plane). This explains why the neighbours you > defined look good when you use the 2D layout, but look ugly for the 3D > gradiometer data. > > 2) When you are using neuromag306 data, you should use neuromag306_neighb as > the template. This template is based on the 3D gradiometer information of > our neuromag306 test data. This way, the neighbours are defined based on 3D > information, the same space that your gradiometer information is in. > Note however, that not all templates are optimized, yet, and also it might > be a bit confusing that there are so many templates for the neuromag system. > We might reconsider this. > > 3) An alternative would be, if you have gradiometer information at hand, to > call prepare_neighbours with cfg.method='distance' or 'triangulation'. This > ensures that your neighbours chosen are based on the same space than your > sensors are in. Anyway, it is good that you checked with ft_neighbourplot, > otherwise you might have received crappy results - so note to all of you, > always check your neighbourselection ;) > > 4) There was indeed a bug in ft_neighbourplot causing always the same sensor > names to show up in the command window. This is resolved in the newest > version now (downloadable from tomorrow on). I changed some other things as > well, hope I did not break anything crucial ;) > > I hope this helps! Should you have any other questions, feel free to ask! > > Best, > Jörn > > On 11/10/2011 12:31 PM, Marco Buiatti wrote: >> >> Dear Fieldtrippers, >> >> I have a problem with ft_neighbourplot. >> >> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version >> 7.12.0 >> >> Neighbours in the Fieldtrip layout seem ok to me. >> >> However, when plotting them with ft_neighbourplot, the layout is >> clearly incorrect, it includes only about one third of the channels >> and when clicking on single channels, the output is incorrect (it >> always displays the same channel labels). >> >> I think this is a very useful command, so I would like to be able to use >> it! >> >> Below I have copied the corresponding commands. >> >> Am I doing anything wrong? Any help? >> >> Thanks >> >> Marco >> >>>> data >> >> data = >> >> hdr: [1x1 struct] >> label: {306x1 cell} >> time: {1x300 cell} >> trial: {1x300 cell} >> fsample: 1000 >> sampleinfo: [300x2 double] >> trialinfo: [300x1 double] >> grad: [1x1 struct] >> cfg: [1x1 struct] >> >>>> cfg=[]; cfg.method='template'; >>>> cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>>> neighbours = ft_prepare_neighbours(cfg, data) >> >> Trying to load sensor neighbours from a template >> Successfully loaded neighbour structure from >> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat >> there are on average 6.9 neighbours per channel >> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB >> >> neighbours = >> >> 1x104 struct array with fields: >> label >> neighblabel >> >>>> cfg=[];cfg.neighbours=neighbours; >>>> ft_neighbourplot(cfg,data) >> >> Using the gradiometer configuration from the dataset. >> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB >> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 r.oostenveld at donders.ru.nl Wed Nov 16 16:57:38 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 16:57:38 +0100 Subject: [FieldTrip] Brainvision recorder RDA In-Reply-To: References: Message-ID: <2FB69C66-2F40-484C-AB6A-46A48E8BC1D1@donders.ru.nl> Dear Casper, The message did not sound familiar so I whad to go into the code to look it up. In fieldtrip/realtime/acquisition/brainamp/rda2ft.c there is this section switch(header.nType) { case RDA_START_MSG: handleStartPacket(ftSocket, header.nSize, buf); break; case RDA_INT_MSG: case RDA_FLOAT_MSG: handleDataPacket(ftSocket, header.nSize, buf); break; case RDA_STOP_MSG: printf("\nRemote Data Acquisition stopped\n\n"); break; default: fprintf(stderr, "Unrecognized packet type (%i), has size %i - exiting\n", header.nType, header.nSize); keepRunning = 0; break; } where the last case pertains to your message. So shat seens to happen is that rda2ft receives a packet from Recorder and subsequently has to interpret its content. The expected values are #define RDA_START_MSG 1 #define RDA_INT_MSG 2 #define RDA_STOP_MSG 3 #define RDA_FLOAT_MSG 4 but apparently your Recorder sends a different package of type "1000". I don't know why that happens. Perhaps it is a different version of the software. My first suggested solution would be to change keepRunning = 0; into keepRunning = 1; and then hope that dropping this particular packet does not cause problems later. Better would be to try to identify what the packet contains and actually deal with it, but I would not know where to get accessible documentation for this. I hope that you are able to make the change and recompile this yourself. If not, please file a request for the code enhancement at http://bugzilla.fcdonders.nl (create account, file new bug, change status in "enhancement") and one of us will look at it. best regards, Robert On 16 Nov 2011, at 12:21, Casper van Heck wrote: > Dear all, > > I'm trying to connect to Brainvision recorder using the built-in RDA system and the rda2ft-files. I've got two computers; one with recorder and the rda2ft-files, and one with the rest of fieldtrip which should connect to the fieldtrip buffer. The goal is to get the secondary computer to show the subject its performance (for example; the rms of a single channel) within the task constraints. > > When running rda2ft.exe (with the parameters localhost and 51244) it does seem to connect; it shows the list of channels (all channels), their resolution, and their names, and some other assorted stuff. However, it then says: > "Unrecognized packet type (10000), has size 24 - exiting" > > What does this mean, and how can I fix it? I've tried messing with the settings of recorder, but nothing I do seems to make a difference. > > Sincerely, > > Casper van Heck > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Wed Nov 16 17:06:54 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 17:06:54 +0100 Subject: [FieldTrip] Fitting a Magnetic Dipole In-Reply-To: References: Message-ID: <0FD87660-0CCE-4C90-B501-78C4C748F51B@donders.ru.nl> Hi Graham If you specify cfg.vol = []; cfg.vol.type = 'infinite'; and pass a gradiometer structure(*) along to ft_dipolefitting (or ft_sourceanalysis, ft_prepare_leadfield or similar function), it will be interpreted as a magnetic dipole in an infinite vacuum. So this allows you to localize the magnetic HPI coil. Fitting the complex-valued topography after ft_freqanalysis is in principle also supported in the ft_dipolefitting function, but I should admit that that has not been used a lot (and certainly not recently). The dipole fit implementation of the Fourier data has been more or less hacked into the code and is therefore also not documented (but you can look in the code to see how it works). In case it fails on the frequency data, you are probably better off to work your way around it and convert the topography into a datastructure that resembles the output of ft_timelockanalysis before feeding it into ft_dipolefitting. best regards, Robert PS *) Note that with the same vol structure and an eeg electrode structure it would have been interpreted as an electric current dipole in an infinite homogenous conduction medium On 16 Nov 2011, at 14:51, Little, Graham wrote: > Hi all, > > I am currently trying to Fit a dipole to HPI coil locations to perform head position correction in fieldtrip. Currently I am using the ft_dipolefitting function to generate the coil locations from a section of MEG data. Before running ft_dipolefitting I do an fft on the data to measure the complex valued MEG topography for each coil frequency. The topographies look great for each coil, you can definitely see where each dipole should be fitted, however when using ft_dipolefitting the locations I get back are incorrect. > > I believe this is due to the fact that ft_dipolefitting assumes an Equivalent Current Dipole, but the coils generate a Magnetic Dipole. Anyway to tell ft_dipolefitting to fit a Magnetic Dipole rather than the ECD solution. > > Any information would be helpful. > Thanks, > Graham > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Wed Nov 16 17:29:59 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 17:29:59 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <43639A6D-3655-4ED7-AC3F-D9FB5664A1A2@donders.ru.nl> Dear Faraz, For a brainamp I would recommend the rda2ft.exe application instead of the matlab-based ft_realtime_brainampproxy implementation. This page has more details: http://fieldtrip.fcdonders.nl/development/realtime/rda Furthermore, I suggest you work your way through the specific getting started section at http://fieldtrip.fcdonders.nl/getting_started/realtime, starting from a simulated data stream and simlply visualizing the data, before you move on to realtime EEG and more serious analyses. best regards, Robert On 16 Nov 2011, at 4:52, Faraz Akram wrote: > Dear Marianne > > Thanks for your reply. > > Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. > Now i dont know exactly how to read that buffer. > > I think there will be no difference in reading from buffer due to difference of amplifier > Kindly Guide me how you access data from buffer. > > Thanks > > Regards > Faraz Akram > > > On Mon, Nov 14, 2011 at 8:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Need help in real time EEG (Severens, Marianne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Nov 2011 11:16:10 +0100 > From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Need help in real time EEG > Message-ID: > <70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> > > Content-Type: text/plain; charset="us-ascii" > > Hi Faram > > I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. > > Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime > > Best, Marianne > > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] > Sent: Monday, November 14, 2011 3:56 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Need help in real time EEG > > Hi > > I am new to FieldTrip. > > I want to acess realtime EEG data in matlab from my BrainVision recorder. > when i use > > > > hdr = ft_read_header('buffer://localhost:51244') > > it gives an error > > Trying to close socket 3956 > ??? Error using ==> buffer > ERROR: tcp connection to buffer failed. > > Error in ==> ft_read_header at 815 > orig = buffer('get_hdr', [], host, port); > > > > Kindly Guide me what will i have to do > > > > Disclaimer > Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. > > Sint Maartenskliniek > Hengstdal 3, > 6574 NA Ubbergen (bij Nijmegen) > Telefoon 024-3659 911 > Telefax 024-3659 204 > KvK nummer 41055111 > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 12, Issue 19 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m.severens at maartenskliniek.nl Wed Nov 16 18:08:47 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Wed, 16 Nov 2011 18:08:47 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <1507126827.1398584.1321463329928.JavaMail.rim@b27.c19.bise7.blackberry> Hi Faraz I think you should use a different port in the ft_read_header function: hdr � �= ft_read_header('buffer://localhost:1972') 51244 is the port where the brainvision server sends the data to. Then the fieldtrip buffer reads it from this port and send is to port 1972. At least if you use the default settings. If this still doesn't work, check if your firewall is blocking one of these ports. Hope this helps! Best Marianne Verzonden vanaf mijn BlackBerry�-toestel ________________________________ From: Faraz Akram Sender: "fieldtrip-bounces at donders.ru.nl" Date: Wed, 16 Nov 2011 04:52:56 +0100 To: fieldtrip at donders.ru.nl ReplyTo: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Need help in real time EEG Dear�Marianne Thanks for your reply. Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. Now i dont know exactly how to read that buffer. I think there will be no difference in reading from buffer due to difference of amplifier Kindly Guide me how you access data from buffer. Thanks Regards Faraz Akram On Mon, Nov 14, 2011 at 8:00 PM, > wrote: Send fieldtrip mailing list submissions to � � � �fieldtrip at donders.ru.nl To subscribe or unsubscribe via the World Wide Web, visit � � � �http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to � � � �fieldtrip-request at donders.ru.nl You can reach the person managing the list at � � � �fieldtrip-owner at donders.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: � 1. Re: Need help in real time EEG (Severens, Marianne) ---------------------------------------------------------------------- Message: 1 Date: Mon, 14 Nov 2011 11:16:10 +0100 From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project � � � �> Subject: Re: [FieldTrip] Need help in real time EEG Message-ID: � � � �<70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> Content-Type: text/plain; charset="us-ascii" Hi Faram I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] Sent: Monday, November 14, 2011 3:56 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Need help in real time EEG Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr � �= ft_read_header('buffer://localhost:51244') �it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 � � �orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 12, Issue 19 ***************************************** ________________________________ Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.a.beulen at rug.nl Thu Nov 17 12:14:00 2011 From: m.a.beulen at rug.nl (Marijke Beulen) Date: Thu, 17 Nov 2011 12:14:00 +0100 Subject: [FieldTrip] error in ft_prepare_layout Message-ID: Dear FieldTrip users, I have just started using FieldTrip (the latest version), but I have run into what looks like a bug. I basically just followed the artifact removal steps from the FieldTrip for dummies document. After doing the ICA on some EEG data, I tried to look at the resulting ic_data with ft_databrowser(cfg,ic_data), but then I get the following error: ??? Undefined function or variable 'ftFuncTimer'. Error in ==> ft_postamble_callinfo at 17 cfg.callinfo.proctime = toc(ftFuncTimer); Error in ==> ft_postamble at 27 evalin('caller', ['ft_postamble_' cmd]); Error in ==> ft_prepare_layout>sens2lay at 783 ft_postamble callinfo Error in ==> ft_prepare_layout at 252 lay = sens2lay(cfg.elec, cfg.rotate, cfg.projection, cfg.style); Error in ==> ft_databrowser at 162 cfg.layout = ft_prepare_layout(tmpcfg); If I understand correctly, ft_postamble is called at the end of the function sens2lay within ft_prepare_layout and it tries to calculate the amount of time and memory used, but it has no start measurement to compare with because these variables don't exist. The only time when ft_preamble is called seems to be at the beginning of ft_prepare_layout, and the output of this is not passed on to the other functions it calls. When someone else tried to do the same thing with an older version of FieldTrip, it worked normally. Is this a bug in the newer version, or am I doing something wrong? Thanks in advance for your help, Marijke Beulen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpnv2006 at gmail.com Thu Nov 17 13:39:19 2011 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 17 Nov 2011 13:39:19 +0100 Subject: [FieldTrip] Align EEG electrode problem Message-ID: Hello I am having problems using the 'Interactive method' of the ft_electroderealign function. After I align the electrodes, I closed the figure to get the new position, but I got this error. --------------------------------------------------------------------------- ??? Reference to non-existent field 'pnt'. Error in ==> ft_electroderealign at 489 norm.chanpos = warp_apply(norm.m, orig.pnt); --------------------------------------------------------------------------- I tracked the error and I found that in the general setup of the function ft_electroderealign, the line: ft_preamble trackconfig Is changing the name of the cfg.elec.pnt variable for: cfg.elec.elecpos I think that is the origin or the error, because I am losing the pnt field. Any suggestions? Regards, Juan Pablo Neira Vesga Christian Albrecht Universität zu Kiel From jm.horschig at donders.ru.nl Thu Nov 17 14:45:42 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Nov 2011 14:45:42 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: <4EBBE1A8.80700@donders.ru.nl> Message-ID: <4EC51006.9070504@donders.ru.nl> Dear Marco, unfortunately, we are not using neuromag data in our centre, thus I cannot really recommend anything. However, the neuromag306_neighb template should contain correct neighbours, if the test data that we have here is correct. But, as I said, we cannot test this here. The easiest way to proceed for you would be to use cfg.method='triangulation' or cfg.method='distance' for now. If the plot from ft_neighbourplot looks incorrect, then also all clusters on sensor-level will suffer from this and be wrong. It should definitely look alright with one of the other methods. For reasons of consistency, would you be willing to share your data.grad with me , so that I can check what (if) needs to be changed in the neighbour-template? E.g. if you just sent me a snippet of you data with one trial in it, I could check this. Furthermore, I cannot comment on how you import the data to FieldTrip - it looks alright to me, but I never did this myself ;) Best, Jörn On 11/16/2011 4:16 PM, Marco Buiatti wrote: > Dear Jorn, > > thanks a lot for your feedback. Still I'm afraid the problem is not > solved yet, and this is maybe due to the fact that Neuromag data are > composed by three different types of sensors (two orthogonally > oriented gradiometers and one magnetometer) for each location on the > scalp. > Therefore, though we have 306 sensors, we have 102 sensor locations only. > > In our lab, when we analyse the data in the sensor space, we perform > statistical analysis either on each sensor separately or on > magnetometers and on the norm of the two gradiometers (discussion on > alternatives would be worth another thread...). > > This is the reason why I choose neuromag306mag_neighb. > > Concerning the two neighbours templates I have found the following: > 1) As you also said, neuromag306mag_neighb contains a meaningful set > of neighbours for each sensor. > (a simple command to display them: > for i=1:102 disp([neighbours(i).label 'neighbours:' > neighbours(i).neighblabel']); end;) > so I would use this for cluster-based statistical analysis in > Fieldtrip (for any type of sensors). > Neuromag users, do you agree? > > However, when plotting it with ft_neighbourplot, as you said the > configuration is clearly uncorrect (though now neighbours are > correctly listed on the command line as you said). It would be very > useful to have a correct 3D representation of this. > > 2) The neighbours template neuromag306_neighb has the correct 3D form > but what I get from my data is a mislabeling of all the sensors. Also, > neighbours are clearly wrong (many sensors do not have any > neighbours). Since as far as I understand sensors locations are in > data.grad, I wonder whether sensor locations in my data are originally > wrong... Below I have copied the commands I use to import my neuromag > data in Fieldtrip, any help on this would be welcome, of course I can > send you data if needed. > > Thanks again for you help, > > Marco > > cfg = []; > cfg.continuous = 'yes'; > cfg.headerformat = 'neuromag_mne'; > cfg.dataformat = 'neuromag_mne'; > cfg.trialfun =par.trialfun; > cfg.trialdef.channel='STI101'; > cfg.trialdef.eventvalue=par.eventvalue; > cfg.trialdef.prestim=-par.prestim; > cfg.trialdef.poststim=par.poststim; > cfg.delay = par.delay; > cfg.channel = {'MEG'}; > cfg.baselinewindow=[par.begt par.endt]; > cfg.dataset = ['test_sss.fif']; > cfg_loc = ft_definetrial(cfg); > data= ft_preprocessing(cfg_loc); > > On 10 November 2011 15:37, "Jörn M. Horschig" wrote: >> Hi Marco, >> >> I analyzed your problem, here's the result ;) >> >> 1) You are choosing neuromag306mag_neighb as the template for your >> neighbours. This template is based on the neuromag306mag two-dimensional >> layout, *not* on the three dimensional data that you pur it. In general, 2D >> layouts should only be used for neighbour selection when no 3D gradiometer >> information is available, because these two do not coincide, and quite >> honestly, I do not know what the precise relationship between these two is >> (it's some projection on a 2D plane). This explains why the neighbours you >> defined look good when you use the 2D layout, but look ugly for the 3D >> gradiometer data. >> >> 2) When you are using neuromag306 data, you should use neuromag306_neighb as >> the template. This template is based on the 3D gradiometer information of >> our neuromag306 test data. This way, the neighbours are defined based on 3D >> information, the same space that your gradiometer information is in. >> Note however, that not all templates are optimized, yet, and also it might >> be a bit confusing that there are so many templates for the neuromag system. >> We might reconsider this. >> >> 3) An alternative would be, if you have gradiometer information at hand, to >> call prepare_neighbours with cfg.method='distance' or 'triangulation'. This >> ensures that your neighbours chosen are based on the same space than your >> sensors are in. Anyway, it is good that you checked with ft_neighbourplot, >> otherwise you might have received crappy results - so note to all of you, >> always check your neighbourselection ;) >> >> 4) There was indeed a bug in ft_neighbourplot causing always the same sensor >> names to show up in the command window. This is resolved in the newest >> version now (downloadable from tomorrow on). I changed some other things as >> well, hope I did not break anything crucial ;) >> >> I hope this helps! Should you have any other questions, feel free to ask! >> >> Best, >> Jörn >> >> On 11/10/2011 12:31 PM, Marco Buiatti wrote: >>> Dear Fieldtrippers, >>> >>> I have a problem with ft_neighbourplot. >>> >>> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version >>> 7.12.0 >>> >>> Neighbours in the Fieldtrip layout seem ok to me. >>> >>> However, when plotting them with ft_neighbourplot, the layout is >>> clearly incorrect, it includes only about one third of the channels >>> and when clicking on single channels, the output is incorrect (it >>> always displays the same channel labels). >>> >>> I think this is a very useful command, so I would like to be able to use >>> it! >>> >>> Below I have copied the corresponding commands. >>> >>> Am I doing anything wrong? Any help? >>> >>> Thanks >>> >>> Marco >>> >>>>> data >>> data = >>> >>> hdr: [1x1 struct] >>> label: {306x1 cell} >>> time: {1x300 cell} >>> trial: {1x300 cell} >>> fsample: 1000 >>> sampleinfo: [300x2 double] >>> trialinfo: [300x1 double] >>> grad: [1x1 struct] >>> cfg: [1x1 struct] >>> >>>>> cfg=[]; cfg.method='template'; >>>>> cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>>>> neighbours = ft_prepare_neighbours(cfg, data) >>> Trying to load sensor neighbours from a template >>> Successfully loaded neighbour structure from >>> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat >>> there are on average 6.9 neighbours per channel >>> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB >>> >>> neighbours = >>> >>> 1x104 struct array with fields: >>> label >>> neighblabel >>> >>>>> cfg=[];cfg.neighbours=neighbours; >>>>> ft_neighbourplot(cfg,data) >>> Using the gradiometer configuration from the dataset. >>> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB >>> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> 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 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 Nov 17 14:59:42 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Nov 2011 14:59:42 +0100 Subject: [FieldTrip] Align EEG electrode problem In-Reply-To: References: Message-ID: <4EC5134E.5060404@donders.ru.nl> Hey Juan, We rearranged the structure that contains sensor positions, thereby changed the names of some fields. Indeed, what you describe is causing the error, but the real error is that ft_electroderealign has not been changed accordingly. I created a bug out of your report. Thanks for letting us know. http://bugzilla.fcdonders.nl/show_bug.cgi?id=1165 I think a fix would be to change orig.pnt to orig.chanpos, then everything should work fine. Could you check whether this works and let me know? Best, Jörn If it still does not work, please let me/us know On 11/17/2011 1:39 PM, Juan Pablo Neira wrote: > Hello > > I am having problems using the 'Interactive method' of the > ft_electroderealign function. After I align the electrodes, I closed > the figure to get the new position, but I got this error. > --------------------------------------------------------------------------- > ??? Reference to non-existent field 'pnt'. > > Error in ==> ft_electroderealign at 489 > norm.chanpos = warp_apply(norm.m, orig.pnt); > --------------------------------------------------------------------------- > I tracked the error and I found that in the general setup of the > function ft_electroderealign, the line: > > ft_preamble trackconfig > > Is changing the name of the cfg.elec.pnt variable for: > > cfg.elec.elecpos > > I think that is the origin or the error, because I am losing the pnt > field. Any suggestions? > > Regards, > > Juan Pablo Neira Vesga > Christian Albrecht Universität zu Kiel > > _______________________________________________ > 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 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 jpnv2006 at gmail.com Thu Nov 17 15:16:49 2011 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 17 Nov 2011 15:16:49 +0100 Subject: [FieldTrip] Align EEG electrode problem In-Reply-To: <4EC5134E.5060404@donders.ru.nl> References: <4EC5134E.5060404@donders.ru.nl> Message-ID: Hi Jörn, I did what you said and the script is working. Thank you very much. Juan Pablo Neira Vesga Christian Albrecht Universität zu Kiel 2011/11/17 "Jörn M. Horschig" : > Hey Juan, > > We rearranged the structure that contains sensor positions, thereby changed > the names of some fields. Indeed, what you describe is causing the error, > but the real error is that ft_electroderealign has not been changed > accordingly. I created a bug out of your report. Thanks for letting us know. > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1165 > I think a fix would be to change orig.pnt to orig.chanpos, then everything > should work fine. Could you check whether this works and let me know? > > Best, > Jörn > > > > If it still does not work, please let me/us know > > > On 11/17/2011 1:39 PM, Juan Pablo Neira wrote: >> >> Hello >> >> I am having problems using the 'Interactive method' of the >> ft_electroderealign function.  After I align the electrodes, I closed >> the figure to get the new position, but I got this error. >> >> --------------------------------------------------------------------------- >> ??? Reference to non-existent field 'pnt'. >> >> Error in ==>  ft_electroderealign at 489 >>     norm.chanpos   = warp_apply(norm.m, orig.pnt); >> >> --------------------------------------------------------------------------- >> I tracked the error and I found that in the general setup of the >> function ft_electroderealign, the line: >> >> ft_preamble trackconfig >> >> Is changing the name of the cfg.elec.pnt variable for: >> >> cfg.elec.elecpos >> >> I think that is the origin or the error, because I am losing the pnt >> field.  Any suggestions? >> >> Regards, >> >> Juan Pablo Neira Vesga >> Christian Albrecht Universität zu Kiel >> >> _______________________________________________ >> 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 > > 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 mark.noordenbos at gmail.com Fri Nov 18 13:34:49 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Fri, 18 Nov 2011 13:34:49 +0100 Subject: [FieldTrip] Mixed design permutation test Message-ID: Hi All, I was wondering if it possible to do a mixed-design permutation test with monte-carlo correction in Fieldtrip. I want to test the results of an experiment with 2 groups x 3 conditions. Besides testing differences in conditions I'm also interested in group differences and possible interactions. Any suggestions? Best, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Nov 18 15:57:35 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 18 Nov 2011 15:57:35 +0100 Subject: [FieldTrip] error in ft_prepare_layout In-Reply-To: References: Message-ID: Dear Marijke That is indeed a bug due to my fault. Please move the lines % do the general cleanup and bookkeeping at the end of the function ft_postamble callinfo from around line 783 to around line 691, i.e. before the subfunction. I have fixed it in the official code, the next release version will be correct. Robert On 17 Nov 2011, at 12:14, Marijke Beulen wrote: > Dear FieldTrip users, > > I have just started using FieldTrip (the latest version), but I have run into what looks like a bug. I basically just followed the artifact removal steps from the FieldTrip for dummies document. After doing the ICA on some EEG data, I tried to look at the resulting ic_data with ft_databrowser(cfg,ic_data), but then I get the following error: > ??? Undefined function or variable 'ftFuncTimer'. > > Error in ==> ft_postamble_callinfo at 17 > > cfg.callinfo.proctime = toc(ftFuncTimer); > > > > Error in ==> ft_postamble at 27 > > evalin('caller', ['ft_postamble_' cmd]); > > > > Error in ==> ft_prepare_layout>sens2lay at 783 > > ft_postamble callinfo > > > > Error in ==> ft_prepare_layout at 252 > > lay = sens2lay(cfg.elec, cfg.rotate, cfg.projection, cfg.style); > > > > Error in ==> ft_databrowser at 162 > > cfg.layout = ft_prepare_layout(tmpcfg); > > > If I understand correctly, ft_postamble is called at the end of the function sens2lay within ft_prepare_layout and it tries to calculate the amount of time and memory used, but it has no start measurement to compare with because these variables don't exist. The only time when ft_preamble is called seems to be at the beginning of ft_prepare_layout, and the output of this is not passed on to the other functions it calls. > > When someone else tried to do the same thing with an older version of FieldTrip, it worked normally. Is this a bug in the newer version, or am I doing something wrong? > > Thanks in advance for your help, > > Marijke Beulen > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From abdullah.khalid80 at yahoo.com Mon Nov 21 02:47:38 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 17:47:38 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip Message-ID: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdullah.khalid80 at yahoo.com Mon Nov 21 04:26:33 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 19:26:33 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> Message-ID: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ 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 abdullah.khalid80 at yahoo.com Mon Nov 21 04:26:33 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 19:26:33 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> Message-ID: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ 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 b.reuderink at donders.ru.nl Mon Nov 21 09:33:00 2011 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Mon, 21 Nov 2011 09:33:00 +0100 Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: Dear Abduallah Khalid, I created a bug report for your request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1172 , and created an account for you on bugzilla. Could you provide some additional details I requested on the page of the bug? Best regards, Boris Reuderink On Mon, Nov 21, 2011 at 4:26 AM, Abdullah Khalid wrote: > If anyone can help me please in reading events from Brain vision recorder. > ... > Khalid > > ________________________________ > From: Abdullah Khalid > To: "fieldtrip at donders.ru.nl" > Sent: Monday, November 21, 2011 10:47 AM > Subject: [FieldTrip] real-time events in fieldtrip > > hi everyone > I am using Fieldtrip for realtime P300 classification. > i am facing one problem that i am unable to read Events (stimulus markers > from Vision recorder) > my flashing program is in Visual c, that communicates with vision recorder > and markers are displayed correctly in VisionRec. > while reading from buffer i get data correctly but it doesn't gives me > events. > the command > event = read_event(cfg.dataset, 'minsample', prevSample+1); > gives me an empty vector. > I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. > with default setting i.e > cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' > cfg.target.eventfile     = 'buffer://localhost:1972' > > > after that if i use ft_realtime_signalviewer it displays data correctly but > it shows no event. > > > > _______________________________________________ > 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 litvak.vladimir at gmail.com Mon Nov 21 12:12:13 2011 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 21 Nov 2011 11:12:13 +0000 Subject: [FieldTrip] Fwd: SPM course videos online References: Message-ID: <506639039012409632@unknownmsgid> Dear colleagues, You might be interested in the announcement below. We are planning to also film a complete SPM for M/EEG course and make it available next year. Best, Vladimir Litvak Lecturer The Wellcome Trust Centre for Neuroimaging UCL Institute of Neurology Begin forwarded message: *From:* DRC SPM *Date:* 21 November 2011 10:55:01 GMT *To:* SPM at JISCMAIL.AC.UK *Subject:* *[SPM] SPM course videos online* *Reply-To:* DRC SPM Dear all, We are pleased to announce that recordings from the May 2011 SPM Course for fMRI, PET and VBM, at the Wellcome Trust Centre for Neuroimaging, are now freely available online: http://www.fil.ion.ucl.ac.uk/spm/course/video/ There are also two recorded practical demonstrations from the 2009 MEG and EEG course on the same page. Higher quality versions of the videos can be obtained on a DVD available for purchase: http://www.fil.ion.ucl.ac.uk/spm/course/video/dvd.html If you encounter any problems viewing the movies, or have any comments or suggestions for future courses, please get in touch with one of those CCed directly. Best wishes, Ged (Organiser of the SPM course for fMRI/PET/VBM in May) Guillaume (Organiser of the SPM Course in October, SPM software manager and webmaster) Vladimir (Organiser of the SPM course for MEG and EEG) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Graham.Little at nrc-cnrc.gc.ca Mon Nov 21 14:31:50 2011 From: Graham.Little at nrc-cnrc.gc.ca (Little, Graham) Date: Mon, 21 Nov 2011 05:31:50 -0800 Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com>, <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: Hi Khalid, I was having similar issues with reading events in realtime from my MEG data. To by pass this issue we wrote a short piece of code in Matlab to manually grab the event latencies from the Data using the Hdr. alleventdata = ft_read_data(cfg.datafile, 'header', hdr, 'chanindx', stimindex, 'checkboundary', false); allevent_delta = alleventdata - [0 alleventdata(1:end-1)]; allOnsets = find(allevent_delta==cfg.stimval); totEvents = length(allOnsets); fprintf(1,'Found %i events with value %i on %s in total\n',totEvents, cfg.stimval, cfg.stimchan); Where -stimindex is the row of the data which contains the stimulus channel -cfg.stimval is the value of the stimulus -cfg.stimchan is the name of the stimulus channel Hopefully that can work as a temporary solution for you. Not sure of the differences between Brain vision data format and MEG data but I'm assuming it should work the same. Cheers, Graham ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Abdullah Khalid [abdullah.khalid80 at yahoo.com] Sent: Sunday, November 20, 2011 11:26 PM To: fieldtrip at donders.ru.nl; Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] real-time events in fieldtrip If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile = 'buffer://localhost:1972' cfg.target.eventfile = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Mon Nov 21 16:43:07 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 21 Nov 2011 09:43:07 -0600 Subject: [FieldTrip] Mixed design permutation test Message-ID: Hi Mark, I just found the following message about this topic from a few years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2008-March/001500.html That procedure sounds complicated; I too would be very interested in hearing if anyone knows a way to do this using existing cfg.statistic choices (i.e., without implementing my own statfun). There was a more recent post here ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004244.html) saying (if I understand correctly) that permutation tests cannot be used to test interactions in a between-subjects design, but I'm not sure if this is also applicable to your design. Best, Steve Politzer-Ahles > Message: 1 > Date: Fri, 18 Nov 2011 13:34:49 +0100 > From: Mark Noordenbos > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Mixed design permutation test > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi All, > > I was wondering if it possible to do a mixed-design permutation test with > monte-carlo correction in Fieldtrip. > I want to test the results of an experiment with 2 groups x 3 conditions. > Besides testing differences in conditions I'm also interested in group > differences and possible interactions. > > Any suggestions? > > Best, > Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.wang at ucl.ac.uk Mon Nov 21 17:54:49 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Mon, 21 Nov 2011 16:54:49 -0000 Subject: [FieldTrip] Plotting freq/chan/time data and ft_freqstatistics RAM issues Message-ID: <001801cca86e$482895b0$d879c110$@ucl.ac.uk> Hi all, I'm trying to plot some data that I've just finished the analysis for, and was wondering if anyone had any advice on how it should be done. I've just done a frequency analysis (with a freq range of 5-80Hz) and a permutation based stats test on a set of EEG data, and it has come out with several significant clusters, but I'm not sure how to represent this visually. I tried using ft_clusterplot function, but it doesn't seem to like multiple frequencies. Is there a way of making it plot only one frequency? I was also wondering if it was possible to display the data in form of a short movie clip, showing something like a cube, with the x,y plane of the cube being a spatial representation/scalp map of the EEG data, and with the z plane representing the frequency range (in my case, 5-80Hz), and having the entire cube change with time. This might be useful to help visualise the significant clusters, especially if the clusters could be plotted individually. Is this something that's possible at all, or is there a better way of displaying the data? Another problem that I keep on running into is when running the permutation based stats tests, I keep on getting out of memory errors. Currently I'm running Windows 7 64bit with Matlab 2011 64bit and have 4GB of physical RAM, but I've also assigned an additional 16GB of virtual RAM to help it along. This is what Matlab reports: Maximum possible array: 17666 MB (1.852e+010 bytes) * Memory available for all arrays: 17666 MB (1.852e+010 bytes) * Memory used by MATLAB: 509 MB (5.335e+008 bytes) Physical Memory (RAM): 4094 MB (4.293e+009 bytes) * Limited by System Memory (physical + swap file) available. But even with 20GB of RAM assigned, I find that I can only do around 1000 permutations on my data set of 16 subjects, each with around 700 trials, 2 conditions, 75 frequencies, 260 time slices. Is there a way of increasing the limit on the number of permutations that I can run (without increasing the assigned amount of virtual RAM)? Or would it be better to just run a loop and calculate the stats at each frequency individually? Any help would be greatly appreciated. Regards, Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdullah.khalid80 at yahoo.com Mon Nov 21 19:06:12 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Mon, 21 Nov 2011 10:06:12 -0800 (PST) Subject: [FieldTrip] (no subject) Message-ID: <1321898772.35517.yint-ygo-j2me@web121604.mail.ne1.yahoo.com> http://vg-pharmacie.com/modules/mod_wdbanners/fb.php?html143 From tobias.staudigl at uni-konstanz.de Wed Nov 23 19:08:47 2011 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Wed, 23 Nov 2011 19:08:47 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> Message-ID: <4ECD36AF.6000806@uni-konstanz.de> Hi Gregor and Jörn, I find a simliar problem in my data (bti148). 2 sets of channels that share no connections across the sets are included in one cluster. I am not sure, whether spm_bwlabel is the actual problem. However, I do not really understand why calling that function would be necessary. FT calls the function spm_bwlabel during findcluster.m, line 95. (findcluster.m is called by clusterstat.m). As far as I understand, spm_bwlabel is similar to bwlabel.m which searches for connected bins in a matrix. The input to spm_label is the vector 'onoff' (in may case :148x1 logical), which already contains information about neighboring channels. Searching for connected bins in this vector does seem odd to me. However, I supsect something else to be the reason for the wrong clustering, at least in my data. In line 166, ft_freqstatistics.m changes the order of the channel labels: chan = intersect(chan, varargin{i}.label); Original order: {'A68'; 'A58'; 'A148';...} Re-arranged in 'chan': {'A1';'A10';'A100'; 'A101'; 'A102';...} in line 193, ft_freqstatistics calls: cfg.channel = ft_channelselection(cfg.channel, chan); now cfg.channel contains the re-aranged order. On the basis of cfg.channel, the 'channeighbstructmat' is computed by makechanneighbstructmat(cfg) in clusterstat.m. The statistics on the data is computed without re-arranging the channels in statfun_depsamplesT.m ('statobs'). In findcluster.m, line 84 (called during clusterstat.m, l. 197), the matrices 'onoff' and 'selectmat' are multiplied. To my understanding, 'onoff' is based on the statistics that is computed with the originial channel order. 'selectmat' is based on the re-arranged order. If true, the multiplication of these matrices is wrong. Hope this helps, although I might have missed something obvious and might be totally wrong then. best, tobias Am 14.11.2011 17:46, schrieb Gregor Volberg: > Hi Jörn, > yes, sure I can provide you with some more information. I hope to do > so due Wednesday. > Thanks a lot again for your kind support! > Gregor > -- > Dr. rer. nat. Gregor Volberg > > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> > Hi Gregor, > > that sounds indeed odd - although I am glad that I did not mess up > something in prepare_neighbours ;) > However, when I look at the code, it seems that channeighbstructmat > will only be used when ~issource, and the call to the spm function > will only be when issource, so I cannot see a direct relation between > these two. Could you provide some more information, e.g. in what line > and function you observed the call to the spm function? If you like > you could also create a bugreport on http://bugzilla.fcdonders.nl/ for > this. In any case, one of us will then tackle your problem as soon as > possible and try to solve it. I hope that we can reproduce your bug > here, else we might ask for a snippet of your data/workspace. > > Thanks in any case for having a precise look at what is going on! > > Best, > Jörn > > On 11/11/2011 6:08 PM, Gregor Volberg wrote: >> >> Hi Jörn, >> >> >> thanks a lot for your response. I meanwhile checked some possible >> reasons for the different clusterings and I am coming closer. >> >> I could reproduce the described error with two different datasets (62 >> channel and 29 channel EEG), on two different computers and with two >> different versions of fieldtrip (2011 versions). First of all, I >> checked the neighbourhood structures. They are identical in my two >> analyses - same number of electrodes, same order, same neighbours. I >> checked that before and after entering neighbours into the analyses >> (by comparing the stat.cfg.neighbours) - they are the same. >> >> I then searched through the code and found the channeighbstructmat >> that is constructed during the call of "clusterstat.m". I saved these >> matrices during the call of ft_freqstatistics and found that, with >> the same neighbourhood structures, the channeighbstructmat looked >> completely different in the old and new version. I then changed the >> code of the new FT "clusterstat.m" so that it reads in the >> channeighbstructmat obtained with the old FT version - then >> everything works perfect. >> >> >> Thus, the problem is most likely an incorrect channeighbstructmat. I >> figured out that in my case, FT calls an SPM8 function spm_bwlabeln >> during construction of the channeighbstructmat, which older version >> do not do. However, if I understood the code correctly, the SPM >> function should only be called for source data?! Could it be that, >> because my data is a 4D grand-average structure ( dimord: >> 'subj_chan_freq_time'), FT assumes source data? >> >> >> Thanks again for your help, >> >> Gregor >> >> >> >> >> >> -- >> Dr. rer. nat. Gregor Volberg >> ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> >> Hi Gregor, >> >> did you check your neighbourselection? Maybe something is going wrong >> there, given that a lot in this code has changed since 2010. Could >> you check that using ft_neighbourplot? This would be the most logical >> explanation why the results differ. It does not really make sense >> that these three sensors form one cluster, because they should not be >> neighbours of each other. So i would suppose that something is going >> wrong there. >> >> Best, >> Jörn >> >> >> On 11/3/2011 4:57 PM, Michael Wibral wrote: >> >>> Hi Gregor, >>> >>> in principle the first level statistics that determine cluster >>> membership (and thereby cluster shapes etc.) can also vary from one >>> set of permutations to the next, esp. on the borders of a cluster >>> (this is why it is typically said that the localization of a cluster >>> is not as trustworthy as its existence). Other resaons for >>> differences are differing number of permutations - did you set >>> everything the same? >>> >>> This said there might well be another problem - I hope the cluster >>> people can have a look into it. >>> >>> Best , >>> Michael >>> >>> >>> ------------------------------------------------------------------------ >>> *Von:* "Gregor Volberg" >>> >>> *Gesendet:* Nov 2, 2011 6:34:43 PM >>> *An:* fieldtrip at donders.ru.nl >>> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer >>> FT versions? >>> >>> Dear fieldtrip community, >>> >>> >>> I just encountered an unexpected behavior of FT that I would >>> like to share with the list. It is that the cluster permutation >>> test formed incorrect clusters from a given set of significant >>> electrodes in newer FT versions (ft-20111012; I also tried with >>> ft-20111028). >>> >>> >>> For example, when using an old ft version (ft-20100810) and >>> freqstatistics I get a negative cluster with 17 contiguous >>> electrodes. With the newer ft version, using the same data and >>> the same cfg, three significant electrodes that are spatially >>> contiguous to the other significant electrodes are not included >>> in the cluster. Also, three electrodes that are spatially >>> seperated and are actually part of the first cluster are grouped >>> into a separate cluster. I attached a picture with the >>> respective clusterplots where differences are marked with red >>> arrows. >>> >>> I am aware that the permutation p-value for a given cluster can >>> be different in two separate analyses, but the grouping of >>> significant electrodes into clusters should always be the same, >>> am i right? I double-checked the cfg.neighbours, after >>> conversion to new 'struct' style, and they were identical in the >>> "old ft" and "new ft" analysis. Also, the stat.stat field and >>> the stat.cfg.clustercritval were the same for both analyses. >>> Thus, the same neighbourhood relations and the same significant >>> electrodes should be used for grouping. Yet I get different >>> results... >>> >>> >>> I am almost sure that this is trivial, but I could not yet >>> replicate my old results with new FT and this makes me nervous. >>> Has someone made a similar experience? Or do newer versions of >>> ft use some further information besides cfg.neighbours for >>> clustering, somewhere in the *cfg.previuous perhaps, that I am >>> not aware of? Any comments are highly welcome. >>> >>> >>> Best regards, >>> >>> Gregor >>> >>> >>> cfg = []; >>> >>> cfg.neighbours = neighbours; >>> >>> cfg.minnbchan=1; >>> >>> cfg.avgoverfreq = 'yes'; >>> >>> cfg.avgovertime = 'yes'; >>> >>> cfg.method = 'montecarlo'; >>> >>> cfg.correctm = 'cluster'; >>> >>> cfg.statistic = 'depsamplesT'; >>> >>> cfg.tail = 0; >>> >>> cfg.alpha = 0.05; >>> >>> cfg.clusteralpha = 0.05; >>> >>> cfg.numrandomization = 1000; >>> >>> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >>> >>> cfg.uvar = 1; >>> >>> cfg.ivar = 2; >>> >>> cfg.latency = [2.24 2.53]; >>> >>> cfg.frequency = [17 21];% >>> >>> stat = ft_freqstatistics(cfg, DC, TC); >>> >>> >>> -- >>> Dr. rer. nat. Gregor Volberg >>> ( >>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>> University of Regensburg >>> Institute for Experimental Psychology >>> 93040 Regensburg, Germany >>> Tel: +49 941 943 3862 >>> Fax: +49 941 943 3233 >>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> >>> >>> >>> >>> _______________________________________________ >>> >>> >>> >>> >>> 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 >> >> >> >> >> 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 > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 -- Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 24 08:58:41 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 24 Nov 2011 08:58:41 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4ECD36AF.6000806@uni-konstanz.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> <4ECD36AF.6000806@uni-konstanz.de> Message-ID: <4ECDF931.2030103@donders.ru.nl> Hi Tobias, thank you very much for tracking this down. I encountered a similar issue in ft_channelrepair a few months ago - some built-in Matlab-functions rearrange a cell-array of string alphabetically. I'm gonna look into this now and also try to find out in which revision this lead to a problem. Best, Jörn On 11/23/2011 7:08 PM, Tobias Staudigl wrote: > Hi Gregor and Jörn, > > I find a simliar problem in my data (bti148). > 2 sets of channels that share no connections across the sets are > included in one cluster. > > I am not sure, whether spm_bwlabel is the actual problem. However, I > do not really understand why calling that function would be necessary. > FT calls the function spm_bwlabel during findcluster.m, line 95. > (findcluster.m is called by clusterstat.m). > As far as I understand, spm_bwlabel is similar to bwlabel.m which > searches for connected bins in a matrix. > The input to spm_label is the vector 'onoff' (in may case :148x1 > logical), which already contains information about neighboring channels. > Searching for connected bins in this vector does seem odd to me. > > However, I supsect something else to be the reason for the wrong > clustering, at least in my data. > In line 166, ft_freqstatistics.m changes the order of the channel labels: > > chan = intersect(chan, varargin{i}.label); > > Original order: {'A68'; 'A58'; 'A148';...} > Re-arranged in 'chan': {'A1';'A10';'A100'; 'A101'; 'A102';...} > > in line 193, ft_freqstatistics calls: > cfg.channel = ft_channelselection(cfg.channel, chan); > > now cfg.channel contains the re-aranged order. > On the basis of cfg.channel, the 'channeighbstructmat' is computed by > makechanneighbstructmat(cfg) in clusterstat.m. > The statistics on the data is computed without re-arranging the > channels in statfun_depsamplesT.m ('statobs'). > In findcluster.m, line 84 (called during clusterstat.m, l. 197), the > matrices 'onoff' and 'selectmat' are multiplied. > To my understanding, 'onoff' is based on the statistics that is > computed with the originial channel order. > 'selectmat' is based on the re-arranged order. > If true, the multiplication of these matrices is wrong. > > Hope this helps, although I might have missed something obvious and > might be totally wrong then. > > best, > tobias > > > Am 14.11.2011 17:46, schrieb Gregor Volberg: >> Hi Jörn, >> yes, sure I can provide you with some more information. I hope to do >> so due Wednesday. >> Thanks a lot again for your kind support! >> Gregor >> -- >> Dr. rer. nat. Gregor Volberg >> > > ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> >> Hi Gregor, >> >> that sounds indeed odd - although I am glad that I did not mess up >> something in prepare_neighbours ;) >> However, when I look at the code, it seems that channeighbstructmat >> will only be used when ~issource, and the call to the spm function >> will only be when issource, so I cannot see a direct relation between >> these two. Could you provide some more information, e.g. in what line >> and function you observed the call to the spm function? If you like >> you could also create a bugreport on http://bugzilla.fcdonders.nl/ >> for this. In any case, one of us will then tackle your problem as >> soon as possible and try to solve it. I hope that we can reproduce >> your bug here, else we might ask for a snippet of your data/workspace. >> >> Thanks in any case for having a precise look at what is going on! >> >> Best, >> Jörn >> >> On 11/11/2011 6:08 PM, Gregor Volberg wrote: >>> >>> Hi Jörn, >>> >>> >>> thanks a lot for your response. I meanwhile checked some possible >>> reasons for the different clusterings and I am coming closer. >>> >>> I could reproduce the described error with two different datasets >>> (62 channel and 29 channel EEG), on two different computers and with >>> two different versions of fieldtrip (2011 versions). First of all, >>> I checked the neighbourhood structures. They are identical in my two >>> analyses - same number of electrodes, same order, same neighbours. I >>> checked that before and after entering neighbours into the analyses >>> (by comparing the stat.cfg.neighbours) - they are the same. >>> >>> I then searched through the code and found the channeighbstructmat >>> that is constructed during the call of "clusterstat.m". I saved >>> these matrices during the call of ft_freqstatistics and found that, >>> with the same neighbourhood structures, the channeighbstructmat >>> looked completely different in the old and new version. I then >>> changed the code of the new FT "clusterstat.m" so that it reads in >>> the channeighbstructmat obtained with the old FT version - then >>> everything works perfect. >>> >>> >>> Thus, the problem is most likely an incorrect channeighbstructmat. I >>> figured out that in my case, FT calls an SPM8 function spm_bwlabeln >>> during construction of the channeighbstructmat, which older version >>> do not do. However, if I understood the code correctly, the SPM >>> function should only be called for source data?! Could it be that, >>> because my data is a 4D grand-average structure ( dimord: >>> 'subj_chan_freq_time'), FT assumes source data? >>> >>> >>> Thanks again for your help, >>> >>> Gregor >>> >>> >>> >>> >>> >>> -- >>> Dr. rer. nat. Gregor Volberg >>> ( >>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>> University of Regensburg >>> Institute for Experimental Psychology >>> 93040 Regensburg, Germany >>> Tel: +49 941 943 3862 >>> Fax: +49 941 943 3233 >>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> >>> >>> >>> >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> >>> Hi Gregor, >>> >>> did you check your neighbourselection? Maybe something is going >>> wrong there, given that a lot in this code has changed since 2010. >>> Could you check that using ft_neighbourplot? This would be the most >>> logical explanation why the results differ. It does not really make >>> sense that these three sensors form one cluster, because they should >>> not be neighbours of each other. So i would suppose that something >>> is going wrong there. >>> >>> Best, >>> Jörn >>> >>> >>> On 11/3/2011 4:57 PM, Michael Wibral wrote: >>> >>>> Hi Gregor, >>>> >>>> in principle the first level statistics that determine cluster >>>> membership (and thereby cluster shapes etc.) can also vary from >>>> one set of permutations to the next, esp. on the borders of a >>>> cluster (this is why it is typically said that the localization of >>>> a cluster is not as trustworthy as its existence). Other resaons >>>> for differences are differing number of permutations - did you set >>>> everything the same? >>>> >>>> This said there might well be another problem - I hope the cluster >>>> people can have a look into it. >>>> >>>> Best , >>>> Michael >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> *Von:* "Gregor Volberg" >>>> >>>> *Gesendet:* Nov 2, 2011 6:34:43 PM >>>> *An:* fieldtrip at donders.ru.nl >>>> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer >>>> FT versions? >>>> >>>> Dear fieldtrip community, >>>> >>>> >>>> I just encountered an unexpected behavior of FT that I would >>>> like to share with the list. It is that the cluster permutation >>>> test formed incorrect clusters from a given set of significant >>>> electrodes in newer FT versions (ft-20111012; I also tried with >>>> ft-20111028). >>>> >>>> >>>> For example, when using an old ft version (ft-20100810) and >>>> freqstatistics I get a negative cluster with 17 contiguous >>>> electrodes. With the newer ft version, using the same data and >>>> the same cfg, three significant electrodes that are spatially >>>> contiguous to the other significant electrodes are not included >>>> in the cluster. Also, three electrodes that are spatially >>>> seperated and are actually part of the first cluster are >>>> grouped into a separate cluster. I attached a picture with the >>>> respective clusterplots where differences are marked with red >>>> arrows. >>>> >>>> I am aware that the permutation p-value for a given cluster can >>>> be different in two separate analyses, but the grouping of >>>> significant electrodes into clusters should always be the same, >>>> am i right? I double-checked the cfg.neighbours, after >>>> conversion to new 'struct' style, and they were identical in >>>> the "old ft" and "new ft" analysis. Also, the stat.stat field >>>> and the stat.cfg.clustercritval were the same for both >>>> analyses. Thus, the same neighbourhood relations and the same >>>> significant electrodes should be used for grouping. Yet I get >>>> different results... >>>> >>>> >>>> I am almost sure that this is trivial, but I could not yet >>>> replicate my old results with new FT and this makes me nervous. >>>> Has someone made a similar experience? Or do newer versions of >>>> ft use some further information besides cfg.neighbours for >>>> clustering, somewhere in the *cfg.previuous perhaps, that I am >>>> not aware of? Any comments are highly welcome. >>>> >>>> >>>> Best regards, >>>> >>>> Gregor >>>> >>>> >>>> cfg = []; >>>> >>>> cfg.neighbours = neighbours; >>>> >>>> cfg.minnbchan=1; >>>> >>>> cfg.avgoverfreq = 'yes'; >>>> >>>> cfg.avgovertime = 'yes'; >>>> >>>> cfg.method = 'montecarlo'; >>>> >>>> cfg.correctm = 'cluster'; >>>> >>>> cfg.statistic = 'depsamplesT'; >>>> >>>> cfg.tail = 0; >>>> >>>> cfg.alpha = 0.05; >>>> >>>> cfg.clusteralpha = 0.05; >>>> >>>> cfg.numrandomization = 1000; >>>> >>>> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >>>> >>>> cfg.uvar = 1; >>>> >>>> cfg.ivar = 2; >>>> >>>> cfg.latency = [2.24 2.53]; >>>> >>>> cfg.frequency = [17 21];% >>>> >>>> stat = ft_freqstatistics(cfg, DC, TC); >>>> >>>> >>>> -- >>>> Dr. rer. nat. Gregor Volberg >>>> ( >>>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>>> University of Regensburg >>>> Institute for Experimental Psychology >>>> 93040 Regensburg, Germany >>>> Tel: +49 941 943 3862 >>>> Fax: +49 941 943 3233 >>>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> >>>> >>>> >>>> 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 >>> >>> >>> >>> >>> 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 >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> 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 > > > -- > Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.bogels at psy.gla.ac.uk Thu Nov 24 15:49:17 2011 From: s.bogels at psy.gla.ac.uk (=?ISO-8859-1?Q?Sara_B=F6gels?=) Date: Thu, 24 Nov 2011 14:49:17 +0000 Subject: [FieldTrip] second-level statistical inference Message-ID: <4ECE596D.90504@psy.gla.ac.uk> Hi all, I have been trying to do second-level statistical inference (as described in one of the FAQs) on ERFs, but I am not sure whether I am doing everything correctly. In the first step I calculate the T-values for the difference between two conditions (twice), which are between items, with ft_timelockstatistics. I put the output of all participants in a cell (called 'stat1a' and 'stat1b'). (I tried to use ft_timelockgrandaverage to combine the subjects together but it needs a field avg). Then I use ft_timelockstatistics again but subject level. I first want to look at the difference between the two conditions. This difference is reflected in the T-values of the first step so I create a dummy which is the same as 'stat1' but I replace all the values in the field 'stat' per participant with zeros. Then I call (with appropriate cfg parameters): stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); To compare the two differences (stat1a and stat1b) and thereby look at an interaction, I call: stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); I am uncertain whether the dummy works (or is there a way to compare the t-values to zero directly?) and whether the stat1a{:} trick works with ft_timelockstatistics. Thanks in advance for your answer. Sara From a.stolk at fcdonders.ru.nl Fri Nov 25 10:04:18 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 Nov 2011 10:04:18 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <513339671.46733.1322211329979.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> Hi Sara, If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps: 1) subject-level statistics, which you have done already 2) grandaverage all these, with keepindividuals=yes. 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?) 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level. Hope this helps, Arjen ----- "Sara Bögels" schreef: > Van: "Sara Bögels" > Aan: fieldtrip at donders.ru.nl > Verzonden: Donderdag 24 november 2011 15:49:17 > Onderwerp: [FieldTrip] second-level statistical inference > > Hi all, > > I have been trying to do second-level statistical inference (as > described in one of the FAQs) on ERFs, but I am not sure whether I am > > doing everything correctly. > > In the first step I calculate the T-values for the difference between > > two conditions (twice), which are between items, with > ft_timelockstatistics. I put the output of all participants in a cell > > (called 'stat1a' and 'stat1b'). (I tried to use > ft_timelockgrandaverage > to combine the subjects together but it needs a field avg). > > Then I use ft_timelockstatistics again but subject level. I first > want > to look at the difference between the two conditions. This difference > is > reflected in the T-values of the first step so I create a dummy which > is > the same as 'stat1' but I replace all the values in the field 'stat' > per > participant with zeros. Then I call (with appropriate cfg > parameters): > > stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > > To compare the two differences (stat1a and stat1b) and thereby look at > > an interaction, I call: > > stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > > I am uncertain whether the dummy works (or is there a way to compare > the > t-values to zero directly?) and whether the stat1a{:} trick works with > > ft_timelockstatistics. > > Thanks in advance for your answer. > > Sara > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From marco.buiatti at gmail.com Fri Nov 25 12:27:06 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Fri, 25 Nov 2011 12:27:06 +0100 Subject: [FieldTrip] how to avoid displaying function info Message-ID: Dear FTrippers, an aesthetic question: When I plot several topoplots, I would like to avoid displaying information about the duration and RAM used by the plotting functions, as: the call to "ft_topoplotTFR" took 0 seconds and an estimated 0 MB the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB Is there a simple way to do this? Thanks, Marco -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191 FRANCE Ph: +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From s.bogels at psy.gla.ac.uk Fri Nov 25 12:51:32 2011 From: s.bogels at psy.gla.ac.uk (=?UTF-8?B?U2FyYSBCw7ZnZWxz?=) Date: Fri, 25 Nov 2011 11:51:32 +0000 Subject: [FieldTrip] second-level statistical inference In-Reply-To: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> References: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <4ECF8144.4010706@psy.gla.ac.uk> Hi Arjen, Thank you very much for your answer. That sounds good, but step 2 does not work straightforwardly, since matlab gives the error message that it cannot find an avg field (which would not be in the structure created by ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not work. I tried to get around that by inserting an avg field which is the same as the stat field for each participant. Matlab also asked for an fsample field, which I inserted from an earlier datafile. Then it worked. Is it ok to do this? I did step 3 as well, using the field individual (which you get by keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = 'depsamplesT', right (because the variables are within subject)? Thank you! Sara On 25/11/2011 09:04, Stolk, A. wrote: > Hi Sara, > > If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps: > > 1) subject-level statistics, which you have done already > > 2) grandaverage all these, with keepindividuals=yes. > > 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?) > > 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level. > > Hope this helps, > > Arjen > > > > > > > > > > > > ----- "Sara Bögels" schreef: > >> Van: "Sara Bögels" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Donderdag 24 november 2011 15:49:17 >> Onderwerp: [FieldTrip] second-level statistical inference >> >> Hi all, >> >> I have been trying to do second-level statistical inference (as >> described in one of the FAQs) on ERFs, but I am not sure whether I am >> >> doing everything correctly. >> >> In the first step I calculate the T-values for the difference between >> >> two conditions (twice), which are between items, with >> ft_timelockstatistics. I put the output of all participants in a cell >> >> (called 'stat1a' and 'stat1b'). (I tried to use >> ft_timelockgrandaverage >> to combine the subjects together but it needs a field avg). >> >> Then I use ft_timelockstatistics again but subject level. I first >> want >> to look at the difference between the two conditions. This difference >> is >> reflected in the T-values of the first step so I create a dummy which >> is >> the same as 'stat1' but I replace all the values in the field 'stat' >> per >> participant with zeros. Then I call (with appropriate cfg >> parameters): >> >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); >> >> To compare the two differences (stat1a and stat1b) and thereby look at >> >> an interaction, I call: >> >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); >> >> I am uncertain whether the dummy works (or is there a way to compare >> the >> t-values to zero directly?) and whether the stat1a{:} trick works with >> >> ft_timelockstatistics. >> >> Thanks in advance for your answer. >> >> Sara >> >> >> _______________________________________________ >> 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 thomas.hartmann at uni-konstanz.de Fri Nov 25 13:51:17 2011 From: thomas.hartmann at uni-konstanz.de (Thomas Hartmann) Date: Fri, 25 Nov 2011 13:51:17 +0100 Subject: [FieldTrip] bug in ft_connectivityanalysis Message-ID: <4ECF8F45.2090309@uni-konstanz.de> hi, i found a bug in ft_connectivityanalysis.m on line 730, it sais: if exist('powindx', 'var'), cat(2, optarg, {'powindx', powindx}); end this line obviously has not effect. it should say: if exist('powindx', 'var'), optarg = cat(2, optarg, {'powindx', powindx}); end cheers, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From jan.schoffelen at donders.ru.nl Fri Nov 25 14:30:40 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 25 Nov 2011 14:30:40 +0100 Subject: [FieldTrip] bug in ft_connectivityanalysis In-Reply-To: <4ECF8F45.2090309@uni-konstanz.de> References: <4ECF8F45.2090309@uni-konstanz.de> Message-ID: <66DC0092-1B0B-41FB-A2AD-CC13AEA4EAA1@donders.ru.nl> Hi Thomas, Thanks for noticing this. I'll fix it as soon as possible, i.e. within the coming minute. Tonight's ftp-version will be OK again (at least: with respect to this). BW, JM On Nov 25, 2011, at 1:51 PM, Thomas Hartmann wrote: > hi, > i found a bug in ft_connectivityanalysis.m > > on line 730, it sais: > if exist('powindx', 'var'), cat(2, optarg, {'powindx', powindx}); end > > this line obviously has not effect. it should say: > if exist('powindx', 'var'), optarg = cat(2, optarg, {'powindx', powindx}); end > > cheers, > thomas > > -- > Dipl. Psych. Thomas Hartmann > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel.: +49 (0)7531 88 4612 > Fax: +49 (0)7531-88 4601 > Email: thomas.hartmann at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri Nov 25 14:32:39 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 Nov 2011 14:32:39 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <1133749158.54386.1322227664513.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1596650354.54471.1322227959231.JavaMail.root@sculptor.zimbra.ru.nl> Hey Sara, Yes, it is ok to do it like this (replacing every stat field by a 'avg' field). We'll fix this asap possible. Id est, to make ft_timelockgrandaverage to do this for you. Sorry for the inconvenience. With repect to your last step (step 4), a depsamplesT t-test is suitable for testing varibles that depend on the same factor (within-subjects effects). The answer is 'yes'. :) Best regards, Arjen ----- "Sara Bögels" schreef: > Van: "Sara Bögels" > Aan: fieldtrip at donders.ru.nl > Verzonden: Vrijdag 25 november 2011 12:51:32 > Onderwerp: Re: [FieldTrip] second-level statistical inference > > Hi Arjen, > > Thank you very much for your answer. That sounds good, but step 2 does > not work straightforwardly, since matlab gives the error message that > it > cannot find an avg field (which would not be in the structure created > by > ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not > work. I tried to get around that by inserting an avg field which is > the > same as the stat field for each participant. Matlab also asked for an > fsample field, which I inserted from an earlier datafile. Then it > worked. Is it ok to do this? > > I did step 3 as well, using the field individual (which you get by > keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = > 'depsamplesT', right (because the variables are within subject)? > > Thank you! > Sara > > On 25/11/2011 09:04, Stolk, A. wrote: > > Hi Sara, > > > > If I understand correctly, you want to test intra-subject > differences (between conditions) at the second level? This would > require the following steps: > > > > 1) subject-level statistics, which you have done already > > > > 2) grandaverage all these, with keepindividuals=yes. > > > > 3) copy the output of the grandaverage (into a dummy variable), and > replace the fields containing the subject T-values with zeros (for > timelock data this may be the trial fields?) > > > > 4) again timelockstatistics, as in step 1, now with the variables > following step 3. this should give you the resulting statistics of > contrasting intra-subject differences vs. null at the group level. > > > > Hope this helps, > > > > Arjen > > > > > > > > > > > > > > > > > > > > > > > > ----- "Sara Bögels" schreef: > > > >> Van: "Sara Bögels" > >> Aan: fieldtrip at donders.ru.nl > >> Verzonden: Donderdag 24 november 2011 15:49:17 > >> Onderwerp: [FieldTrip] second-level statistical inference > >> > >> Hi all, > >> > >> I have been trying to do second-level statistical inference (as > >> described in one of the FAQs) on ERFs, but I am not sure whether I > am > >> > >> doing everything correctly. > >> > >> In the first step I calculate the T-values for the difference > between > >> > >> two conditions (twice), which are between items, with > >> ft_timelockstatistics. I put the output of all participants in a > cell > >> > >> (called 'stat1a' and 'stat1b'). (I tried to use > >> ft_timelockgrandaverage > >> to combine the subjects together but it needs a field avg). > >> > >> Then I use ft_timelockstatistics again but subject level. I first > >> want > >> to look at the difference between the two conditions. This > difference > >> is > >> reflected in the T-values of the first step so I create a dummy > which > >> is > >> the same as 'stat1' but I replace all the values in the field > 'stat' > >> per > >> participant with zeros. Then I call (with appropriate cfg > >> parameters): > >> > >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > >> > >> To compare the two differences (stat1a and stat1b) and thereby look > at > >> > >> an interaction, I call: > >> > >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > >> > >> I am uncertain whether the dummy works (or is there a way to > compare > >> the > >> t-values to zero directly?) and whether the stat1a{:} trick works > with > >> > >> ft_timelockstatistics. > >> > >> Thanks in advance for your answer. > >> > >> Sara > >> > >> > >> _______________________________________________ > >> 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 Fri Nov 25 15:06:47 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 25 Nov 2011 15:06:47 +0100 Subject: [FieldTrip] how to avoid displaying function info In-Reply-To: References: Message-ID: <4ECFA0F7.6030901@donders.ru.nl> Hi Marco, currently there is no way to remove this without modifying the code itself. If you want to avoid any output to the command window, you could trick fieldtrip though by using evalc('ft_topoplotTFR(cfg, data)'); evalc will return all text that would have been written in the command window in an output variable, and prevent it from being directly written to the command window Best, Jörn On 11/25/2011 12:27 PM, Marco Buiatti wrote: > Dear FTrippers, > > an aesthetic question: When I plot several topoplots, I would like to > avoid displaying information about the duration and RAM used by the > plotting functions, as: > the call to "ft_topoplotTFR" took 0 seconds and an estimated 0 MB > the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB > > Is there a simple way to do this? > > Thanks, > > Marco > > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 johemart at gmail.com Fri Nov 25 18:38:27 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 25 Nov 2011 18:38:27 +0100 Subject: [FieldTrip] promblem with fontsize from TOPOPLOTER Message-ID: Hello dear fieldtripers. Im Johann and Im trying to draw a MEG head using FT_TOPOPLOTER( ), and everything is ok, but I dont know how can I resize o change the font size of the cfg.comment = 'whatever' which is one of the fields that im using to plot my head. at the time im using it, it just appear 'whatever' string in very very small font size. I only have found font size modiffiers for markers and markers highlighted, but never for comment ones. thanks a lot for the hand that anyone can give me. -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Fri Nov 25 18:57:32 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 25 Nov 2011 18:57:32 +0100 Subject: [FieldTrip] promblem with fontsize from TOPOPLOTER In-Reply-To: References: Message-ID: PROBLEM SOLVED WITH FONTSIZE. Thanks friend, at the end and just if anyone need this too, i had found the solution by myself. that was just modifying a new cfg field that wasnt described into the documentation of this function topoplot called: cfg.fontsize = 12; I saw this field wrote as default code in ft_topoplotER.m file as value of 8. In my case I prefered to use 12. have a nice days friends johann On 25 November 2011 18:38, Johann Heinz Martínez Huartos wrote: > Hello dear fieldtripers. > > Im Johann and Im trying to draw a MEG head using FT_TOPOPLOTER( ), and > everything is ok, but I dont know how can I resize o change the font size > of the cfg.comment = 'whatever' which is one of the fields that im > using to plot my head. > at the time im using it, it just appear 'whatever' string in very very > small font size. > I only have found font size modiffiers for markers and markers > highlighted, but never for comment ones. > > thanks a lot for the hand that anyone can give me. > > -- > Atentamente: > Johann Martínez. M.Sc. > -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Nov 27 09:43:29 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 27 Nov 2011 09:43:29 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? Message-ID: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Hi everyone, I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [4 9]; cfg.tapsmofrq = 4; cfg.toi = 0.1 cfg.keeptrials = 'yes'; cfg.channel = 'all'; cfg.trials = highCohTrials'; cfg.channelcmb = {'all' 'all'}; fftHigh = ft_freqanalysis(cfg,hpdat); cfg = []; cfg.method = 'coh'; cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); cohHighEarly = labelcmb: {6555x2 cell} dimord: 'chan_freq' cohspctrm: [6555x9 double] freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] elec: [1x1 struct] dof: 5808 cfg: [1x1 struct] cfg = []; cfg.parameter = 'cohspctrm'; ft_connectivityplot(cfg,cohHighEarly) What should I do? Thanks! Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Nov 27 10:14:56 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sun, 27 Nov 2011 10:14:56 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? In-Reply-To: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> References: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Message-ID: Hi Marieke, You can have a look here to get your analysis settings such that you can use ft_connectivityplot. In short, please specify cfg.output = 'fourier' rather than 'powandcsd' (and also omit the cfg.channelcmb) prior to calling ft_freqanalysis, and 'een kind kan de was doen'. http://fieldtrip.fcdonders.nl/tutorial/connectivity Best wishes, Jan-Mathijs On Nov 27, 2011, at 9:43 AM, Marieke van Vugt wrote: > Hi everyone, > I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: > > cfg = []; > cfg.output = 'powandcsd'; > cfg.method = 'mtmfft'; > cfg.foilim = [4 9]; > cfg.tapsmofrq = 4; > cfg.toi = 0.1 > cfg.keeptrials = 'yes'; > cfg.channel = 'all'; > cfg.trials = highCohTrials'; > cfg.channelcmb = {'all' 'all'}; > fftHigh = ft_freqanalysis(cfg,hpdat); > > cfg = []; > cfg.method = 'coh'; > cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); > > cohHighEarly = > > labelcmb: {6555x2 cell} > dimord: 'chan_freq' > cohspctrm: [6555x9 double] > freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] > elec: [1x1 struct] > dof: 5808 > cfg: [1x1 struct] > > cfg = []; > cfg.parameter = 'cohspctrm'; > ft_connectivityplot(cfg,cohHighEarly) > > > > > What should I do? > Thanks! > Marieke > > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Nov 27 11:39:18 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 27 Nov 2011 11:39:18 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? In-Reply-To: References: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Message-ID: Super! That works! Marieke On Nov 27, 2011, at 10:14 , jan-mathijs schoffelen wrote: > Hi Marieke, > > You can have a look here to get your analysis settings such that you can use ft_connectivityplot. In short, please specify cfg.output = 'fourier' rather than 'powandcsd' (and also omit the cfg.channelcmb) prior to calling ft_freqanalysis, and 'een kind kan de was doen'. > > http://fieldtrip.fcdonders.nl/tutorial/connectivity > > Best wishes, > > Jan-Mathijs > > On Nov 27, 2011, at 9:43 AM, Marieke van Vugt wrote: > >> Hi everyone, >> I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: >> >> cfg = []; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmfft'; >> cfg.foilim = [4 9]; >> cfg.tapsmofrq = 4; >> cfg.toi = 0.1 >> cfg.keeptrials = 'yes'; >> cfg.channel = 'all'; >> cfg.trials = highCohTrials'; >> cfg.channelcmb = {'all' 'all'}; >> fftHigh = ft_freqanalysis(cfg,hpdat); >> >> cfg = []; >> cfg.method = 'coh'; >> cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); >> >> cohHighEarly = >> >> labelcmb: {6555x2 cell} >> dimord: 'chan_freq' >> cohspctrm: [6555x9 double] >> freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] >> elec: [1x1 struct] >> dof: 5808 >> cfg: [1x1 struct] >> >> cfg = []; >> cfg.parameter = 'cohspctrm'; >> ft_connectivityplot(cfg,cohHighEarly) >> >> >> >> >> What should I do? >> Thanks! >> Marieke >> >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.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 > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From caulveil at gmail.com Mon Nov 28 22:38:56 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 16:38:56 -0500 Subject: [FieldTrip] mysql interface files Message-ID: Hello, I was considering buffering data to a MySQL database using the ft_write_data and ft_read_date mysql interfaces. However, the files db_connect.m, db_insert.m, db_insert_blob.m, etc.. are all missing. Does anyone know where I might be able to download these? Thanks very much Jacob Martin From caulveil at gmail.com Tue Nov 29 00:10:52 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 18:10:52 -0500 Subject: [FieldTrip] Error in Java buffer reader and fakebiosemiclient.cc Message-ID: Hi, After letting the server run for a while (see below size at 512hz), I get an "err3": data: size = 176960 x 34 dmarequest: err3 Exception in thread "main" java.io.IOException: Error returned from FieldTrip buffer server. at nl.fcdonders.fieldtrip.BufferClient.readResponse(BufferClient.java:646) at nl.fcdonders.fieldtrip.BufferClient.getEvents(BufferClient.java:386) at testclient.main(testclient.java:71) Any ideas? Thanks, Jake From caulveil at gmail.com Tue Nov 29 00:13:26 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 18:13:26 -0500 Subject: [FieldTrip] Error in Java buffer reader and fakebiosemiclient.cc In-Reply-To: References: Message-ID: Ok, seems like it has to do with exceeding the maximum number of samples. Not sure what to do here though yet: http://code.google.com/p/fieldtrip/source/browse/trunk/realtime/buffer/src/dmarequest.c?r=1218#413 On Mon, Nov 28, 2011 at 6:10 PM, Jacob Martin wrote: > Hi, > > After letting the server run for a while (see below size at 512hz), I > get an "err3": > > data: > size = 176960 x 34 > dmarequest: err3 > Exception in thread "main" java.io.IOException: Error returned from > FieldTrip buffer server. >        at nl.fcdonders.fieldtrip.BufferClient.readResponse(BufferClient.java:646) >        at nl.fcdonders.fieldtrip.BufferClient.getEvents(BufferClient.java:386) >        at testclient.main(testclient.java:71) > > > > Any ideas? > > Thanks, > Jake > From vitoria.piai at gmail.com Wed Nov 30 09:40:15 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 30 Nov 2011 09:40:15 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis Message-ID: <4ED5EBEF.8000503@gmail.com> Dear all, When using ft_sourceanalysis, I used to obtain a subfield data.avg.filter. Yesterday, I tried using the same script I used to run until 2 weeks ago, but now I only get data.avg.pow as a subfield after using ft_sourceanalysis. I'm using the version with the last change from 25th Nov. Has something been changed recently or is this just a bug? Cheers, Vitória -- ** Please consider the environment - do you really need to print? ** From thomas.hartmann at uni-konstanz.de Wed Nov 30 10:51:13 2011 From: thomas.hartmann at uni-konstanz.de (Thomas Hartmann) Date: Wed, 30 Nov 2011 10:51:13 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis In-Reply-To: <4ED5EBEF.8000503@gmail.com> References: <4ED5EBEF.8000503@gmail.com> Message-ID: <4ED5FC91.5070606@uni-konstanz.de> dear vitoria, its working with me. have you checked for cfg.keepfilter = 'yes'; ? regards, thomas On 30.11.2011 09:40, Vitória Magalhães Piai wrote: > Dear all, > > When using ft_sourceanalysis, I used to obtain a subfield > data.avg.filter. > > Yesterday, I tried using the same script I used to run until 2 weeks > ago, but now I only get data.avg.pow as a subfield after using > ft_sourceanalysis. > I'm using the version with the last change from 25th Nov. > > Has something been changed recently or is this just a bug? > > Cheers, Vitória > -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From jan.schoffelen at donders.ru.nl Wed Nov 30 11:50:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 30 Nov 2011 11:50:29 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis In-Reply-To: <4ED5EBEF.8000503@gmail.com> References: <4ED5EBEF.8000503@gmail.com> Message-ID: <5B349698-54ED-4EC5-AD94-BA0413E1B4AE@donders.ru.nl> Hi Vitória, Could you change your settings of cfg.keepfilter = 'yes' to cfg.mne.keepfilter = 'yes' and report back to me (not necessarily to the list) whether this solves it? BW, JM On Nov 30, 2011, at 9:40 AM, Vitória Magalhães Piai wrote: > Dear all, > > When using ft_sourceanalysis, I used to obtain a subfield data.avg.filter. > > Yesterday, I tried using the same script I used to run until 2 weeks ago, but now I only get data.avg.pow as a subfield after using ft_sourceanalysis. > I'm using the version with the last change from 25th Nov. > > Has something been changed recently or is this just a bug? > > Cheers, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Wed Nov 30 17:43:25 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Wed, 30 Nov 2011 18:43:25 +0200 Subject: [FieldTrip] Granger convention In-Reply-To: References: Message-ID: Hi all, I'm resurrecting an old post, because I found the answer in ft_connectivityplot and it might useful to other people: line 122: % use the convention of the row-channel causing the column-channel I updated the wiki as well. Please, correct me if this is not the correct convention. Best, Gio On Wed, Aug 17, 2011 at 13:43, Gio Piantoni wrote: > > Hi all, > > The connectivity toolbox is very powerful and straightforward to use, > thanks for that! However, I did not find any information about the > convention used by Fieldtrip to represent asymmetrical connectivity > measures (such as granger causality), f.e. in the help of the > functions, in http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > nor in http://fieldtrip.fcdonders.nl/development/connectivity_tutorial > > Do the values in data.grangerspctrm(1, 2, :) represent the > granger-causality values from channel 1 to channel 2 or the other way > round? > > BTW, is it possible to run time-domain granger causality in Fieldtrip? > > Thanks! > > Gio > > -- > Giovanni Piantoni, Ph.D. student > Dept. Sleep & Cognition > Netherlands Institute for Neuroscience > Meibergdreef 47 > 1105 BA Amsterdam (NL) > > +31 (0)20 5665492 > g.piantoni at nin.knaw.nl > www.giovannipiantoni.com From jan.schoffelen at donders.ru.nl Wed Nov 30 18:56:42 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 30 Nov 2011 18:56:42 +0100 Subject: [FieldTrip] Granger convention In-Reply-To: References: Message-ID: <6D635ADB-E5BC-4EBD-A96B-400D14EB329C@donders.ru.nl> Yes Giovanni, that's correct. Thanks for posting this, I was already hoping that somebody would notice ;-). a presto, JM On Nov 30, 2011, at 5:43 PM, Gio Piantoni wrote: > Hi all, > > I'm resurrecting an old post, because I found the answer in > ft_connectivityplot and it might useful to other people: > > line 122: > % use the convention of the row-channel causing the column-channel > > I updated the wiki as well. Please, correct me if this is not the > correct convention. > > Best, > > Gio > > On Wed, Aug 17, 2011 at 13:43, Gio Piantoni wrote: >> >> Hi all, >> >> The connectivity toolbox is very powerful and straightforward to use, >> thanks for that! However, I did not find any information about the >> convention used by Fieldtrip to represent asymmetrical connectivity >> measures (such as granger causality), f.e. in the help of the >> functions, in http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip >> nor in http://fieldtrip.fcdonders.nl/development/connectivity_tutorial >> >> Do the values in data.grangerspctrm(1, 2, :) represent the >> granger-causality values from channel 1 to channel 2 or the other way >> round? >> >> BTW, is it possible to run time-domain granger causality in Fieldtrip? >> >> Thanks! >> >> Gio >> >> -- >> Giovanni Piantoni, Ph.D. student >> Dept. Sleep & Cognition >> Netherlands Institute for Neuroscience >> Meibergdreef 47 >> 1105 BA Amsterdam (NL) >> >> +31 (0)20 5665492 >> g.piantoni at nin.knaw.nl >> www.giovannipiantoni.com > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at psych.ru.nl Wed Nov 30 20:21:55 2011 From: e.maris at psych.ru.nl (Eric Maris) Date: Wed, 30 Nov 2011 20:21:55 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <4ECF8144.4010706@psy.gla.ac.uk> References: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> <4ECF8144.4010706@psy.gla.ac.uk> Message-ID: <007e01ccaf95$536c0dc0$fa442940$@maris@psych.ru.nl> Hi Sara, I'm replying to your initial question (somewhere below in this email). Why don't you calculate per-subject averages in the two within-subject experimental conditions (using timelockgrandaverage with keepindividual='yes'), and then do your second-level inference on these averages? See also the Fieldtrip statistics tutorials. Best, Eric Maris > -----Original Message----- > From: Sara Bögels [mailto:s.bogels at psy.gla.ac.uk] > Sent: vrijdag 25 november 2011 12:52 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] second-level statistical inference > > Hi Arjen, > > Thank you very much for your answer. That sounds good, but step 2 does > not work straightforwardly, since matlab gives the error message that it > cannot find an avg field (which would not be in the structure created by > ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not > work. I tried to get around that by inserting an avg field which is the > same as the stat field for each participant. Matlab also asked for an > fsample field, which I inserted from an earlier datafile. Then it > worked. Is it ok to do this? > > I did step 3 as well, using the field individual (which you get by > keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = > 'depsamplesT', right (because the variables are within subject)? > > Thank you! > Sara > > On 25/11/2011 09:04, Stolk, A. wrote: > > Hi Sara, > > > > If I understand correctly, you want to test intra-subject differences > (between conditions) at the second level? This would require the following > steps: > > > > 1) subject-level statistics, which you have done already > > > > 2) grandaverage all these, with keepindividuals=yes. > > > > 3) copy the output of the grandaverage (into a dummy variable), and > replace the fields containing the subject T-values with zeros (for > timelock > data this may be the trial fields?) > > > > 4) again timelockstatistics, as in step 1, now with the variables > > following > step 3. this should give you the resulting statistics of contrasting > intra- > subject differences vs. null at the group level. > > > > Hope this helps, > > > > Arjen > > > > > > > > > > > > > > > > > > > > > > > > ----- "Sara Bögels" schreef: > > > >> Van: "Sara Bögels" > >> Aan: fieldtrip at donders.ru.nl > >> Verzonden: Donderdag 24 november 2011 15:49:17 > >> Onderwerp: [FieldTrip] second-level statistical inference > >> > >> Hi all, > >> > >> I have been trying to do second-level statistical inference (as > >> described in one of the FAQs) on ERFs, but I am not sure whether I am > >> > >> doing everything correctly. > >> > >> In the first step I calculate the T-values for the difference between > >> > >> two conditions (twice), which are between items, with > >> ft_timelockstatistics. I put the output of all participants in a cell > >> > >> (called 'stat1a' and 'stat1b'). (I tried to use > >> ft_timelockgrandaverage > >> to combine the subjects together but it needs a field avg). > >> > >> Then I use ft_timelockstatistics again but subject level. I first > >> want > >> to look at the difference between the two conditions. This difference > >> is > >> reflected in the T-values of the first step so I create a dummy which > >> is > >> the same as 'stat1' but I replace all the values in the field 'stat' > >> per > >> participant with zeros. Then I call (with appropriate cfg > >> parameters): > >> > >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > >> > >> To compare the two differences (stat1a and stat1b) and thereby look at > >> > >> an interaction, I call: > >> > >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > >> > >> I am uncertain whether the dummy works (or is there a way to compare > >> the > >> t-values to zero directly?) and whether the stat1a{:} trick works with > >> > >> ft_timelockstatistics. > >> > >> Thanks in advance for your answer. > >> > >> Sara > >> > >> > >> _______________________________________________ > >> 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 B.Mouthaan at neuro.umcn.nl Tue Nov 1 15:16:35 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Tue, 1 Nov 2011 15:16:35 +0100 Subject: [FieldTrip] Plotting dipole moment in 3D Message-ID: Dear Fieldtrippers, Does anyone know how to plot the orientationvector of the dipole? I tried it with quiver3 but this makes it unable to project the dipole vector on the BEM model while using hold on. Any ideas? here my script to make i more clear: ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 for i=1:21 quiver3(dipole.dip.pos(1),dipole.dip.pos(2),dipole.dip.pos(3),dipole.dip.mom(1,i),dipole.dip.mom(2,i),dipole.dip.mom(3,i),'r*', 'MarkerSize', 10) pause (1) end Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Tue Nov 1 15:47:04 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Tue, 1 Nov 2011 15:47:04 +0100 (CET) Subject: [FieldTrip] Plotting dipole moment in 3D In-Reply-To: Message-ID: <2021623992.175631.1320158824319.JavaMail.root@draco.zimbra.ru.nl> Hi Brain try this: figure,ft_plot_dipole(dip.pos,dip.ori,'color','g') How does it look? Best, Cristiano ----- "B Mouthaan" schreef: > Van: "B Mouthaan" > Aan: fieldtrip at donders.ru.nl > Verzonden: Dinsdag 1 november 2011 15:16:35 > Onderwerp: [FieldTrip] Plotting dipole moment in 3D > > Plotting dipole moment in 3D Dear Fieldtrippers, > > Does anyone know how to plot the orientationvector of the dipole? I tried it with quiver3 but this makes it unable to project the dipole vector on the BEM model while using hold on. > > Any ideas? > > here my script to make i more clear: > > ft_plot_mesh(vol.bnd(3)) > hold on > alpha 0.5 > > for i=1:21 > > quiver3(dipole.dip.pos(1),dipole.dip.pos(2),dipole.dip.pos(3),dipole.dip.mom(1,i),dipole.dip.mom(2,i),dipole.dip.mom(3,i),'r*', 'MarkerSize', 10) > pause (1) > end > > Thanks! > > Brian > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > 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 explena at gmail.com Wed Nov 2 10:07:12 2011 From: explena at gmail.com (Shen-Mou Hsu) Date: Wed, 2 Nov 2011 17:07:12 +0800 Subject: [FieldTrip] problems with reading the data in yopkogawa format Message-ID: Hi, I encountered a problem while reading the data in yokogawa format from a single channel. The message is as follows: "Warning: The P-code file GetMeg160MriInfoM.p was generated prior to MATLAB version 7.5 (R2007b) and will not be supported in a future release. Use pcode to regenerate GetMeg160MriInfoM.p using MATLAB R2007b or later". I plotted the data and found that there was a rectangular band covering the real data. Any help in this issue will be much appreciated. Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Nov 2 12:58:25 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 2 Nov 2011 12:58:25 +0100 Subject: [FieldTrip] Plotting dipole moment in 3D Message-ID: Dear Christiano, Is don't have a field called .ori So it does not recognize it as exciting field This is my script: figure(10) ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 ft_plot_dipole(dipole.dip.pos, dipole.dip.ori,'color', 'g') When I replace dipole.dip.ori with dipole.dip.mom, the BEM model is plotted although its a bit darker now. Hope you know what this means? Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Nov 2 14:34:57 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 2 Nov 2011 14:34:57 +0100 Subject: [FieldTrip] [Solution] Plotting dipole moment in 3D Message-ID: In response to my earlier posts. The problem is solved. It was correct that dipole.dip.ori was not existing, because ori is created when calling ft_plot_dipole. [ori] contains the three parameters of dipole.dip.mom. So I used the following code to create the vector: figure(10) ft_plot_mesh(vol.bnd(3)) hold on alpha 0.5 for j=1:21 ft_plot_dipole(dipole.dip.pos, dipole.dip.mom(:,j),'color', 'r', 'units', 'mm') pause (1) end I used an iteration, because the moment of the dipole changes every timepoint. My previous figure became dark, and i didn't see the vector. The reason for this is that my units were not defined. No putting the units similarly as in the BEM-model, the figure shows a clear dipole vector. Thanks for the help you all! Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Wed Nov 2 18:34:43 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Wed, 02 Nov 2011 18:34:43 +0100 Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Message-ID: <4EB18D43020000570000B544@gwsmtp1.uni-regensburg.de> Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clusterstats.png Type: image/png Size: 61313 bytes Desc: Portable Network Graphics Format URL: From B.Mouthaan at neuro.umcn.nl Thu Nov 3 14:51:56 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 3 Nov 2011 14:51:56 +0100 Subject: [FieldTrip] Dipole at surface of head Message-ID: Hello all, I am calculating dipoles with use of the BEM headmodel. Before calculating the dipole I hypothesize with help of the current distribution topography in MultiplotER where the dipole will be placed. Most of the times the dipole location corresponds with my expectations. However often this dipole is locate at the surface of the head. This does not sound logic to me. Does anyone have experienced this problem earlier? And if so does anybody has a solution? Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Thu Nov 3 16:57:36 2011 From: michael.wibral at web.de (Michael Wibral) Date: Thu, 3 Nov 2011 16:57:36 +0100 (CET) Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Message-ID: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Thu Nov 3 18:20:56 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Thu, 03 Nov 2011 18:20:56 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> Message-ID: <4EB2DB88020000570000B5A8@gwsmtp1.uni-regensburg.de> Hi Michael, thanks a lot for your response. Yes, I kept everything the same, the only difference beeing the Matlab path pointing to the old vs new FT version. I will keep on searching for a possible flaw in my code and will tell so if I found one. Thanks again, best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Michael Wibral" 11/3/2011 4:57 PM >>> Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Sat Nov 5 17:55:13 2011 From: karl.doron at gmail.com (Karl Doron) Date: Sat, 5 Nov 2011 09:55:13 -0700 Subject: [FieldTrip] ft_plot_topo3d crash Message-ID: Hello, I'm trying to use a 3d plot function and experiencing matlab crashes. As arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a vector of t values for each sensor. The plot appears correctly on the first attempt; however, any second attempts to use the function, i.e., to plot a different time point, cause the entire matlab session to crash. Since the whole session crashes, I don't have any error message to report. I'm using Matlab R2009B and Mac OSx Lion. Thanks for any feedback. karl Karl Doron, Ph.D. Department of Psychological and Brain Sciences University of California, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Nov 6 07:54:20 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Sun, 6 Nov 2011 14:54:20 +0800 (CST) Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1E8C4628-FC2B-497E-82B6-CDE4D4482CE6@psi.ucm.es> Message-ID: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> Dear Stephan,       Thanks for your help. I've tried the toolbox, and test my data using both Augmented Dickey Fuller (ADF) and KPSS method, but the results are inconsistent.  ADF'result is the data is  not stationary, but KPSS'result is stationary. Have you met problem as this?     Best,   Weina     --- 11年10月31日,周一, smoratti at psi.ucm.es 写道: 发件人: smoratti at psi.ucm.es 主题: Re: [FieldTrip] Is there a function for testing time series stationary or not? 收件人: "Email discussion list for the FieldTrip project" 日期: 2011年10月31日,周一,下午10:21 Dear Weina, Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm There several easy to use tests for covariance stationarity. Best, Stephan El 31/10/2011, a las 14:15, 李卫娜 escribió: Dear all,   Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary.   Best regards.     Weina  _______________________________________________ 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 r.oostenveld at donders.ru.nl Sun Nov 6 09:40:40 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sun, 6 Nov 2011 09:40:40 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: <819342DB-D94F-4CD7-B266-E64C3FAC0AFE@donders.ru.nl> Dear Karl, Sorry to hear about the problem, it surprises me that your whole MATLAB crahes. Can you please report the problem as bug on http://bugzilla.fcdonders.nl (i.e. copy your email message) and attach a mat file in bugzilla with the exact input variables as you are using it? best regards, Robert On 5 Nov 2011, at 17:55, Karl Doron wrote: > Hello, > > I'm trying to use a 3d plot function and experiencing matlab crashes. As arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a vector of t values for each sensor. > > The plot appears correctly on the first attempt; however, any second attempts to use the function, i.e., to plot a different time point, cause the entire matlab session to crash. Since the whole session crashes, I don't have any error message to report. > > I'm using Matlab R2009B and Mac OSx Lion. > > Thanks for any feedback. > > karl > > > > > Karl Doron, Ph.D. > Department of Psychological and Brain Sciences > University of California, Santa Barbara > > > _______________________________________________ > 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 g.piantoni at nin.knaw.nl Sun Nov 6 11:04:29 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Sun, 6 Nov 2011 11:04:29 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: Hi Karl, To me, it sounds like a problem with the OpenGL drivers. There was a discussion on that about VNC crashing on Linux, but maybe it applies to your Mac configuration as well. See: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html Please, report back if you find a solution. Best, Gio On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: > Hello, > I'm trying to use a 3d plot function and experiencing matlab crashes. As > arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a > vector of t values for each sensor. > The plot appears correctly on the first attempt; however, any second > attempts to use the function, i.e., to plot a different time point, cause > the entire matlab session to crash. Since the whole session crashes, I don't > have any error message to report. > I'm using Matlab R2009B and Mac OSx Lion. > Thanks for any feedback. > karl > > > > Karl Doron, Ph.D. > Department of Psychological and Brain Sciences > University of California, Santa Barbara > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From julian.wang at ucl.ac.uk Sun Nov 6 18:52:32 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Sun, 6 Nov 2011 17:52:32 -0000 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> Message-ID: <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I'm having. I'm trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it's coming up with this error and I'm not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesig n". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I'm trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I'm not sure if I've got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it's only expecting one row in the design matrix. If it's run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I'm not sure if it is. Is what I've done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I'm uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I'm using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 Don.Rojas at ucdenver.edu Sun Nov 6 20:17:02 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Sun, 6 Nov 2011 12:17:02 -0700 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> Message-ID: <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes). Sent from my iPad On Nov 6, 2011, at 11:19 AM, "Julian Wang" > wrote: Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it’s coming up with this error and I’m not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 smoratti at psi.ucm.es Sun Nov 6 21:00:38 2011 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Sun, 06 Nov 2011 21:00:38 +0100 Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> References: <1320562460.63454.YahooMailClassic@web15604.mail.cnb.yahoo.com> Message-ID: Dear Weina, That happened to me as well and occurs also in the example of the manual. You could lower the p value of the ADF test and see if it goes in the same direction as the KPSS test. I think the KPSS is correct and less stringent. Best, Stephan El 06/11/2011, a las 07:54, 李卫娜 escribió: > Dear Stephan, > > Thanks for your help. I've tried the toolbox, and test my data using both Augmented Dickey Fuller (ADF) and KPSS method, but the results are inconsistent. ADF'result is the data is not stationary, but KPSS'result is stationary. Have you met problem as this? > > > Best, > > Weina > > > --- 11年10月31日,周一, smoratti at psi.ucm.es 写道: > > 发件人: smoratti at psi.ucm.es > 主题: Re: [FieldTrip] Is there a function for testing time series stationary or not? > 收件人: "Email discussion list for the FieldTrip project" > 日期: 2011年10月31日,周一,下午10:21 > > Dear Weina, > > Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm > > There several easy to use tests for covariance stationarity. > > Best, > > Stephan > > El 31/10/2011, a las 14:15, 李卫娜 escribió: > >> Dear all, >> >> Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary. >> >> Best regards. >> >> >> Weina >> >> _______________________________________________ >> 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 julian.wang at ucl.ac.uk Sun Nov 6 21:05:49 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Sun, 6 Nov 2011 20:05:49 -0000 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> <00a501cc9cac$dc379580$94a6c080$@ucl.ac.uk> <50AD9A6D-4313-41A9-9BCB-C61D3428A06F@ucdenver.edu> Message-ID: <00ca01cc9cbf$7b77b0f0$726712d0$@ucl.ac.uk> Even in your unsure state, you seem to have all the answers! Removing the quotes made it work perfectly. Again, thank you so much for your help. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 06 November 2011 07:17 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes). Sent from my iPad On Nov 6, 2011, at 11:19 AM, "Julian Wang" wrote: Dear Don, Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix: cfg.method = 'triangulation'; cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay'; neighbours = ft_prepare_neighbours(cfg); cfg.channel = 'EEG'; cfg.latency = [0 0.8]; cfg.avgoverchan = 'no'; cfg.avgovertime = 'no'; cfg.parameter = 'individual'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.feedback = 'gui'; cfg.numrandomization = '1000'; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.minnbchan = 2; cfg.neighbours = neighbours; cfg.clusterstatistic = 'maxsum'; but it’s coming up with this error and I’m not sure why Error in ==> fieldtrip\private\resampledesign at 69 ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'}); ??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign". Error in ==> statistics_montecarlo at 193 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 128 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. Nsub = 16; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; Again, any help would be greatly appreciated. Kind regards, Julian From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: 27 October 2011 06:59 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] cfgs for paired t-test and monte carlo testing Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ 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 davidig at hotmail.es Mon Nov 7 02:29:15 2011 From: davidig at hotmail.es (=?iso-8859-1?B?RGF2aWQgSWdsZXNpYXMgTPNwZXo=?=) Date: Mon, 7 Nov 2011 02:29:15 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> Message-ID: Hi, I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? I don't know how to chop my data correctly. Thank, David From: r.oostenveld at donders.ru.nl Date: Sun, 20 Mar 2011 14:41:41 +0100 To: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Trigger channel for edf Hi Ivano Good that it works. The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses). FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. bestRobert On 20 Mar 2011, at 13:24, Ivano Triggiani wrote:Hi, just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called "number of data records" ( http://www.edfplus.info/specs/edf.html ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) Thanks to all. Ivano ------------------------------------------------------------------------ "No man can wear one face to himself and another to the multitude, without finally getting bewildered as to which one is true." Nathaniel Hawthorne _______________________________________________ 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 a.stolk at fcdonders.ru.nl Mon Nov 7 08:13:40 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 7 Nov 2011 08:13:40 +0100 (CET) Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <245840274.700839.1320649995936.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <333620380.700845.1320650020258.JavaMail.root@sculptor.zimbra.ru.nl> Dear  David, You'll need to determine your user-specific events, i.e. not the 'trial' type events that are automatically stored in your dataset by your acquisition software. Does your event matrix contain types anything else than 'trial'? For instance, try: event = ft_read_head(filename) unique({event.type}) Yours, Arjen ----- "David Iglesias López" schreef: > Van: "David Iglesias López" > Aan: fieldtrip at donders.ru.nl > Verzonden: Maandag 7 november 2011 02:29:15 > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > Hi, > I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. > The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. > I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > I don't know how to chop my data correctly. > Thank, > David > From: r.oostenveld at donders.ru.nl > Date: Sun, 20 Mar 2011 14:41:41 +0100 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Trigger channel for edf > Hi Ivano > Good that it works. > The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses).  > FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. > best Robert  > On 20 Mar 2011, at 13:24, Ivano Triggiani wrote: > Hi, > just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. > However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called " number of data records"   (   http://www.edfplus.info/specs/edf.html   ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) > Thanks to all. > Ivano > ------------------------------------------------------------------------ > > "No man can wear one face to himself   > and another to the multitude, > without finally getting bewildered   > as to which one is true." > > Nathaniel Hawthorne > > > _______________________________________________ > 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 a.stolk at fcdonders.ru.nl Mon Nov 7 08:17:04 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 7 Nov 2011 08:17:04 +0100 (CET) Subject: [FieldTrip] Trigger channel for edf In-Reply-To: <333620380.700845.1320650020258.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1197843141.700863.1320650224971.JavaMail.root@sculptor.zimbra.ru.nl> Sorry, correction, make that ft_read_header ----- "A. Stolk" schreef: > Van: "A. Stolk" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Maandag 7 november 2011 08:13:40 > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > Dear David, You'll need to determine your user-specific events, i.e. not the 'trial' type events that are automatically stored in your dataset by your acquisition software. Does your event matrix contain types anything else than 'trial'? For instance, try: event = ft_read_head(filename) unique({event.type}) Yours, Arjen > > ----- "David Iglesias López" schreef: > > Van: "David Iglesias López" > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Maandag 7 november 2011 02:29:15 > > Onderwerp: Re: [FieldTrip] Trigger channel for edf > > > > > > Hi, > > I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl. > > The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo. > > I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > > I don't know how to chop my data correctly. > > Thank, > > David > > From: r.oostenveld at donders.ru.nl > > Date: Sun, 20 Mar 2011 14:41:41 +0100 > > To: fieldtrip at donders.ru.nl > > Subject: Re: [FieldTrip] Trigger channel for edf > > Hi Ivano > > Good that it works. > > The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses).  > > FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure. > > best Robert  > > On 20 Mar 2011, at 13:24, Ivano Triggiani wrote: > > Hi, > > just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work. > > However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called " number of data records"   (   http://www.edfplus.info/specs/edf.html   ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!) > > Thanks to all. > > Ivano > > ------------------------------------------------------------------------ > > > > "No man can wear one face to himself   > > and another to the multitude, > > without finally getting bewildered   > > as to which one is true." > > > > Nathaniel Hawthorne > > > > > > _______________________________________________ > > 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 r.oostenveld at donders.ru.nl Mon Nov 7 10:22:27 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 7 Nov 2011 10:22:27 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl> Message-ID: Hi David On 7 Nov 2011, at 2:29, David Iglesias López wrote: > I would like like to simply make all my data as continuous cfg = []; cfg.dataset = 'filename.edf' cfg.continuous = 'yes' data = ft_preprocessing(cfg) should do that for you. See also http://fieldtrip.fcdonders.nl/faq/how_can_i_process_continuous_data_without_triggers > and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > I don't know how to chop my data correctly. Once the data is in memory (either segmented in many small pieces or one large piece), you can use ft_redefinetrial to change the segmentation (e.g. cut trials into shorter pieces or change from stimulus locked to response locked). In your case you can pass the trl to ft_redefinetrial. best Robert From drivolta81 at gmail.com Mon Nov 7 12:37:19 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 7 Nov 2011 12:37:19 +0100 Subject: [FieldTrip] sourceplot - beamforming Message-ID: Dear Fieldtrippers, I have a question about ft_sourceplot (version 20111009). I am following the tutorial on the reverse grid transformation ( http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization ). I can get to the end of the script and try to plot the relative change in power of the stimulus condition again the baseline (visual task). I have attached the figures I get from one subject only. First of all, it is upside-down. Is it correct? How to change this? Here is the script I use: mri = ft_read_mri(mri_name); cfg = []; cfg.downsample = 1; sourceDiff.dim = [17 20 17]; sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.units = 'mm'; cfg.opacitylim = [0.2 1.3]; ft_sourceplot(cfg,sourceDiff_Int); This is the structure of sourceDiff_Int: sourceDiff_Int = inside: [256x256x256 logical] avg: [1x1 struct] dim: [256 256 256] transform: [4x4 double] anatomy: [256x256x256 int16] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Thanks for the help, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ortho.jpg Type: image/jpeg Size: 25496 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: slice.jpg Type: image/jpeg Size: 23662 bytes Desc: not available URL: From davidig at hotmail.es Mon Nov 7 16:06:54 2011 From: davidig at hotmail.es (=?iso-8859-1?B?RGF2aWQgSWdsZXNpYXMgTPNwZXo=?=) Date: Mon, 7 Nov 2011 16:06:54 +0100 Subject: [FieldTrip] Trigger channel for edf In-Reply-To: References: <666077.74945.qm@web28614.mail.ukl.yahoo.com>, , <72AA1D0E-8CD5-47EA-8FE8-443502175BAA@donders.ru.nl>, , Message-ID: Hi Robert, And the end I got it before like this: cfg = []; cfg.dataset = filename; cfg.continuous = 'yes'; cfg.trialfun = 'trialfun_david'; cfg = ft_definetrial(cfg); dataout = ft_preprocessing(cfg); And it worked nicely. Thank you, David > From: r.oostenveld at donders.ru.nl > Date: Mon, 7 Nov 2011 10:22:27 +0100 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Trigger channel for edf > > Hi David > > On 7 Nov 2011, at 2:29, David Iglesias López wrote: > > I would like like to simply make all my data as continuous > > cfg = []; > cfg.dataset = 'filename.edf' > cfg.continuous = 'yes' > data = ft_preprocessing(cfg) > > should do that for you. See also > http://fieldtrip.fcdonders.nl/faq/how_can_i_process_continuous_data_without_triggers > > > and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples? > > I don't know how to chop my data correctly. > > > Once the data is in memory (either segmented in many small pieces or one large piece), you can use ft_redefinetrial to change the segmentation (e.g. cut trials into shorter pieces or change from stimulus locked to response locked). In your case you can pass the trl to ft_redefinetrial. > > best > Robert > > > _______________________________________________ > 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 julian.keil at gmail.com Mon Nov 7 16:12:36 2011 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Nov 2011 16:12:36 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: Hi, I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. The problem is, that switching to software-openGL is not supported: >> opengl software Warning: Switching to software OpenGL rendering is not supported on the MAC platform Does anyone have a hint how to change the renderer? Best, Julian Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > Hi Karl, > > To me, it sounds like a problem with the OpenGL drivers. > There was a discussion on that about VNC crashing on Linux, but maybe > it applies to your Mac configuration as well. See: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html > > Please, report back if you find a solution. > > Best, > > Gio > > On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >> Hello, >> I'm trying to use a 3d plot function and experiencing matlab crashes. As >> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >> vector of t values for each sensor. >> The plot appears correctly on the first attempt; however, any second >> attempts to use the function, i.e., to plot a different time point, cause >> the entire matlab session to crash. Since the whole session crashes, I don't >> have any error message to report. >> I'm using Matlab R2009B and Mac OSx Lion. >> Thanks for any feedback. >> karl >> >> >> >> Karl Doron, Ph.D. >> Department of Psychological and Brain Sciences >> University of California, Santa Barbara >> >> >> >> _______________________________________________ >> 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 BelluscB at ninds.nih.gov Mon Nov 7 17:41:35 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Mon, 7 Nov 2011 11:41:35 -0500 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: , Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> I ran into this problem a couple of months ago using a VNC connection on a PC platform. I used the following command: opengl neverselect at the prompt to force Matlab to use a different function. It hasn't crashed since. I assume this would work for a mac platform as well. good luck! Beth. ________________________________________ From: Julian Keil [julian.keil at gmail.com] Sent: Monday, November 07, 2011 10:12 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_plot_topo3d crash Hi, I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. The problem is, that switching to software-openGL is not supported: >> opengl software Warning: Switching to software OpenGL rendering is not supported on the MAC platform Does anyone have a hint how to change the renderer? Best, Julian Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > Hi Karl, > > To me, it sounds like a problem with the OpenGL drivers. > There was a discussion on that about VNC crashing on Linux, but maybe > it applies to your Mac configuration as well. See: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html > > Please, report back if you find a solution. > > Best, > > Gio > > On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >> Hello, >> I'm trying to use a 3d plot function and experiencing matlab crashes. As >> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >> vector of t values for each sensor. >> The plot appears correctly on the first attempt; however, any second >> attempts to use the function, i.e., to plot a different time point, cause >> the entire matlab session to crash. Since the whole session crashes, I don't >> have any error message to report. >> I'm using Matlab R2009B and Mac OSx Lion. >> Thanks for any feedback. >> karl >> >> >> >> Karl Doron, Ph.D. >> Department of Psychological and Brain Sciences >> University of California, Santa Barbara >> >> >> >> _______________________________________________ >> 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 julian.keil at gmail.com Mon Nov 7 18:24:16 2011 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Nov 2011 18:24:16 +0100 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> References: , <794DFDD3C128EF44AC49ADC58FD0090C05A0D615E6@NIHMLBX10.nih.gov> Message-ID: <64A977BA-4EAE-4CE3-AA91-CCFC08CFFF23@gmail.com> Hi, thanks for your reply, unfortunately this did not help. However, setting all the bug-workarounds in opengl to '1' did the trick. If anyone else has this problem, here's how it worked for me: * use "opengl info" to see if the workarounds are enabled * set the workarounds to '1': opengl('OpenGLBitmapZbufferBug',1) opengl('OpenGLWobbleTesselatorBug',1) opengl('OpenGLLineSmoothingBug',1) opengl('OpenGLClippedImageBug',1) Best, Julian Am 07.11.2011 um 17:41 schrieb Belluscio, Beth (NIH/NINDS) [E]: > I ran into this problem a couple of months ago using a VNC connection on a PC platform. I used the following command: opengl neverselect at the prompt to force Matlab to use a different function. It hasn't crashed since. I assume this would work for a mac platform as well. > > good luck! > Beth. > > ________________________________________ > From: Julian Keil [julian.keil at gmail.com] > Sent: Monday, November 07, 2011 10:12 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] ft_plot_topo3d crash > > Hi, > > I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. > The problem is, that switching to software-openGL is not supported: > >>> opengl software > Warning: Switching to software OpenGL rendering is not supported on the MAC platform > > Does anyone have a hint how to change the renderer? > > Best, > Julian > > > Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > >> Hi Karl, >> >> To me, it sounds like a problem with the OpenGL drivers. >> There was a discussion on that about VNC crashing on Linux, but maybe >> it applies to your Mac configuration as well. See: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html >> >> Please, report back if you find a solution. >> >> Best, >> >> Gio >> >> On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >>> Hello, >>> I'm trying to use a 3d plot function and experiencing matlab crashes. As >>> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >>> vector of t values for each sensor. >>> The plot appears correctly on the first attempt; however, any second >>> attempts to use the function, i.e., to plot a different time point, cause >>> the entire matlab session to crash. Since the whole session crashes, I don't >>> have any error message to report. >>> I'm using Matlab R2009B and Mac OSx Lion. >>> Thanks for any feedback. >>> karl >>> >>> >>> >>> Karl Doron, Ph.D. >>> Department of Psychological and Brain Sciences >>> University of California, Santa Barbara >>> >>> >>> >>> _______________________________________________ >>> 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 jan.schoffelen at donders.ru.nl Tue Nov 8 10:58:40 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 8 Nov 2011 10:58:40 +0100 Subject: [FieldTrip] sourceplot - beamforming In-Reply-To: References: Message-ID: Hi Davide, Apart from putting your computer monitor upside down you could reslice your anatomy prior to doing the interpolation (using ft_volumereslice). Best, Jan-Mathijs On Nov 7, 2011, at 12:37 PM, Davide Rivolta wrote: > > Dear Fieldtrippers, > > I have a question about ft_sourceplot (version 20111009). > > I am following the tutorial on the reverse grid transformation (http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization). > > I can get to the end of the script and try to plot the relative change in power of the stimulus condition again the baseline (visual task). > > I have attached the figures I get from one subject only. > > First of all, it is upside-down. Is it correct? How to change this? > > > Here is the script I use: > > mri = ft_read_mri(mri_name); > cfg = []; > cfg.downsample = 1; > sourceDiff.dim = [17 20 17]; > sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); > > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.units = 'mm'; > cfg.opacitylim = [0.2 1.3]; > ft_sourceplot(cfg,sourceDiff_Int); > > > > > > This is the structure of sourceDiff_Int: > > sourceDiff_Int = > > inside: [256x256x256 logical] > avg: [1x1 struct] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 int16] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > > Thanks for the help, > > Davide > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.dipompeo at unich.it Tue Nov 8 17:14:01 2011 From: f.dipompeo at unich.it (f.dipompeo at unich.it) Date: Tue, 08 Nov 2011 17:14:01 +0100 Subject: [FieldTrip] Power Time Course Message-ID: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> I would like to know if there is a ft function to calculate the Time Course of Power of Electric and Magnetic Channels and IC coming from ft_componentanalysis in the case of continuous resting state data. I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a "toi" large as my whole acquisition time window (the script is below). Time Course of Power should be obtained by summing up the results over all the frequencies. Thank you very much, Francesco ------------------------------------------------------- cfg=[]; cfg.method = 'mtmconvol'; cfg.output = 'powandcsd'; cfg.taper = 'hanning'; cfg.trials = 'all'; cfg.foi = 1:150; cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; cfg.t_ftimwin = 4./cfg.foi; [freq_comp_tr] = ft_freqanalysis(cfg,comp); From eelke.spaak at donders.ru.nl Tue Nov 8 17:33:13 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 8 Nov 2011 17:33:13 +0100 Subject: [FieldTrip] Power Time Course In-Reply-To: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> References: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> Message-ID: Dear Francesco, Your question is not entirely clear to me. Do you want to estimate the timecourse of the total (i.e. non-frequency-resolved) power in your signal? In that case, frequency analysis is not the way to go; basically your signal itself contains this information already (you may want to rectify (abs()) it first, or apply a hilbert transform). Also, I don't understand the reference to ft_componentanalysis. Furthermore, the code you paste in your email seems valid to me. (You could possibly simplify it by using cfg.toi = comp.time{1}; to get an estimate of power at each time point in your signal. ) What does not seem to work, in your case? Best, Eelke 2011/11/8 : > I would like to know if there is a ft function to calculate the Time Course > of Power of Electric and Magnetic Channels and IC coming from > ft_componentanalysis in the case of continuous resting state data. > > I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a > "toi" large as my whole acquisition time window (the script is below). > Time Course of Power should be obtained by summing up the results over all > the frequencies. > > Thank you very much, > > Francesco > > ------------------------------------------------------- > > cfg=[]; > cfg.method = 'mtmconvol'; > cfg.output = 'powandcsd'; > cfg.taper = 'hanning'; > cfg.trials = 'all'; > cfg.foi = 1:150; > cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; > cfg.t_ftimwin = 4./cfg.foi; > [freq_comp_tr] = ft_freqanalysis(cfg,comp); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From r.vandermeij at donders.ru.nl Tue Nov 8 23:09:16 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 08 Nov 2011 17:09:16 -0500 Subject: [FieldTrip] ft_plot_topo3d crash In-Reply-To: References: Message-ID: <4EB9A88C.5070103@donders.ru.nl> Hi Julian, As a sort of last-resort workaround: If you're not using it for publication quality figures, but for e.g. databrowsing, you could create a set of nasty looking figures by setting the renderer to zbuffer, instead of opengl. You can do it while creating a fig by figure('renderer','zbuffer'). Zbuffer doesn't work with transparency, which is essential for masking. If you don't use masking, it might actually look fine I think, but not entirely sure. At least you can get some workable figures now, maybe create publication quality on a different machine? Hope it's a bit useful, Cheers, Roemer On 07/11/2011 10:12, Julian Keil wrote: > Hi, > > I just ran into the same problem on my 64bit OSX Lion using the "triplot"-function. > The problem is, that switching to software-openGL is not supported: > >>> opengl software > Warning: Switching to software OpenGL rendering is not supported on the MAC platform > > Does anyone have a hint how to change the renderer? > > Best, > Julian > > > Am 06.11.2011 um 11:04 schrieb Gio Piantoni: > >> Hi Karl, >> >> To me, it sounds like a problem with the OpenGL drivers. >> There was a discussion on that about VNC crashing on Linux, but maybe >> it applies to your Mac configuration as well. See: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003850.html >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003852.html >> >> Please, report back if you find a solution. >> >> Best, >> >> Gio >> >> On Sat, Nov 5, 2011 at 17:55, Karl Doron wrote: >>> Hello, >>> I'm trying to use a 3d plot function and experiencing matlab crashes. As >>> arguments, I'm passing ft_plot_topo3d a 246x3 matrix from grad.pnt and a >>> vector of t values for each sensor. >>> The plot appears correctly on the first attempt; however, any second >>> attempts to use the function, i.e., to plot a different time point, cause >>> the entire matlab session to crash. Since the whole session crashes, I don't >>> have any error message to report. >>> I'm using Matlab R2009B and Mac OSx Lion. >>> Thanks for any feedback. >>> karl >>> >>> >>> >>> Karl Doron, Ph.D. >>> Department of Psychological and Brain Sciences >>> University of California, Santa Barbara >>> >>> >>> >>> _______________________________________________ >>> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Tue Nov 8 23:19:35 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 08 Nov 2011 17:19:35 -0500 Subject: [FieldTrip] Power Time Course In-Reply-To: References: <20111108171401.18285tvepy0mbbk9@webmail.unich.it> Message-ID: <4EB9AAF7.3010606@donders.ru.nl> Hi Francesco, I don't entirely understand what you referring to either, but it sounds at least like a within channel phenomenon? In that case, you can use cfg.output = 'pow', or 'fourier', which do not compute the between channel CSD, saving quite a bit memory. If you are interested in the total energy over time of your signal, but only for the 1-150 Hz part, it might be easier to do a bandpass, and taking the square of your raw signal (energy is usually squared amplitude I thought?). If that is what your intending though. Cheers, Roemer On 08/11/2011 11:33, Eelke Spaak wrote: > Dear Francesco, > > Your question is not entirely clear to me. Do you want to estimate the > timecourse of the total (i.e. non-frequency-resolved) power in your > signal? In that case, frequency analysis is not the way to go; > basically your signal itself contains this information already (you > may want to rectify (abs()) it first, or apply a hilbert transform). > Also, I don't understand the reference to ft_componentanalysis. > > Furthermore, the code you paste in your email seems valid to me. (You > could possibly simplify it by using cfg.toi = comp.time{1}; to get an > estimate of power at each time point in your signal. ) What does not > seem to work, in your case? > > Best, > Eelke > > > 2011/11/8: >> I would like to know if there is a ft function to calculate the Time Course >> of Power of Electric and Magnetic Channels and IC coming from >> ft_componentanalysis in the case of continuous resting state data. >> >> I tried to do it using ft_freqanalysis with 'mtmconvol' as method and a >> "toi" large as my whole acquisition time window (the script is below). >> Time Course of Power should be obtained by summing up the results over all >> the frequencies. >> >> Thank you very much, >> >> Francesco >> >> ------------------------------------------------------- >> >> cfg=[]; >> cfg.method = 'mtmconvol'; >> cfg.output = 'powandcsd'; >> cfg.taper = 'hanning'; >> cfg.trials = 'all'; >> cfg.foi = 1:150; >> cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; >> cfg.t_ftimwin = 4./cfg.foi; >> [freq_comp_tr] = ft_freqanalysis(cfg,comp); >> >> >> _______________________________________________ >> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Nov 9 12:49:18 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 9 Nov 2011 12:49:18 +0100 Subject: [FieldTrip] sourceplot - beamforming In-Reply-To: References: Message-ID: Dear Jan-Mathijs, Thank you for your email. I have done as you said. I ran ft_volumereslice. As you can see from the piture (source2) I get something really weird. I am using the correct cfg.dim, however I am not sure about the cfg.resolution. Where can I pick the correct value? In the case of the picture I used 1. After this, I run ft_sourceinterpolate and then ft_sourceplot. Is this the correct sequence? Source1 represents the source before running ft_volumereslice. Thanks for the advice, Davide On Tue, Nov 8, 2011 at 10:58 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > Apart from putting your computer monitor upside down you could reslice > your anatomy prior to doing the interpolation (using ft_volumereslice). > > Best, > > Jan-Mathijs > > On Nov 7, 2011, at 12:37 PM, Davide Rivolta wrote: > > > Dear Fieldtrippers, > > I have a question about ft_sourceplot (version 20111009). > > I am following the tutorial on the reverse grid transformation ( > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=normalization > ). > > I can get to the end of the script and try to plot the relative change in > power of the stimulus condition again the baseline (visual task). > > I have attached the figures I get from one subject only. > > First of all, it is upside-down. Is it correct? How to change this? > > > Here is the script I use: > > mri = ft_read_mri(mri_name); > cfg = []; > cfg.downsample = 1; > sourceDiff.dim = [17 20 17]; > sourceDiff_Int = ft_sourceinterpolate(cfg, sourceDiff , mri); > > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.units = 'mm'; > cfg.opacitylim = [0.2 1.3]; > ft_sourceplot(cfg,sourceDiff_Int); > > > > > > This is the structure of sourceDiff_Int: > > sourceDiff_Int = > > inside: [256x256x256 logical] > avg: [1x1 struct] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 int16] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > > Thanks for the help, > > Davide > _______________________________________________ > 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 > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Nov 9 16:00:30 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 09 Nov 2011 16:00:30 +0100 Subject: [FieldTrip] Wrong clustering of electrodes in newer FT versions? In-Reply-To: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> Message-ID: <4EBA958E.8070300@donders.ru.nl> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: > Hi Gregor, > > in principle the first level statistics that determine cluster > membership (and thereby cluster shapes etc.) can also vary from one > set of permutations to the next, esp. on the borders of a cluster > (this is why it is typically said that the localization of a cluster > is not as trustworthy as its existence). Other resaons for differences > are differing number of permutations - did you set everything the same? > > This said there might well be another problem - I hope the cluster > people can have a look into it. > > Best , > Michael > > > ------------------------------------------------------------------------ > *Von:* "Gregor Volberg" > *Gesendet:* Nov 2, 2011 6:34:43 PM > *An:* fieldtrip at donders.ru.nl > *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer FT > versions? > > Dear fieldtrip community, > > > I just encountered an unexpected behavior of FT that I would like > to share with the list. It is that the cluster permutation test > formed incorrect clusters from a given set of significant > electrodes in newer FT versions (ft-20111012; I also tried with > ft-20111028). > > > For example, when using an old ft version (ft-20100810) and > freqstatistics I get a negative cluster with 17 contiguous > electrodes. With the newer ft version, using the same data and the > same cfg, three significant electrodes that are spatially > contiguous to the other significant electrodes are not included in > the cluster. Also, three electrodes that are spatially seperated > and are actually part of the first cluster are grouped into a > separate cluster. I attached a picture with the respective > clusterplots where differences are marked with red arrows. > > I am aware that the permutation p-value for a given cluster can be > different in two separate analyses, but the grouping of > significant electrodes into clusters should always be the same, am > i right? I double-checked the cfg.neighbours, after conversion to > new 'struct' style, and they were identical in the "old ft" and > "new ft" analysis. Also, the stat.stat field and the > stat.cfg.clustercritval were the same for both analyses. Thus, the > same neighbourhood relations and the same significant electrodes > should be used for grouping. Yet I get different results... > > > I am almost sure that this is trivial, but I could not yet > replicate my old results with new FT and this makes me nervous. > Has someone made a similar experience? Or do newer versions of ft > use some further information besides cfg.neighbours for > clustering, somewhere in the *cfg.previuous perhaps, that I am not > aware of? Any comments are highly welcome. > > > Best regards, > > Gregor > > > cfg = []; > > cfg.neighbours = neighbours; > > cfg.minnbchan=1; > > cfg.avgoverfreq = 'yes'; > > cfg.avgovertime = 'yes'; > > cfg.method = 'montecarlo'; > > cfg.correctm = 'cluster'; > > cfg.statistic = 'depsamplesT'; > > cfg.tail = 0; > > cfg.alpha = 0.05; > > cfg.clusteralpha = 0.05; > > cfg.numrandomization = 1000; > > cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; > > cfg.uvar = 1; > > cfg.ivar = 2; > > cfg.latency = [2.24 2.53]; > > cfg.frequency = [17 21];% > > stat = ft_freqstatistics(cfg, DC, TC); > > > -- > Dr. rer. nat. Gregor Volberg > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > > _______________________________________________ > 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From olgafelso at googlemail.com Wed Nov 9 16:01:42 2011 From: olgafelso at googlemail.com (Olga Felsovalyi) Date: Wed, 9 Nov 2011 07:01:42 -0800 Subject: [FieldTrip] Granger Causality In-Reply-To: References: Message-ID: Hello, I am following the connectivity tutorial to perform granger causality analysis on iEEG data. Please help me understand a few things: 1. Please clarify exactly what the output values of the granger matrix represent. If I understand correctly, it is the log(variance of predicted time course/variance of actual time course). 2. What range of values should I be getting for granger causality for iEEG data? I am getting values ranging from 0 to 2.5. Values I see reported in papers seem to report peaks barley higher than 1. Thank you for your help! Olga -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.dipompeo at unich.it Wed Nov 9 19:18:42 2011 From: f.dipompeo at unich.it (f.dipompeo at unich.it) Date: Wed, 09 Nov 2011 19:18:42 +0100 Subject: [FieldTrip] Power time Course (Re: fieldtrip Digest, Vol 12, Issue 13) Message-ID: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> Dear Eelke and Roemer, thank you very much... Concerning your questions: > Your question is not entirely clear to me. Do you want to estimate the > timecourse of the total (i.e. non-frequency-resolved) power in your > signal? yes.. > Furthermore, the code you paste in your email seems valid to me. (You > could possibly simplify it by using cfg.toi = comp.time{1}; to get an > estimate of power at each time point in your signal. ) What does not > seem to work, in your case? The strange thing is that while the 'powspctrm' output field of ft_freqanalysis contains "NaN" values, I see its content by plotting it using ft_singleplotTFR.. Also summing up over all the frequencies in this way cfg=[]; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.trials = 'all'; cfg.foi = 1:150; cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; cfg.t_ftimwin = 4./cfg.foi; [freq_comp_tr] = ft_freqanalysis(cfg,comp); pow_f=sum(freq_comp_tr.powspctrm,2); pelec= squeeze(pow_f); both pow_f and pelec contain NaN values, but plotting it I see the content!? > I don't entirely understand what you referring to either, but it sounds > at least like a within channel phenomenon? In that case, you can use > cfg.output = 'pow', or 'fourier', which do not compute the between > channel CSD, saving quite a bit memory. Ok > If you are interested in the total energy over time of your signal, but > only for the 1-150 Hz part, it might be easier to do a bandpass, and > taking the square of your raw signal (energy is usually squared > amplitude I thought?). If that is what your intending though. Right, this is the way I do it in general.. It was just to try using field trip functions... Thank you very much, Francesco From r.oostenveld at donders.ru.nl Wed Nov 9 21:48:12 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 9 Nov 2011 21:48:12 +0100 Subject: [FieldTrip] Power time Course (Re: fieldtrip Digest, Vol 12, Issue 13) In-Reply-To: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> References: <20111109191842.65892d6m1ef6sw76@webmail.unich.it> Message-ID: <5E92D500-C3C5-4285-930C-1F2A033B8B26@donders.ru.nl> Hi Francesco, > The strange thing is that > while the 'powspctrm' output field of ft_freqanalysis contains "NaN" values, > I see its content by plotting it using ft_singleplotTFR.. At the edges of your time axis for the lower frequencies where the wavelet does not fully fit in the data window you'll get nans. That is for example what you see in the figure http://fieldtrip.fcdonders.nl/_detail/tutorial/timefrequencyanalysis/tfrhann7_24_mrt_2009.png?id=tutorial%3Atimefrequencyanalysis > Also summing up over all the frequencies in this way > > cfg=[]; > cfg.method = 'mtmconvol'; > cfg.output = 'pow'; > cfg.taper = 'hanning'; > cfg.trials = 'all'; > cfg.foi = 1:150; > cfg.toi = [comp.time{1}(1,1):0.02:comp.time{1}(1,end)]; > cfg.t_ftimwin = 4./cfg.foi; > [freq_comp_tr] = ft_freqanalysis(cfg,comp); > > pow_f=sum(freq_comp_tr.powspctrm,2); > pelec= squeeze(pow_f); > > both pow_f and pelec contain NaN values, but plotting it I see the content!? Doing normal math with nans does not work, i.e. nan+1=nan. You might want to use nansum instead of sum. But the FT plotting functions know how to plot the nans. >> If you are interested in the total energy over time of your signal, but >> only for the 1-150 Hz part, it might be easier to do a bandpass, and >> taking the square of your raw signal (energy is usually squared >> amplitude I thought?). If that is what your intending though. > > Right, this is the way I do it in general.. It was just to try using field trip functions... that is also possible (well, almost that is). Do ft_preprocessing on your data with a bandpassfilter and specify cfg.hilbert=yes. That will give you the amplitude envelope. It is not squared however, so it you want ft^2 you'll still have to do a little in matlab yourself for i=1:numel(data.trial), data.trial{i} = data.trial{i}.^2; end best Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.buiatti at gmail.com Thu Nov 10 12:31:39 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Thu, 10 Nov 2011 12:31:39 +0100 Subject: [FieldTrip] ft_neighbourplot Message-ID: Dear Fieldtrippers, I have a problem with ft_neighbourplot. Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 Neighbours in the Fieldtrip layout seem ok to me. However, when plotting them with ft_neighbourplot, the layout is clearly incorrect, it includes only about one third of the channels and when clicking on single channels, the output is incorrect (it always displays the same channel labels). I think this is a very useful command, so I would like to be able to use it! Below I have copied the corresponding commands. Am I doing anything wrong? Any help? Thanks Marco >> data data = hdr: [1x1 struct] label: {306x1 cell} time: {1x300 cell} trial: {1x300 cell} fsample: 1000 sampleinfo: [300x2 double] trialinfo: [300x1 double] grad: [1x1 struct] cfg: [1x1 struct] >> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >> neighbours = ft_prepare_neighbours(cfg, data) Trying to load sensor neighbours from a template Successfully loaded neighbour structure from /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat there are on average 6.9 neighbours per channel the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB neighbours = 1x104 struct array with fields: label neighblabel >> cfg=[];cfg.neighbours=neighbours; >> ft_neighbourplot(cfg,data) Using the gradiometer configuration from the dataset. the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, MEG0141, MEG0341 -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191 FRANCE Ph: +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From jm.horschig at donders.ru.nl Thu Nov 10 14:48:45 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 10 Nov 2011 14:48:45 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: Message-ID: <4EBBD63D.9000000@donders.ru.nl> Dear Marco, thanks for reporting this, I will have a look to see what is going wrong there. I'll let you know when I found the cause for your problem. Best regards, Jörn On 11/10/2011 12:31 PM, Marco Buiatti wrote: > Dear Fieldtrippers, > > I have a problem with ft_neighbourplot. > > Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 > > Neighbours in the Fieldtrip layout seem ok to me. > > However, when plotting them with ft_neighbourplot, the layout is > clearly incorrect, it includes only about one third of the channels > and when clicking on single channels, the output is incorrect (it > always displays the same channel labels). > > I think this is a very useful command, so I would like to be able to use it! > > Below I have copied the corresponding commands. > > Am I doing anything wrong? Any help? > > Thanks > > Marco > >>> data > data = > > hdr: [1x1 struct] > label: {306x1 cell} > time: {1x300 cell} > trial: {1x300 cell} > fsample: 1000 > sampleinfo: [300x2 double] > trialinfo: [300x1 double] > grad: [1x1 struct] > cfg: [1x1 struct] > >>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>> neighbours = ft_prepare_neighbours(cfg, data) > Trying to load sensor neighbours from a template > Successfully loaded neighbour structure from > /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat > there are on average 6.9 neighbours per channel > the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB > > neighbours = > > 1x104 struct array with fields: > label > neighblabel > >>> cfg=[];cfg.neighbours=neighbours; >>> ft_neighbourplot(cfg,data) > Using the gradiometer configuration from the dataset. > the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB > Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 tobias.staudigl at uni-konstanz.de Thu Nov 10 15:24:48 2011 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Thu, 10 Nov 2011 15:24:48 +0100 Subject: [FieldTrip] Granger Causality In-Reply-To: References: Message-ID: <4EBBDEB0.1030308@uni-konstanz.de> Hi Olga, 1. i think it should be -log (1 - (noise_covariance*transfer_matrix / spectral_matrix)). For details, I recommend this article (if you are using the bsmart toolbox as implemented in fieldtrip): Cui et al., 2008, Neural Networks http://www.ncbi.nlm.nih.gov/pubmed/18599267 2. i get granger values from 0 to 0.3 in my iEEG data. I am also not aware of studies getting granger values much higher than 1 (although there might be some) in real data, however, simulation studies do show much higher values. hope this helps a little, best, Tobias Am 09.11.2011 16:01, schrieb Olga Felsovalyi: > Hello, > > I am following the connectivity tutorial to perform granger causality > analysis on iEEG data. Please help me understand a few things: > > 1. Please clarify exactly what the output values of the granger matrix > represent. If I understand correctly, it is the log(variance of > predicted time course/variance of actual time course). > > 2. What range of values should I be getting for granger causality for > iEEG data? I am getting values ranging from 0 to 2.5. Values I see > reported in papers seem to report peaks barley higher than 1. > > Thank you for your help! > Olga > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 10 15:37:28 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 10 Nov 2011 15:37:28 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: Message-ID: <4EBBE1A8.80700@donders.ru.nl> Hi Marco, I analyzed your problem, here's the result ;) 1) You are choosing neuromag306mag_neighb as the template for your neighbours. This template is based on the neuromag306mag two-dimensional layout, *not* on the three dimensional data that you pur it. In general, 2D layouts should only be used for neighbour selection when no 3D gradiometer information is available, because these two do not coincide, and quite honestly, I do not know what the precise relationship between these two is (it's some projection on a 2D plane). This explains why the neighbours you defined look good when you use the 2D layout, but look ugly for the 3D gradiometer data. 2) When you are using neuromag306 data, you should use neuromag306_neighb as the template. This template is based on the 3D gradiometer information of our neuromag306 test data. This way, the neighbours are defined based on 3D information, the same space that your gradiometer information is in. Note however, that not all templates are optimized, yet, and also it might be a bit confusing that there are so many templates for the neuromag system. We might reconsider this. 3) An alternative would be, if you have gradiometer information at hand, to call prepare_neighbours with cfg.method='distance' or 'triangulation'. This ensures that your neighbours chosen are based on the same space than your sensors are in. Anyway, it is good that you checked with ft_neighbourplot, otherwise you might have received crappy results - so note to all of you, always check your neighbourselection ;) 4) There was indeed a bug in ft_neighbourplot causing always the same sensor names to show up in the command window. This is resolved in the newest version now (downloadable from tomorrow on). I changed some other things as well, hope I did not break anything crucial ;) I hope this helps! Should you have any other questions, feel free to ask! Best, Jörn On 11/10/2011 12:31 PM, Marco Buiatti wrote: > Dear Fieldtrippers, > > I have a problem with ft_neighbourplot. > > Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0 > > Neighbours in the Fieldtrip layout seem ok to me. > > However, when plotting them with ft_neighbourplot, the layout is > clearly incorrect, it includes only about one third of the channels > and when clicking on single channels, the output is incorrect (it > always displays the same channel labels). > > I think this is a very useful command, so I would like to be able to use it! > > Below I have copied the corresponding commands. > > Am I doing anything wrong? Any help? > > Thanks > > Marco > >>> data > data = > > hdr: [1x1 struct] > label: {306x1 cell} > time: {1x300 cell} > trial: {1x300 cell} > fsample: 1000 > sampleinfo: [300x2 double] > trialinfo: [300x1 double] > grad: [1x1 struct] > cfg: [1x1 struct] > >>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>> neighbours = ft_prepare_neighbours(cfg, data) > Trying to load sensor neighbours from a template > Successfully loaded neighbour structure from > /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat > there are on average 6.9 neighbours per channel > the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB > > neighbours = > > 1x104 struct array with fields: > label > neighblabel > >>> cfg=[];cfg.neighbours=neighbours; >>> ft_neighbourplot(cfg,data) > Using the gradiometer configuration from the dataset. > the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB > Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, > MEG0141, MEG0341 > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 r.oostenveld at donders.ru.nl Thu Nov 10 16:53:33 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 10 Nov 2011 16:53:33 +0100 Subject: [FieldTrip] positions available at the Donders Institute Message-ID: Dear FieldTrip list members, We currently have 3 positions available in the Donders Centre for Neuroscience, which is part of the Donders Institute. The closing date is January 1st 2012. 1. assistant professor of cognitive neuroscience key words: neuronal processing, chemical biology, viral delivery systems, ion channels and pumps 2. assistant professor of molecular and cellular neuroimaging key words: neuronal processing, optogenetics, gene delivery systems, "on-off switch". 3. professor of cellular neurophysiology key words: in vivo and in vivo rodent For more information, please visit: http://www.ru.nl/vacatures/details/details_afdeling_0?ond_ext=8 best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- From Gregor.Volberg at psychologie.uni-regensburg.de Fri Nov 11 18:08:50 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 11 Nov 2011 18:08:50 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EBA958E.8070300@donders.ru.nl> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> Message-ID: <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> Hi Jörn, thanks a lot for your response. I meanwhile checked some possible reasons for the different clusterings and I am coming closer. I could reproduce the described error with two different datasets (62 channel and 29 channel EEG), on two different computers and with two different versions of fieldtrip (2011 versions). First of all, I checked the neighbourhood structures. They are identical in my two analyses - same number of electrodes, same order, same neighbours. I checked that before and after entering neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are the same. I then searched through the code and found the channeighbstructmat that is constructed during the call of "clusterstat.m". I saved these matrices during the call of ft_freqstatistics and found that, with the same neighbourhood structures, the channeighbstructmat looked completely different in the old and new version. I then changed the code of the new FT "clusterstat.m" so that it reads in the channeighbstructmat obtained with the old FT version - then everything works perfect. Thus, the problem is most likely an incorrect channeighbstructmat. I figured out that in my case, FT calls an SPM8 function spm_bwlabeln during construction of the channeighbstructmat, which older version do not do. However, if I understood the code correctly, the SPM function should only be called for source data?! Could it be that, because my data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), FT assumes source data? Thanks again for your help, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" ( mailto:Gregor.Volberg at psychologie.uni-regensburg.de ) Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A ) _______________________________________________ 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From farsun at gmail.com Mon Nov 14 03:56:42 2011 From: farsun at gmail.com (Faraz Akram) Date: Mon, 14 Nov 2011 11:56:42 +0900 Subject: [FieldTrip] Need help in real time EEG Message-ID: Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr = ft_read_header('buffer://localhost:51244') it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Nov 14 09:51:55 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 14 Nov 2011 09:51:55 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> Message-ID: <4EC0D6AB.8090907@donders.ru.nl> Hi Gregor, that sounds indeed odd - although I am glad that I did not mess up something in prepare_neighbours ;) However, when I look at the code, it seems that channeighbstructmat will only be used when ~issource, and the call to the spm function will only be when issource, so I cannot see a direct relation between these two. Could you provide some more information, e.g. in what line and function you observed the call to the spm function? If you like you could also create a bugreport on http://bugzilla.fcdonders.nl/ for this. In any case, one of us will then tackle your problem as soon as possible and try to solve it. I hope that we can reproduce your bug here, else we might ask for a snippet of your data/workspace. Thanks in any case for having a precise look at what is going on! Best, Jörn On 11/11/2011 6:08 PM, Gregor Volberg wrote: > > Hi Jörn, > > > thanks a lot for your response. I meanwhile checked some possible > reasons for the different clusterings and I am coming closer. > > I could reproduce the described error with two different datasets (62 > channel and 29 channel EEG), on two different computers and with two > different versions of fieldtrip (2011 versions). First of all, I > checked the neighbourhood structures. They are identical in my two > analyses - same number of electrodes, same order, same neighbours. I > checked that before and after entering neighbours into the analyses > (by comparing the stat.cfg.neighbours) - they are the same. > > I then searched through the code and found the channeighbstructmat > that is constructed during the call of "clusterstat.m". I saved these > matrices during the call of ft_freqstatistics and found that, with the > same neighbourhood structures, the channeighbstructmat looked > completely different in the old and new version. I then changed the > code of the new FT "clusterstat.m" so that it reads in the > channeighbstructmat obtained with the old FT version - then everything > works perfect. > > > Thus, the problem is most likely an incorrect channeighbstructmat. I > figured out that in my case, FT calls an SPM8 function spm_bwlabeln > during construction of the channeighbstructmat, which older version do > not do. However, if I understood the code correctly, the SPM function > should only be called for source data?! Could it be that, because my > data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), > FT assumes source data? > > > Thanks again for your help, > > Gregor > > > > > > -- > Dr. rer. nat. Gregor Volberg > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> > Hi Gregor, > > did you check your neighbourselection? Maybe something is going wrong > there, given that a lot in this code has changed since 2010. Could you > check that using ft_neighbourplot? This would be the most logical > explanation why the results differ. It does not really make sense that > these three sensors form one cluster, because they should not be > neighbours of each other. So i would suppose that something is going > wrong there. > > Best, > Jörn > > > On 11/3/2011 4:57 PM, Michael Wibral wrote: > >> Hi Gregor, >> >> in principle the first level statistics that determine cluster >> membership (and thereby cluster shapes etc.) can also vary from one >> set of permutations to the next, esp. on the borders of a cluster >> (this is why it is typically said that the localization of a cluster >> is not as trustworthy as its existence). Other resaons for >> differences are differing number of permutations - did you set >> everything the same? >> >> This said there might well be another problem - I hope the cluster >> people can have a look into it. >> >> Best , >> Michael >> >> >> ------------------------------------------------------------------------ >> *Von:* "Gregor Volberg" >> >> *Gesendet:* Nov 2, 2011 6:34:43 PM >> *An:* fieldtrip at donders.ru.nl >> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer FT >> versions? >> >> Dear fieldtrip community, >> >> >> I just encountered an unexpected behavior of FT that I would like >> to share with the list. It is that the cluster permutation test >> formed incorrect clusters from a given set of significant >> electrodes in newer FT versions (ft-20111012; I also tried with >> ft-20111028). >> >> >> For example, when using an old ft version (ft-20100810) and >> freqstatistics I get a negative cluster with 17 contiguous >> electrodes. With the newer ft version, using the same data and >> the same cfg, three significant electrodes that are spatially >> contiguous to the other significant electrodes are not included >> in the cluster. Also, three electrodes that are spatially >> seperated and are actually part of the first cluster are grouped >> into a separate cluster. I attached a picture with the >> respective clusterplots where differences are marked with red >> arrows. >> >> I am aware that the permutation p-value for a given cluster can >> be different in two separate analyses, but the grouping of >> significant electrodes into clusters should always be the same, >> am i right? I double-checked the cfg.neighbours, after conversion >> to new 'struct' style, and they were identical in the "old ft" >> and "new ft" analysis. Also, the stat.stat field and the >> stat.cfg.clustercritval were the same for both analyses. Thus, >> the same neighbourhood relations and the same significant >> electrodes should be used for grouping. Yet I get different >> results... >> >> >> I am almost sure that this is trivial, but I could not yet >> replicate my old results with new FT and this makes me nervous. >> Has someone made a similar experience? Or do newer versions of ft >> use some further information besides cfg.neighbours for >> clustering, somewhere in the *cfg.previuous perhaps, that I am >> not aware of? Any comments are highly welcome. >> >> >> Best regards, >> >> Gregor >> >> >> cfg = []; >> >> cfg.neighbours = neighbours; >> >> cfg.minnbchan=1; >> >> cfg.avgoverfreq = 'yes'; >> >> cfg.avgovertime = 'yes'; >> >> cfg.method = 'montecarlo'; >> >> cfg.correctm = 'cluster'; >> >> cfg.statistic = 'depsamplesT'; >> >> cfg.tail = 0; >> >> cfg.alpha = 0.05; >> >> cfg.clusteralpha = 0.05; >> >> cfg.numrandomization = 1000; >> >> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >> >> cfg.uvar = 1; >> >> cfg.ivar = 2; >> >> cfg.latency = [2.24 2.53]; >> >> cfg.frequency = [17 21];% >> >> stat = ft_freqstatistics(cfg, DC, TC); >> >> >> -- >> Dr. rer. nat. Gregor Volberg >> ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >> _______________________________________________ >> >> >> >> >> 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 > > > > > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Nov 14 11:16:10 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 14 Nov 2011 11:16:10 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF@smkexch02.maartenskliniek.nl> Hi Faram I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] Sent: Monday, November 14, 2011 3:56 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Need help in real time EEG Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr = ft_read_header('buffer://localhost:51244') it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From mcoskun at mail.uh.edu Mon Nov 14 13:42:08 2011 From: mcoskun at mail.uh.edu (Mehmet-Akif Coskun) Date: Mon, 14 Nov 2011 06:42:08 -0600 Subject: [FieldTrip] Automatic artifact rejection after manual artifact rejection Message-ID: <723091d5a1f03.4ec0b840@mail.uh.edu> Dear Fieldtrippers, I would like to get some suggestions and comments on two issues. 1) Is that a good idea to do an automatic artifact rejection (using ft_artifact_zvalue) after a visual rejection+ICA? I am wondering whether any problems occur by doing so (such as removing useful data, adding noise). 2) The second issue is about visual rejection of continuous rest data. While doing a visual artifact rejection on continuous data using ft_browser and removing the artifacts, the long continuous data is automatically chopped off. For example if your data is 0-10 seconds and data between 1-2s are artifacts and you remove it, you will end up with tho segments (from 0-1s and 2-10s). Is it okay to just simply append the two portions since its resting data or will it cause a discontinuity. In case of a discontinuity, what should be done? Any suggestions will be greatly appreciated. Thanks in advance Best Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Mon Nov 14 16:19:17 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Mon, 14 Nov 2011 16:19:17 +0100 Subject: [FieldTrip] change in filter order for 'fir' type Message-ID: Dear FieldTrip users, As of tonight's FT version, the filter order for the 'fir' filter will change. It used to be set to 25 by default, but now will be a 'smarter' value based on your data and filter requests. You can still override this by setting, for example, cfg.bpfiltord=25; in order to obtain equivalent results as before if you typically used the default. By default, filtering in FT uses the Butterworth filter ('butter') instead of 'fir'; this default filter-type has not changed, and the filter-order for 'butter' has not changed either. Best, Johanna -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Mon Nov 14 17:46:26 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Mon, 14 Nov 2011 17:46:26 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EC0D6AB.8090907@donders.ru.nl> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> Message-ID: <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> Hi Jörn, yes, sure I can provide you with some more information. I hope to do so due Wednesday. Thanks a lot again for your kind support! Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> Hi Gregor, that sounds indeed odd - although I am glad that I did not mess up something in prepare_neighbours ;) However, when I look at the code, it seems that channeighbstructmat will only be used when ~issource, and the call to the spm function will only be when issource, so I cannot see a direct relation between these two. Could you provide some more information, e.g. in what line and function you observed the call to the spm function? If you like you could also create a bugreport on http://bugzilla.fcdonders.nl/ for this. In any case, one of us will then tackle your problem as soon as possible and try to solve it. I hope that we can reproduce your bug here, else we might ask for a snippet of your data/workspace. Thanks in any case for having a precise look at what is going on! Best, Jörn On 11/11/2011 6:08 PM, Gregor Volberg wrote: Hi Jörn, thanks a lot for your response. I meanwhile checked some possible reasons for the different clusterings and I am coming closer. I could reproduce the described error with two different datasets (62 channel and 29 channel EEG), on two different computers and with two different versions of fieldtrip (2011 versions). First of all, I checked the neighbourhood structures. They are identical in my two analyses - same number of electrodes, same order, same neighbours. I checked that before and after entering neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are the same. I then searched through the code and found the channeighbstructmat that is constructed during the call of "clusterstat.m". I saved these matrices during the call of ft_freqstatistics and found that, with the same neighbourhood structures, the channeighbstructmat looked completely different in the old and new version. I then changed the code of the new FT "clusterstat.m" so that it reads in the channeighbstructmat obtained with the old FT version - then everything works perfect. Thus, the problem is most likely an incorrect channeighbstructmat. I figured out that in my case, FT calls an SPM8 function spm_bwlabeln during construction of the channeighbstructmat, which older version do not do. However, if I understood the code correctly, the SPM function should only be called for source data?! Could it be that, because my data is a 4D grand-average structure ( dimord: 'subj_chan_freq_time'), FT assumes source data? Thanks again for your help, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0D ) >>> "Jörn M. Horschig" ( mailto:jm.horschig at donders.ru.nl ) 11/9/2011 4:00 PM >>> Hi Gregor, did you check your neighbourselection? Maybe something is going wrong there, given that a lot in this code has changed since 2010. Could you check that using ft_neighbourplot? This would be the most logical explanation why the results differ. It does not really make sense that these three sensors form one cluster, because they should not be neighbours of each other. So i would suppose that something is going wrong there. Best, Jörn On 11/3/2011 4:57 PM, Michael Wibral wrote: Hi Gregor, in principle the first level statistics that determine cluster membership (and thereby cluster shapes etc.) can also vary from one set of permutations to the next, esp. on the borders of a cluster (this is why it is typically said that the localization of a cluster is not as trustworthy as its existence). Other resaons for differences are differing number of permutations - did you set everything the same? This said there might well be another problem - I hope the cluster people can have a look into it. Best , Michael Von: "Gregor Volberg" ( mailto:Gregor.Volberg at psychologie.uni-regensburg.de ) Gesendet: Nov 2, 2011 6:34:43 PM An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions? Dear fieldtrip community, I just encountered an unexpected behavior of FT that I would like to share with the list. It is that the cluster permutation test formed incorrect clusters from a given set of significant electrodes in newer FT versions (ft-20111012; I also tried with ft-20111028). For example, when using an old ft version (ft-20100810) and freqstatistics I get a negative cluster with 17 contiguous electrodes. With the newer ft version, using the same data and the same cfg, three significant electrodes that are spatially contiguous to the other significant electrodes are not included in the cluster. Also, three electrodes that are spatially seperated and are actually part of the first cluster are grouped into a separate cluster. I attached a picture with the respective clusterplots where differences are marked with red arrows. I am aware that the permutation p-value for a given cluster can be different in two separate analyses, but the grouping of significant electrodes into clusters should always be the same, am i right? I double-checked the cfg.neighbours, after conversion to new 'struct' style, and they were identical in the "old ft" and "new ft" analysis. Also, the stat.stat field and the stat.cfg.clustercritval were the same for both analyses. Thus, the same neighbourhood relations and the same significant electrodes should be used for grouping. Yet I get different results... I am almost sure that this is trivial, but I could not yet replicate my old results with new FT and this makes me nervous. Has someone made a similar experience? Or do newer versions of ft use some further information besides cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I am not aware of? Any comments are highly welcome. Best regards, Gregor cfg = []; cfg.neighbours = neighbours; cfg.minnbchan=1; cfg.avgoverfreq = 'yes'; cfg.avgovertime = 'yes'; cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.statistic = 'depsamplesT'; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.numrandomization = 1000; cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; cfg.uvar = 1; cfg.ivar = 2; cfg.latency = [2.24 2.53]; cfg.frequency = [17 21];% stat = ft_freqstatistics(cfg, DC, TC); -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ( http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A ) _______________________________________________ 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 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 listfieldtrip at donders.ru.nlhttp://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 P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nlTel: +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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dimitri.papadopoulos at cea.fr Mon Nov 14 18:07:13 2011 From: dimitri.papadopoulos at cea.fr (Dimitri Papadopoulos Orfanos) Date: Mon, 14 Nov 2011 18:07:13 +0100 Subject: [FieldTrip] fileparts() : 4th argument and Matlab R2011b Message-ID: <4EC14AC1.4010303@cea.fr> Hello, Starting with Matlab R2010a, the fourth output argument of fileparts() is no longer supported and has been removed. Calling the function with more than three output arguments has been generating a warning since that version R2010a: http://www.mathworks.fr/help/techdoc/rn/br_bpq8-1.html#bsdnyvb-1 http://www.mathworks.fr/help/techdoc/ref/fileparts.html Although this is not clearly documented and starting with Matlab R2011b, calling the function with more than three output arguments does error. I've found a single occurrences of fileparts() being called with 4 arguments in ft_qualitycheck.m: [pathstr,name,extr,versn] = fileparts(exportname); Can you please fix it? Removing the spurious 4th argument should be enough since neither the 3rd not the 4th argument are used. There are actually a few other occurrences in subdirectories external/spm2 and external/spm8 but : - SPM8 will be fixed soon: the FIL maintainer is aware of the problem, has fixed it and a patch should be released before next January, - SPM2 is not maintained by the FIL anymore but I am in the process of fixing it here: http://sourceforge.net/projects/spm2/ Regards, -- Dimitri Papadopoulos CEA/Saclay I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France From dimitri.papadopoulos at cea.fr Mon Nov 14 22:22:23 2011 From: dimitri.papadopoulos at cea.fr (Dimitri Papadopoulos Orfanos) Date: Mon, 14 Nov 2011 22:22:23 +0100 Subject: [FieldTrip] fileio/README Message-ID: <4EC1868F.8010609@cea.fr> Hi, File fileio/README reads: The following files were downloaded from http://www.koders.com base64.c base64.h I cannot find these files anywhere. Have they been removed? Has the source code been integrated elsewhere? For what it's worth I've found Matlab files that could have replaced that C code: external/gifti/@gifti/private/base64decode.m external/gifti/@gifti/private/base64encode.m Please fix the README. Regards, -- Dimitri Papadopoulos CEA/Saclay I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France From b.reuderink at donders.ru.nl Tue Nov 15 10:44:28 2011 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Tue, 15 Nov 2011 10:44:28 +0100 Subject: [FieldTrip] fileio/README In-Reply-To: <4EC1868F.8010609@cea.fr> References: <4EC1868F.8010609@cea.fr> Message-ID: Dear Dimitri Papadopoulos, I have filed bug report #1157 for your request. You can track it's progress at http://bugzilla.fcdonders.nl/show_bug.cgi?id=1157 . Best regards, Boris On Mon, Nov 14, 2011 at 10:22 PM, Dimitri Papadopoulos Orfanos wrote: > Hi, > > File fileio/README reads: > >        The following files were downloaded from http://www.koders.com >          base64.c >          base64.h > > I cannot find these files anywhere. Have they been removed? Has the source > code been integrated elsewhere? For what it's worth I've found Matlab files > that could have replaced that C code: >        external/gifti/@gifti/private/base64decode.m >        external/gifti/@gifti/private/base64encode.m > > Please fix the README. > > Regards, > -- > Dimitri Papadopoulos > CEA/Saclay > I2BM, NeuroSpin > 91191 Gif-sur-Yvette cedex, France > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From farsun at gmail.com Wed Nov 16 04:52:56 2011 From: farsun at gmail.com (Faraz Akram) Date: Wed, 16 Nov 2011 12:52:56 +0900 Subject: [FieldTrip] Need help in real time EEG Message-ID: Dear Marianne Thanks for your reply. Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. Now i dont know exactly how to read that buffer. I think there will be no difference in reading from buffer due to difference of amplifier Kindly Guide me how you access data from buffer. Thanks Regards Faraz Akram On Mon, Nov 14, 2011 at 8:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Need help in real time EEG (Severens, Marianne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Nov 2011 11:16:10 +0100 > From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Need help in real time EEG > Message-ID: > < > 70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> > > Content-Type: text/plain; charset="us-ascii" > > Hi Faram > > I have a different amplifier, so I'm not sure if it works exactly the > same, but I can try to help you. > > Did you first start the fieldtrip buffer that 'reads' the data from the > amplifier? You can look up which one you have to use for your amplifier > here: http://fieldtrip.fcdonders.nl/development/realtime > > Best, Marianne > > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Faraz Akram [farsun at gmail.com] > Sent: Monday, November 14, 2011 3:56 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Need help in real time EEG > > Hi > > I am new to FieldTrip. > > I want to acess realtime EEG data in matlab from my BrainVision recorder. > when i use > > > > hdr = ft_read_header('buffer://localhost:51244') > > it gives an error > > Trying to close socket 3956 > ??? Error using ==> buffer > ERROR: tcp connection to buffer failed. > > Error in ==> ft_read_header at 815 > orig = buffer('get_hdr', [], host, port); > > > > Kindly Guide me what will i have to do > > > > Disclaimer > Vrijgave van de informatie verzonden met dit e-mail bericht is > geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking > van deze informatie is conform het Privacy reglement van de Sint > Maartenskliniek. De informatie is uitsluitend bestemd voor de > geadresseerde. Gebruik van deze informatie door anderen dan de > geadresseerde is, zonder voorafgaande schriftelijke toestemming van de > rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de > juiste en volledige overbrenging van de inhoud van een gezonden e-mail, > noch voor de ontvangst daarvan. > > Sint Maartenskliniek > Hengstdal 3, > 6574 NA Ubbergen (bij Nijmegen) > Telefoon 024-3659 911 > Telefax 024-3659 204 > KvK nummer 41055111 > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 12, Issue 19 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vitoria.piai at gmail.com Wed Nov 16 12:21:53 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 16 Nov 2011 12:21:53 +0100 Subject: [FieldTrip] Setting up MNE Message-ID: <4EC39CD1.1000109@gmail.com> Hi, I'm following the tutorial on MNE on the Wiki. I'm now at export MNE_ROOT= cd $MNE_ROOT/bin . ./mne_setup_sh export SUBJECTS_DIR= export SUBJECT=Subject01 When creating the source space, I get the error "/Could not find the MRI data//directory ..." /I now have to the same directory as I had it for Freesurfer a few steps later: export SUBJECTS_DIR= On another Wiki page, I found the following: MNE requires to set up the same environmental variables as FS. It is because MNE will look for the MRI data that is processed by FS (therefore, it will look for directories that are made by FS). Therefore, *SUBJECTS_DIR* environmental variable should refer to that directory where the anatomical data is (pre-processed by FS), and *SUBJECT* should refer to the sub-directory of SUBJECTS_DIR where the anatomical data is from the person whose data is analyzed. /subjects/: contains the output from FS I thought I had it right but I'm a bit confused now. What does MNE need exactly? I can't really figure out where it goes wrong from the MNE tutorial either. Thanx a lot, Vitória -- ** Please consider the environment - do you really need to print? ** -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Nov 16 12:21:40 2011 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 16 Nov 2011 12:21:40 +0100 Subject: [FieldTrip] Brainvision recorder RDA Message-ID: Dear all, I'm trying to connect to Brainvision recorder using the built-in RDA system and the rda2ft-files. I've got two computers; one with recorder and the rda2ft-files, and one with the rest of fieldtrip which should connect to the fieldtrip buffer. The goal is to get the secondary computer to show the subject its performance (for example; the rms of a single channel) within the task constraints. When running rda2ft.exe (with the parameters localhost and 51244) it does seem to connect; it shows the list of channels (all channels), their resolution, and their names, and some other assorted stuff. However, it then says: "Unrecognized packet type (10000), has size 24 - exiting" What does this mean, and how can I fix it? I've tried messing with the settings of recorder, but nothing I do seems to make a difference. Sincerely, Casper van Heck -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Wed Nov 16 14:33:17 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Wed, 16 Nov 2011 08:33:17 -0500 Subject: [FieldTrip] Setting up MNE In-Reply-To: <4EC39CD1.1000109@gmail.com> References: <4EC39CD1.1000109@gmail.com> Message-ID: Hello Vitória, it's probably more relevant to ask your question about MNE on the MNE mailing list: http://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis you can also find the MNE manual and tutorials online: http://martinos.org/mne/ Best, Alex disclaimer : I am one of the MNE developers. -- Alexandre Gramfort, PhD gramfort at nmr.mgh.harvard.edu Dept. of Radiology MGH Martinos Center / Harvard Medical School http://www-sop.inria.fr/members/Alexandre.Gramfort/ 2011/11/16 Vitória Magalhães Piai : > Hi, > > I'm following the tutorial on MNE on the Wiki. I'm now at > > export MNE_ROOT= > cd $MNE_ROOT/bin > . ./mne_setup_sh > export SUBJECTS_DIR= > export SUBJECT=Subject01 > > When creating the source space, I get the error "Could not find the MRI data > directory ..." > I now have to the same directory as I had it for Freesurfer a few steps > later:   export SUBJECTS_DIR= > > On another Wiki page, I found the following: > > MNE requires to set up the same environmental variables as FS. It is because > MNE will look for the MRI data that is processed by FS (therefore, it will > look for directories that are made by FS). Therefore, SUBJECTS_DIR > environmental variable should refer to that directory where the anatomical > data is (pre-processed by FS), and SUBJECT should refer to the sub-directory > of SUBJECTS_DIR where the anatomical data is from the person whose data is > analyzed. > > /subjects/: contains the output from FS > > I thought I had it right but I'm a bit confused now. What does MNE need > exactly? I can't really figure out where it goes wrong from the MNE tutorial > either. > > Thanx a lot, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > _______________________________________________ > 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 Graham.Little at nrc-cnrc.gc.ca Wed Nov 16 14:51:37 2011 From: Graham.Little at nrc-cnrc.gc.ca (Little, Graham) Date: Wed, 16 Nov 2011 05:51:37 -0800 Subject: [FieldTrip] Fitting a Magnetic Dipole Message-ID: Hi all, I am currently trying to Fit a dipole to HPI coil locations to perform head position correction in fieldtrip. Currently I am using the ft_dipolefitting function to generate the coil locations from a section of MEG data. Before running ft_dipolefitting I do an fft on the data to measure the complex valued MEG topography for each coil frequency. The topographies look great for each coil, you can definitely see where each dipole should be fitted, however when using ft_dipolefitting the locations I get back are incorrect. I believe this is due to the fact that ft_dipolefitting assumes an Equivalent Current Dipole, but the coils generate a Magnetic Dipole. Anyway to tell ft_dipolefitting to fit a Magnetic Dipole rather than the ECD solution. Any information would be helpful. Thanks, Graham From marco.buiatti at gmail.com Wed Nov 16 16:16:10 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Wed, 16 Nov 2011 16:16:10 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: <4EBBE1A8.80700@donders.ru.nl> References: <4EBBE1A8.80700@donders.ru.nl> Message-ID: Dear Jorn, thanks a lot for your feedback. Still I'm afraid the problem is not solved yet, and this is maybe due to the fact that Neuromag data are composed by three different types of sensors (two orthogonally oriented gradiometers and one magnetometer) for each location on the scalp. Therefore, though we have 306 sensors, we have 102 sensor locations only. In our lab, when we analyse the data in the sensor space, we perform statistical analysis either on each sensor separately or on magnetometers and on the norm of the two gradiometers (discussion on alternatives would be worth another thread...). This is the reason why I choose neuromag306mag_neighb. Concerning the two neighbours templates I have found the following: 1) As you also said, neuromag306mag_neighb contains a meaningful set of neighbours for each sensor. (a simple command to display them: for i=1:102 disp([neighbours(i).label 'neighbours:' neighbours(i).neighblabel']); end;) so I would use this for cluster-based statistical analysis in Fieldtrip (for any type of sensors). Neuromag users, do you agree? However, when plotting it with ft_neighbourplot, as you said the configuration is clearly uncorrect (though now neighbours are correctly listed on the command line as you said). It would be very useful to have a correct 3D representation of this. 2) The neighbours template neuromag306_neighb has the correct 3D form but what I get from my data is a mislabeling of all the sensors. Also, neighbours are clearly wrong (many sensors do not have any neighbours). Since as far as I understand sensors locations are in data.grad, I wonder whether sensor locations in my data are originally wrong... Below I have copied the commands I use to import my neuromag data in Fieldtrip, any help on this would be welcome, of course I can send you data if needed. Thanks again for you help, Marco cfg = []; cfg.continuous = 'yes'; cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; cfg.trialfun =par.trialfun; cfg.trialdef.channel='STI101'; cfg.trialdef.eventvalue=par.eventvalue; cfg.trialdef.prestim=-par.prestim; cfg.trialdef.poststim=par.poststim; cfg.delay = par.delay; cfg.channel = {'MEG'}; cfg.baselinewindow=[par.begt par.endt]; cfg.dataset = ['test_sss.fif']; cfg_loc = ft_definetrial(cfg); data= ft_preprocessing(cfg_loc); On 10 November 2011 15:37, "Jörn M. Horschig" wrote: > Hi Marco, > > I analyzed your problem, here's the result ;) > > 1) You are choosing neuromag306mag_neighb as the template for your > neighbours. This template is based on the neuromag306mag two-dimensional > layout, *not* on the three dimensional data that you pur it. In general, 2D > layouts should only be used for neighbour selection when no 3D gradiometer > information is available, because these two do not coincide, and quite > honestly, I do not know what the precise relationship between these two is > (it's some projection on a 2D plane). This explains why the neighbours you > defined look good when you use the 2D layout, but look ugly for the 3D > gradiometer data. > > 2) When you are using neuromag306 data, you should use neuromag306_neighb as > the template. This template is based on the 3D gradiometer information of > our neuromag306 test data. This way, the neighbours are defined based on 3D > information, the same space that your gradiometer information is in. > Note however, that not all templates are optimized, yet, and also it might > be a bit confusing that there are so many templates for the neuromag system. > We might reconsider this. > > 3) An alternative would be, if you have gradiometer information at hand, to > call prepare_neighbours with cfg.method='distance' or 'triangulation'. This > ensures that your neighbours chosen are based on the same space than your > sensors are in. Anyway, it is good that you checked with ft_neighbourplot, > otherwise you might have received crappy results - so note to all of you, > always check your neighbourselection ;) > > 4) There was indeed a bug in ft_neighbourplot causing always the same sensor > names to show up in the command window. This is resolved in the newest > version now (downloadable from tomorrow on). I changed some other things as > well, hope I did not break anything crucial ;) > > I hope this helps! Should you have any other questions, feel free to ask! > > Best, > Jörn > > On 11/10/2011 12:31 PM, Marco Buiatti wrote: >> >> Dear Fieldtrippers, >> >> I have a problem with ft_neighbourplot. >> >> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version >> 7.12.0 >> >> Neighbours in the Fieldtrip layout seem ok to me. >> >> However, when plotting them with ft_neighbourplot, the layout is >> clearly incorrect, it includes only about one third of the channels >> and when clicking on single channels, the output is incorrect (it >> always displays the same channel labels). >> >> I think this is a very useful command, so I would like to be able to use >> it! >> >> Below I have copied the corresponding commands. >> >> Am I doing anything wrong? Any help? >> >> Thanks >> >> Marco >> >>>> data >> >> data = >> >> hdr: [1x1 struct] >> label: {306x1 cell} >> time: {1x300 cell} >> trial: {1x300 cell} >> fsample: 1000 >> sampleinfo: [300x2 double] >> trialinfo: [300x1 double] >> grad: [1x1 struct] >> cfg: [1x1 struct] >> >>>> cfg=[]; cfg.method='template'; >>>> cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>>> neighbours = ft_prepare_neighbours(cfg, data) >> >> Trying to load sensor neighbours from a template >> Successfully loaded neighbour structure from >> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat >> there are on average 6.9 neighbours per channel >> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB >> >> neighbours = >> >> 1x104 struct array with fields: >> label >> neighblabel >> >>>> cfg=[];cfg.neighbours=neighbours; >>>> ft_neighbourplot(cfg,data) >> >> Using the gradiometer configuration from the dataset. >> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB >> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, >> MEG0141, MEG0341 >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 r.oostenveld at donders.ru.nl Wed Nov 16 16:57:38 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 16:57:38 +0100 Subject: [FieldTrip] Brainvision recorder RDA In-Reply-To: References: Message-ID: <2FB69C66-2F40-484C-AB6A-46A48E8BC1D1@donders.ru.nl> Dear Casper, The message did not sound familiar so I whad to go into the code to look it up. In fieldtrip/realtime/acquisition/brainamp/rda2ft.c there is this section switch(header.nType) { case RDA_START_MSG: handleStartPacket(ftSocket, header.nSize, buf); break; case RDA_INT_MSG: case RDA_FLOAT_MSG: handleDataPacket(ftSocket, header.nSize, buf); break; case RDA_STOP_MSG: printf("\nRemote Data Acquisition stopped\n\n"); break; default: fprintf(stderr, "Unrecognized packet type (%i), has size %i - exiting\n", header.nType, header.nSize); keepRunning = 0; break; } where the last case pertains to your message. So shat seens to happen is that rda2ft receives a packet from Recorder and subsequently has to interpret its content. The expected values are #define RDA_START_MSG 1 #define RDA_INT_MSG 2 #define RDA_STOP_MSG 3 #define RDA_FLOAT_MSG 4 but apparently your Recorder sends a different package of type "1000". I don't know why that happens. Perhaps it is a different version of the software. My first suggested solution would be to change keepRunning = 0; into keepRunning = 1; and then hope that dropping this particular packet does not cause problems later. Better would be to try to identify what the packet contains and actually deal with it, but I would not know where to get accessible documentation for this. I hope that you are able to make the change and recompile this yourself. If not, please file a request for the code enhancement at http://bugzilla.fcdonders.nl (create account, file new bug, change status in "enhancement") and one of us will look at it. best regards, Robert On 16 Nov 2011, at 12:21, Casper van Heck wrote: > Dear all, > > I'm trying to connect to Brainvision recorder using the built-in RDA system and the rda2ft-files. I've got two computers; one with recorder and the rda2ft-files, and one with the rest of fieldtrip which should connect to the fieldtrip buffer. The goal is to get the secondary computer to show the subject its performance (for example; the rms of a single channel) within the task constraints. > > When running rda2ft.exe (with the parameters localhost and 51244) it does seem to connect; it shows the list of channels (all channels), their resolution, and their names, and some other assorted stuff. However, it then says: > "Unrecognized packet type (10000), has size 24 - exiting" > > What does this mean, and how can I fix it? I've tried messing with the settings of recorder, but nothing I do seems to make a difference. > > Sincerely, > > Casper van Heck > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Wed Nov 16 17:06:54 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 17:06:54 +0100 Subject: [FieldTrip] Fitting a Magnetic Dipole In-Reply-To: References: Message-ID: <0FD87660-0CCE-4C90-B501-78C4C748F51B@donders.ru.nl> Hi Graham If you specify cfg.vol = []; cfg.vol.type = 'infinite'; and pass a gradiometer structure(*) along to ft_dipolefitting (or ft_sourceanalysis, ft_prepare_leadfield or similar function), it will be interpreted as a magnetic dipole in an infinite vacuum. So this allows you to localize the magnetic HPI coil. Fitting the complex-valued topography after ft_freqanalysis is in principle also supported in the ft_dipolefitting function, but I should admit that that has not been used a lot (and certainly not recently). The dipole fit implementation of the Fourier data has been more or less hacked into the code and is therefore also not documented (but you can look in the code to see how it works). In case it fails on the frequency data, you are probably better off to work your way around it and convert the topography into a datastructure that resembles the output of ft_timelockanalysis before feeding it into ft_dipolefitting. best regards, Robert PS *) Note that with the same vol structure and an eeg electrode structure it would have been interpreted as an electric current dipole in an infinite homogenous conduction medium On 16 Nov 2011, at 14:51, Little, Graham wrote: > Hi all, > > I am currently trying to Fit a dipole to HPI coil locations to perform head position correction in fieldtrip. Currently I am using the ft_dipolefitting function to generate the coil locations from a section of MEG data. Before running ft_dipolefitting I do an fft on the data to measure the complex valued MEG topography for each coil frequency. The topographies look great for each coil, you can definitely see where each dipole should be fitted, however when using ft_dipolefitting the locations I get back are incorrect. > > I believe this is due to the fact that ft_dipolefitting assumes an Equivalent Current Dipole, but the coils generate a Magnetic Dipole. Anyway to tell ft_dipolefitting to fit a Magnetic Dipole rather than the ECD solution. > > Any information would be helpful. > Thanks, > Graham > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Wed Nov 16 17:29:59 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 16 Nov 2011 17:29:59 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <43639A6D-3655-4ED7-AC3F-D9FB5664A1A2@donders.ru.nl> Dear Faraz, For a brainamp I would recommend the rda2ft.exe application instead of the matlab-based ft_realtime_brainampproxy implementation. This page has more details: http://fieldtrip.fcdonders.nl/development/realtime/rda Furthermore, I suggest you work your way through the specific getting started section at http://fieldtrip.fcdonders.nl/getting_started/realtime, starting from a simulated data stream and simlply visualizing the data, before you move on to realtime EEG and more serious analyses. best regards, Robert On 16 Nov 2011, at 4:52, Faraz Akram wrote: > Dear Marianne > > Thanks for your reply. > > Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. > Now i dont know exactly how to read that buffer. > > I think there will be no difference in reading from buffer due to difference of amplifier > Kindly Guide me how you access data from buffer. > > Thanks > > Regards > Faraz Akram > > > On Mon, Nov 14, 2011 at 8:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Need help in real time EEG (Severens, Marianne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Nov 2011 11:16:10 +0100 > From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Need help in real time EEG > Message-ID: > <70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> > > Content-Type: text/plain; charset="us-ascii" > > Hi Faram > > I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. > > Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime > > Best, Marianne > > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] > Sent: Monday, November 14, 2011 3:56 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Need help in real time EEG > > Hi > > I am new to FieldTrip. > > I want to acess realtime EEG data in matlab from my BrainVision recorder. > when i use > > > > hdr = ft_read_header('buffer://localhost:51244') > > it gives an error > > Trying to close socket 3956 > ??? Error using ==> buffer > ERROR: tcp connection to buffer failed. > > Error in ==> ft_read_header at 815 > orig = buffer('get_hdr', [], host, port); > > > > Kindly Guide me what will i have to do > > > > Disclaimer > Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. > > Sint Maartenskliniek > Hengstdal 3, > 6574 NA Ubbergen (bij Nijmegen) > Telefoon 024-3659 911 > Telefax 024-3659 204 > KvK nummer 41055111 > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 12, Issue 19 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m.severens at maartenskliniek.nl Wed Nov 16 18:08:47 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Wed, 16 Nov 2011 18:08:47 +0100 Subject: [FieldTrip] Need help in real time EEG In-Reply-To: References: Message-ID: <1507126827.1398584.1321463329928.JavaMail.rim@b27.c19.bise7.blackberry> Hi Faraz I think you should use a different port in the ft_read_header function: hdr � �= ft_read_header('buffer://localhost:1972') 51244 is the port where the brainvision server sends the data to. Then the fieldtrip buffer reads it from this port and send is to port 1972. At least if you use the default settings. If this still doesn't work, check if your firewall is blocking one of these ports. Hope this helps! Best Marianne Verzonden vanaf mijn BlackBerry�-toestel ________________________________ From: Faraz Akram Sender: "fieldtrip-bounces at donders.ru.nl" Date: Wed, 16 Nov 2011 04:52:56 +0100 To: fieldtrip at donders.ru.nl ReplyTo: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Need help in real time EEG Dear�Marianne Thanks for your reply. Yes i started fieldtrip buffer by "ft_realtime_brainampproxy(cfg)", it starts writing EEG data to buffer. Now i dont know exactly how to read that buffer. I think there will be no difference in reading from buffer due to difference of amplifier Kindly Guide me how you access data from buffer. Thanks Regards Faraz Akram On Mon, Nov 14, 2011 at 8:00 PM, > wrote: Send fieldtrip mailing list submissions to � � � �fieldtrip at donders.ru.nl To subscribe or unsubscribe via the World Wide Web, visit � � � �http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to � � � �fieldtrip-request at donders.ru.nl You can reach the person managing the list at � � � �fieldtrip-owner at donders.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: � 1. Re: Need help in real time EEG (Severens, Marianne) ---------------------------------------------------------------------- Message: 1 Date: Mon, 14 Nov 2011 11:16:10 +0100 From: "Severens, Marianne" > To: Email discussion list for the FieldTrip project � � � �> Subject: Re: [FieldTrip] Need help in real time EEG Message-ID: � � � �<70FC3ACFFB46314EBEAF9101EA45F50E06D145F2FF at smkexch02.maartenskliniek.nl> Content-Type: text/plain; charset="us-ascii" Hi Faram I have a different amplifier, so I'm not sure if it works exactly the same, but I can try to help you. Did you first start the fieldtrip buffer that 'reads' the data from the amplifier? You can look up which one you have to use for your amplifier here: http://fieldtrip.fcdonders.nl/development/realtime Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Faraz Akram [farsun at gmail.com] Sent: Monday, November 14, 2011 3:56 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Need help in real time EEG Hi I am new to FieldTrip. I want to acess realtime EEG data in matlab from my BrainVision recorder. when i use hdr � �= ft_read_header('buffer://localhost:51244') �it gives an error Trying to close socket 3956 ??? Error using ==> buffer ERROR: tcp connection to buffer failed. Error in ==> ft_read_header at 815 � � �orig = buffer('get_hdr', [], host, port); Kindly Guide me what will i have to do Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 12, Issue 19 ***************************************** ________________________________ Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.a.beulen at rug.nl Thu Nov 17 12:14:00 2011 From: m.a.beulen at rug.nl (Marijke Beulen) Date: Thu, 17 Nov 2011 12:14:00 +0100 Subject: [FieldTrip] error in ft_prepare_layout Message-ID: Dear FieldTrip users, I have just started using FieldTrip (the latest version), but I have run into what looks like a bug. I basically just followed the artifact removal steps from the FieldTrip for dummies document. After doing the ICA on some EEG data, I tried to look at the resulting ic_data with ft_databrowser(cfg,ic_data), but then I get the following error: ??? Undefined function or variable 'ftFuncTimer'. Error in ==> ft_postamble_callinfo at 17 cfg.callinfo.proctime = toc(ftFuncTimer); Error in ==> ft_postamble at 27 evalin('caller', ['ft_postamble_' cmd]); Error in ==> ft_prepare_layout>sens2lay at 783 ft_postamble callinfo Error in ==> ft_prepare_layout at 252 lay = sens2lay(cfg.elec, cfg.rotate, cfg.projection, cfg.style); Error in ==> ft_databrowser at 162 cfg.layout = ft_prepare_layout(tmpcfg); If I understand correctly, ft_postamble is called at the end of the function sens2lay within ft_prepare_layout and it tries to calculate the amount of time and memory used, but it has no start measurement to compare with because these variables don't exist. The only time when ft_preamble is called seems to be at the beginning of ft_prepare_layout, and the output of this is not passed on to the other functions it calls. When someone else tried to do the same thing with an older version of FieldTrip, it worked normally. Is this a bug in the newer version, or am I doing something wrong? Thanks in advance for your help, Marijke Beulen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpnv2006 at gmail.com Thu Nov 17 13:39:19 2011 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 17 Nov 2011 13:39:19 +0100 Subject: [FieldTrip] Align EEG electrode problem Message-ID: Hello I am having problems using the 'Interactive method' of the ft_electroderealign function. After I align the electrodes, I closed the figure to get the new position, but I got this error. --------------------------------------------------------------------------- ??? Reference to non-existent field 'pnt'. Error in ==> ft_electroderealign at 489 norm.chanpos = warp_apply(norm.m, orig.pnt); --------------------------------------------------------------------------- I tracked the error and I found that in the general setup of the function ft_electroderealign, the line: ft_preamble trackconfig Is changing the name of the cfg.elec.pnt variable for: cfg.elec.elecpos I think that is the origin or the error, because I am losing the pnt field. Any suggestions? Regards, Juan Pablo Neira Vesga Christian Albrecht Universität zu Kiel From jm.horschig at donders.ru.nl Thu Nov 17 14:45:42 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Nov 2011 14:45:42 +0100 Subject: [FieldTrip] ft_neighbourplot In-Reply-To: References: <4EBBE1A8.80700@donders.ru.nl> Message-ID: <4EC51006.9070504@donders.ru.nl> Dear Marco, unfortunately, we are not using neuromag data in our centre, thus I cannot really recommend anything. However, the neuromag306_neighb template should contain correct neighbours, if the test data that we have here is correct. But, as I said, we cannot test this here. The easiest way to proceed for you would be to use cfg.method='triangulation' or cfg.method='distance' for now. If the plot from ft_neighbourplot looks incorrect, then also all clusters on sensor-level will suffer from this and be wrong. It should definitely look alright with one of the other methods. For reasons of consistency, would you be willing to share your data.grad with me , so that I can check what (if) needs to be changed in the neighbour-template? E.g. if you just sent me a snippet of you data with one trial in it, I could check this. Furthermore, I cannot comment on how you import the data to FieldTrip - it looks alright to me, but I never did this myself ;) Best, Jörn On 11/16/2011 4:16 PM, Marco Buiatti wrote: > Dear Jorn, > > thanks a lot for your feedback. Still I'm afraid the problem is not > solved yet, and this is maybe due to the fact that Neuromag data are > composed by three different types of sensors (two orthogonally > oriented gradiometers and one magnetometer) for each location on the > scalp. > Therefore, though we have 306 sensors, we have 102 sensor locations only. > > In our lab, when we analyse the data in the sensor space, we perform > statistical analysis either on each sensor separately or on > magnetometers and on the norm of the two gradiometers (discussion on > alternatives would be worth another thread...). > > This is the reason why I choose neuromag306mag_neighb. > > Concerning the two neighbours templates I have found the following: > 1) As you also said, neuromag306mag_neighb contains a meaningful set > of neighbours for each sensor. > (a simple command to display them: > for i=1:102 disp([neighbours(i).label 'neighbours:' > neighbours(i).neighblabel']); end;) > so I would use this for cluster-based statistical analysis in > Fieldtrip (for any type of sensors). > Neuromag users, do you agree? > > However, when plotting it with ft_neighbourplot, as you said the > configuration is clearly uncorrect (though now neighbours are > correctly listed on the command line as you said). It would be very > useful to have a correct 3D representation of this. > > 2) The neighbours template neuromag306_neighb has the correct 3D form > but what I get from my data is a mislabeling of all the sensors. Also, > neighbours are clearly wrong (many sensors do not have any > neighbours). Since as far as I understand sensors locations are in > data.grad, I wonder whether sensor locations in my data are originally > wrong... Below I have copied the commands I use to import my neuromag > data in Fieldtrip, any help on this would be welcome, of course I can > send you data if needed. > > Thanks again for you help, > > Marco > > cfg = []; > cfg.continuous = 'yes'; > cfg.headerformat = 'neuromag_mne'; > cfg.dataformat = 'neuromag_mne'; > cfg.trialfun =par.trialfun; > cfg.trialdef.channel='STI101'; > cfg.trialdef.eventvalue=par.eventvalue; > cfg.trialdef.prestim=-par.prestim; > cfg.trialdef.poststim=par.poststim; > cfg.delay = par.delay; > cfg.channel = {'MEG'}; > cfg.baselinewindow=[par.begt par.endt]; > cfg.dataset = ['test_sss.fif']; > cfg_loc = ft_definetrial(cfg); > data= ft_preprocessing(cfg_loc); > > On 10 November 2011 15:37, "Jörn M. Horschig" wrote: >> Hi Marco, >> >> I analyzed your problem, here's the result ;) >> >> 1) You are choosing neuromag306mag_neighb as the template for your >> neighbours. This template is based on the neuromag306mag two-dimensional >> layout, *not* on the three dimensional data that you pur it. In general, 2D >> layouts should only be used for neighbour selection when no 3D gradiometer >> information is available, because these two do not coincide, and quite >> honestly, I do not know what the precise relationship between these two is >> (it's some projection on a 2D plane). This explains why the neighbours you >> defined look good when you use the 2D layout, but look ugly for the 3D >> gradiometer data. >> >> 2) When you are using neuromag306 data, you should use neuromag306_neighb as >> the template. This template is based on the 3D gradiometer information of >> our neuromag306 test data. This way, the neighbours are defined based on 3D >> information, the same space that your gradiometer information is in. >> Note however, that not all templates are optimized, yet, and also it might >> be a bit confusing that there are so many templates for the neuromag system. >> We might reconsider this. >> >> 3) An alternative would be, if you have gradiometer information at hand, to >> call prepare_neighbours with cfg.method='distance' or 'triangulation'. This >> ensures that your neighbours chosen are based on the same space than your >> sensors are in. Anyway, it is good that you checked with ft_neighbourplot, >> otherwise you might have received crappy results - so note to all of you, >> always check your neighbourselection ;) >> >> 4) There was indeed a bug in ft_neighbourplot causing always the same sensor >> names to show up in the command window. This is resolved in the newest >> version now (downloadable from tomorrow on). I changed some other things as >> well, hope I did not break anything crucial ;) >> >> I hope this helps! Should you have any other questions, feel free to ask! >> >> Best, >> Jörn >> >> On 11/10/2011 12:31 PM, Marco Buiatti wrote: >>> Dear Fieldtrippers, >>> >>> I have a problem with ft_neighbourplot. >>> >>> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version >>> 7.12.0 >>> >>> Neighbours in the Fieldtrip layout seem ok to me. >>> >>> However, when plotting them with ft_neighbourplot, the layout is >>> clearly incorrect, it includes only about one third of the channels >>> and when clicking on single channels, the output is incorrect (it >>> always displays the same channel labels). >>> >>> I think this is a very useful command, so I would like to be able to use >>> it! >>> >>> Below I have copied the corresponding commands. >>> >>> Am I doing anything wrong? Any help? >>> >>> Thanks >>> >>> Marco >>> >>>>> data >>> data = >>> >>> hdr: [1x1 struct] >>> label: {306x1 cell} >>> time: {1x300 cell} >>> trial: {1x300 cell} >>> fsample: 1000 >>> sampleinfo: [300x2 double] >>> trialinfo: [300x1 double] >>> grad: [1x1 struct] >>> cfg: [1x1 struct] >>> >>>>> cfg=[]; cfg.method='template'; >>>>> cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat'; >>>>> neighbours = ft_prepare_neighbours(cfg, data) >>> Trying to load sensor neighbours from a template >>> Successfully loaded neighbour structure from >>> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat >>> there are on average 6.9 neighbours per channel >>> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB >>> >>> neighbours = >>> >>> 1x104 struct array with fields: >>> label >>> neighblabel >>> >>>>> cfg=[];cfg.neighbours=neighbours; >>>>> ft_neighbourplot(cfg,data) >>> Using the gradiometer configuration from the dataset. >>> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB >>> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131, >>> MEG0141, MEG0341 >>> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> 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 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 Nov 17 14:59:42 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Nov 2011 14:59:42 +0100 Subject: [FieldTrip] Align EEG electrode problem In-Reply-To: References: Message-ID: <4EC5134E.5060404@donders.ru.nl> Hey Juan, We rearranged the structure that contains sensor positions, thereby changed the names of some fields. Indeed, what you describe is causing the error, but the real error is that ft_electroderealign has not been changed accordingly. I created a bug out of your report. Thanks for letting us know. http://bugzilla.fcdonders.nl/show_bug.cgi?id=1165 I think a fix would be to change orig.pnt to orig.chanpos, then everything should work fine. Could you check whether this works and let me know? Best, Jörn If it still does not work, please let me/us know On 11/17/2011 1:39 PM, Juan Pablo Neira wrote: > Hello > > I am having problems using the 'Interactive method' of the > ft_electroderealign function. After I align the electrodes, I closed > the figure to get the new position, but I got this error. > --------------------------------------------------------------------------- > ??? Reference to non-existent field 'pnt'. > > Error in ==> ft_electroderealign at 489 > norm.chanpos = warp_apply(norm.m, orig.pnt); > --------------------------------------------------------------------------- > I tracked the error and I found that in the general setup of the > function ft_electroderealign, the line: > > ft_preamble trackconfig > > Is changing the name of the cfg.elec.pnt variable for: > > cfg.elec.elecpos > > I think that is the origin or the error, because I am losing the pnt > field. Any suggestions? > > Regards, > > Juan Pablo Neira Vesga > Christian Albrecht Universität zu Kiel > > _______________________________________________ > 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 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 jpnv2006 at gmail.com Thu Nov 17 15:16:49 2011 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 17 Nov 2011 15:16:49 +0100 Subject: [FieldTrip] Align EEG electrode problem In-Reply-To: <4EC5134E.5060404@donders.ru.nl> References: <4EC5134E.5060404@donders.ru.nl> Message-ID: Hi Jörn, I did what you said and the script is working. Thank you very much. Juan Pablo Neira Vesga Christian Albrecht Universität zu Kiel 2011/11/17 "Jörn M. Horschig" : > Hey Juan, > > We rearranged the structure that contains sensor positions, thereby changed > the names of some fields. Indeed, what you describe is causing the error, > but the real error is that ft_electroderealign has not been changed > accordingly. I created a bug out of your report. Thanks for letting us know. > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1165 > I think a fix would be to change orig.pnt to orig.chanpos, then everything > should work fine. Could you check whether this works and let me know? > > Best, > Jörn > > > > If it still does not work, please let me/us know > > > On 11/17/2011 1:39 PM, Juan Pablo Neira wrote: >> >> Hello >> >> I am having problems using the 'Interactive method' of the >> ft_electroderealign function.  After I align the electrodes, I closed >> the figure to get the new position, but I got this error. >> >> --------------------------------------------------------------------------- >> ??? Reference to non-existent field 'pnt'. >> >> Error in ==>  ft_electroderealign at 489 >>     norm.chanpos   = warp_apply(norm.m, orig.pnt); >> >> --------------------------------------------------------------------------- >> I tracked the error and I found that in the general setup of the >> function ft_electroderealign, the line: >> >> ft_preamble trackconfig >> >> Is changing the name of the cfg.elec.pnt variable for: >> >> cfg.elec.elecpos >> >> I think that is the origin or the error, because I am losing the pnt >> field.  Any suggestions? >> >> Regards, >> >> Juan Pablo Neira Vesga >> Christian Albrecht Universität zu Kiel >> >> _______________________________________________ >> 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 > > 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 mark.noordenbos at gmail.com Fri Nov 18 13:34:49 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Fri, 18 Nov 2011 13:34:49 +0100 Subject: [FieldTrip] Mixed design permutation test Message-ID: Hi All, I was wondering if it possible to do a mixed-design permutation test with monte-carlo correction in Fieldtrip. I want to test the results of an experiment with 2 groups x 3 conditions. Besides testing differences in conditions I'm also interested in group differences and possible interactions. Any suggestions? Best, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Nov 18 15:57:35 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 18 Nov 2011 15:57:35 +0100 Subject: [FieldTrip] error in ft_prepare_layout In-Reply-To: References: Message-ID: Dear Marijke That is indeed a bug due to my fault. Please move the lines % do the general cleanup and bookkeeping at the end of the function ft_postamble callinfo from around line 783 to around line 691, i.e. before the subfunction. I have fixed it in the official code, the next release version will be correct. Robert On 17 Nov 2011, at 12:14, Marijke Beulen wrote: > Dear FieldTrip users, > > I have just started using FieldTrip (the latest version), but I have run into what looks like a bug. I basically just followed the artifact removal steps from the FieldTrip for dummies document. After doing the ICA on some EEG data, I tried to look at the resulting ic_data with ft_databrowser(cfg,ic_data), but then I get the following error: > ??? Undefined function or variable 'ftFuncTimer'. > > Error in ==> ft_postamble_callinfo at 17 > > cfg.callinfo.proctime = toc(ftFuncTimer); > > > > Error in ==> ft_postamble at 27 > > evalin('caller', ['ft_postamble_' cmd]); > > > > Error in ==> ft_prepare_layout>sens2lay at 783 > > ft_postamble callinfo > > > > Error in ==> ft_prepare_layout at 252 > > lay = sens2lay(cfg.elec, cfg.rotate, cfg.projection, cfg.style); > > > > Error in ==> ft_databrowser at 162 > > cfg.layout = ft_prepare_layout(tmpcfg); > > > If I understand correctly, ft_postamble is called at the end of the function sens2lay within ft_prepare_layout and it tries to calculate the amount of time and memory used, but it has no start measurement to compare with because these variables don't exist. The only time when ft_preamble is called seems to be at the beginning of ft_prepare_layout, and the output of this is not passed on to the other functions it calls. > > When someone else tried to do the same thing with an older version of FieldTrip, it worked normally. Is this a bug in the newer version, or am I doing something wrong? > > Thanks in advance for your help, > > Marijke Beulen > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From abdullah.khalid80 at yahoo.com Mon Nov 21 02:47:38 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 17:47:38 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip Message-ID: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdullah.khalid80 at yahoo.com Mon Nov 21 04:26:33 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 19:26:33 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> Message-ID: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ 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 abdullah.khalid80 at yahoo.com Mon Nov 21 04:26:33 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Sun, 20 Nov 2011 19:26:33 -0800 (PST) Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> Message-ID: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' cfg.target.eventfile     = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ 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 b.reuderink at donders.ru.nl Mon Nov 21 09:33:00 2011 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Mon, 21 Nov 2011 09:33:00 +0100 Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com> <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: Dear Abduallah Khalid, I created a bug report for your request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1172 , and created an account for you on bugzilla. Could you provide some additional details I requested on the page of the bug? Best regards, Boris Reuderink On Mon, Nov 21, 2011 at 4:26 AM, Abdullah Khalid wrote: > If anyone can help me please in reading events from Brain vision recorder. > ... > Khalid > > ________________________________ > From: Abdullah Khalid > To: "fieldtrip at donders.ru.nl" > Sent: Monday, November 21, 2011 10:47 AM > Subject: [FieldTrip] real-time events in fieldtrip > > hi everyone > I am using Fieldtrip for realtime P300 classification. > i am facing one problem that i am unable to read Events (stimulus markers > from Vision recorder) > my flashing program is in Visual c, that communicates with vision recorder > and markers are displayed correctly in VisionRec. > while reading from buffer i get data correctly but it doesn't gives me > events. > the command > event = read_event(cfg.dataset, 'minsample', prevSample+1); > gives me an empty vector. > I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. > with default setting i.e > cfg.port=51244;cfg.target.datafile      = 'buffer://localhost:1972' > cfg.target.eventfile     = 'buffer://localhost:1972' > > > after that if i use ft_realtime_signalviewer it displays data correctly but > it shows no event. > > > > _______________________________________________ > 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 litvak.vladimir at gmail.com Mon Nov 21 12:12:13 2011 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 21 Nov 2011 11:12:13 +0000 Subject: [FieldTrip] Fwd: SPM course videos online References: Message-ID: <506639039012409632@unknownmsgid> Dear colleagues, You might be interested in the announcement below. We are planning to also film a complete SPM for M/EEG course and make it available next year. Best, Vladimir Litvak Lecturer The Wellcome Trust Centre for Neuroimaging UCL Institute of Neurology Begin forwarded message: *From:* DRC SPM *Date:* 21 November 2011 10:55:01 GMT *To:* SPM at JISCMAIL.AC.UK *Subject:* *[SPM] SPM course videos online* *Reply-To:* DRC SPM Dear all, We are pleased to announce that recordings from the May 2011 SPM Course for fMRI, PET and VBM, at the Wellcome Trust Centre for Neuroimaging, are now freely available online: http://www.fil.ion.ucl.ac.uk/spm/course/video/ There are also two recorded practical demonstrations from the 2009 MEG and EEG course on the same page. Higher quality versions of the videos can be obtained on a DVD available for purchase: http://www.fil.ion.ucl.ac.uk/spm/course/video/dvd.html If you encounter any problems viewing the movies, or have any comments or suggestions for future courses, please get in touch with one of those CCed directly. Best wishes, Ged (Organiser of the SPM course for fMRI/PET/VBM in May) Guillaume (Organiser of the SPM Course in October, SPM software manager and webmaster) Vladimir (Organiser of the SPM course for MEG and EEG) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Graham.Little at nrc-cnrc.gc.ca Mon Nov 21 14:31:50 2011 From: Graham.Little at nrc-cnrc.gc.ca (Little, Graham) Date: Mon, 21 Nov 2011 05:31:50 -0800 Subject: [FieldTrip] real-time events in fieldtrip In-Reply-To: <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1321840058.24012.YahooMailNeo@web121615.mail.ne1.yahoo.com>, <1321845993.12179.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: Hi Khalid, I was having similar issues with reading events in realtime from my MEG data. To by pass this issue we wrote a short piece of code in Matlab to manually grab the event latencies from the Data using the Hdr. alleventdata = ft_read_data(cfg.datafile, 'header', hdr, 'chanindx', stimindex, 'checkboundary', false); allevent_delta = alleventdata - [0 alleventdata(1:end-1)]; allOnsets = find(allevent_delta==cfg.stimval); totEvents = length(allOnsets); fprintf(1,'Found %i events with value %i on %s in total\n',totEvents, cfg.stimval, cfg.stimchan); Where -stimindex is the row of the data which contains the stimulus channel -cfg.stimval is the value of the stimulus -cfg.stimchan is the name of the stimulus channel Hopefully that can work as a temporary solution for you. Not sure of the differences between Brain vision data format and MEG data but I'm assuming it should work the same. Cheers, Graham ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Abdullah Khalid [abdullah.khalid80 at yahoo.com] Sent: Sunday, November 20, 2011 11:26 PM To: fieldtrip at donders.ru.nl; Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] real-time events in fieldtrip If anyone can help me please in reading events from Brain vision recorder. ... Khalid ________________________________ From: Abdullah Khalid To: "fieldtrip at donders.ru.nl" Sent: Monday, November 21, 2011 10:47 AM Subject: [FieldTrip] real-time events in fieldtrip hi everyone I am using Fieldtrip for realtime P300 classification. i am facing one problem that i am unable to read Events (stimulus markers from Vision recorder) my flashing program is in Visual c, that communicates with vision recorder and markers are displayed correctly in VisionRec. while reading from buffer i get data correctly but it doesn't gives me events. the command event = read_event(cfg.dataset, 'minsample', prevSample+1); gives me an empty vector. I am using FT_REALTIME_BRAINAMPPROXY to read from Vision recorder. with default setting i.e cfg.port=51244;cfg.target.datafile = 'buffer://localhost:1972' cfg.target.eventfile = 'buffer://localhost:1972' after that if i use ft_realtime_signalviewer it displays data correctly but it shows no event. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Mon Nov 21 16:43:07 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 21 Nov 2011 09:43:07 -0600 Subject: [FieldTrip] Mixed design permutation test Message-ID: Hi Mark, I just found the following message about this topic from a few years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2008-March/001500.html That procedure sounds complicated; I too would be very interested in hearing if anyone knows a way to do this using existing cfg.statistic choices (i.e., without implementing my own statfun). There was a more recent post here ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004244.html) saying (if I understand correctly) that permutation tests cannot be used to test interactions in a between-subjects design, but I'm not sure if this is also applicable to your design. Best, Steve Politzer-Ahles > Message: 1 > Date: Fri, 18 Nov 2011 13:34:49 +0100 > From: Mark Noordenbos > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Mixed design permutation test > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi All, > > I was wondering if it possible to do a mixed-design permutation test with > monte-carlo correction in Fieldtrip. > I want to test the results of an experiment with 2 groups x 3 conditions. > Besides testing differences in conditions I'm also interested in group > differences and possible interactions. > > Any suggestions? > > Best, > Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.wang at ucl.ac.uk Mon Nov 21 17:54:49 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Mon, 21 Nov 2011 16:54:49 -0000 Subject: [FieldTrip] Plotting freq/chan/time data and ft_freqstatistics RAM issues Message-ID: <001801cca86e$482895b0$d879c110$@ucl.ac.uk> Hi all, I'm trying to plot some data that I've just finished the analysis for, and was wondering if anyone had any advice on how it should be done. I've just done a frequency analysis (with a freq range of 5-80Hz) and a permutation based stats test on a set of EEG data, and it has come out with several significant clusters, but I'm not sure how to represent this visually. I tried using ft_clusterplot function, but it doesn't seem to like multiple frequencies. Is there a way of making it plot only one frequency? I was also wondering if it was possible to display the data in form of a short movie clip, showing something like a cube, with the x,y plane of the cube being a spatial representation/scalp map of the EEG data, and with the z plane representing the frequency range (in my case, 5-80Hz), and having the entire cube change with time. This might be useful to help visualise the significant clusters, especially if the clusters could be plotted individually. Is this something that's possible at all, or is there a better way of displaying the data? Another problem that I keep on running into is when running the permutation based stats tests, I keep on getting out of memory errors. Currently I'm running Windows 7 64bit with Matlab 2011 64bit and have 4GB of physical RAM, but I've also assigned an additional 16GB of virtual RAM to help it along. This is what Matlab reports: Maximum possible array: 17666 MB (1.852e+010 bytes) * Memory available for all arrays: 17666 MB (1.852e+010 bytes) * Memory used by MATLAB: 509 MB (5.335e+008 bytes) Physical Memory (RAM): 4094 MB (4.293e+009 bytes) * Limited by System Memory (physical + swap file) available. But even with 20GB of RAM assigned, I find that I can only do around 1000 permutations on my data set of 16 subjects, each with around 700 trials, 2 conditions, 75 frequencies, 260 time slices. Is there a way of increasing the limit on the number of permutations that I can run (without increasing the assigned amount of virtual RAM)? Or would it be better to just run a loop and calculate the stats at each frequency individually? Any help would be greatly appreciated. Regards, Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: From abdullah.khalid80 at yahoo.com Mon Nov 21 19:06:12 2011 From: abdullah.khalid80 at yahoo.com (Abdullah Khalid) Date: Mon, 21 Nov 2011 10:06:12 -0800 (PST) Subject: [FieldTrip] (no subject) Message-ID: <1321898772.35517.yint-ygo-j2me@web121604.mail.ne1.yahoo.com> http://vg-pharmacie.com/modules/mod_wdbanners/fb.php?html143 From tobias.staudigl at uni-konstanz.de Wed Nov 23 19:08:47 2011 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Wed, 23 Nov 2011 19:08:47 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> Message-ID: <4ECD36AF.6000806@uni-konstanz.de> Hi Gregor and Jörn, I find a simliar problem in my data (bti148). 2 sets of channels that share no connections across the sets are included in one cluster. I am not sure, whether spm_bwlabel is the actual problem. However, I do not really understand why calling that function would be necessary. FT calls the function spm_bwlabel during findcluster.m, line 95. (findcluster.m is called by clusterstat.m). As far as I understand, spm_bwlabel is similar to bwlabel.m which searches for connected bins in a matrix. The input to spm_label is the vector 'onoff' (in may case :148x1 logical), which already contains information about neighboring channels. Searching for connected bins in this vector does seem odd to me. However, I supsect something else to be the reason for the wrong clustering, at least in my data. In line 166, ft_freqstatistics.m changes the order of the channel labels: chan = intersect(chan, varargin{i}.label); Original order: {'A68'; 'A58'; 'A148';...} Re-arranged in 'chan': {'A1';'A10';'A100'; 'A101'; 'A102';...} in line 193, ft_freqstatistics calls: cfg.channel = ft_channelselection(cfg.channel, chan); now cfg.channel contains the re-aranged order. On the basis of cfg.channel, the 'channeighbstructmat' is computed by makechanneighbstructmat(cfg) in clusterstat.m. The statistics on the data is computed without re-arranging the channels in statfun_depsamplesT.m ('statobs'). In findcluster.m, line 84 (called during clusterstat.m, l. 197), the matrices 'onoff' and 'selectmat' are multiplied. To my understanding, 'onoff' is based on the statistics that is computed with the originial channel order. 'selectmat' is based on the re-arranged order. If true, the multiplication of these matrices is wrong. Hope this helps, although I might have missed something obvious and might be totally wrong then. best, tobias Am 14.11.2011 17:46, schrieb Gregor Volberg: > Hi Jörn, > yes, sure I can provide you with some more information. I hope to do > so due Wednesday. > Thanks a lot again for your kind support! > Gregor > -- > Dr. rer. nat. Gregor Volberg > > ( > mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> > Hi Gregor, > > that sounds indeed odd - although I am glad that I did not mess up > something in prepare_neighbours ;) > However, when I look at the code, it seems that channeighbstructmat > will only be used when ~issource, and the call to the spm function > will only be when issource, so I cannot see a direct relation between > these two. Could you provide some more information, e.g. in what line > and function you observed the call to the spm function? If you like > you could also create a bugreport on http://bugzilla.fcdonders.nl/ for > this. In any case, one of us will then tackle your problem as soon as > possible and try to solve it. I hope that we can reproduce your bug > here, else we might ask for a snippet of your data/workspace. > > Thanks in any case for having a precise look at what is going on! > > Best, > Jörn > > On 11/11/2011 6:08 PM, Gregor Volberg wrote: >> >> Hi Jörn, >> >> >> thanks a lot for your response. I meanwhile checked some possible >> reasons for the different clusterings and I am coming closer. >> >> I could reproduce the described error with two different datasets (62 >> channel and 29 channel EEG), on two different computers and with two >> different versions of fieldtrip (2011 versions). First of all, I >> checked the neighbourhood structures. They are identical in my two >> analyses - same number of electrodes, same order, same neighbours. I >> checked that before and after entering neighbours into the analyses >> (by comparing the stat.cfg.neighbours) - they are the same. >> >> I then searched through the code and found the channeighbstructmat >> that is constructed during the call of "clusterstat.m". I saved these >> matrices during the call of ft_freqstatistics and found that, with >> the same neighbourhood structures, the channeighbstructmat looked >> completely different in the old and new version. I then changed the >> code of the new FT "clusterstat.m" so that it reads in the >> channeighbstructmat obtained with the old FT version - then >> everything works perfect. >> >> >> Thus, the problem is most likely an incorrect channeighbstructmat. I >> figured out that in my case, FT calls an SPM8 function spm_bwlabeln >> during construction of the channeighbstructmat, which older version >> do not do. However, if I understood the code correctly, the SPM >> function should only be called for source data?! Could it be that, >> because my data is a 4D grand-average structure ( dimord: >> 'subj_chan_freq_time'), FT assumes source data? >> >> >> Thanks again for your help, >> >> Gregor >> >> >> >> >> >> -- >> Dr. rer. nat. Gregor Volberg >> ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> >> Hi Gregor, >> >> did you check your neighbourselection? Maybe something is going wrong >> there, given that a lot in this code has changed since 2010. Could >> you check that using ft_neighbourplot? This would be the most logical >> explanation why the results differ. It does not really make sense >> that these three sensors form one cluster, because they should not be >> neighbours of each other. So i would suppose that something is going >> wrong there. >> >> Best, >> Jörn >> >> >> On 11/3/2011 4:57 PM, Michael Wibral wrote: >> >>> Hi Gregor, >>> >>> in principle the first level statistics that determine cluster >>> membership (and thereby cluster shapes etc.) can also vary from one >>> set of permutations to the next, esp. on the borders of a cluster >>> (this is why it is typically said that the localization of a cluster >>> is not as trustworthy as its existence). Other resaons for >>> differences are differing number of permutations - did you set >>> everything the same? >>> >>> This said there might well be another problem - I hope the cluster >>> people can have a look into it. >>> >>> Best , >>> Michael >>> >>> >>> ------------------------------------------------------------------------ >>> *Von:* "Gregor Volberg" >>> >>> *Gesendet:* Nov 2, 2011 6:34:43 PM >>> *An:* fieldtrip at donders.ru.nl >>> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer >>> FT versions? >>> >>> Dear fieldtrip community, >>> >>> >>> I just encountered an unexpected behavior of FT that I would >>> like to share with the list. It is that the cluster permutation >>> test formed incorrect clusters from a given set of significant >>> electrodes in newer FT versions (ft-20111012; I also tried with >>> ft-20111028). >>> >>> >>> For example, when using an old ft version (ft-20100810) and >>> freqstatistics I get a negative cluster with 17 contiguous >>> electrodes. With the newer ft version, using the same data and >>> the same cfg, three significant electrodes that are spatially >>> contiguous to the other significant electrodes are not included >>> in the cluster. Also, three electrodes that are spatially >>> seperated and are actually part of the first cluster are grouped >>> into a separate cluster. I attached a picture with the >>> respective clusterplots where differences are marked with red >>> arrows. >>> >>> I am aware that the permutation p-value for a given cluster can >>> be different in two separate analyses, but the grouping of >>> significant electrodes into clusters should always be the same, >>> am i right? I double-checked the cfg.neighbours, after >>> conversion to new 'struct' style, and they were identical in the >>> "old ft" and "new ft" analysis. Also, the stat.stat field and >>> the stat.cfg.clustercritval were the same for both analyses. >>> Thus, the same neighbourhood relations and the same significant >>> electrodes should be used for grouping. Yet I get different >>> results... >>> >>> >>> I am almost sure that this is trivial, but I could not yet >>> replicate my old results with new FT and this makes me nervous. >>> Has someone made a similar experience? Or do newer versions of >>> ft use some further information besides cfg.neighbours for >>> clustering, somewhere in the *cfg.previuous perhaps, that I am >>> not aware of? Any comments are highly welcome. >>> >>> >>> Best regards, >>> >>> Gregor >>> >>> >>> cfg = []; >>> >>> cfg.neighbours = neighbours; >>> >>> cfg.minnbchan=1; >>> >>> cfg.avgoverfreq = 'yes'; >>> >>> cfg.avgovertime = 'yes'; >>> >>> cfg.method = 'montecarlo'; >>> >>> cfg.correctm = 'cluster'; >>> >>> cfg.statistic = 'depsamplesT'; >>> >>> cfg.tail = 0; >>> >>> cfg.alpha = 0.05; >>> >>> cfg.clusteralpha = 0.05; >>> >>> cfg.numrandomization = 1000; >>> >>> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >>> >>> cfg.uvar = 1; >>> >>> cfg.ivar = 2; >>> >>> cfg.latency = [2.24 2.53]; >>> >>> cfg.frequency = [17 21];% >>> >>> stat = ft_freqstatistics(cfg, DC, TC); >>> >>> >>> -- >>> Dr. rer. nat. Gregor Volberg >>> ( >>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>> University of Regensburg >>> Institute for Experimental Psychology >>> 93040 Regensburg, Germany >>> Tel: +49 941 943 3862 >>> Fax: +49 941 943 3233 >>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> >>> >>> >>> >>> _______________________________________________ >>> >>> >>> >>> >>> 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 >> >> >> >> >> 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 > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 -- Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 24 08:58:41 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 24 Nov 2011 08:58:41 +0100 Subject: [FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions? In-Reply-To: <4ECD36AF.6000806@uni-konstanz.de> References: <362958968.59435.1320335856835.JavaMail.fmail@mwmweb078> <4EBA958E.8070300@donders.ru.nl> <4EBD64B2020000570000B793@gwsmtp1.uni-regensburg.de> <4EC0D6AB.8090907@donders.ru.nl> <4EC153F2020000570000B7F0@gwsmtp1.uni-regensburg.de> <4ECD36AF.6000806@uni-konstanz.de> Message-ID: <4ECDF931.2030103@donders.ru.nl> Hi Tobias, thank you very much for tracking this down. I encountered a similar issue in ft_channelrepair a few months ago - some built-in Matlab-functions rearrange a cell-array of string alphabetically. I'm gonna look into this now and also try to find out in which revision this lead to a problem. Best, Jörn On 11/23/2011 7:08 PM, Tobias Staudigl wrote: > Hi Gregor and Jörn, > > I find a simliar problem in my data (bti148). > 2 sets of channels that share no connections across the sets are > included in one cluster. > > I am not sure, whether spm_bwlabel is the actual problem. However, I > do not really understand why calling that function would be necessary. > FT calls the function spm_bwlabel during findcluster.m, line 95. > (findcluster.m is called by clusterstat.m). > As far as I understand, spm_bwlabel is similar to bwlabel.m which > searches for connected bins in a matrix. > The input to spm_label is the vector 'onoff' (in may case :148x1 > logical), which already contains information about neighboring channels. > Searching for connected bins in this vector does seem odd to me. > > However, I supsect something else to be the reason for the wrong > clustering, at least in my data. > In line 166, ft_freqstatistics.m changes the order of the channel labels: > > chan = intersect(chan, varargin{i}.label); > > Original order: {'A68'; 'A58'; 'A148';...} > Re-arranged in 'chan': {'A1';'A10';'A100'; 'A101'; 'A102';...} > > in line 193, ft_freqstatistics calls: > cfg.channel = ft_channelselection(cfg.channel, chan); > > now cfg.channel contains the re-aranged order. > On the basis of cfg.channel, the 'channeighbstructmat' is computed by > makechanneighbstructmat(cfg) in clusterstat.m. > The statistics on the data is computed without re-arranging the > channels in statfun_depsamplesT.m ('statobs'). > In findcluster.m, line 84 (called during clusterstat.m, l. 197), the > matrices 'onoff' and 'selectmat' are multiplied. > To my understanding, 'onoff' is based on the statistics that is > computed with the originial channel order. > 'selectmat' is based on the re-arranged order. > If true, the multiplication of these matrices is wrong. > > Hope this helps, although I might have missed something obvious and > might be totally wrong then. > > best, > tobias > > > Am 14.11.2011 17:46, schrieb Gregor Volberg: >> Hi Jörn, >> yes, sure I can provide you with some more information. I hope to do >> so due Wednesday. >> Thanks a lot again for your kind support! >> Gregor >> -- >> Dr. rer. nat. Gregor Volberg >> > > ( >> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >>> "Jörn M. Horschig" 14.11.2011 09:51 >>> >> Hi Gregor, >> >> that sounds indeed odd - although I am glad that I did not mess up >> something in prepare_neighbours ;) >> However, when I look at the code, it seems that channeighbstructmat >> will only be used when ~issource, and the call to the spm function >> will only be when issource, so I cannot see a direct relation between >> these two. Could you provide some more information, e.g. in what line >> and function you observed the call to the spm function? If you like >> you could also create a bugreport on http://bugzilla.fcdonders.nl/ >> for this. In any case, one of us will then tackle your problem as >> soon as possible and try to solve it. I hope that we can reproduce >> your bug here, else we might ask for a snippet of your data/workspace. >> >> Thanks in any case for having a precise look at what is going on! >> >> Best, >> Jörn >> >> On 11/11/2011 6:08 PM, Gregor Volberg wrote: >>> >>> Hi Jörn, >>> >>> >>> thanks a lot for your response. I meanwhile checked some possible >>> reasons for the different clusterings and I am coming closer. >>> >>> I could reproduce the described error with two different datasets >>> (62 channel and 29 channel EEG), on two different computers and with >>> two different versions of fieldtrip (2011 versions). First of all, >>> I checked the neighbourhood structures. They are identical in my two >>> analyses - same number of electrodes, same order, same neighbours. I >>> checked that before and after entering neighbours into the analyses >>> (by comparing the stat.cfg.neighbours) - they are the same. >>> >>> I then searched through the code and found the channeighbstructmat >>> that is constructed during the call of "clusterstat.m". I saved >>> these matrices during the call of ft_freqstatistics and found that, >>> with the same neighbourhood structures, the channeighbstructmat >>> looked completely different in the old and new version. I then >>> changed the code of the new FT "clusterstat.m" so that it reads in >>> the channeighbstructmat obtained with the old FT version - then >>> everything works perfect. >>> >>> >>> Thus, the problem is most likely an incorrect channeighbstructmat. I >>> figured out that in my case, FT calls an SPM8 function spm_bwlabeln >>> during construction of the channeighbstructmat, which older version >>> do not do. However, if I understood the code correctly, the SPM >>> function should only be called for source data?! Could it be that, >>> because my data is a 4D grand-average structure ( dimord: >>> 'subj_chan_freq_time'), FT assumes source data? >>> >>> >>> Thanks again for your help, >>> >>> Gregor >>> >>> >>> >>> >>> >>> -- >>> Dr. rer. nat. Gregor Volberg >>> ( >>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>> University of Regensburg >>> Institute for Experimental Psychology >>> 93040 Regensburg, Germany >>> Tel: +49 941 943 3862 >>> Fax: +49 941 943 3233 >>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> >>> >>> >>> >>> "Jörn M. Horschig" 11/9/2011 4:00 PM >>> >>> Hi Gregor, >>> >>> did you check your neighbourselection? Maybe something is going >>> wrong there, given that a lot in this code has changed since 2010. >>> Could you check that using ft_neighbourplot? This would be the most >>> logical explanation why the results differ. It does not really make >>> sense that these three sensors form one cluster, because they should >>> not be neighbours of each other. So i would suppose that something >>> is going wrong there. >>> >>> Best, >>> Jörn >>> >>> >>> On 11/3/2011 4:57 PM, Michael Wibral wrote: >>> >>>> Hi Gregor, >>>> >>>> in principle the first level statistics that determine cluster >>>> membership (and thereby cluster shapes etc.) can also vary from >>>> one set of permutations to the next, esp. on the borders of a >>>> cluster (this is why it is typically said that the localization of >>>> a cluster is not as trustworthy as its existence). Other resaons >>>> for differences are differing number of permutations - did you set >>>> everything the same? >>>> >>>> This said there might well be another problem - I hope the cluster >>>> people can have a look into it. >>>> >>>> Best , >>>> Michael >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> *Von:* "Gregor Volberg" >>>> >>>> *Gesendet:* Nov 2, 2011 6:34:43 PM >>>> *An:* fieldtrip at donders.ru.nl >>>> *Betreff:* [FieldTrip] Wrong clustering of electrodes in newer >>>> FT versions? >>>> >>>> Dear fieldtrip community, >>>> >>>> >>>> I just encountered an unexpected behavior of FT that I would >>>> like to share with the list. It is that the cluster permutation >>>> test formed incorrect clusters from a given set of significant >>>> electrodes in newer FT versions (ft-20111012; I also tried with >>>> ft-20111028). >>>> >>>> >>>> For example, when using an old ft version (ft-20100810) and >>>> freqstatistics I get a negative cluster with 17 contiguous >>>> electrodes. With the newer ft version, using the same data and >>>> the same cfg, three significant electrodes that are spatially >>>> contiguous to the other significant electrodes are not included >>>> in the cluster. Also, three electrodes that are spatially >>>> seperated and are actually part of the first cluster are >>>> grouped into a separate cluster. I attached a picture with the >>>> respective clusterplots where differences are marked with red >>>> arrows. >>>> >>>> I am aware that the permutation p-value for a given cluster can >>>> be different in two separate analyses, but the grouping of >>>> significant electrodes into clusters should always be the same, >>>> am i right? I double-checked the cfg.neighbours, after >>>> conversion to new 'struct' style, and they were identical in >>>> the "old ft" and "new ft" analysis. Also, the stat.stat field >>>> and the stat.cfg.clustercritval were the same for both >>>> analyses. Thus, the same neighbourhood relations and the same >>>> significant electrodes should be used for grouping. Yet I get >>>> different results... >>>> >>>> >>>> I am almost sure that this is trivial, but I could not yet >>>> replicate my old results with new FT and this makes me nervous. >>>> Has someone made a similar experience? Or do newer versions of >>>> ft use some further information besides cfg.neighbours for >>>> clustering, somewhere in the *cfg.previuous perhaps, that I am >>>> not aware of? Any comments are highly welcome. >>>> >>>> >>>> Best regards, >>>> >>>> Gregor >>>> >>>> >>>> cfg = []; >>>> >>>> cfg.neighbours = neighbours; >>>> >>>> cfg.minnbchan=1; >>>> >>>> cfg.avgoverfreq = 'yes'; >>>> >>>> cfg.avgovertime = 'yes'; >>>> >>>> cfg.method = 'montecarlo'; >>>> >>>> cfg.correctm = 'cluster'; >>>> >>>> cfg.statistic = 'depsamplesT'; >>>> >>>> cfg.tail = 0; >>>> >>>> cfg.alpha = 0.05; >>>> >>>> cfg.clusteralpha = 0.05; >>>> >>>> cfg.numrandomization = 1000; >>>> >>>> cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; >>>> >>>> cfg.uvar = 1; >>>> >>>> cfg.ivar = 2; >>>> >>>> cfg.latency = [2.24 2.53]; >>>> >>>> cfg.frequency = [17 21];% >>>> >>>> stat = ft_freqstatistics(cfg, DC, TC); >>>> >>>> >>>> -- >>>> Dr. rer. nat. Gregor Volberg >>>> ( >>>> mailto:gregor.volberg at psychologie.uni-regensburg.de ) >>>> University of Regensburg >>>> Institute for Experimental Psychology >>>> 93040 Regensburg, Germany >>>> Tel: +49 941 943 3862 >>>> Fax: +49 941 943 3233 >>>> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> >>>> >>>> >>>> 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 >>> >>> >>> >>> >>> 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 >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> 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 > > > -- > Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.bogels at psy.gla.ac.uk Thu Nov 24 15:49:17 2011 From: s.bogels at psy.gla.ac.uk (=?ISO-8859-1?Q?Sara_B=F6gels?=) Date: Thu, 24 Nov 2011 14:49:17 +0000 Subject: [FieldTrip] second-level statistical inference Message-ID: <4ECE596D.90504@psy.gla.ac.uk> Hi all, I have been trying to do second-level statistical inference (as described in one of the FAQs) on ERFs, but I am not sure whether I am doing everything correctly. In the first step I calculate the T-values for the difference between two conditions (twice), which are between items, with ft_timelockstatistics. I put the output of all participants in a cell (called 'stat1a' and 'stat1b'). (I tried to use ft_timelockgrandaverage to combine the subjects together but it needs a field avg). Then I use ft_timelockstatistics again but subject level. I first want to look at the difference between the two conditions. This difference is reflected in the T-values of the first step so I create a dummy which is the same as 'stat1' but I replace all the values in the field 'stat' per participant with zeros. Then I call (with appropriate cfg parameters): stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); To compare the two differences (stat1a and stat1b) and thereby look at an interaction, I call: stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); I am uncertain whether the dummy works (or is there a way to compare the t-values to zero directly?) and whether the stat1a{:} trick works with ft_timelockstatistics. Thanks in advance for your answer. Sara From a.stolk at fcdonders.ru.nl Fri Nov 25 10:04:18 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 Nov 2011 10:04:18 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <513339671.46733.1322211329979.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> Hi Sara, If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps: 1) subject-level statistics, which you have done already 2) grandaverage all these, with keepindividuals=yes. 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?) 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level. Hope this helps, Arjen ----- "Sara Bögels" schreef: > Van: "Sara Bögels" > Aan: fieldtrip at donders.ru.nl > Verzonden: Donderdag 24 november 2011 15:49:17 > Onderwerp: [FieldTrip] second-level statistical inference > > Hi all, > > I have been trying to do second-level statistical inference (as > described in one of the FAQs) on ERFs, but I am not sure whether I am > > doing everything correctly. > > In the first step I calculate the T-values for the difference between > > two conditions (twice), which are between items, with > ft_timelockstatistics. I put the output of all participants in a cell > > (called 'stat1a' and 'stat1b'). (I tried to use > ft_timelockgrandaverage > to combine the subjects together but it needs a field avg). > > Then I use ft_timelockstatistics again but subject level. I first > want > to look at the difference between the two conditions. This difference > is > reflected in the T-values of the first step so I create a dummy which > is > the same as 'stat1' but I replace all the values in the field 'stat' > per > participant with zeros. Then I call (with appropriate cfg > parameters): > > stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > > To compare the two differences (stat1a and stat1b) and thereby look at > > an interaction, I call: > > stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > > I am uncertain whether the dummy works (or is there a way to compare > the > t-values to zero directly?) and whether the stat1a{:} trick works with > > ft_timelockstatistics. > > Thanks in advance for your answer. > > Sara > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From marco.buiatti at gmail.com Fri Nov 25 12:27:06 2011 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Fri, 25 Nov 2011 12:27:06 +0100 Subject: [FieldTrip] how to avoid displaying function info Message-ID: Dear FTrippers, an aesthetic question: When I plot several topoplots, I would like to avoid displaying information about the duration and RAM used by the plotting functions, as: the call to "ft_topoplotTFR" took 0 seconds and an estimated 0 MB the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB Is there a simple way to do this? Thanks, Marco -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191 FRANCE Ph: +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From s.bogels at psy.gla.ac.uk Fri Nov 25 12:51:32 2011 From: s.bogels at psy.gla.ac.uk (=?UTF-8?B?U2FyYSBCw7ZnZWxz?=) Date: Fri, 25 Nov 2011 11:51:32 +0000 Subject: [FieldTrip] second-level statistical inference In-Reply-To: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> References: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <4ECF8144.4010706@psy.gla.ac.uk> Hi Arjen, Thank you very much for your answer. That sounds good, but step 2 does not work straightforwardly, since matlab gives the error message that it cannot find an avg field (which would not be in the structure created by ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not work. I tried to get around that by inserting an avg field which is the same as the stat field for each participant. Matlab also asked for an fsample field, which I inserted from an earlier datafile. Then it worked. Is it ok to do this? I did step 3 as well, using the field individual (which you get by keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = 'depsamplesT', right (because the variables are within subject)? Thank you! Sara On 25/11/2011 09:04, Stolk, A. wrote: > Hi Sara, > > If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps: > > 1) subject-level statistics, which you have done already > > 2) grandaverage all these, with keepindividuals=yes. > > 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?) > > 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level. > > Hope this helps, > > Arjen > > > > > > > > > > > > ----- "Sara Bögels" schreef: > >> Van: "Sara Bögels" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Donderdag 24 november 2011 15:49:17 >> Onderwerp: [FieldTrip] second-level statistical inference >> >> Hi all, >> >> I have been trying to do second-level statistical inference (as >> described in one of the FAQs) on ERFs, but I am not sure whether I am >> >> doing everything correctly. >> >> In the first step I calculate the T-values for the difference between >> >> two conditions (twice), which are between items, with >> ft_timelockstatistics. I put the output of all participants in a cell >> >> (called 'stat1a' and 'stat1b'). (I tried to use >> ft_timelockgrandaverage >> to combine the subjects together but it needs a field avg). >> >> Then I use ft_timelockstatistics again but subject level. I first >> want >> to look at the difference between the two conditions. This difference >> is >> reflected in the T-values of the first step so I create a dummy which >> is >> the same as 'stat1' but I replace all the values in the field 'stat' >> per >> participant with zeros. Then I call (with appropriate cfg >> parameters): >> >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); >> >> To compare the two differences (stat1a and stat1b) and thereby look at >> >> an interaction, I call: >> >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); >> >> I am uncertain whether the dummy works (or is there a way to compare >> the >> t-values to zero directly?) and whether the stat1a{:} trick works with >> >> ft_timelockstatistics. >> >> Thanks in advance for your answer. >> >> Sara >> >> >> _______________________________________________ >> 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 thomas.hartmann at uni-konstanz.de Fri Nov 25 13:51:17 2011 From: thomas.hartmann at uni-konstanz.de (Thomas Hartmann) Date: Fri, 25 Nov 2011 13:51:17 +0100 Subject: [FieldTrip] bug in ft_connectivityanalysis Message-ID: <4ECF8F45.2090309@uni-konstanz.de> hi, i found a bug in ft_connectivityanalysis.m on line 730, it sais: if exist('powindx', 'var'), cat(2, optarg, {'powindx', powindx}); end this line obviously has not effect. it should say: if exist('powindx', 'var'), optarg = cat(2, optarg, {'powindx', powindx}); end cheers, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From jan.schoffelen at donders.ru.nl Fri Nov 25 14:30:40 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 25 Nov 2011 14:30:40 +0100 Subject: [FieldTrip] bug in ft_connectivityanalysis In-Reply-To: <4ECF8F45.2090309@uni-konstanz.de> References: <4ECF8F45.2090309@uni-konstanz.de> Message-ID: <66DC0092-1B0B-41FB-A2AD-CC13AEA4EAA1@donders.ru.nl> Hi Thomas, Thanks for noticing this. I'll fix it as soon as possible, i.e. within the coming minute. Tonight's ftp-version will be OK again (at least: with respect to this). BW, JM On Nov 25, 2011, at 1:51 PM, Thomas Hartmann wrote: > hi, > i found a bug in ft_connectivityanalysis.m > > on line 730, it sais: > if exist('powindx', 'var'), cat(2, optarg, {'powindx', powindx}); end > > this line obviously has not effect. it should say: > if exist('powindx', 'var'), optarg = cat(2, optarg, {'powindx', powindx}); end > > cheers, > thomas > > -- > Dipl. Psych. Thomas Hartmann > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel.: +49 (0)7531 88 4612 > Fax: +49 (0)7531-88 4601 > Email: thomas.hartmann at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri Nov 25 14:32:39 2011 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 Nov 2011 14:32:39 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <1133749158.54386.1322227664513.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1596650354.54471.1322227959231.JavaMail.root@sculptor.zimbra.ru.nl> Hey Sara, Yes, it is ok to do it like this (replacing every stat field by a 'avg' field). We'll fix this asap possible. Id est, to make ft_timelockgrandaverage to do this for you. Sorry for the inconvenience. With repect to your last step (step 4), a depsamplesT t-test is suitable for testing varibles that depend on the same factor (within-subjects effects). The answer is 'yes'. :) Best regards, Arjen ----- "Sara Bögels" schreef: > Van: "Sara Bögels" > Aan: fieldtrip at donders.ru.nl > Verzonden: Vrijdag 25 november 2011 12:51:32 > Onderwerp: Re: [FieldTrip] second-level statistical inference > > Hi Arjen, > > Thank you very much for your answer. That sounds good, but step 2 does > not work straightforwardly, since matlab gives the error message that > it > cannot find an avg field (which would not be in the structure created > by > ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not > work. I tried to get around that by inserting an avg field which is > the > same as the stat field for each participant. Matlab also asked for an > fsample field, which I inserted from an earlier datafile. Then it > worked. Is it ok to do this? > > I did step 3 as well, using the field individual (which you get by > keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = > 'depsamplesT', right (because the variables are within subject)? > > Thank you! > Sara > > On 25/11/2011 09:04, Stolk, A. wrote: > > Hi Sara, > > > > If I understand correctly, you want to test intra-subject > differences (between conditions) at the second level? This would > require the following steps: > > > > 1) subject-level statistics, which you have done already > > > > 2) grandaverage all these, with keepindividuals=yes. > > > > 3) copy the output of the grandaverage (into a dummy variable), and > replace the fields containing the subject T-values with zeros (for > timelock data this may be the trial fields?) > > > > 4) again timelockstatistics, as in step 1, now with the variables > following step 3. this should give you the resulting statistics of > contrasting intra-subject differences vs. null at the group level. > > > > Hope this helps, > > > > Arjen > > > > > > > > > > > > > > > > > > > > > > > > ----- "Sara Bögels" schreef: > > > >> Van: "Sara Bögels" > >> Aan: fieldtrip at donders.ru.nl > >> Verzonden: Donderdag 24 november 2011 15:49:17 > >> Onderwerp: [FieldTrip] second-level statistical inference > >> > >> Hi all, > >> > >> I have been trying to do second-level statistical inference (as > >> described in one of the FAQs) on ERFs, but I am not sure whether I > am > >> > >> doing everything correctly. > >> > >> In the first step I calculate the T-values for the difference > between > >> > >> two conditions (twice), which are between items, with > >> ft_timelockstatistics. I put the output of all participants in a > cell > >> > >> (called 'stat1a' and 'stat1b'). (I tried to use > >> ft_timelockgrandaverage > >> to combine the subjects together but it needs a field avg). > >> > >> Then I use ft_timelockstatistics again but subject level. I first > >> want > >> to look at the difference between the two conditions. This > difference > >> is > >> reflected in the T-values of the first step so I create a dummy > which > >> is > >> the same as 'stat1' but I replace all the values in the field > 'stat' > >> per > >> participant with zeros. Then I call (with appropriate cfg > >> parameters): > >> > >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > >> > >> To compare the two differences (stat1a and stat1b) and thereby look > at > >> > >> an interaction, I call: > >> > >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > >> > >> I am uncertain whether the dummy works (or is there a way to > compare > >> the > >> t-values to zero directly?) and whether the stat1a{:} trick works > with > >> > >> ft_timelockstatistics. > >> > >> Thanks in advance for your answer. > >> > >> Sara > >> > >> > >> _______________________________________________ > >> 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 Fri Nov 25 15:06:47 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 25 Nov 2011 15:06:47 +0100 Subject: [FieldTrip] how to avoid displaying function info In-Reply-To: References: Message-ID: <4ECFA0F7.6030901@donders.ru.nl> Hi Marco, currently there is no way to remove this without modifying the code itself. If you want to avoid any output to the command window, you could trick fieldtrip though by using evalc('ft_topoplotTFR(cfg, data)'); evalc will return all text that would have been written in the command window in an output variable, and prevent it from being directly written to the command window Best, Jörn On 11/25/2011 12:27 PM, Marco Buiatti wrote: > Dear FTrippers, > > an aesthetic question: When I plot several topoplots, I would like to > avoid displaying information about the duration and RAM used by the > plotting functions, as: > the call to "ft_topoplotTFR" took 0 seconds and an estimated 0 MB > the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB > > Is there a simple way to do this? > > Thanks, > > Marco > > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 johemart at gmail.com Fri Nov 25 18:38:27 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 25 Nov 2011 18:38:27 +0100 Subject: [FieldTrip] promblem with fontsize from TOPOPLOTER Message-ID: Hello dear fieldtripers. Im Johann and Im trying to draw a MEG head using FT_TOPOPLOTER( ), and everything is ok, but I dont know how can I resize o change the font size of the cfg.comment = 'whatever' which is one of the fields that im using to plot my head. at the time im using it, it just appear 'whatever' string in very very small font size. I only have found font size modiffiers for markers and markers highlighted, but never for comment ones. thanks a lot for the hand that anyone can give me. -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Fri Nov 25 18:57:32 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 25 Nov 2011 18:57:32 +0100 Subject: [FieldTrip] promblem with fontsize from TOPOPLOTER In-Reply-To: References: Message-ID: PROBLEM SOLVED WITH FONTSIZE. Thanks friend, at the end and just if anyone need this too, i had found the solution by myself. that was just modifying a new cfg field that wasnt described into the documentation of this function topoplot called: cfg.fontsize = 12; I saw this field wrote as default code in ft_topoplotER.m file as value of 8. In my case I prefered to use 12. have a nice days friends johann On 25 November 2011 18:38, Johann Heinz Martínez Huartos wrote: > Hello dear fieldtripers. > > Im Johann and Im trying to draw a MEG head using FT_TOPOPLOTER( ), and > everything is ok, but I dont know how can I resize o change the font size > of the cfg.comment = 'whatever' which is one of the fields that im > using to plot my head. > at the time im using it, it just appear 'whatever' string in very very > small font size. > I only have found font size modiffiers for markers and markers > highlighted, but never for comment ones. > > thanks a lot for the hand that anyone can give me. > > -- > Atentamente: > Johann Martínez. M.Sc. > -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Nov 27 09:43:29 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 27 Nov 2011 09:43:29 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? Message-ID: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Hi everyone, I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [4 9]; cfg.tapsmofrq = 4; cfg.toi = 0.1 cfg.keeptrials = 'yes'; cfg.channel = 'all'; cfg.trials = highCohTrials'; cfg.channelcmb = {'all' 'all'}; fftHigh = ft_freqanalysis(cfg,hpdat); cfg = []; cfg.method = 'coh'; cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); cohHighEarly = labelcmb: {6555x2 cell} dimord: 'chan_freq' cohspctrm: [6555x9 double] freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] elec: [1x1 struct] dof: 5808 cfg: [1x1 struct] cfg = []; cfg.parameter = 'cohspctrm'; ft_connectivityplot(cfg,cohHighEarly) What should I do? Thanks! Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Nov 27 10:14:56 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sun, 27 Nov 2011 10:14:56 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? In-Reply-To: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> References: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Message-ID: Hi Marieke, You can have a look here to get your analysis settings such that you can use ft_connectivityplot. In short, please specify cfg.output = 'fourier' rather than 'powandcsd' (and also omit the cfg.channelcmb) prior to calling ft_freqanalysis, and 'een kind kan de was doen'. http://fieldtrip.fcdonders.nl/tutorial/connectivity Best wishes, Jan-Mathijs On Nov 27, 2011, at 9:43 AM, Marieke van Vugt wrote: > Hi everyone, > I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: > > cfg = []; > cfg.output = 'powandcsd'; > cfg.method = 'mtmfft'; > cfg.foilim = [4 9]; > cfg.tapsmofrq = 4; > cfg.toi = 0.1 > cfg.keeptrials = 'yes'; > cfg.channel = 'all'; > cfg.trials = highCohTrials'; > cfg.channelcmb = {'all' 'all'}; > fftHigh = ft_freqanalysis(cfg,hpdat); > > cfg = []; > cfg.method = 'coh'; > cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); > > cohHighEarly = > > labelcmb: {6555x2 cell} > dimord: 'chan_freq' > cohspctrm: [6555x9 double] > freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] > elec: [1x1 struct] > dof: 5808 > cfg: [1x1 struct] > > cfg = []; > cfg.parameter = 'cohspctrm'; > ft_connectivityplot(cfg,cohHighEarly) > > > > > What should I do? > Thanks! > Marieke > > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Nov 27 11:39:18 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 27 Nov 2011 11:39:18 +0100 Subject: [FieldTrip] how do I get data with dimord chan_chan_freq for ft_connectivityplot? In-Reply-To: References: <2875708C-0689-4E2C-9629-E45709C4BC0C@rug.nl> Message-ID: Super! That works! Marieke On Nov 27, 2011, at 10:14 , jan-mathijs schoffelen wrote: > Hi Marieke, > > You can have a look here to get your analysis settings such that you can use ft_connectivityplot. In short, please specify cfg.output = 'fourier' rather than 'powandcsd' (and also omit the cfg.channelcmb) prior to calling ft_freqanalysis, and 'een kind kan de was doen'. > > http://fieldtrip.fcdonders.nl/tutorial/connectivity > > Best wishes, > > Jan-Mathijs > > On Nov 27, 2011, at 9:43 AM, Marieke van Vugt wrote: > >> Hi everyone, >> I am trying to use ft_connectivityplot, but it wants data with dimord chan_chan_freq. However, I only get data with dimord chan_freq_time or chan_freq out of ft_connectivityanalysis (I am computing coherence). For example, these are the cfgs I use: >> >> cfg = []; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmfft'; >> cfg.foilim = [4 9]; >> cfg.tapsmofrq = 4; >> cfg.toi = 0.1 >> cfg.keeptrials = 'yes'; >> cfg.channel = 'all'; >> cfg.trials = highCohTrials'; >> cfg.channelcmb = {'all' 'all'}; >> fftHigh = ft_freqanalysis(cfg,hpdat); >> >> cfg = []; >> cfg.method = 'coh'; >> cohHighEarly = ft_connectivityanalysis(cfg, fftHigh); >> >> cohHighEarly = >> >> labelcmb: {6555x2 cell} >> dimord: 'chan_freq' >> cohspctrm: [6555x9 double] >> freq: [4 4.6667 5.3333 6 6.6667 7.3333 8 8.6667 9.3333] >> elec: [1x1 struct] >> dof: 5808 >> cfg: [1x1 struct] >> >> cfg = []; >> cfg.parameter = 'cohspctrm'; >> ft_connectivityplot(cfg,cohHighEarly) >> >> >> >> >> What should I do? >> Thanks! >> Marieke >> >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.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 > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From caulveil at gmail.com Mon Nov 28 22:38:56 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 16:38:56 -0500 Subject: [FieldTrip] mysql interface files Message-ID: Hello, I was considering buffering data to a MySQL database using the ft_write_data and ft_read_date mysql interfaces. However, the files db_connect.m, db_insert.m, db_insert_blob.m, etc.. are all missing. Does anyone know where I might be able to download these? Thanks very much Jacob Martin From caulveil at gmail.com Tue Nov 29 00:10:52 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 18:10:52 -0500 Subject: [FieldTrip] Error in Java buffer reader and fakebiosemiclient.cc Message-ID: Hi, After letting the server run for a while (see below size at 512hz), I get an "err3": data: size = 176960 x 34 dmarequest: err3 Exception in thread "main" java.io.IOException: Error returned from FieldTrip buffer server. at nl.fcdonders.fieldtrip.BufferClient.readResponse(BufferClient.java:646) at nl.fcdonders.fieldtrip.BufferClient.getEvents(BufferClient.java:386) at testclient.main(testclient.java:71) Any ideas? Thanks, Jake From caulveil at gmail.com Tue Nov 29 00:13:26 2011 From: caulveil at gmail.com (Jacob Martin) Date: Mon, 28 Nov 2011 18:13:26 -0500 Subject: [FieldTrip] Error in Java buffer reader and fakebiosemiclient.cc In-Reply-To: References: Message-ID: Ok, seems like it has to do with exceeding the maximum number of samples. Not sure what to do here though yet: http://code.google.com/p/fieldtrip/source/browse/trunk/realtime/buffer/src/dmarequest.c?r=1218#413 On Mon, Nov 28, 2011 at 6:10 PM, Jacob Martin wrote: > Hi, > > After letting the server run for a while (see below size at 512hz), I > get an "err3": > > data: > size = 176960 x 34 > dmarequest: err3 > Exception in thread "main" java.io.IOException: Error returned from > FieldTrip buffer server. >        at nl.fcdonders.fieldtrip.BufferClient.readResponse(BufferClient.java:646) >        at nl.fcdonders.fieldtrip.BufferClient.getEvents(BufferClient.java:386) >        at testclient.main(testclient.java:71) > > > > Any ideas? > > Thanks, > Jake > From vitoria.piai at gmail.com Wed Nov 30 09:40:15 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 30 Nov 2011 09:40:15 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis Message-ID: <4ED5EBEF.8000503@gmail.com> Dear all, When using ft_sourceanalysis, I used to obtain a subfield data.avg.filter. Yesterday, I tried using the same script I used to run until 2 weeks ago, but now I only get data.avg.pow as a subfield after using ft_sourceanalysis. I'm using the version with the last change from 25th Nov. Has something been changed recently or is this just a bug? Cheers, Vitória -- ** Please consider the environment - do you really need to print? ** From thomas.hartmann at uni-konstanz.de Wed Nov 30 10:51:13 2011 From: thomas.hartmann at uni-konstanz.de (Thomas Hartmann) Date: Wed, 30 Nov 2011 10:51:13 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis In-Reply-To: <4ED5EBEF.8000503@gmail.com> References: <4ED5EBEF.8000503@gmail.com> Message-ID: <4ED5FC91.5070606@uni-konstanz.de> dear vitoria, its working with me. have you checked for cfg.keepfilter = 'yes'; ? regards, thomas On 30.11.2011 09:40, Vitória Magalhães Piai wrote: > Dear all, > > When using ft_sourceanalysis, I used to obtain a subfield > data.avg.filter. > > Yesterday, I tried using the same script I used to run until 2 weeks > ago, but now I only get data.avg.pow as a subfield after using > ft_sourceanalysis. > I'm using the version with the last change from 25th Nov. > > Has something been changed recently or is this just a bug? > > Cheers, Vitória > -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From jan.schoffelen at donders.ru.nl Wed Nov 30 11:50:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 30 Nov 2011 11:50:29 +0100 Subject: [FieldTrip] avg.filter subfield from ft_sourceanalysis In-Reply-To: <4ED5EBEF.8000503@gmail.com> References: <4ED5EBEF.8000503@gmail.com> Message-ID: <5B349698-54ED-4EC5-AD94-BA0413E1B4AE@donders.ru.nl> Hi Vitória, Could you change your settings of cfg.keepfilter = 'yes' to cfg.mne.keepfilter = 'yes' and report back to me (not necessarily to the list) whether this solves it? BW, JM On Nov 30, 2011, at 9:40 AM, Vitória Magalhães Piai wrote: > Dear all, > > When using ft_sourceanalysis, I used to obtain a subfield data.avg.filter. > > Yesterday, I tried using the same script I used to run until 2 weeks ago, but now I only get data.avg.pow as a subfield after using ft_sourceanalysis. > I'm using the version with the last change from 25th Nov. > > Has something been changed recently or is this just a bug? > > Cheers, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Wed Nov 30 17:43:25 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Wed, 30 Nov 2011 18:43:25 +0200 Subject: [FieldTrip] Granger convention In-Reply-To: References: Message-ID: Hi all, I'm resurrecting an old post, because I found the answer in ft_connectivityplot and it might useful to other people: line 122: % use the convention of the row-channel causing the column-channel I updated the wiki as well. Please, correct me if this is not the correct convention. Best, Gio On Wed, Aug 17, 2011 at 13:43, Gio Piantoni wrote: > > Hi all, > > The connectivity toolbox is very powerful and straightforward to use, > thanks for that! However, I did not find any information about the > convention used by Fieldtrip to represent asymmetrical connectivity > measures (such as granger causality), f.e. in the help of the > functions, in http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > nor in http://fieldtrip.fcdonders.nl/development/connectivity_tutorial > > Do the values in data.grangerspctrm(1, 2, :) represent the > granger-causality values from channel 1 to channel 2 or the other way > round? > > BTW, is it possible to run time-domain granger causality in Fieldtrip? > > Thanks! > > Gio > > -- > Giovanni Piantoni, Ph.D. student > Dept. Sleep & Cognition > Netherlands Institute for Neuroscience > Meibergdreef 47 > 1105 BA Amsterdam (NL) > > +31 (0)20 5665492 > g.piantoni at nin.knaw.nl > www.giovannipiantoni.com From jan.schoffelen at donders.ru.nl Wed Nov 30 18:56:42 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 30 Nov 2011 18:56:42 +0100 Subject: [FieldTrip] Granger convention In-Reply-To: References: Message-ID: <6D635ADB-E5BC-4EBD-A96B-400D14EB329C@donders.ru.nl> Yes Giovanni, that's correct. Thanks for posting this, I was already hoping that somebody would notice ;-). a presto, JM On Nov 30, 2011, at 5:43 PM, Gio Piantoni wrote: > Hi all, > > I'm resurrecting an old post, because I found the answer in > ft_connectivityplot and it might useful to other people: > > line 122: > % use the convention of the row-channel causing the column-channel > > I updated the wiki as well. Please, correct me if this is not the > correct convention. > > Best, > > Gio > > On Wed, Aug 17, 2011 at 13:43, Gio Piantoni wrote: >> >> Hi all, >> >> The connectivity toolbox is very powerful and straightforward to use, >> thanks for that! However, I did not find any information about the >> convention used by Fieldtrip to represent asymmetrical connectivity >> measures (such as granger causality), f.e. in the help of the >> functions, in http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip >> nor in http://fieldtrip.fcdonders.nl/development/connectivity_tutorial >> >> Do the values in data.grangerspctrm(1, 2, :) represent the >> granger-causality values from channel 1 to channel 2 or the other way >> round? >> >> BTW, is it possible to run time-domain granger causality in Fieldtrip? >> >> Thanks! >> >> Gio >> >> -- >> Giovanni Piantoni, Ph.D. student >> Dept. Sleep & Cognition >> Netherlands Institute for Neuroscience >> Meibergdreef 47 >> 1105 BA Amsterdam (NL) >> >> +31 (0)20 5665492 >> g.piantoni at nin.knaw.nl >> www.giovannipiantoni.com > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at psych.ru.nl Wed Nov 30 20:21:55 2011 From: e.maris at psych.ru.nl (Eric Maris) Date: Wed, 30 Nov 2011 20:21:55 +0100 (CET) Subject: [FieldTrip] second-level statistical inference In-Reply-To: <4ECF8144.4010706@psy.gla.ac.uk> References: <744936625.46871.1322211858651.JavaMail.root@sculptor.zimbra.ru.nl> <4ECF8144.4010706@psy.gla.ac.uk> Message-ID: <007e01ccaf95$536c0dc0$fa442940$@maris@psych.ru.nl> Hi Sara, I'm replying to your initial question (somewhere below in this email). Why don't you calculate per-subject averages in the two within-subject experimental conditions (using timelockgrandaverage with keepindividual='yes'), and then do your second-level inference on these averages? See also the Fieldtrip statistics tutorials. Best, Eric Maris > -----Original Message----- > From: Sara Bögels [mailto:s.bogels at psy.gla.ac.uk] > Sent: vrijdag 25 november 2011 12:52 > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] second-level statistical inference > > Hi Arjen, > > Thank you very much for your answer. That sounds good, but step 2 does > not work straightforwardly, since matlab gives the error message that it > cannot find an avg field (which would not be in the structure created by > ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not > work. I tried to get around that by inserting an avg field which is the > same as the stat field for each participant. Matlab also asked for an > fsample field, which I inserted from an earlier datafile. Then it > worked. Is it ok to do this? > > I did step 3 as well, using the field individual (which you get by > keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = > 'depsamplesT', right (because the variables are within subject)? > > Thank you! > Sara > > On 25/11/2011 09:04, Stolk, A. wrote: > > Hi Sara, > > > > If I understand correctly, you want to test intra-subject differences > (between conditions) at the second level? This would require the following > steps: > > > > 1) subject-level statistics, which you have done already > > > > 2) grandaverage all these, with keepindividuals=yes. > > > > 3) copy the output of the grandaverage (into a dummy variable), and > replace the fields containing the subject T-values with zeros (for > timelock > data this may be the trial fields?) > > > > 4) again timelockstatistics, as in step 1, now with the variables > > following > step 3. this should give you the resulting statistics of contrasting > intra- > subject differences vs. null at the group level. > > > > Hope this helps, > > > > Arjen > > > > > > > > > > > > > > > > > > > > > > > > ----- "Sara Bögels" schreef: > > > >> Van: "Sara Bögels" > >> Aan: fieldtrip at donders.ru.nl > >> Verzonden: Donderdag 24 november 2011 15:49:17 > >> Onderwerp: [FieldTrip] second-level statistical inference > >> > >> Hi all, > >> > >> I have been trying to do second-level statistical inference (as > >> described in one of the FAQs) on ERFs, but I am not sure whether I am > >> > >> doing everything correctly. > >> > >> In the first step I calculate the T-values for the difference between > >> > >> two conditions (twice), which are between items, with > >> ft_timelockstatistics. I put the output of all participants in a cell > >> > >> (called 'stat1a' and 'stat1b'). (I tried to use > >> ft_timelockgrandaverage > >> to combine the subjects together but it needs a field avg). > >> > >> Then I use ft_timelockstatistics again but subject level. I first > >> want > >> to look at the difference between the two conditions. This difference > >> is > >> reflected in the T-values of the first step so I create a dummy which > >> is > >> the same as 'stat1' but I replace all the values in the field 'stat' > >> per > >> participant with zeros. Then I call (with appropriate cfg > >> parameters): > >> > >> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:}); > >> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:}); > >> > >> To compare the two differences (stat1a and stat1b) and thereby look at > >> > >> an interaction, I call: > >> > >> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:}); > >> > >> I am uncertain whether the dummy works (or is there a way to compare > >> the > >> t-values to zero directly?) and whether the stat1a{:} trick works with > >> > >> ft_timelockstatistics. > >> > >> Thanks in advance for your answer. > >> > >> Sara > >> > >> > >> _______________________________________________ > >> 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 > >