From seapsy at GMAIL.COM Fri Dec 3 02:05:06 2010 From: seapsy at GMAIL.COM (seapsy seapsy) Date: Fri, 3 Dec 2010 09:05:06 +0800 Subject: read NeuroScan avg file In-Reply-To: <05B030CE-4ED9-4A61-B363-965270C7997A@donders.ru.nl> Message-ID: Dear Robert There still a problem when I plot the *.AVG file with FieldTrip. The figure I plotted with negative down, but I family with negative up, So, the question is how to plot with negative upward? Tthanks so much! Seapsy --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From michielvanelk at GMAIL.COM Fri Dec 3 15:28:58 2010 From: michielvanelk at GMAIL.COM (Michiel van Elk) Date: Fri, 3 Dec 2010 15:28:58 +0100 Subject: importing CeeGraph EEG data in Fieldtrip & iEEG analysis Message-ID: Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone interested: The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone knows about the right filter settings for preprocessing iEEG data for LFP and TFR analysis? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Best, Michiel van Elk --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From s.oosthoek at DONDERS.RU.NL Fri Dec 3 17:39:39 2010 From: s.oosthoek at DONDERS.RU.NL (Simon Oosthoek) Date: Fri, 3 Dec 2010 17:39:39 +0100 Subject: the list has MOVED Message-ID: Hello dear fieldtrippers As you may have heard, the maillist service at SurfNET is being terminated as of 1st of January 2011. Therefore the list has now moved to a different location and a different organisation. The Science Department of the Radboud University has kindly provided us with new maillists, to which I have subscribed all existing subscribers, EXCEPT those who were somehow invisible, so please check if you received this e-mail, but not something from fieldtrip at donders.ru.nl If you want to subscribe or unsubscribe to that list use: fieldtrip-subscribe at donders.ru.nl or fieldtrip-unsubscribe at donders.ru.nl Let's continue the discussion at fieldtrip at donders.ru.nl! Cheers Simon PS, I will try to make the old archives available at some point. --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From reyna.gordon at VANDERBILT.EDU Fri Dec 3 22:46:19 2010 From: reyna.gordon at VANDERBILT.EDU (Gordon, Reyna L) Date: Fri, 3 Dec 2010 15:46:19 -0600 Subject: read NeuroScan avg file In-Reply-To: Message-ID: Dear Seapsy, Try adding this line of code right after you call the plotting function. set(gca,'YDir','reverse'); Best, Reyna ------------------------------ Reyna L Gordon, Ph.D. Postdoctoral Fellow EEG/ERP Lab Vanderbilt Kennedy Center 227 MRL (615) 322-1324 reyna.gordon at Vanderbilt.Edu On Dec 2, 2010, at 7:05 PM, seapsy seapsy wrote: > Dear Robert > There still a problem when I plot the *.AVG file with FieldTrip. > The figure I plotted with negative down, but I family with negative up, > So, the question is how to plot with negative upward? > Tthanks so much! > > Seapsy > > --------------------------------------------------------------------------- > You are receiving this message because you are subscribed to > the FieldTrip list. The aim of this list is to facilitate the discussion > between users of the FieldTrip toolbox, to share experiences > and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > --------------------------------------------------------------------------- --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From seapsy at GMAIL.COM Sat Dec 4 03:33:58 2010 From: seapsy at GMAIL.COM (seapsy seapsy) Date: Sat, 4 Dec 2010 10:33:58 +0800 Subject: read NeuroScan avg file In-Reply-To: <98ED66E1-566A-4D0D-B38B-06542B8C5057@Vanderbilt.Edu> Message-ID: Dear Reyna Thanks for you reply. But still with problem that turning the figure up to down, left to right. Seapsy 2010/12/4 Gordon, Reyna L : > Dear Seapsy, > > Try adding this line of code right after you call the plotting function. > > set(gca,'YDir','reverse'); > > Best, > Reyna > > ------------------------------ > Reyna L Gordon, Ph.D. > Postdoctoral Fellow > EEG/ERP Lab > Vanderbilt Kennedy Center > 227 MRL > (615) 322-1324 > reyna.gordon at Vanderbilt.Edu > > > > > > On Dec 2, 2010, at 7:05 PM, seapsy seapsy wrote: > >> Dear Robert >> There still a problem when I plot the *.AVG file with FieldTrip. >> The figure I plotted with negative down, but I family with negative up, >> So, the question is how to plot with negative  upward? >> Tthanks so much! >> >>                  Seapsy >> >> --------------------------------------------------------------------------- >> You are receiving this message because you are subscribed to >> the  FieldTrip list. The aim of this list is to facilitate the discussion >> between  users of the FieldTrip  toolbox, to share experiences >> and to discuss  new ideas for MEG and EEG analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> --------------------------------------------------------------------------- > > --------------------------------------------------------------------------- > You are receiving this message because you are subscribed to > the  FieldTrip list. The aim of this list is to facilitate the discussion > between  users of the FieldTrip  toolbox, to share experiences > and to discuss  new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > --------------------------------------------------------------------------- > --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From batrod at GMAIL.COM Thu Dec 9 13:38:06 2010 From: batrod at GMAIL.COM (Rodolphe Nenert) Date: Thu, 9 Dec 2010 06:38:06 -0600 Subject: Awful Experience....(Rodolphe Nenert)..I Need Your Help!!!! Message-ID: Hi, I'm writing this with tears in my eyes.I'm presently in London,United Kingdom for a short vacation and I'm stuck...And really it was unannounced. I was attacked by four armed robbers on my way back to the hotel where i lodged.I was robbed and completely embarrassed. All my cash,credit cards and cellphone were stolen. I reported the incident to the embassy and the Police but to my dismay they seem not bothered...their response was just too casual.My flight is scheduled for tomorrow afternoon but I've got to settle my bills before I'm allowed to leave....Now am freaked out. Regards.. --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From michielvanelk at gmail.com Fri Dec 3 17:07:51 2010 From: michielvanelk at gmail.com (Michiel van Elk) Date: Fri, 3 Dec 2010 17:07:51 +0100 Subject: [FieldTrip] importing CeeGraph EEG data in Fieldtrip & iEEG analysis Message-ID: Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone who ever runs into the same problem (should work for EEGlab as well). The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts (textread function) and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone has recommendations for the preprocessing of iEEG data for subsequent LFP and TFR analysis (e.g. re-reference data or not, which filter settings, where to put the baseline)? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Thanks, Michiel van Elk -- mail: michielvanelk at gmail.com phone: (+41) 76-2271095 web: www.michielvanelk.com From Douglas.Rose at cchmc.org Fri Dec 3 17:53:24 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Fri, 03 Dec 2010 11:53:24 -0500 Subject: [FieldTrip] importing CeeGraph EEG data in Fieldtrip & iEEG analysis In-Reply-To: References: Message-ID: <4CF8DA34.0668.003A.1@cchmc.org> Thank you for the heads up. We use CeeGraph for some studies. Did you try Insight from Persyst? ( http://www.eeg-persyst.com/). I use that to read CeeGraph and other Bio-logic files and I believe it outputs in a number of other formats including MatLab. Douglas Rose **************************************************** Douglas F. Rose, M.D. Medical Director, CCHMC MEG Center Professor of Pediatrics and Neurology Cincinnati Children's Hospital Medical Center 3333 Burnet Ave, ML #11006 Cincinnati, OH 45229, USA Phone 513-636-4222 Fax 513-636-3980 Email douglas.rose at cchmc.org **************************************************** >>> Michiel van Elk 12/3/2010 11:07 AM >>> Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone who ever runs into the same problem (should work for EEGlab as well). The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts (textread function) and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone has recommendations for the preprocessing of iEEG data for subsequent LFP and TFR analysis (e.g. re-reference data or not, which filter settings, where to put the baseline)? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Thanks, Michiel van Elk -- mail: michielvanelk at gmail.com phone: (+41) 76-2271095 web: www.michielvanelk.com _______________________________________________ Fieldtrip mailing list Fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From michael.hanke at gmail.com Sat Dec 4 14:27:25 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 08:27:25 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip Message-ID: <20101204132725.GA6337@meiner> Hi, I'm one of the NeuroDebian (http://neuro.debian.net) developers and I am looking into packaging fieldtrip for the Debian operating system. I'd be glad if you could provide me with some information concerning the following questions: 1. I cloned the public SVN repository. There are no tags in it. Does fieldtrip do actual releases, or is every revision intended to be used by users? 2. The repository contains a large number of binaries for various platforms. A Debian package cannot ship any of these, as all binaries have to be buildable from source. Therefore I stripped all MEX extension and third party binaries. This raises the question of how to get them rebuilt ;-) There are no Makefiles, but there is ft_compile_mex.m. However, that doesn't seem to build everything that is shipped with the fieldtrip distribution. 3. My initial goal was simply to get enough of fieldtrip running to be able to serve as a dependency for our package of the Matlab version of SPM8. However, I now discovered that there is a "port" of fieldtrip to octave: http://kurage.nimh.nih.gov/meglab/Meg/Software which makes it mandatory for me to try to integrate it properly into Debian octave infrastructure. Are you aware of this octave port? Is there any plan to incorporate this effort? To what degree is it complete or usable? Or maybe current fieldtrip code already runs (partially) on octave? 4. Distribution packaging can sometimes cause problems, because the maintainer is not aware of some peculiarities. Do you have a test suite that can be used to assess proper functioning of fieldtrip? I saw the tutorial and associated data that could serve as a test suite, but some tutorial parts only mention compatibility with versions of the past, and I wasn't able to locate the actual tutorial _code_ for download. I also saw http://fieldtrip.fcdonders.nl/development/infrastructure_for_testing but it looks more like a plan for the future, correct? 5. I had to strip all 'external' software due to various licensing/distribution problems. I wonder to what degree the presence of these pieces is critical for fieldtrip functionality -- beside obvious lack of support for some file formats? Thanks in advance for your answers to this long list, Michael -- GPG key: 4096R/7FFB9E9B Michael Hanke http://mih.voxindeserto.de From tomh at kurage.nimh.nih.gov Sat Dec 4 16:55:42 2010 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Sat, 4 Dec 2010 10:55:42 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip Message-ID: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> >However, I now discovered that there is a "port" of fieldtrip to octave: >http://kurage.nimh.nih.gov/meglab/Meg/Software That isn't a port, just a few tools written long ago to make some things easier. Fieldtrip has changed a great deal since then. Getting it to work correctly under Octave is something that needs to be done by the Fieldtrip developers. From michael.hanke at gmail.com Sat Dec 4 17:10:29 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 11:10:29 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> References: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> Message-ID: <20101204161029.GA8032@meiner> On Sat, Dec 04, 2010 at 10:55:42AM -0500, Tom Holroyd wrote: > >However, I now discovered that there is a "port" of fieldtrip to octave: > >http://kurage.nimh.nih.gov/meglab/Meg/Software > > That isn't a port, just a few tools written long ago to make some things easier. Thanks for the clarification. Do you know who did that? Was it you? Where can I find information on what things were made easier? > Fieldtrip has changed a great deal since then. Getting it to work correctly > under Octave is something that needs to be done by the Fieldtrip developers. I agree. Does anyone have experience with or further information about the current state of compatibility between fieldtrip and octave? Thanks in advance, Michael -- Michael Hanke http://mih.voxindeserto.de GPG key: 4096R/7FFB9E9B From alexandre.gramfort at inria.fr Sat Dec 4 23:42:02 2010 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Sat, 4 Dec 2010 17:42:02 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: Hi Mickael, > 4. Distribution packaging can sometimes cause problems, because the >   maintainer is not aware of some peculiarities. Do you have a test >   suite that can be used to assess proper functioning of fieldtrip? To my knowledge fieldtrip do not have a full test suite. You do have one though for externals/openmeeg base on mtest: http://www.mathworks.com/matlabcentral/fileexchange/22846 Alex From michael.hanke at gmail.com Sun Dec 5 03:55:05 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 21:55:05 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: References: <20101204132725.GA6337@meiner> Message-ID: <20101205025505.GB14803@meiner> On Sat, Dec 04, 2010 at 05:42:02PM -0500, Alexandre Gramfort wrote: > To my knowledge fieldtrip do not have a full test suite. You do > have one though for externals/openmeeg base on mtest: > http://www.mathworks.com/matlabcentral/fileexchange/22846 Thanks Alex! However, the Debian package of fieldtrip will not ship with openmeeg. We already have a dedicated package for it and it is currently updated to also provide the Matlab functionality for fieldtrip. A corresponding dependency between the two packages will be specified to ensure that fieldtrip users will have access to openmeeg-related functionality. Special thanks for adding a test suite to openmeeg! Michael -- Michael Hanke http://mih.voxindeserto.de From michael.hanke at gmail.com Sun Dec 5 22:00:56 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sun, 5 Dec 2010 16:00:56 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: <20101205210056.GA23636@meiner> On Sat, Dec 04, 2010 at 08:27:25AM -0500, Michael Hanke wrote: > 2. The repository contains a large number of binaries for various > platforms. A Debian package cannot ship any of these, as all binaries > have to be buildable from source. Therefore I stripped all MEX > extension and third party binaries. This raises the question of how > to get them rebuilt ;-) > > There are no Makefiles, but there is ft_compile_mex.m. However, that > doesn't seem to build everything that is shipped with the fieldtrip > distribution. Moreover the current SVN version doesn't run successfully, because it expects files in different locations. The following patch allows MEX files to be compiled. However, I'm not sure if this is half-way into a transition. For example 'routlm' seems to have moved into forward/private, but is still expected to be in private/. The current binary distribution also ships it in private/. What is the intented setup? ft_compile_mex.m now builds 22 of 35 MEX files in the binary distribution (excluding external ones). diff --git a/ft_compile_mex.m b/ft_compile_mex.m index 9fe1d63..cf191b3 100644 --- a/ft_compile_mex.m +++ b/ft_compile_mex.m @@ -51,11 +51,11 @@ L = addSource(L,'forward/private','meg_leadfield1'); L = addSource(L,'forward/private','lmoutr',[],[],'geometry.c -I.'); L = addSource(L,'forward/private','solid_angle',[],[],'geometry.c -I.'); L = addSource(L,'forward/private','ptriproj',[],[],'geometry.c -I.'); +L = addSource(L,'forward/private','routlm',[],[],'geometry.c -I.'); L = addSource(L,'private','splint_gh'); -L = addSource(L,'private','ltrisect',[],[],'geometry.c -I.'); -L = addSource(L,'private','routlm',[],[],'geometry.c -I.'); -L = addSource(L,'private','plinproj',[],[],'geometry.c -I.'); +L = addSource(L,'private','ltrisect',[],[],'../forward/private/geometry.c -I../forward/private'); +L = addSource(L,'private','plinproj',[],[],'../forward/private/geometry.c -I../forward/private'); L = addSource(L,'realtime/online_mri','ft_omri_smooth_volume'); Thanks again, Michael -- Michael Hanke http://mih.voxindeserto.de From s.klanke at donders.ru.nl Mon Dec 6 10:04:35 2010 From: s.klanke at donders.ru.nl (Stefan Klanke) Date: Mon, 06 Dec 2010 10:04:35 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101205210056.GA23636@meiner> References: <20101204132725.GA6337@meiner> <20101205210056.GA23636@meiner> Message-ID: <4CFCA723.50909@donders.ru.nl> Hey Michael, I'll try to answer some of your questions: > 1. Does fieldtrip do actual releases, or is every revision intended to be used by users? The latter is true, we don't do releases. > 2. There are no Makefiles, but there is ft_compile_mex.m. However, that doesn't seem to build everything that is shipped with the fieldtrip distribution. The ft_compile_mex file is fairly new itself, and indeed only compiles the "simple" MEX files without extra dependencies. The big three blocks of left-out MEX files are in the a) realtime b) peer and c) multivariate (sub-)toolboxes. For a) and b), we need extra stuff like pthreads and other system libraries, which is quite hard to build in a simple way that still works for all platforms (and compilers). Also, when I made the compile script, c) was under heavy restructuring and I didn't even know whether I'd have all the sources available. If you're only after a compile script or Makefile for Linux (and GCC), we can probably do a lot better (see below). > 3. Or maybe current fieldtrip code already runs (partially) on octave? I recently tested some FieldTrip code on Octave 3.2 myself (including the buffer mex file), and that ran fine. Nowadays, most of the code should run unmodified, since we don't heavily use OOP or Matlab GUI code. I won't make any promises, though. > Moreover the current SVN version doesn't run successfully, because it > expects files in different locations. The following patch allows MEX > files to be compiled. ... Some of the MEX files (and .m files) show up in multiple private directories, but we use SVN externals to maintain a single version in the repository, and copy this to the various places. If you want a source-only distribution, we'd need to adapt the ft_compile_mex script to take over the functionality of the SVN externals. Actually, I guess the proper solution for a source distribution would be a global Makefile (maybe based on autoconf) that compiles all the MEX files for the version of Matlab or Octave that is visible on the path. Until now we've shied away from that effort since our audience is usually happy to have the binaries provided for them, and for the Windows platform it's easier to compile the MEX files within Matlab. Cheers, Stefan From r.oostenveld at donders.ru.nl Mon Dec 6 15:13:11 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 6 Dec 2010 15:13:11 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> Dear Michael As you may know, I am in charge of the fieldtrip project. Since you asked the questions on the email list, let me also reply through this channel. There are a number of techical issues that you raised, some of which have already been addressed by email lists subscribers. Let me just respond to some of the remaining points. Regarding octave: It would of course be nice if it ran both on octave and matlab. However, the active developers at the moment do not have a need for octave as alternative for Matlab. At the donders we have enough matlab licenses and I believe this applies to the other developers as well. The consequence is that maintaining compatibility with octave is not high on the priority list of any of these developers. However, I certainly welcome suggestions for improving the octave compatibility. Suggestions for improvements can be posted on http://bugzilla.fcdonders.nl . If someone wants to take up this responsibility, that person could get direct access to the svn server. Please note that we have external people already contributing to the project source code and documentation, it is not only a Donders project. Regarding test suite: there is the branches/testing directory in which you can find test code. It is not a complete suite, and most importantly is that the data files (which amount to many GBs are not in there. I am trying to encourage contributors to add test scripts there, but at the moment we do not have an automated testing procedure. We used to have one, but at a certain point it ran too long (more than one full night) and was not sufficiently sensitive in picking up the actual bugs, so that is why we abandoned the automatic (regression) testing. We now rely on our users to report problems and take quick action in fixing the bugs. The automatic testing remains a desireable feature, but currently we lack manpower and expertise for properly implementing this. Regarding openmeeg: where do you in general envision the "glue code" between project A and project B to go? In this particular example, I think that the openmeeg glue code should go into the fieldtrip package. The reason for this is that it is maintained by the whole fieldtrip developer team, and hosted on the fieldtrip svn. Part of the glue is actually even in the fieldtrip/forward directory, so taking away fieldtrip/external/openmeeg might make it more confusing for users. Note that the openmeeg package in fieldtrip does automatic checking of the required binaries and provides instructions if the binaries are missing, so towards end-users it is friendlier to rely on that checking mechanism. Regarding externals in general: the externals are more than just providing a version of some external software for easy download. The externals also provide a specific version (that is tested and known to work), a subset of the toolbox (e.g. part of spm2 instead of the complete version) and bug fixes if the external parter does not provide them in time (e.g. the isfinite function which fails on recent matlabs and therefore had to be replaced by the finite function on afni and spm2). SPM8 works with a particular version of fieldtrip, and the SPM developers are responsible for keeping their fieldtrip version in synch with our developments. Vice versa, the fieldtrip developers are responsible for keeping the fieldtrip/external. The challenge in package management on linux is of course also dependencies. With the matlab toolboxes we are joinly trying to work towards better dependency management, but are clearly not there yet. How do you envision that your debian packaging ensures correct versions to be co- installed? Regarding mex files: not all users have compilers on their system by default (esp. on windows 64 bit and osx in general), therefore we provide the packaged fieldtrip version including binaries. This also facilitates the fieldtrip release to be installed and maintained by a single user in a larger research group, e.g. on a shared network drive that is read only for all users except the maintainer. Recompiling by individual users requires individual users to have write access. Of course if you consider every user to be super user on his own linux box, that is not a problem. But in reality many researchers have limited rights to the computers on which they are working. Recompiling the mex files is of course always an option, but it would be cumbersome to force this on the users. Why would you want to exclude the mex binaries from the release version? Regarding your observation of files being replicated: fieldtrip (as all matlab toolboxes) consists of interpreted code and not compield code. To ensure a consistent and long-term stable user interface to the functions, part of the functions are hidden (in the private directories). Those hidden functions are also hidden from each other, i.e. fieldtrip/fileio/private and fieldtrip/forward/private functions cannot access each other. Hence some of the low-level functions (and also mex files) have to be replicated. That is why we use svn file externals. Checking out so many svn file externals is very slow due to the suboptimal implementation of the svn client software. However, the regular users (95% of all users) don't notice and don't care, because they are just getting a packaged zip file, unzip it and can get to work. Then some general questions: which part of the FieldTrip audience do you expect to benefit from the packaged version? I presume that it would be limited to the linux users, with root access to their own computers, and debian based releases. Actually I would expect those people to benefit more from the read-only SVN version of fieldtrip that we make available to all users. Working with SVN should be simple for this particular sub-class of fieldtrip users. And using svn allows the user to roll back to older versions, and to make changes in his copy of the code without those changes being overwritten with the next "svn update". If you want to discuss this in more detail, feel free to drop me an email to schedule a phone or skype call. Probably that is more efficient for both of us in getting things done. 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 ----------------------------------------------------------- On 4 Dec 2010, at 14:27, Michael Hanke wrote: > Hi, > > I'm one of the NeuroDebian (http://neuro.debian.net) developers and > I am > looking into packaging fieldtrip for the Debian operating system. > I'd be > glad if you could provide me with some information concerning the > following questions: > > 1. I cloned the public SVN repository. There are no tags in it. Does > fieldtrip do actual releases, or is every revision intended to be > used by users? > > 2. The repository contains a large number of binaries for various > platforms. A Debian package cannot ship any of these, as all > binaries > have to be buildable from source. Therefore I stripped all MEX > extension and third party binaries. This raises the question of how > to get them rebuilt ;-) > > There are no Makefiles, but there is ft_compile_mex.m. However, that > doesn't seem to build everything that is shipped with the fieldtrip > distribution. > > 3. My initial goal was simply to get enough of fieldtrip running to > be able to > serve as a dependency for our package of the Matlab version of SPM8. > However, I now discovered that there is a "port" of fieldtrip to > octave: http://kurage.nimh.nih.gov/meglab/Meg/Software which makes > it > mandatory for me to try to integrate it properly into Debian octave > infrastructure. > > Are you aware of this octave port? Is there any plan to incorporate > this effort? To what degree is it complete or usable? Or maybe > current fieldtrip code already runs (partially) on octave? > > 4. Distribution packaging can sometimes cause problems, because the > maintainer is not aware of some peculiarities. Do you have a test > suite that can be used to assess proper functioning of fieldtrip? > > I saw the tutorial and associated data that could serve as a test > suite, but some tutorial parts only mention compatibility with > versions of the past, and I wasn't able to locate the actual > tutorial > _code_ for download. > > I also saw http://fieldtrip.fcdonders.nl/development/infrastructure_for_testing > but it looks more like a plan for the future, correct? > > 5. I had to strip all 'external' software due to various > licensing/distribution problems. I wonder to what degree the > presence > of these pieces is critical for fieldtrip functionality -- beside > obvious lack of support for some file formats? > > Thanks in advance for your answers to this long list, > > Michael > > -- > GPG key: 4096R/7FFB9E9B Michael Hanke > http://mih.voxindeserto.de > _______________________________________________ > Fieldtrip mailing list > Fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From maya.zuckerman at gmail.com Mon Dec 6 15:19:25 2010 From: maya.zuckerman at gmail.com (Maya Zuckerman) Date: Mon, 6 Dec 2010 16:19:25 +0200 Subject: [FieldTrip] nonparametric statistics Message-ID: Hi, I was recently referred to your paper on the subject of nonparametric statistical testing in Journal of Neuroscience Methods (2007). I find the paper very interesting and it has contributed a lot to the statistical analyses I'm currently using. My experiment includes 3 conditions, of which I was a priori interested in two. Thus, I ran the analysis proposed by you for two of the conditions only that were of relevant theoretical interest, and found significant differences at a specific time window and cluster of electrodes. Now I'm interested in examining the third condition at this specific time and space frame. I was wondering if you could advise what would the appropriate statistical threshold/correction be, as I'm unsure after consulting several of my colleagues. Thanks, Maya Zuckerman -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.hanke at gmail.com Mon Dec 6 16:32:17 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Mon, 6 Dec 2010 10:32:17 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> References: <20101204132725.GA6337@meiner> <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> Message-ID: <20101206153217.GA31612@meiner> Hi Robert, thanks for your detailed explanations. Please see my in-line responses below: On Mon, Dec 06, 2010 at 03:13:11PM +0100, Robert Oostenveld wrote: > Regarding octave: It would of course be nice if it ran both on > octave and matlab. However, the active developers at the moment do > not have a need for octave as alternative for Matlab. At the donders > we have enough matlab licenses and I believe this applies to the > other developers as well. The consequence is that maintaining > compatibility with octave is not high on the priority list of any of > these developers. Octave compatibility has many advantages (not talking about abstract philosophical ones now). Let say I want to run a simulation that involves fieldtrip code on our cluster. I'd suddenly need 500! matlab licenses for me alone. Money is not a severe problem here, but I bet my institution would not appreciate having to double the number of licenses if everybody wants to do like me. Moreover, cloud-computing becomes really accessible these days. Few lines of code allow me to send jobs to e.g. Amazon's EC. However, not for Matlab-based computing... BUT: if fieldtrip works fine with octave you can quickly get an army of users that help with maintaining compatibility, just expose it to people. If there is code to perform an automatic functionality check it would facilitate things significantly. > The automatic testing remains a desireable feature, but currently we > lack manpower and expertise for properly implementing this. At NeuroDebian we are working with many neuroscience projects to implement test suites and cross-toolkit interoperability tests. We'd be happy to contribute. > Regarding openmeeg: where do you in general envision the "glue code" > between project A and project B to go? In this particular example, I > think that the openmeeg glue code should go into the fieldtrip > package. The reason for this is that it is maintained by the whole > fieldtrip developer team, and hosted on the fieldtrip svn. Part of > the glue is actually even in the fieldtrip/forward directory, so > taking away fieldtrip/external/openmeeg might make it more confusing > for users. Note that the openmeeg package in fieldtrip does > automatic checking of the required binaries and provides > instructions if the binaries are missing, so towards end-users it is > friendlier to rely on that checking mechanism. I feared that, and that is why I asked. I did not see that the externals are more than just externals. Ideally you could make a clear distinction between 3rd-party code and fieldtrip-specific glue. I agree that such code belongs to fieldtrip, but it should not be labeled 'external', because it is not really that. < snip reasoning about tested dependencies > > How do you envision that your debian packaging ensures correct > versions to be co-installed? This is a common problem that we have to deal with every day. The short answer is: Debian packaging allows me to specify arbitrarily detailed versioned dependencies. If fieldtrip of yesterday works with SPM2 older than 10 years OR SPM8 of the very last release, I can say that and the Debian package manager ensures that these dependencies become available on the system -- if not possible it would refuse to install fieldtrip. (softer dependencies are also possible, of course). The issue of "tested" dependencies is more tricky. Your approach (and the one of many others for that matter) is to "fork" 3rd-party code and include it into fieldtrip. However, this entitles you to be responsible for all bugs that affect the code that ships with fieldtrip. If some external doesn't see support from its original developers anymore (SPM2?) you even inherit all responsibility. But do you have enough manpower to support all that additional code. Typically projects simply assume that their forked dependencies work and do not monitor other people's bugs (also because having public bugtrackers isn't common in neuroscience -- fieldtrip being one of the noble exceptions!). However, we believe this trust only works because so few people use the code and so few bugs get reported -- the true health state of research software code is, sadly, much worse. We believe that the only way to ensure proper functioning is proper testing. This exposes bugs, makes people aware, attracts contributions, increases quality, make software more portable and eventually simply better. I could talk at length about the benefits of free-and-open-source-software development models, but I'll skip that. We have seen a number of serious bugs in core neuro-imaging libraries and applications in the past that affected research results, but only became apparent by built/run-time tests of Debian packages on hardware architectures that the original developers had no access to -- but nevertheless affected common platforms like amd64. That being said, I do not want to blame anyone for having manually tested and frozen dependencies to ensure proper functioning. This is often the only reasonable strategy that can be done with limited manpower. What I'm arguing for is simply to enable more people/machines to do testing and by that get access to "unlimited" manpower. Having your software in Debian causes even non-neuroscientist developers to check your code, run tests, send patches -- without you having to motivate/pay/ask them at all. > Of course if you consider every user to be super user on his own linux > box, that is not a problem. But in reality many researchers have > limited rights to the computers on which they are working. Recompiling > the mex files is of course always an option, but it would be > cumbersome to force this on the users. Debian packaging does not enforce compilation on users. Everything is performed automatically without any required interaction. If you do not have the permissions to install things on a system you cannot install packages. However, this issue is completely orthogonal to fieldtrip providing a build system to allow (not enforce) recompiling MEX files. > Why would you want to exclude the mex binaries from the > release version? The Debian policy mandates it. Every Debian source package must be compilable by anybody (given access to all build-dependencies). There is a trust path between Debian and its users that requires anybody to be able to verify what is shipped in Debian's binary package. Compiling EVERYTHING from source is the only way to ensure this. We don't even ship pre-generated PDF, but rebuild them to make sure we can fix typos in the manuals whenever we find them (over-simplified example ;-). > Then some general questions: which part of the FieldTrip audience do > you expect to benefit from the packaged version? Almost everybody -- especially those you do not use fieldtrip yet. Almost every single neuroscience software project that we packaged in the past 6 years has seen an enormous increase in its user base after it became available in the official Debian/ubuntu archives. > I presume that it would be limited to the linux users, with root > access to their own computers, and debian based releases. Somewhat, but root access is only necessary for installing the package, which is typically done by a sysadmin. The primary customer of a package is a user that is served with readily usable software -- not a hacker. Debian packaging also makes arbitrary software deployment very simple. It doesn't matter whether you deploy Matlab-code, C-code, Python scripts or data -- all is done with the same infrastructure and the same command. This kind of deployment system is used in some large research institutions to be able to handle complex systems with affordable administration. If you want to get some first-hand reports you could consider contacting some people listed in the 'research institutions' section of our testimonials page: http://neuro.debian.net/testimonials.html > Actually I would expect those people to benefit more from the > read-only SVN version of fieldtrip that we make available to all > users. Working with SVN should be simple for this particular sub-class > of fieldtrip users. And using svn allows the user to roll back to > older versions, and to make changes in his copy of the code without > those changes being overwritten with the next "svn update". Acknowledged. But as I said, Debian packaging is a global integration effort that abstracts development and deployment workflows beyond the level of a single project. What looks simple when working with fieldtrip alone, becomes tedious when working with fieldtrip, AFNI, FSL, SPM, openmeeg, ITK-SNAP, ANTS, ... http://neuro.debian.net/pkgs.html > If you want to discuss this in more detail, feel free to drop me an > email to schedule a phone or skype call. Probably that is more > efficient for both of us in getting things done. Replied in a private message with my contact details. Thanks again, Michael -- Michael Hanke http://mih.voxindeserto.de From holroydt at mail.nih.gov Mon Dec 6 17:16:09 2010 From: holroydt at mail.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Mon, 06 Dec 2010 11:16:09 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204161029.GA8032@meiner> References: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> <20101204161029.GA8032@meiner> Message-ID: <4CFD0C49.9060902@mail.nih.gov> I think Robert answered a lot; I didn't know it ran under Octave 3.2, the last I checked was 3.0. Anyway, it doesn't need anything from Kurage (kuh-rah-ge -- it's Japanese for Jellyfish). That stuff is really old anyway. Michael Hanke wrote: > On Sat, Dec 04, 2010 at 10:55:42AM -0500, Tom Holroyd wrote: >>> However, I now discovered that there is a "port" of fieldtrip to octave: >>> http://kurage.nimh.nih.gov/meglab/Meg/Software >> That isn't a port, just a few tools written long ago to make some things easier. > > Thanks for the clarification. Do you know who did that? Was it you? > Where can I find information on what things were made easier? > >> Fieldtrip has changed a great deal since then. Getting it to work correctly >> under Octave is something that needs to be done by the Fieldtrip developers. > > I agree. Does anyone have experience with or further information about the > current state of compatibility between fieldtrip and octave? > > Thanks in advance, > > Michael > -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow From e.maris at donders.ru.nl Mon Dec 6 17:56:16 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Mon, 6 Dec 2010 17:56:16 +0100 Subject: [FieldTrip] nonparametric statistics In-Reply-To: References: Message-ID: <005b01cb9566$82539670$86fac350$@maris@donders.ru.nl> Dear Maya, I was recently referred to your paper on the subject of nonparametric statistical testing in Journal of Neuroscience Methods (2007). I find the paper very interesting and it has contributed a lot to the statistical analyses I'm currently using. My experiment includes 3 conditions, of which I was a priori interested in two. Thus, I ran the analysis proposed by you for two of the conditions only that were of relevant theoretical interest, and found significant differences at a specific time window and cluster of electrodes. Now I'm interested in examining the third condition at this specific time and space frame. I was wondering if you could advise what would the appropriate statistical threshold/correction be, as I'm unsure after consulting several of my colleagues. I see the following options: 1. Compare the third condition with each of the other two conditions and do Bonferroni-correction to account for the fact that you perform three tests. 2. Compare all three conditions with a cluster-based permutation test using an F-statistic statfun (depsamplesF for a within-UO design and indepsamplesF for a between-UO design). The power of this test will be somewhat lower than the power of the cluster-based permutation test using the t-statistic that you have already performed. Examining the difference between the third condition and the first two at the data-selected time and space frame does not in general control the false alarm rate (because the selection of the time and space frame is based on the data). Best, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Dec 9 11:34:16 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 9 Dec 2010 11:34:16 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101206153217.GA31612@meiner> References: <20101204132725.GA6337@meiner> <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> <20101206153217.GA31612@meiner> Message-ID: <5DE0077D-9A10-4EB5-91F5-860560D1B0E0@donders.ru.nl> Hi Michael Thanks for your detailled response. I don't think that we have big differences in how we would like to see things develop, only in how we are personally and with our respective teams able to further that development. Working together and combining our complementary expertise is certainly a good move. Let's continue this specific collaboration discussion off-line. Regarding octave: that is certainly something that I see the value in. But the practical situation at our Donders Centre where ~150 people work is that we have ~100 MATLAB floating network licenses, and a 50 node linux cluster. That number of licenses is enough to give people a comfortable number of data analysis sessions on their desktop workstations and on the linux cluster. We don't have the scientific manpower nor comuting hardware to keep many more than these 100 MATLAB sessions busy at any given point in time. The MATLAB maintenance contract (which entitles us to MATLAB updates) costs us ~6000 euro/ year. This includes a small increase in the number of licenses every year. This 6000 euros is peanuts compared to the scanner and personel costs, and compares more to the amount of money we spend on our coffee machine (yes, we do have a nice machine!). So from a scientific budget point of view I currently cannot warrant investing effort from people of _our_ centre (i.e. salary costs) into the octave compatibility. But the prospect of outsourcing part of the computations to large clusters, grids or the cloud is of course interesting. For that reason I also started a distributed computing sub-project to fieldtrip (see http://fieldtrip.fcdonders.nl/development/peer) and in that project the licenses do become more of an issue. If I were able to get an "army of octave users" (as you write) to help me out with improving the compatibility of the code, I certainly would welcome that and would be willing to coordinate those efforts. If there are people on this mailing list interested in this, please do contact me! Also people that are willing to contribute to improving the testing infrastructure are very welcome. best regards, Robert On 6 Dec 2010, at 16:32, Michael Hanke wrote: > Hi Robert, > > thanks for your detailed explanations. Please see my in-line responses > below: > > On Mon, Dec 06, 2010 at 03:13:11PM +0100, Robert Oostenveld wrote: >> Regarding octave: It would of course be nice if it ran both on >> octave and matlab. However, the active developers at the moment do >> not have a need for octave as alternative for Matlab. At the donders >> we have enough matlab licenses and I believe this applies to the >> other developers as well. The consequence is that maintaining >> compatibility with octave is not high on the priority list of any of >> these developers. > > Octave compatibility has many advantages (not talking about abstract > philosophical ones now). Let say I want to run a simulation that > involves fieldtrip code on our cluster. I'd suddenly need 500! matlab > licenses for me alone. Money is not a severe problem here, but I bet > my > institution would not appreciate having to double the number of > licenses > if everybody wants to do like me. Moreover, cloud-computing becomes > really accessible these days. Few lines of code allow me to send > jobs to > e.g. Amazon's EC. However, not for Matlab-based computing... > > BUT: if fieldtrip works fine with octave you can quickly get an army > of > users that help with maintaining compatibility, just expose it to > people. If there is code to perform an automatic functionality check > it > would facilitate things significantly. > >> The automatic testing remains a desireable feature, but currently we >> lack manpower and expertise for properly implementing this. > > At NeuroDebian we are working with many neuroscience projects to > implement test suites and cross-toolkit interoperability tests. We'd > be > happy to contribute. > >> Regarding openmeeg: where do you in general envision the "glue code" >> between project A and project B to go? In this particular example, I >> think that the openmeeg glue code should go into the fieldtrip >> package. The reason for this is that it is maintained by the whole >> fieldtrip developer team, and hosted on the fieldtrip svn. Part of >> the glue is actually even in the fieldtrip/forward directory, so >> taking away fieldtrip/external/openmeeg might make it more confusing >> for users. Note that the openmeeg package in fieldtrip does >> automatic checking of the required binaries and provides >> instructions if the binaries are missing, so towards end-users it is >> friendlier to rely on that checking mechanism. > > I feared that, and that is why I asked. I did not see that the > externals > are more than just externals. Ideally you could make a clear > distinction > between 3rd-party code and fieldtrip-specific glue. I agree that such > code belongs to fieldtrip, but it should not be labeled 'external', > because > it is not really that. > > < snip reasoning about tested dependencies > >> How do you envision that your debian packaging ensures correct >> versions to be co-installed? > > This is a common problem that we have to deal with every day. The > short > answer is: Debian packaging allows me to specify arbitrarily detailed > versioned dependencies. If fieldtrip of yesterday works with SPM2 > older > than 10 years OR SPM8 of the very last release, I can say that and the > Debian package manager ensures that these dependencies become > available > on the system -- if not possible it would refuse to install fieldtrip. > (softer dependencies are also possible, of course). > > The issue of "tested" dependencies is more tricky. Your approach (and > the one of many others for that matter) is to "fork" 3rd-party code > and > include it into fieldtrip. However, this entitles you to be > responsible > for all bugs that affect the code that ships with fieldtrip. If some > external doesn't see support from its original developers anymore > (SPM2?) you even inherit all responsibility. But do you have enough > manpower to support all that additional code. Typically projects > simply > assume that their forked dependencies work and do not monitor other > people's bugs (also because having public bugtrackers isn't common in > neuroscience -- fieldtrip being one of the noble exceptions!). > However, > we believe this trust only works because so few people use the code > and > so few bugs get reported -- the true health state of research software > code is, sadly, much worse. > > We believe that the only way to ensure proper functioning is proper > testing. This exposes bugs, makes people aware, attracts > contributions, > increases quality, make software more portable and eventually simply > better. I could talk at length about the benefits of > free-and-open-source-software development models, but I'll skip that. > We have seen a number of serious bugs in core neuro-imaging > libraries and > applications in the past that affected research results, but only > became > apparent by built/run-time tests of Debian packages on hardware > architectures that the original developers had no access to -- but > nevertheless affected common platforms like amd64. > > That being said, I do not want to blame anyone for having manually > tested and frozen dependencies to ensure proper functioning. This is > often the only reasonable strategy that can be done with limited > manpower. What I'm arguing for is simply to enable more people/ > machines > to do testing and by that get access to "unlimited" manpower. Having > your software in Debian causes even non-neuroscientist developers to > check your code, run tests, send patches -- without you having to > motivate/pay/ask them at all. > >> Of course if you consider every user to be super user on his own >> linux >> box, that is not a problem. But in reality many researchers have >> limited rights to the computers on which they are working. >> Recompiling >> the mex files is of course always an option, but it would be >> cumbersome to force this on the users. > > Debian packaging does not enforce compilation on users. Everything is > performed automatically without any required interaction. If you do > not > have the permissions to install things on a system you cannot install > packages. However, this issue is completely orthogonal to fieldtrip > providing a build system to allow (not enforce) recompiling MEX files. > >> Why would you want to exclude the mex binaries from the >> release version? > > The Debian policy mandates it. Every Debian source package must be > compilable by anybody (given access to all build-dependencies). > There is > a trust path between Debian and its users that requires anybody to be > able to verify what is shipped in Debian's binary package. Compiling > EVERYTHING from source is the only way to ensure this. We don't even > ship pre-generated PDF, but rebuild them to make sure we can fix typos > in the manuals whenever we find them (over-simplified example ;-). > >> Then some general questions: which part of the FieldTrip audience do >> you expect to benefit from the packaged version? > > Almost everybody -- especially those you do not use fieldtrip yet. > Almost every single neuroscience software project that we packaged in > the past 6 years has seen an enormous increase in its user base > after it > became available in the official Debian/ubuntu archives. > >> I presume that it would be limited to the linux users, with root >> access to their own computers, and debian based releases. > > Somewhat, but root access is only necessary for installing the > package, > which is typically done by a sysadmin. The primary customer of a > package > is a user that is served with readily usable software -- not a hacker. > Debian packaging also makes arbitrary software deployment very simple. > It doesn't matter whether you deploy Matlab-code, C-code, Python > scripts > or data -- all is done with the same infrastructure and the same > command. This kind of deployment system is used in some large research > institutions to be able to handle complex systems with affordable > administration. If you want to get some first-hand reports you could > consider contacting some people listed in the 'research institutions' > section of our testimonials page: > > http://neuro.debian.net/testimonials.html > >> Actually I would expect those people to benefit more from the >> read-only SVN version of fieldtrip that we make available to all >> users. Working with SVN should be simple for this particular sub- >> class >> of fieldtrip users. And using svn allows the user to roll back to >> older versions, and to make changes in his copy of the code without >> those changes being overwritten with the next "svn update". > > Acknowledged. But as I said, Debian packaging is a global integration > effort that abstracts development and deployment workflows beyond the > level of a single project. What looks simple when working with > fieldtrip > alone, becomes tedious when working with fieldtrip, AFNI, FSL, SPM, > openmeeg, ITK-SNAP, ANTS, ... > > http://neuro.debian.net/pkgs.html > >> If you want to discuss this in more detail, feel free to drop me an >> email to schedule a phone or skype call. Probably that is more >> efficient for both of us in getting things done. > > Replied in a private message with my contact details. > > > Thanks again, > > Michael > > -- > Michael Hanke > http://mih.voxindeserto.de > _______________________________________________ > Fieldtrip mailing list > Fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sid.kouider at gmail.com Fri Dec 10 18:40:34 2010 From: sid.kouider at gmail.com (Sid Kouider) Date: Fri, 10 Dec 2010 18:40:34 +0100 Subject: [FieldTrip] research engineer position in neuroimaging - Paris, France Message-ID: <4d026613.82eed80a.6564.ffff9589@mx.google.com> The Department of Cognitive Science at the Ecole Normale Supérieure (Paris) invites applications for a research engineer position to work on Neuroimaging data in the framework of the DynaMind ERC project held by Dr Sid Kouider. The successful applicant will mainly be in charge of managing and analyzing data obtained on human subjects with fMRI in adults and high-density EEG in infants. The successful applicant will also be involved in the design and elaboration of research protocols. Candidates should have at least a master degree in a relevant domain and a solid training in neuroimaging data analysis, with robust experience in signal processing and programming. Experience with Matlab and the SPM toolbox is desirable but not a prerequisite. The successful applicant will be affiliated to the Perception, Attention and Consciousness team of Dr Sid Kouider. The Department of Cognitive Science offers a rich research environment composed of a multidisciplinary set of research units on philosophy, cognitive psychology, cognitive neurosciences and computational neurosciences. Our research team, at the interface of these disciplines, is working on the cognitive and neural determinants of consciousness, with an emphasis on the distinction between unconscious perception and perceptual awareness. Our lab is located in central Paris, within the historical Quartier Latin. Consideration of applicants will commence December 15th, 2010 and will continue until the position is filled. The net salary will range between 2 100 to 2 800 Euros per month depending on qualifications. The appointment is for two years initially but can be extended later on. Please send a CV (including the names and contact information of two references) to sid.kouider at ens.fr Do not hesitate to contact us for further questions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr Sid Kouider, CNRS research scientist Ecole Normale Supérieure LSCP, Pavillon Jardin, 29 rue d'Ulm, 75005 Paris, France www.lscp.net/persons/sidk/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From TAVABIK at email.chop.edu Mon Dec 13 17:33:50 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 11:33:50 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting Message-ID: Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. ExpHi = freq: [1x158 double] time: [1x2880 double] powspctrm: [4-D double] dimord: 'subj_chan_freq_time' lable: {2x1 cell} (ie., {['MLT']; ['MRT']} size(ExpHi.powspctrm) = 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) Currently I am recieving the following errors ??? Reference to non-existent field 'label'. Error in ==> prepare_timefreq_data>forcedimord at 509 output.label = input.label; Error in ==> prepare_timefreq_data at 87 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); -K. ------------------------------------------------------------ Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_freqstats_script.m Type: text/x-objcsrc Size: 697 bytes Desc: ft_freqstats_script.m URL: From nathanweisz at mac.com Mon Dec 13 20:12:54 2010 From: nathanweisz at mac.com (Nathan Weisz) Date: Mon, 13 Dec 2010 20:12:54 +0100 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: Message-ID: <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From TAVABIK at email.chop.edu Mon Dec 13 20:42:00 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 14:42:00 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 e.maris at donders.ru.nl Mon Dec 13 21:21:39 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Mon, 13 Dec 2010 21:21:39 +0100 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: <035b01cb9b03$59a5b3f0$0cf11bd0$@maris@donders.ru.nl> Dear Kambiz, Type "help ft_neighbourselection" on the Matlab command line. This will provide you with some information. Most likely you will decide not to cluster in space (but only in time and frequency). I this case, the neighbourhood structure of both channels has to be empty. Good luck, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip- > bounces at donders.ru.nl] On Behalf Of Tavabi, Kambiz > Sent: maandag 13 december 2010 20:42 > To: nathanweisz at me.com > Cc: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Cluster Permutation Data Formatting > > Embarassing, off course I do! I apologize about that. However I am > still having other downstream errors due to some of the definitions. > FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script > resulted in > > ??? Undefined function or variable "sens". > Error in ==> ft_neighbourselection at 95 > if ~isstruct(sens) > Error in ==> neighbourselection at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > Error in ==> statistics_wrapper at 241 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> ft_freqstatistics at 125 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > I maybe misunderstanding what is clustered. Is it sensors or adjacent > time-frequency bins? Because I only have two channels clustering > adjacent sensors will fail. Perhaps you could advise on whether > cfg.correctm ='cluster'; is the right choice. Should I consider another > option? and if so what happens to: > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.clustertail = 0; > > Is there another tutorial which discusses other routines for the > various multiple comparison correction routines? > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Nathan Weisz [nathanweisz at mac.com] > Sent: Monday, December 13, 2010 2:12 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Cluster Permutation Data Formatting > > hi, > > looks like you have a typo in your data structure (lable instead of > label). > > good luck, > n > > On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > > > Greetings, I am using the recommendations on > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#wit > hin-subjects_experiments to carry out within-subjects permutation tests > on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject > I have the conditional source-space (2 virtual electrodes) time- > frequency representations computed between 1.5-80Hz (0.5 freq step) > using Morlet wavelets throughout the stimulus duration (i.e., trial > epochs from -0.8 - 1.6 sec). As per tutorial I have created data > structures, which to the best of my knowledge are suitable for use with > ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified > the routine in the tutorial to create the cfg structure. As the final > state of the dataset was not arrived at using the FT pipeline I am > afraid there might be input structure field(s) I may have not defined, > or defined incorrectly (e.g. channel labling and layout). Essentially I > simply wish to run the tests and view res > ults on two time-frequency representation plots (eg., imagesc)! I > would very much appreciate if someone with more experience in these > routines would take a look at my script (see attachment) and e.g. data > structure and let me know what is missing and/or wrong with them. > > > > ExpHi = > > freq: [1x158 double] > > time: [1x2880 double] > > powspctrm: [4-D double] > > dimord: 'subj_chan_freq_time' > > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > > > size(ExpHi.powspctrm) = > > 10 2 158 2880 (i.e., Subjects x > channes x freqs x timepoints) > > > > Currently I am recieving the following errors > > > > ??? Reference to non-existent field 'label'. > > Error in ==> prepare_timefreq_data>forcedimord at 509 > > output.label = input.label; > > Error in ==> prepare_timefreq_data at 87 > > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> > statistics_wrapper at 217 > > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> > ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, > varargin{:}); > > > > > > -K. > > ------------------------------------------------------------ > > Kambiz Tavabi PhD > > Biomedical Imaging Laboratory > > The Children's Hospital of Philadelphia > > 34th Street and Civic Center Boulevard > > Philadelphia, Pa. 19104 > > Tel: 267.426.0302 > > email: tavabik at email.chop.edu > > ------------------------------------------------------------ > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > 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 Douglas.Rose at cchmc.org Mon Dec 13 21:29:53 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Mon, 13 Dec 2010 15:29:53 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: <4D063BF3.0668.003A.1@cchmc.org> Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 TAVABIK at email.chop.edu Mon Dec 13 21:42:49 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 15:42:49 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: <4D063BF3.0668.003A.1@cchmc.org> References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> <4D063BF3.0668.003A.1@cchmc.org> Message-ID: I am sorry but I don't understand this response from Doug. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Douglas Rose Sent: Monday, December 13, 2010 3:30 PM To: nathanweisz at me.com Cc: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Cluster Permutation Data Formatting Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 TAVABIK at email.chop.edu Mon Dec 13 23:02:30 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 17:02:30 -0500 Subject: [FieldTrip] Plotting cluster permutation results Message-ID: Greetings, Based on FT tutorials and user advice I have managed to create a stat structure using ft_freqstatistics. stat = prob [2x158x1800 double] posclusters: [1x43 struct] posclusterslabelmat: [2x158x1800 double] posdistribution: [1x500 double] negclusters: [1x63 struct] negclusterslabelmat: [2x158x1800 double] negdistribution: [1x500 double] mask: [2x158x1800 logical] stat: [2x158x1800 double] ref: [2x158x1800 double] dimord: 'chan_freq_time' label: {2x1 cell} (i.e., {['MLT'];['MRT']} freq: [1x158 double] time: [1x1800 double] cfg: [1x1 struct] Please note that the cluster permuation tests were performed on source space time-frequency representations, thus data is only available for two channels. As such the statistics was done without cfg.minnbchan and cfg.neighbours=[ ]. and clustering was done on the time-frequency bins throuought the entire epoch for wide-band data (i.e., no averaging over frequencies). The initial conditional power spectra used in the statistics were 10 x 2 x 158 x 2880 (subjects x channels x frequencies x time). I did manage to use ft_singleplotTFR(cfg, stat) to plot the results for single channel -after masking time-frequency points by clusterlabels information belonging to a specific cluster (see attached). But I cannot really make much sense out of the results. Am I doing something wrong here? When I use cfg = []; cfg.alpha = 0.025; cfg.zparam = 'stat'; cfg.zlim = [-4 4]; ft_clusterplot(cfg, stat); I get the following: ??? Error using ==> ft_clusterplot at 75 stat contains multiple frequencies which is not allowed because it should be averaged over frequencies Technically I don't have any apriori frequency band(s) of interest, thus I used the wide-band data. How does ft_clusterplot accept frequency averaging? And is it possible to work around this criterion? Is it possible to customize cfg.layout? Thanks in advance -Kambiz -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_singleplotTFR.jpg Type: image/jpeg Size: 12468 bytes Desc: ft_singleplotTFR.jpg URL: From Douglas.Rose at cchmc.org Tue Dec 14 20:18:56 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Tue, 14 Dec 2010 14:18:56 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> <4D063BF3.0668.003A.1@cchmc.org> Message-ID: <4D077CD0.0668.003A.1@cchmc.org> Ooops. My apologies. Clicked on the wrong email to answer. So sorry. Not related at all to your thread. Doug >>> "Tavabi, Kambiz" 12/13/2010 3:42 PM >>> I am sorry but I don't understand this response from Doug. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Douglas Rose Sent: Monday, December 13, 2010 3:30 PM To: nathanweisz at me.com Cc: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Cluster Permutation Data Formatting Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From TAVABIK at email.chop.edu Wed Dec 15 16:52:44 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Wed, 15 Dec 2010 10:52:44 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) Message-ID: Greetings Fieldstrippers - Would someone savvy in cluster permutation testing kindly take a look at the attached plots. Briefly, Top left upper & lower panels are conditional grand averaged (n=10), time-frequency representation (TFR) of single virtual electrode. The TFR shows %change in power relative to baseline (i.e., baseline corrected power spectrum). The top right panel is the p-value map of sample-wise paired t-testing (two-tailed) of the data. To deal with the multiple comparison problem, I used ft_freqstatistics to carryout out permuation tests on the source space time-frequency representations from my virtual sensors (2), as such the statistics were done without cfg.minnbchan and cfg.neighbours=[ ]. Testing was done on the time-frequency bins throughout the epochs of wide band data (i.e., no averaging over frequencies). In the attached file the bottom panel is the plot of the permutation result for the same data and channel in the grand averages. As per advice from other fieldtrip users I created the plot by: stat.stat2=stat.stat.*(stat.posclusterlabelmat == 1); cfg.zparam='stat2'; ft_singleplotTFR(cfg, stat); When I use ft_clusterplot(cfg, stat); for obvious reasons I get the following error. As I have no apriori freqs interval of interest I am not sure how to get around this.: ??? Error using ==> ft_clusterplot at 75 stat contains multiple frequencies which is not allowed because it should be averaged over frequencies My problem with the results in the attachment is that in the grand averages there is an obvious event related desynchrony (cold colors, negative values) difference between 0.4-0.8sec; 10-40hz which somehow doesn't get picked up, but the small blip of noise/event-related synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed as different between conditions by the permutations! To carry out the permutations I used cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.neighbours = [ ]; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 500; So I presume that the result is not due to a signs (pos/neg values) issue, if I am using a two-tailed test. Changing cfg.tail & cfg.clustertail to 1 makes little to no difference, and a value of -1 results in errors. Basically, I'd appreciate if someone, based on what is observable in the grand averages, could confirm that the permutation result makes sense? And if not then some advice on what I am doing wrong. Thank you. -Kambiz -K. ------------------------------------------------------------ Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: TFR_testing.pdf Type: application/pdf Size: 103055 bytes Desc: TFR_testing.pdf URL: From smoratti at psi.ucm.es Wed Dec 15 21:52:22 2010 From: smoratti at psi.ucm.es (Stephan Moratti) Date: Wed, 15 Dec 2010 21:52:22 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: Message-ID: <7A31E3CD-4B93-4759-8D76-5ACE5D7D395C@psi.ucm.es> Hi Kambiz, Probably you should consider to use cfg.alpha and cfg.clusteralpha = 0.025 if you test two sided (cfg.tail and cfg.clustertail=0). Doing so, will give you a the p values of 0.05 alltogether. Best, Stephan El 15/12/2010, a las 16:52, Tavabi, Kambiz escribió: > Greetings Fieldstrippers - Would someone savvy in cluster > permutation testing kindly take a look at the attached plots. > Briefly, Top left upper & lower panels are conditional grand > averaged (n=10), time-frequency representation (TFR) of single > virtual electrode. The TFR shows %change in power relative to > baseline (i.e., baseline corrected power spectrum). The top right > panel is the p-value map of sample-wise paired t-testing (two- > tailed) of the data. > > To deal with the multiple comparison problem, I used > ft_freqstatistics to carryout out permuation tests on the source > space time-frequency representations from my virtual sensors (2), as > such the statistics were done without cfg.minnbchan and > cfg.neighbours=[ ]. Testing was done on the time-frequency bins > throughout the epochs of wide band data (i.e., no averaging over > frequencies). > > In the attached file the bottom panel is the plot of the permutation > result for the same data and channel in the grand averages. As per > advice from other fieldtrip users I created the plot by: > stat.stat2=stat.stat.*(stat.posclusterlabelmat == 1); > cfg.zparam='stat2'; > ft_singleplotTFR(cfg, stat); > > When I use ft_clusterplot(cfg, stat); for obvious reasons I get the > following error. As I have no apriori freqs interval of interest I > am not sure how to get around this.: > ??? Error using ==> ft_clusterplot at 75 > stat contains multiple frequencies which is not allowed because it > should be > averaged over frequencies > > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which > somehow doesn't get picked up, but the small blip of noise/event- > related synchrony (hot colors, positive values) c. 0.5sec at 50Hz is > revealed as different between conditions by the permutations! To > carry out the permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of > -1 results in errors. Basically, I'd appreciate if someone, based on > what is observable in the grand averages, could confirm that the > permutation result makes sense? And if not then some advice on what > I am doing wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Dec 15 23:36:17 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Wed, 15 Dec 2010 23:36:17 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: Message-ID: <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Dear Kambiz, > Greetings Fieldstrippers "Fieldtrippers" may have connotations that a scientist does not always appreciate, but what to think of "Fieldstrippers"? > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > doesn't get picked up, but the small blip of noise/event-related > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > as different between conditions by the permutations! Have a look at the (channel,frequency)-specific paired t-tests. Do these detect the big cold blob? If not, the variance across subjects is probably large. Best, Eric Maris To carry out the > permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of -1 > results in errors. Basically, I'd appreciate if someone, based on what > is observable in the grand averages, could confirm that the permutation > result makes sense? And if not then some advice on what I am doing > wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ From TAVABIK at email.chop.edu Thu Dec 16 05:29:10 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Wed, 15 Dec 2010 23:29:10 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> References: , <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Message-ID: Eric, >"Fieldtrippers" may have connotations that a scientist does not always >appreciate, but what to think of "Fieldstrippers"? Touche. >Have a look at the (channel,frequency)-specific paired t-tests. I am not sure exactly what you mean. By 'specific' do you mean sample wise testing in a narrow frequency range? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Eric Maris [e.maris at donders.ru.nl] Sent: Wednesday, December 15, 2010 5:36 PM To: 'Email discussion list for the FieldTrip project' Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) Dear Kambiz, > Greetings Fieldstrippers "Fieldtrippers" may have connotations that a scientist does not always appreciate, but what to think of "Fieldstrippers"? > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > doesn't get picked up, but the small blip of noise/event-related > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > as different between conditions by the permutations! Have a look at the (channel,frequency)-specific paired t-tests. Do these detect the big cold blob? If not, the variance across subjects is probably large. Best, Eric Maris To carry out the > permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of -1 > results in errors. Basically, I'd appreciate if someone, based on what > is observable in the grand averages, could confirm that the permutation > result makes sense? And if not then some advice on what I am doing > wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at donders.ru.nl Thu Dec 16 09:21:48 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 16 Dec 2010 09:21:48 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: , <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Message-ID: <001c01cb9cfa$4901e890$db05b9b0$@maris@donders.ru.nl> Kambiz, > >Have a look at the (channel,frequency)-specific paired t-tests. > I am not sure exactly what you mean. By 'specific' do you mean sample > wise testing in a narrow frequency range? Sorry, I forgot that you have time resolution. I mean the (channel,time,frequency)-specific paired t-tests, which are in the output of freqstatistics. Best, Eric > > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Eric Maris [e.maris at donders.ru.nl] > Sent: Wednesday, December 15, 2010 5:36 PM > To: 'Email discussion list for the FieldTrip project' > Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) > > Dear Kambiz, > > > > Greetings Fieldstrippers > > "Fieldtrippers" may have connotations that a scientist does not always > appreciate, but what to think of "Fieldstrippers"? > > > My problem with the results in the attachment is that in the grand > > averages there is an obvious event related desynchrony (cold colors, > > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > > doesn't get picked up, but the small blip of noise/event-related > > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > > as different between conditions by the permutations! > > Have a look at the (channel,frequency)-specific paired t-tests. Do > these > detect the big cold blob? If not, the variance across subjects is > probably > large. > > > Best, > > Eric Maris > > > > > > > To carry out the > > permutations I used > > cfg.method = 'montecarlo'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > cfg.clusterstatistic = 'maxsum'; > > cfg.neighbours = [ ]; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.alpha = 0.05; > > cfg.numrandomization = 500; > > So I presume that the result is not due to a signs (pos/neg values) > > issue, if I am using a two-tailed test. Changing cfg.tail & > > cfg.clustertail to 1 makes little to no difference, and a value of -1 > > results in errors. Basically, I'd appreciate if someone, based on > what > > is observable in the grand averages, could confirm that the > permutation > > result makes sense? And if not then some advice on what I am doing > > wrong. Thank you. -Kambiz > > > > -K. > > ------------------------------------------------------------ > > Kambiz Tavabi PhD > > Biomedical Imaging Laboratory > > The Children's Hospital of Philadelphia > > 34th Street and Civic Center Boulevard > > Philadelphia, Pa. 19104 > > Tel: 267.426.0302 > > email: tavabik at email.chop.edu > > ------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 nathanweisz at mac.com Thu Dec 16 10:48:09 2010 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 16 Dec 2010 10:48:09 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl> References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl> Message-ID: <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> hi kambiz, did you look at the actual p-values of you clusters? the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. good luck, n On 16.12.2010, at 09:21, Eric Maris wrote: > Kambiz, > >>> Have a look at the (channel,frequency)-specific paired t-tests. >> I am not sure exactly what you mean. By 'specific' do you mean sample >> wise testing in a narrow frequency range? > > Sorry, I forgot that you have time resolution. I mean the > (channel,time,frequency)-specific paired t-tests, which are in the output of > freqstatistics. > > > Best, > > Eric > > >> >> -K. >> ------------------------------------------------------------- >> Kambiz Tavabi PhD >> Biomedical Imaging Laboratory >> The Children's Hospital of Philadelphia >> 34th Street and Civic Center Boulevard >> Philadelphia, Pa. 19104 >> Tel: 267.426.0302 >> email: tavabik at email.chop.edu >> ------------------------------------------------------------- >> ________________________________________ >> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >> Sent: Wednesday, December 15, 2010 5:36 PM >> To: 'Email discussion list for the FieldTrip project' >> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >> >> Dear Kambiz, >> >> >>> Greetings Fieldstrippers >> >> "Fieldtrippers" may have connotations that a scientist does not always >> appreciate, but what to think of "Fieldstrippers"? >> >>> My problem with the results in the attachment is that in the grand >>> averages there is an obvious event related desynchrony (cold colors, >>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>> doesn't get picked up, but the small blip of noise/event-related >>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>> as different between conditions by the permutations! >> >> Have a look at the (channel,frequency)-specific paired t-tests. Do >> these >> detect the big cold blob? If not, the variance across subjects is >> probably >> large. >> >> >> Best, >> >> Eric Maris >> >> >> >> >> >> >> To carry out the >>> permutations I used >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistic = 'maxsum'; >>> cfg.neighbours = [ ]; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.05; >>> cfg.numrandomization = 500; >>> So I presume that the result is not due to a signs (pos/neg values) >>> issue, if I am using a two-tailed test. Changing cfg.tail & >>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>> results in errors. Basically, I'd appreciate if someone, based on >> what >>> is observable in the grand averages, could confirm that the >> permutation >>> result makes sense? And if not then some advice on what I am doing >>> wrong. Thank you. -Kambiz >>> >>> -K. >>> ------------------------------------------------------------ >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> 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 dgroppe at cogsci.ucsd.edu Thu Dec 16 15:01:52 2010 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Thu, 16 Dec 2010 09:01:52 -0500 Subject: [FieldTrip] Hann taper vs. single Slepian taper Message-ID: Hi Fieldtripians, Could anyone explain to me when, if ever, it would be better to perform a DFT with a Hann taper vs. a single Slepian taper? It was my understanding that Slepian tapers in general optimally maximized frequency resolution while minimizing leakage from distant frequencies. However, a colleague of mine says he was told at a workshop at the Donders Institute that a Hann taper was better than a single Slepian taper (if you are only going to use one taper). thanks for your help, -David -- David Groppe, Ph.D. dgroppe at cogsci.ucsd.edu http://www.cogsci.ucsd.edu/~dgroppe/ From inieuwenhuis at berkeley.edu Sat Dec 18 01:13:12 2010 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Fri, 17 Dec 2010 16:13:12 -0800 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: References: Message-ID: <4D0BFC98.3080000@berkeley.edu> Dear David, The Slepian tapers are sets of multiple (orthogonal) tapers, that only combined accomplish this "optimally maximized frequency resolution while minimizing leakage from distant frequencies". If you use only a single taper, the Slepian taper is suboptimal compared to the Hanning taper. I've attached some teaching slides I have with some background on multitapers. Hope this helps, Cheers, Ingrid On 12/16/2010 6:01 AM, David Groppe wrote: > Hi Fieldtripians, > Could anyone explain to me when, if ever, it would be better to > perform a DFT with a Hann taper vs. a single Slepian taper? It was my > understanding that Slepian tapers in general optimally maximized > frequency resolution while minimizing leakage from distant > frequencies. However, a colleague of mine says he was told at a > workshop at the Donders Institute that a Hann taper was better than a > single Slepian taper (if you are only going to use one taper). > thanks for your help, > -David > -- Ingrid Nieuwenhuis PhD Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 -------------- next part -------------- A non-text attachment was scrubbed... Name: multitapers.pdf Type: application/pdf Size: 150879 bytes Desc: not available URL: From r.oostenveld at donders.ru.nl Mon Dec 20 09:59:05 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 20 Dec 2010 09:59:05 +0100 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: <4D0BFC98.3080000@berkeley.edu> References: <4D0BFC98.3080000@berkeley.edu> Message-ID: To complement Ingrids good explanation: the shape of the Slepian tapers depend on how many you compute, i.e. if you compute one it will have a (slightly) different shape that the first one if you compute four. The first Slepian taper never goes exactly to zero at the edges, whereas the Hanning (or Hann, as it is also called) does. The consequence is that a single Slepian leaks more than a Hanning. The reason for using a Hanning taper is typically that you don't want to spectrally smooth (usually because the time window is already on the short side), so the leakage of a single Slepian is in that case not desired. Robert On 18 Dec 2010, at 1:13, Ingrid Nieuwenhuis wrote: > Dear David, > > The Slepian tapers are sets of multiple (orthogonal) tapers, that > only combined accomplish this "optimally maximized frequency > resolution while minimizing leakage from distant frequencies". If > you use only a single taper, the Slepian taper is suboptimal > compared to the Hanning taper. I've attached some teaching slides I > have with some background on multitapers. > > Hope this helps, > Cheers, > Ingrid > > > On 12/16/2010 6:01 AM, David Groppe wrote: >> Hi Fieldtripians, >> Could anyone explain to me when, if ever, it would be better to >> perform a DFT with a Hann taper vs. a single Slepian taper? It was >> my >> understanding that Slepian tapers in general optimally maximized >> frequency resolution while minimizing leakage from distant >> frequencies. However, a colleague of mine says he was told at a >> workshop at the Donders Institute that a Hann taper was better than a >> single Slepian taper (if you are only going to use one taper). >> thanks for your help, >> -David >> > > -- > Ingrid Nieuwenhuis PhD > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From dgroppe at cogsci.ucsd.edu Mon Dec 20 14:21:42 2010 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Mon, 20 Dec 2010 08:21:42 -0500 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: References: <4D0BFC98.3080000@berkeley.edu> Message-ID: Thanks very much for the helpful emails Ingrid & Robert. -David On Mon, Dec 20, 2010 at 3:59 AM, Robert Oostenveld wrote: > To complement Ingrids good explanation: the shape of the Slepian tapers > depend on how many you compute, i.e. if you compute one it will have a > (slightly) different shape that the first one if you compute four. The first > Slepian taper never goes exactly to zero at the edges, whereas the Hanning > (or Hann, as it is also called) does. The consequence is that a single > Slepian leaks more than a Hanning. The reason for using a Hanning taper is > typically that you don't want to spectrally smooth (usually because the time > window is already on the short side), so the leakage of a single Slepian is > in that case not desired. > > Robert > > > > > On 18 Dec 2010, at 1:13, Ingrid Nieuwenhuis wrote: > >> Dear David, >> >> The Slepian tapers are sets of multiple (orthogonal) tapers, that only >> combined accomplish this "optimally maximized frequency resolution while >> minimizing leakage from distant frequencies". If you use only a single >> taper, the Slepian taper is suboptimal compared to the Hanning taper. I've >> attached some teaching slides I have with some background on multitapers. >> >> Hope this helps, >> Cheers, >> Ingrid >> >> >> On 12/16/2010 6:01 AM, David Groppe wrote: >>> >>> Hi Fieldtripians, >>>   Could anyone explain to me when, if ever, it would be better to >>> perform a DFT with a Hann taper vs. a single Slepian taper?  It was my >>> understanding that Slepian tapers in general optimally maximized >>> frequency resolution while minimizing leakage from distant >>> frequencies.  However, a colleague of mine says he was told at a >>> workshop at the Donders Institute that a Hann taper was better than a >>> single Slepian taper (if you are only going to use one taper). >>>       thanks for your help, >>>            -David >>> >> >> -- >> Ingrid Nieuwenhuis PhD >> Sleep and Neuroimaging Laboratory >> Department of Psychology >> University of California, Berkeley >> California 94720-1650 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- David Groppe, Ph.D. dgroppe at cogsci.ucsd.edu http://www.cogsci.ucsd.edu/~dgroppe/ From TAVABIK at email.chop.edu Mon Dec 20 22:46:48 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 20 Dec 2010 16:46:48 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl>, <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> Message-ID: Greetings - where can I find a description of the output items for ft_freqstatistics? Or atleast the essential fields necessary for sensibly plotting results of the cluster permutation routine? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Thursday, December 16, 2010 4:48 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) hi kambiz, did you look at the actual p-values of you clusters? the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. good luck, n On 16.12.2010, at 09:21, Eric Maris wrote: > Kambiz, > >>> Have a look at the (channel,frequency)-specific paired t-tests. >> I am not sure exactly what you mean. By 'specific' do you mean sample >> wise testing in a narrow frequency range? > > Sorry, I forgot that you have time resolution. I mean the > (channel,time,frequency)-specific paired t-tests, which are in the output of > freqstatistics. > > > Best, > > Eric > > >> >> -K. >> ------------------------------------------------------------- >> Kambiz Tavabi PhD >> Biomedical Imaging Laboratory >> The Children's Hospital of Philadelphia >> 34th Street and Civic Center Boulevard >> Philadelphia, Pa. 19104 >> Tel: 267.426.0302 >> email: tavabik at email.chop.edu >> ------------------------------------------------------------- >> ________________________________________ >> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >> Sent: Wednesday, December 15, 2010 5:36 PM >> To: 'Email discussion list for the FieldTrip project' >> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >> >> Dear Kambiz, >> >> >>> Greetings Fieldstrippers >> >> "Fieldtrippers" may have connotations that a scientist does not always >> appreciate, but what to think of "Fieldstrippers"? >> >>> My problem with the results in the attachment is that in the grand >>> averages there is an obvious event related desynchrony (cold colors, >>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>> doesn't get picked up, but the small blip of noise/event-related >>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>> as different between conditions by the permutations! >> >> Have a look at the (channel,frequency)-specific paired t-tests. Do >> these >> detect the big cold blob? If not, the variance across subjects is >> probably >> large. >> >> >> Best, >> >> Eric Maris >> >> >> >> >> >> >> To carry out the >>> permutations I used >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistic = 'maxsum'; >>> cfg.neighbours = [ ]; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.05; >>> cfg.numrandomization = 500; >>> So I presume that the result is not due to a signs (pos/neg values) >>> issue, if I am using a two-tailed test. Changing cfg.tail & >>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>> results in errors. Basically, I'd appreciate if someone, based on >> what >>> is observable in the grand averages, could confirm that the >> permutation >>> result makes sense? And if not then some advice on what I am doing >>> wrong. Thank you. -Kambiz >>> >>> -K. >>> ------------------------------------------------------------ >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> 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 inieuwenhuis at berkeley.edu Tue Dec 21 08:20:55 2010 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 20 Dec 2010 23:20:55 -0800 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl>, <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> Message-ID: <4D105557.9030903@berkeley.edu> Hi Kambiz, I don't fully understand your question. Do you want to know what the fields mean that come out of ft_freqstatistics, or did you hacked some output, and want to know how to make the file in a way that FieldTrip can plot it? In either case, check out this tutorial: "Cluster-based permutation tests on time-frequency data" http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq Here you can find description of ft_freqstatistics with the cluster permutation routine, and it points to where you can find output items for ft_freqstatistics on the ftp server "The output can also be obtained from ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/cluster_permutation_freq/stat_freq_planar_FICvsFC.mat." Hope this helps, Ingrid Ingrid Nieuwenhuis PhD Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 On 20-12-2010 13:46, Tavabi, Kambiz wrote: > Greetings - where can I find a description of the output items for ft_freqstatistics? Or atleast the essential fields necessary for sensibly plotting results of the cluster permutation routine? > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] > Sent: Thursday, December 16, 2010 4:48 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) > > hi kambiz, > > did you look at the actual p-values of you clusters? > > the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. > > good luck, > n > > On 16.12.2010, at 09:21, Eric Maris wrote: > >> Kambiz, >> >>>> Have a look at the (channel,frequency)-specific paired t-tests. >>> I am not sure exactly what you mean. By 'specific' do you mean sample >>> wise testing in a narrow frequency range? >> Sorry, I forgot that you have time resolution. I mean the >> (channel,time,frequency)-specific paired t-tests, which are in the output of >> freqstatistics. >> >> >> Best, >> >> Eric >> >> >>> -K. >>> ------------------------------------------------------------- >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------- >>> ________________________________________ >>> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >>> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >>> Sent: Wednesday, December 15, 2010 5:36 PM >>> To: 'Email discussion list for the FieldTrip project' >>> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >>> >>> Dear Kambiz, >>> >>> >>>> Greetings Fieldstrippers >>> "Fieldtrippers" may have connotations that a scientist does not always >>> appreciate, but what to think of "Fieldstrippers"? >>> >>>> My problem with the results in the attachment is that in the grand >>>> averages there is an obvious event related desynchrony (cold colors, >>>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>>> doesn't get picked up, but the small blip of noise/event-related >>>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>>> as different between conditions by the permutations! >>> Have a look at the (channel,frequency)-specific paired t-tests. Do >>> these >>> detect the big cold blob? If not, the variance across subjects is >>> probably >>> large. >>> >>> >>> Best, >>> >>> Eric Maris >>> >>> >>> >>> >>> >>> >>> To carry out the >>>> permutations I used >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'depsamplesT'; >>>> cfg.correctm = 'cluster'; >>>> cfg.clusteralpha = 0.05; >>>> cfg.clusterstatistic = 'maxsum'; >>>> cfg.neighbours = [ ]; >>>> cfg.tail = 0; >>>> cfg.clustertail = 0; >>>> cfg.alpha = 0.05; >>>> cfg.numrandomization = 500; >>>> So I presume that the result is not due to a signs (pos/neg values) >>>> issue, if I am using a two-tailed test. Changing cfg.tail& >>>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>>> results in errors. Basically, I'd appreciate if someone, based on >>> what >>>> is observable in the grand averages, could confirm that the >>> permutation >>>> result makes sense? And if not then some advice on what I am doing >>>> wrong. Thank you. -Kambiz >>>> >>>> -K. >>>> ------------------------------------------------------------ >>>> Kambiz Tavabi PhD >>>> Biomedical Imaging Laboratory >>>> The Children's Hospital of Philadelphia >>>> 34th Street and Civic Center Boulevard >>>> Philadelphia, Pa. 19104 >>>> Tel: 267.426.0302 >>>> email: tavabik at email.chop.edu >>>> ------------------------------------------------------------ >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hanneke.meeren at uvt.nl Wed Dec 29 16:25:49 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Wed, 29 Dec 2010 16:25:49 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293636349.6d2a46cHkmeeren@atommail.uvt.nl> Hi, I would like to perform cluster-based permutation tests on MNE-surface data, which I obtained using the MNE/Freesurfer pipeline. So rather than use the whole FT pipeline and start from scratch, I would like to import my existing source data into FieldTrip, and export the resulting stats to my own matlab visualization tools. Reading the tutorial and reference documentation I understand that I could directly call ft_sourcestatistics, but it is not clear to me what the exact data structure should be for the source data and which fields the cfg should contain. I could not find a tutorial- or example dataset for ft_sourcestatistics. For each condition I have the source data in a (subjects x vertices x time) 3d-array for each condition. Is it possible to have a time-dimension in the source-data, or should I first convert to a two-dimensional array subjects x vertices? In addition I have generated a location matrix which contains the x, y, z - coordinates of the vertices of my surface, which I presume is necessary to define neighbors. It is however not clear to me how to pass the location matrix to the function (should it be defined in a cfg field?). I have also tried to search the archives of the discussion list but was unable to find any messages before December 2010. Does anyone have an example dataset available that can be used as input dataset for sourcestatistics, so I can see what the structure of the data should be? Could someone clarify how I should define the location data? Could someone help me out on how to search through the old messages in the discussion list archives. Any help is greatly appreciated, Thanks a lot in advance, Hanneke ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From hanneke.meeren at uvt.nl Thu Dec 30 00:14:52 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 00:14:52 +0100 Subject: [FieldTrip] Fw: Re: cluster-based permutation tests on MNE-surface data Message-ID: <1293664492.71b8c54Hkmeeren@atommail.uvt.nl> message from Jan-Mathijs forwarded to the list... ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl -------------- next part -------------- An embedded message was scrubbed... From: jan-mathijs schoffelen Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Date: Wed, 29 Dec 2010 16:43:42 +0100 Size: 6246 URL: From hanneke.meeren at uvt.nl Thu Dec 30 00:18:04 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 00:18:04 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> Dear Jan-Mathijs, Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. Best regards, Hanneke -----Original Message----- From: jan-mathijs schoffelen To: hanneke.meeren at uvt.nl Date: Wed, 29 Dec 2010 16:43:42 +0100 Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Hi Hanneke, Performing cluster based statistics on source reconstructed data based on a cortical sheet is as of yet not supported (I assume at least that you do the standard MNE cortical sheet reconstruction). At the moment, we are actually working on implementing an MNE-like pipeline in FieldTrip.Our first strategy would be to interpolate the 2D sheets onto a 3D volume, and use the standard machinery for statistics. Yet, another viable approach indeed would be to build in support for 2D- neighbourhood structures. Do you have any clear ideas on that? I would also be interested to see your recipe to warp the individual cortical sheets to a template. Regarding the mailing list: the list is hosted on a new server since the beginning of December. Apparently the archives have not been moved along, or at least are not accessible. We'll look into this. Best wishes, Jan-Mathijs PS: could you forward this message to the list; I am at home and cannot send mails from my regular account. On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > Hi, > > I would like to perform cluster-based permutation tests on MNE- > surface data, which I obtained using the MNE/Freesurfer pipeline. So > rather than use the whole FT pipeline and start from scratch, I > would like to import my existing source data into FieldTrip, and > export the resulting stats to my own matlab visualization tools. > Reading the tutorial and reference documentation I understand that I > could directly call ft_sourcestatistics, but it is not clear to me > what the exact data structure should be for the source data and > which fields the cfg should contain. I could not find a tutorial- or > example dataset for ft_sourcestatistics. > > For each condition I have the source data in a (subjects x vertices > x time) 3d-array for each condition. Is it possible to have a time- > dimension in the source-data, or should I first convert to a two- > dimensional array subjects x vertices? In addition I have generated > a location matrix which contains the x, y, z - coordinates of the > vertices of my surface, which I presume is necessary to define > neighbors. It is however not clear to me how to pass the location > matrix to the function (should it be defined in a cfg field?). I > have also tried to search the archives of the discussion list but > was unable to find any messages before December 2010. > > Does anyone have an example dataset available that can be used as > input dataset for sourcestatistics, so I can see what the structure > of the data should be? Could someone clarify how I should define the > location data? Could someone help me out on how to search through > the old messages in the discussion list archives. > > Any help is greatly appreciated, > > Thanks a lot in advance, > > Hanneke > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From smoratti at psi.ucm.es Thu Dec 30 10:12:43 2010 From: smoratti at psi.ucm.es (Stephan Moratti) Date: Thu, 30 Dec 2010 10:12:43 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data In-Reply-To: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> References: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> Message-ID: Dear Hanneke, Actually I do this kind of analysis using the MNE solution from the Brainstrom pipeline. I do the following. First you have to determine a connectivity matrix that determines which vertices of your cortical mesh are neighbors. I do that with a brainstrom script called tess_vertices_connectivity.m. You can download brainstrom for free. Let's call the connectivity matrix C. If C(i,j) = 1 then vertices i and j are connected, if C(i,j) = 0, then not. Later I changed the clusterstat.m of FT a little bit: lines 38 to 48 I changed: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) && ~isfield(cfg,'connectivity') channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; elseif isfield(cfg, 'connectivity') disp('Using precomputed connectivity matrix !'); channeighbstructmat = cfg.connectivity; % connectivity has been already computed this is what I introduced issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end By doing so, FT does not calculate a connectivity matrix based on distance, but using directly your connectivity matrix C (see below): The next trick is to create a FT data structure from your MNE data, so that you can use ft_timelockstatistics.m. As a cortical mesh has the same 3d coordinates as a sensor helmet, I "press" my MNE surface data in a sensor data structure that I can use later with ft_timelockstatistic.m. This could look like this: MneERF1.grad.pnt=brain.vert; %brain.vert contains the vertices of my cortical mesh; be sure that the unit is cm for i = 1:7000 MneERF1.label{i}=sprintf('A%g',i); end MneERF1.grad.label = MneERF1.label; MneERF1.grad.tra = eye(7000); MneERF1.cfg.channel = UmneERF1.label; MneERF1.grad.ori = zeros(7000,3); for i = 1:23 MneERF1.individual(i,:,:) = squeeze(MNEsolution(:,i,:)); % Here I put the individual MNE solutions if I have 23 subjects; this depends a little bit of your data matrix end MneERF1.dimord= 'subj_chan_time; Now you can use timelockstatistic.m as described in the FT tutorial on sensor space data to calculate a non-parametric cluster based permutation statistic on your MNE surface data (for example MneERF1, MneERF2 are two conditions that you want to compare). The only difference is that you would introduce cfg.connectivity = C;, so that later clusterstat.m uses your C matrix to determine your neighbours. I hope that helps, Best, Stephan El 30/12/2010, a las 00:18, Meeren.H.K.M. escribió: > Dear Jan-Mathijs, > > Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE > (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. > > Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. > > Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. > > It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. > > Best regards, > > Hanneke > > > -----Original Message----- > From: jan-mathijs schoffelen > To: hanneke.meeren at uvt.nl > Date: Wed, 29 Dec 2010 16:43:42 +0100 > Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data > > Hi Hanneke, > > Performing cluster based statistics on source reconstructed data based > on a cortical sheet is as of yet not supported (I assume at least that > you do the standard MNE cortical sheet reconstruction). At the moment, > we are actually working on implementing an MNE-like pipeline in > FieldTrip.Our first strategy would be to interpolate the 2D sheets > onto a 3D volume, and use the standard machinery for statistics. Yet, > another viable approach indeed would be to build in support for 2D- > neighbourhood structures. Do you have any clear ideas on that? I would > also be interested to see your recipe to warp the individual cortical > sheets to a template. > > Regarding the mailing list: the list is hosted on a new server since > the beginning of December. Apparently the archives have not been moved > along, or at least are not accessible. We'll look into this. > > Best wishes, > > Jan-Mathijs > > PS: could you forward this message to the list; I am at home and > cannot send mails from my regular account. > > > > On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > >> Hi, >> >> I would like to perform cluster-based permutation tests on MNE- >> surface data, which I obtained using the MNE/Freesurfer pipeline. So >> rather than use the whole FT pipeline and start from scratch, I >> would like to import my existing source data into FieldTrip, and >> export the resulting stats to my own matlab visualization tools. >> Reading the tutorial and reference documentation I understand that I >> could directly call ft_sourcestatistics, but it is not clear to me >> what the exact data structure should be for the source data and >> which fields the cfg should contain. I could not find a tutorial- or >> example dataset for ft_sourcestatistics. >> >> For each condition I have the source data in a (subjects x vertices >> x time) 3d-array for each condition. Is it possible to have a time- >> dimension in the source-data, or should I first convert to a two- >> dimensional array subjects x vertices? In addition I have generated >> a location matrix which contains the x, y, z - coordinates of the >> vertices of my surface, which I presume is necessary to define >> neighbors. It is however not clear to me how to pass the location >> matrix to the function (should it be defined in a cfg field?). I >> have also tried to search the archives of the discussion list but >> was unable to find any messages before December 2010. >> >> Does anyone have an example dataset available that can be used as >> input dataset for sourcestatistics, so I can see what the structure >> of the data should be? Could someone clarify how I should define the >> location data? Could someone help me out on how to search through >> the old messages in the discussion list archives. >> >> Any help is greatly appreciated, >> >> Thanks a lot in advance, >> >> Hanneke >> >> ---------------------------------- >> Hanneke K.M. Meeren, PhD. >> Research Fellow and Instructor >> Medical Psychology and Cognitive Neuroscience >> Tilburg University >> P.O. Box 90153 >> 5000 LE Tilburg >> The Netherlands >> email: hanneke.meeren at uvt.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.meeren at uvt.nl Thu Dec 30 14:02:23 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 14:02:23 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293714143.6d35b2cHkmeeren@atommail.uvt.nl> Dear Stephan, Thanks a lot for your explanation. I follow your line of reasoning well. I have already done some experimenting with FT_TIMELOCKSTATISTICS, and it seems to do the job, although I have still have to do some double-checking. I have indeed created a FT data structure from my MNE data very similar as the way you describe it. The main difference between you and my mne-data is I guess, that my functional (source) data are not on a cortical mesh. Although my anatomical surface data is a patch with vertices and faces, my source data is not. My source data consists of fixed dipole locations that are actually a subset of the vertices in my surface data. These dipoles each have an x,y,z position in MRI coordinates, but do not have faces or other connectivity-parameters. I guess your tess_vertices_connectivity.m script cannot do the job for a x,y,z position-matrix. So I consider my dipoles as a set of electrodes each having their x,y,z coordinates, and create the neighbourhood-structure with cfg.neigbourdist =5 (I have both my coordinates and distance in mm). Thanks a lot again, Best regards, Hanneke -----Original Message----- From: Stephan Moratti To: Email discussion list for the FieldTrip project Date: Thu, 30 Dec 2010 10:12:43 +0100 Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Dear Hanneke, Actually I do this kind of analysis using the MNE solution from the Brainstrom pipeline. I do the following. First you have to determine a connectivity matrix that determines which vertices of your cortical mesh are neighbors. I do that with a brainstrom script called tess_vertices_connectivity.m. You can download brainstrom for free. Let's call the connectivity matrix C. If C(i,j) = 1 then vertices i and j are connected, if C(i,j) = 0, then not. Later I changed the clusterstat.m of FT a little bit: lines 38 to 48 I changed: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) && ~isfield(cfg,'connectivity') channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; elseif isfield(cfg, 'connectivity') disp('Using precomputed connectivity matrix !'); channeighbstructmat = cfg.connectivity; % connectivity has been already computed this is what I introduced issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end By doing so, FT does not calculate a connectivity matrix based on distance, but using directly your connectivity matrix C (see below): The next trick is to create a FT data structure from your MNE data, so that you can use ft_timelockstatistics.m. As a cortical mesh has the same 3d coordinates as a sensor helmet, I "press" my MNE surface data in a sensor data structure that I can use later with ft_timelockstatistic.m. This could look like this: MneERF1.grad.pnt=brain.vert; %brain.vert contains the vertices of my cortical mesh; be sure that the unit is cm for i = 1:7000 MneERF1.label{i}=sprintf('A%g',i); end MneERF1.grad.label = MneERF1.label; MneERF1.grad.tra = eye(7000); MneERF1.cfg.channel = UmneERF1.label; MneERF1.grad.ori = zeros(7000,3); for i = 1:23 MneERF1.individual(i,:,:) = squeeze(MNEsolution(:,i,:)); % Here I put the individual MNE solutions if I have 23 subjects; this depends a little bit of your data matrix end MneERF1.dimord= 'subj_chan_time; Now you can use timelockstatistic.m as described in the FT tutorial on sensor space data to calculate a non-parametric cluster based permutation statistic on your MNE surface data (for example MneERF1, MneERF2 are two conditions that you want to compare). The only difference is that you would introduce cfg.connectivity = C;, so that later clusterstat.m uses your C matrix to determine your neighbours. I hope that helps, Best, Stephan El 30/12/2010, a las 00:18, Meeren.H.K.M. escribió: > Dear Jan-Mathijs, > > Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE > (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. > > Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. > > Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. > > It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. > > Best regards, > > Hanneke > > > -----Original Message----- > From: jan-mathijs schoffelen > To: hanneke.meeren at uvt.nl > Date: Wed, 29 Dec 2010 16:43:42 +0100 > Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data > > Hi Hanneke, > > Performing cluster based statistics on source reconstructed data based > on a cortical sheet is as of yet not supported (I assume at least that > you do the standard MNE cortical sheet reconstruction). At the moment, > we are actually working on implementing an MNE-like pipeline in > FieldTrip.Our first strategy would be to interpolate the 2D sheets > onto a 3D volume, and use the standard machinery for statistics. Yet, > another viable approach indeed would be to build in support for 2D- > neighbourhood structures. Do you have any clear ideas on that? I would > also be interested to see your recipe to warp the individual cortical > sheets to a template. > > Regarding the mailing list: the list is hosted on a new server since > the beginning of December. Apparently the archives have not been moved > along, or at least are not accessible. We'll look into this. > > Best wishes, > > Jan-Mathijs > > PS: could you forward this message to the list; I am at home and > cannot send mails from my regular account. > > > > On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > >> Hi, >> >> I would like to perform cluster-based permutation tests on MNE- >> surface data, which I obtained using the MNE/Freesurfer pipeline. So >> rather than use the whole FT pipeline and start from scratch, I >> would like to import my existing source data into FieldTrip, and >> export the resulting stats to my own matlab visualization tools. >> Reading the tutorial and reference documentation I understand that I >> could directly call ft_sourcestatistics, but it is not clear to me >> what the exact data structure should be for the source data and >> which fields the cfg should contain. I could not find a tutorial- or >> example dataset for ft_sourcestatistics. >> >> For each condition I have the source data in a (subjects x vertices >> x time) 3d-array for each condition. Is it possible to have a time- >> dimension in the source-data, or should I first convert to a two- >> dimensional array subjects x vertices? In addition I have generated >> a location matrix which contains the x, y, z - coordinates of the >> vertices of my surface, which I presume is necessary to define >> neighbors. It is however not clear to me how to pass the location >> matrix to the function (should it be defined in a cfg field?). I >> have also tried to search the archives of the discussion list but >> was unable to find any messages before December 2010. >> >> Does anyone have an example dataset available that can be used as >> input dataset for sourcestatistics, so I can see what the structure >> of the data should be? Could someone clarify how I should define the >> location data? Could someone help me out on how to search through >> the old messages in the discussion list archives. >> >> Any help is greatly appreciated, >> >> Thanks a lot in advance, >> >> Hanneke >> >> ---------------------------------- >> Hanneke K.M. Meeren, PhD. >> Research Fellow and Instructor >> Medical Psychology and Cognitive Neuroscience >> Tilburg University >> P.O. Box 90153 >> 5000 LE Tilburg >> The Netherlands >> email: hanneke.meeren at uvt.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From seapsy at GMAIL.COM Fri Dec 3 02:05:06 2010 From: seapsy at GMAIL.COM (seapsy seapsy) Date: Fri, 3 Dec 2010 09:05:06 +0800 Subject: read NeuroScan avg file In-Reply-To: <05B030CE-4ED9-4A61-B363-965270C7997A@donders.ru.nl> Message-ID: Dear Robert There still a problem when I plot the *.AVG file with FieldTrip. The figure I plotted with negative down, but I family with negative up, So, the question is how to plot with negative upward? Tthanks so much! Seapsy --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From michielvanelk at GMAIL.COM Fri Dec 3 15:28:58 2010 From: michielvanelk at GMAIL.COM (Michiel van Elk) Date: Fri, 3 Dec 2010 15:28:58 +0100 Subject: importing CeeGraph EEG data in Fieldtrip & iEEG analysis Message-ID: Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone interested: The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone knows about the right filter settings for preprocessing iEEG data for LFP and TFR analysis? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Best, Michiel van Elk --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From s.oosthoek at DONDERS.RU.NL Fri Dec 3 17:39:39 2010 From: s.oosthoek at DONDERS.RU.NL (Simon Oosthoek) Date: Fri, 3 Dec 2010 17:39:39 +0100 Subject: the list has MOVED Message-ID: Hello dear fieldtrippers As you may have heard, the maillist service at SurfNET is being terminated as of 1st of January 2011. Therefore the list has now moved to a different location and a different organisation. The Science Department of the Radboud University has kindly provided us with new maillists, to which I have subscribed all existing subscribers, EXCEPT those who were somehow invisible, so please check if you received this e-mail, but not something from fieldtrip at donders.ru.nl If you want to subscribe or unsubscribe to that list use: fieldtrip-subscribe at donders.ru.nl or fieldtrip-unsubscribe at donders.ru.nl Let's continue the discussion at fieldtrip at donders.ru.nl! Cheers Simon PS, I will try to make the old archives available at some point. --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From reyna.gordon at VANDERBILT.EDU Fri Dec 3 22:46:19 2010 From: reyna.gordon at VANDERBILT.EDU (Gordon, Reyna L) Date: Fri, 3 Dec 2010 15:46:19 -0600 Subject: read NeuroScan avg file In-Reply-To: Message-ID: Dear Seapsy, Try adding this line of code right after you call the plotting function. set(gca,'YDir','reverse'); Best, Reyna ------------------------------ Reyna L Gordon, Ph.D. Postdoctoral Fellow EEG/ERP Lab Vanderbilt Kennedy Center 227 MRL (615) 322-1324 reyna.gordon at Vanderbilt.Edu On Dec 2, 2010, at 7:05 PM, seapsy seapsy wrote: > Dear Robert > There still a problem when I plot the *.AVG file with FieldTrip. > The figure I plotted with negative down, but I family with negative up, > So, the question is how to plot with negative upward? > Tthanks so much! > > Seapsy > > --------------------------------------------------------------------------- > You are receiving this message because you are subscribed to > the FieldTrip list. The aim of this list is to facilitate the discussion > between users of the FieldTrip toolbox, to share experiences > and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > --------------------------------------------------------------------------- --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From seapsy at GMAIL.COM Sat Dec 4 03:33:58 2010 From: seapsy at GMAIL.COM (seapsy seapsy) Date: Sat, 4 Dec 2010 10:33:58 +0800 Subject: read NeuroScan avg file In-Reply-To: <98ED66E1-566A-4D0D-B38B-06542B8C5057@Vanderbilt.Edu> Message-ID: Dear Reyna Thanks for you reply. But still with problem that turning the figure up to down, left to right. Seapsy 2010/12/4 Gordon, Reyna L : > Dear Seapsy, > > Try adding this line of code right after you call the plotting function. > > set(gca,'YDir','reverse'); > > Best, > Reyna > > ------------------------------ > Reyna L Gordon, Ph.D. > Postdoctoral Fellow > EEG/ERP Lab > Vanderbilt Kennedy Center > 227 MRL > (615) 322-1324 > reyna.gordon at Vanderbilt.Edu > > > > > > On Dec 2, 2010, at 7:05 PM, seapsy seapsy wrote: > >> Dear Robert >> There still a problem when I plot the *.AVG file with FieldTrip. >> The figure I plotted with negative down, but I family with negative up, >> So, the question is how to plot with negative  upward? >> Tthanks so much! >> >>                  Seapsy >> >> --------------------------------------------------------------------------- >> You are receiving this message because you are subscribed to >> the  FieldTrip list. The aim of this list is to facilitate the discussion >> between  users of the FieldTrip  toolbox, to share experiences >> and to discuss  new ideas for MEG and EEG analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> --------------------------------------------------------------------------- > > --------------------------------------------------------------------------- > You are receiving this message because you are subscribed to > the  FieldTrip list. The aim of this list is to facilitate the discussion > between  users of the FieldTrip  toolbox, to share experiences > and to discuss  new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > --------------------------------------------------------------------------- > --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From batrod at GMAIL.COM Thu Dec 9 13:38:06 2010 From: batrod at GMAIL.COM (Rodolphe Nenert) Date: Thu, 9 Dec 2010 06:38:06 -0600 Subject: Awful Experience....(Rodolphe Nenert)..I Need Your Help!!!! Message-ID: Hi, I'm writing this with tears in my eyes.I'm presently in London,United Kingdom for a short vacation and I'm stuck...And really it was unannounced. I was attacked by four armed robbers on my way back to the hotel where i lodged.I was robbed and completely embarrassed. All my cash,credit cards and cellphone were stolen. I reported the incident to the embassy and the Police but to my dismay they seem not bothered...their response was just too casual.My flight is scheduled for tomorrow afternoon but I've got to settle my bills before I'm allowed to leave....Now am freaked out. Regards.. --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From michielvanelk at gmail.com Fri Dec 3 17:07:51 2010 From: michielvanelk at gmail.com (Michiel van Elk) Date: Fri, 3 Dec 2010 17:07:51 +0100 Subject: [FieldTrip] importing CeeGraph EEG data in Fieldtrip & iEEG analysis Message-ID: Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone who ever runs into the same problem (should work for EEGlab as well). The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts (textread function) and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone has recommendations for the preprocessing of iEEG data for subsequent LFP and TFR analysis (e.g. re-reference data or not, which filter settings, where to put the baseline)? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Thanks, Michiel van Elk -- mail: michielvanelk at gmail.com phone: (+41) 76-2271095 web: www.michielvanelk.com From Douglas.Rose at cchmc.org Fri Dec 3 17:53:24 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Fri, 03 Dec 2010 11:53:24 -0500 Subject: [FieldTrip] importing CeeGraph EEG data in Fieldtrip & iEEG analysis In-Reply-To: References: Message-ID: <4CF8DA34.0668.003A.1@cchmc.org> Thank you for the heads up. We use CeeGraph for some studies. Did you try Insight from Persyst? ( http://www.eeg-persyst.com/). I use that to read CeeGraph and other Bio-logic files and I believe it outputs in a number of other formats including MatLab. Douglas Rose **************************************************** Douglas F. Rose, M.D. Medical Director, CCHMC MEG Center Professor of Pediatrics and Neurology Cincinnati Children's Hospital Medical Center 3333 Burnet Ave, ML #11006 Cincinnati, OH 45229, USA Phone 513-636-4222 Fax 513-636-3980 Email douglas.rose at cchmc.org **************************************************** >>> Michiel van Elk 12/3/2010 11:07 AM >>> Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone who ever runs into the same problem (should work for EEGlab as well). The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts (textread function) and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone has recommendations for the preprocessing of iEEG data for subsequent LFP and TFR analysis (e.g. re-reference data or not, which filter settings, where to put the baseline)? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Thanks, Michiel van Elk -- mail: michielvanelk at gmail.com phone: (+41) 76-2271095 web: www.michielvanelk.com _______________________________________________ Fieldtrip mailing list Fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From michael.hanke at gmail.com Sat Dec 4 14:27:25 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 08:27:25 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip Message-ID: <20101204132725.GA6337@meiner> Hi, I'm one of the NeuroDebian (http://neuro.debian.net) developers and I am looking into packaging fieldtrip for the Debian operating system. I'd be glad if you could provide me with some information concerning the following questions: 1. I cloned the public SVN repository. There are no tags in it. Does fieldtrip do actual releases, or is every revision intended to be used by users? 2. The repository contains a large number of binaries for various platforms. A Debian package cannot ship any of these, as all binaries have to be buildable from source. Therefore I stripped all MEX extension and third party binaries. This raises the question of how to get them rebuilt ;-) There are no Makefiles, but there is ft_compile_mex.m. However, that doesn't seem to build everything that is shipped with the fieldtrip distribution. 3. My initial goal was simply to get enough of fieldtrip running to be able to serve as a dependency for our package of the Matlab version of SPM8. However, I now discovered that there is a "port" of fieldtrip to octave: http://kurage.nimh.nih.gov/meglab/Meg/Software which makes it mandatory for me to try to integrate it properly into Debian octave infrastructure. Are you aware of this octave port? Is there any plan to incorporate this effort? To what degree is it complete or usable? Or maybe current fieldtrip code already runs (partially) on octave? 4. Distribution packaging can sometimes cause problems, because the maintainer is not aware of some peculiarities. Do you have a test suite that can be used to assess proper functioning of fieldtrip? I saw the tutorial and associated data that could serve as a test suite, but some tutorial parts only mention compatibility with versions of the past, and I wasn't able to locate the actual tutorial _code_ for download. I also saw http://fieldtrip.fcdonders.nl/development/infrastructure_for_testing but it looks more like a plan for the future, correct? 5. I had to strip all 'external' software due to various licensing/distribution problems. I wonder to what degree the presence of these pieces is critical for fieldtrip functionality -- beside obvious lack of support for some file formats? Thanks in advance for your answers to this long list, Michael -- GPG key: 4096R/7FFB9E9B Michael Hanke http://mih.voxindeserto.de From tomh at kurage.nimh.nih.gov Sat Dec 4 16:55:42 2010 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Sat, 4 Dec 2010 10:55:42 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip Message-ID: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> >However, I now discovered that there is a "port" of fieldtrip to octave: >http://kurage.nimh.nih.gov/meglab/Meg/Software That isn't a port, just a few tools written long ago to make some things easier. Fieldtrip has changed a great deal since then. Getting it to work correctly under Octave is something that needs to be done by the Fieldtrip developers. From michael.hanke at gmail.com Sat Dec 4 17:10:29 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 11:10:29 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> References: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> Message-ID: <20101204161029.GA8032@meiner> On Sat, Dec 04, 2010 at 10:55:42AM -0500, Tom Holroyd wrote: > >However, I now discovered that there is a "port" of fieldtrip to octave: > >http://kurage.nimh.nih.gov/meglab/Meg/Software > > That isn't a port, just a few tools written long ago to make some things easier. Thanks for the clarification. Do you know who did that? Was it you? Where can I find information on what things were made easier? > Fieldtrip has changed a great deal since then. Getting it to work correctly > under Octave is something that needs to be done by the Fieldtrip developers. I agree. Does anyone have experience with or further information about the current state of compatibility between fieldtrip and octave? Thanks in advance, Michael -- Michael Hanke http://mih.voxindeserto.de GPG key: 4096R/7FFB9E9B From alexandre.gramfort at inria.fr Sat Dec 4 23:42:02 2010 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Sat, 4 Dec 2010 17:42:02 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: Hi Mickael, > 4. Distribution packaging can sometimes cause problems, because the >   maintainer is not aware of some peculiarities. Do you have a test >   suite that can be used to assess proper functioning of fieldtrip? To my knowledge fieldtrip do not have a full test suite. You do have one though for externals/openmeeg base on mtest: http://www.mathworks.com/matlabcentral/fileexchange/22846 Alex From michael.hanke at gmail.com Sun Dec 5 03:55:05 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 21:55:05 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: References: <20101204132725.GA6337@meiner> Message-ID: <20101205025505.GB14803@meiner> On Sat, Dec 04, 2010 at 05:42:02PM -0500, Alexandre Gramfort wrote: > To my knowledge fieldtrip do not have a full test suite. You do > have one though for externals/openmeeg base on mtest: > http://www.mathworks.com/matlabcentral/fileexchange/22846 Thanks Alex! However, the Debian package of fieldtrip will not ship with openmeeg. We already have a dedicated package for it and it is currently updated to also provide the Matlab functionality for fieldtrip. A corresponding dependency between the two packages will be specified to ensure that fieldtrip users will have access to openmeeg-related functionality. Special thanks for adding a test suite to openmeeg! Michael -- Michael Hanke http://mih.voxindeserto.de From michael.hanke at gmail.com Sun Dec 5 22:00:56 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sun, 5 Dec 2010 16:00:56 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: <20101205210056.GA23636@meiner> On Sat, Dec 04, 2010 at 08:27:25AM -0500, Michael Hanke wrote: > 2. The repository contains a large number of binaries for various > platforms. A Debian package cannot ship any of these, as all binaries > have to be buildable from source. Therefore I stripped all MEX > extension and third party binaries. This raises the question of how > to get them rebuilt ;-) > > There are no Makefiles, but there is ft_compile_mex.m. However, that > doesn't seem to build everything that is shipped with the fieldtrip > distribution. Moreover the current SVN version doesn't run successfully, because it expects files in different locations. The following patch allows MEX files to be compiled. However, I'm not sure if this is half-way into a transition. For example 'routlm' seems to have moved into forward/private, but is still expected to be in private/. The current binary distribution also ships it in private/. What is the intented setup? ft_compile_mex.m now builds 22 of 35 MEX files in the binary distribution (excluding external ones). diff --git a/ft_compile_mex.m b/ft_compile_mex.m index 9fe1d63..cf191b3 100644 --- a/ft_compile_mex.m +++ b/ft_compile_mex.m @@ -51,11 +51,11 @@ L = addSource(L,'forward/private','meg_leadfield1'); L = addSource(L,'forward/private','lmoutr',[],[],'geometry.c -I.'); L = addSource(L,'forward/private','solid_angle',[],[],'geometry.c -I.'); L = addSource(L,'forward/private','ptriproj',[],[],'geometry.c -I.'); +L = addSource(L,'forward/private','routlm',[],[],'geometry.c -I.'); L = addSource(L,'private','splint_gh'); -L = addSource(L,'private','ltrisect',[],[],'geometry.c -I.'); -L = addSource(L,'private','routlm',[],[],'geometry.c -I.'); -L = addSource(L,'private','plinproj',[],[],'geometry.c -I.'); +L = addSource(L,'private','ltrisect',[],[],'../forward/private/geometry.c -I../forward/private'); +L = addSource(L,'private','plinproj',[],[],'../forward/private/geometry.c -I../forward/private'); L = addSource(L,'realtime/online_mri','ft_omri_smooth_volume'); Thanks again, Michael -- Michael Hanke http://mih.voxindeserto.de From s.klanke at donders.ru.nl Mon Dec 6 10:04:35 2010 From: s.klanke at donders.ru.nl (Stefan Klanke) Date: Mon, 06 Dec 2010 10:04:35 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101205210056.GA23636@meiner> References: <20101204132725.GA6337@meiner> <20101205210056.GA23636@meiner> Message-ID: <4CFCA723.50909@donders.ru.nl> Hey Michael, I'll try to answer some of your questions: > 1. Does fieldtrip do actual releases, or is every revision intended to be used by users? The latter is true, we don't do releases. > 2. There are no Makefiles, but there is ft_compile_mex.m. However, that doesn't seem to build everything that is shipped with the fieldtrip distribution. The ft_compile_mex file is fairly new itself, and indeed only compiles the "simple" MEX files without extra dependencies. The big three blocks of left-out MEX files are in the a) realtime b) peer and c) multivariate (sub-)toolboxes. For a) and b), we need extra stuff like pthreads and other system libraries, which is quite hard to build in a simple way that still works for all platforms (and compilers). Also, when I made the compile script, c) was under heavy restructuring and I didn't even know whether I'd have all the sources available. If you're only after a compile script or Makefile for Linux (and GCC), we can probably do a lot better (see below). > 3. Or maybe current fieldtrip code already runs (partially) on octave? I recently tested some FieldTrip code on Octave 3.2 myself (including the buffer mex file), and that ran fine. Nowadays, most of the code should run unmodified, since we don't heavily use OOP or Matlab GUI code. I won't make any promises, though. > Moreover the current SVN version doesn't run successfully, because it > expects files in different locations. The following patch allows MEX > files to be compiled. ... Some of the MEX files (and .m files) show up in multiple private directories, but we use SVN externals to maintain a single version in the repository, and copy this to the various places. If you want a source-only distribution, we'd need to adapt the ft_compile_mex script to take over the functionality of the SVN externals. Actually, I guess the proper solution for a source distribution would be a global Makefile (maybe based on autoconf) that compiles all the MEX files for the version of Matlab or Octave that is visible on the path. Until now we've shied away from that effort since our audience is usually happy to have the binaries provided for them, and for the Windows platform it's easier to compile the MEX files within Matlab. Cheers, Stefan From r.oostenveld at donders.ru.nl Mon Dec 6 15:13:11 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 6 Dec 2010 15:13:11 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> Dear Michael As you may know, I am in charge of the fieldtrip project. Since you asked the questions on the email list, let me also reply through this channel. There are a number of techical issues that you raised, some of which have already been addressed by email lists subscribers. Let me just respond to some of the remaining points. Regarding octave: It would of course be nice if it ran both on octave and matlab. However, the active developers at the moment do not have a need for octave as alternative for Matlab. At the donders we have enough matlab licenses and I believe this applies to the other developers as well. The consequence is that maintaining compatibility with octave is not high on the priority list of any of these developers. However, I certainly welcome suggestions for improving the octave compatibility. Suggestions for improvements can be posted on http://bugzilla.fcdonders.nl . If someone wants to take up this responsibility, that person could get direct access to the svn server. Please note that we have external people already contributing to the project source code and documentation, it is not only a Donders project. Regarding test suite: there is the branches/testing directory in which you can find test code. It is not a complete suite, and most importantly is that the data files (which amount to many GBs are not in there. I am trying to encourage contributors to add test scripts there, but at the moment we do not have an automated testing procedure. We used to have one, but at a certain point it ran too long (more than one full night) and was not sufficiently sensitive in picking up the actual bugs, so that is why we abandoned the automatic (regression) testing. We now rely on our users to report problems and take quick action in fixing the bugs. The automatic testing remains a desireable feature, but currently we lack manpower and expertise for properly implementing this. Regarding openmeeg: where do you in general envision the "glue code" between project A and project B to go? In this particular example, I think that the openmeeg glue code should go into the fieldtrip package. The reason for this is that it is maintained by the whole fieldtrip developer team, and hosted on the fieldtrip svn. Part of the glue is actually even in the fieldtrip/forward directory, so taking away fieldtrip/external/openmeeg might make it more confusing for users. Note that the openmeeg package in fieldtrip does automatic checking of the required binaries and provides instructions if the binaries are missing, so towards end-users it is friendlier to rely on that checking mechanism. Regarding externals in general: the externals are more than just providing a version of some external software for easy download. The externals also provide a specific version (that is tested and known to work), a subset of the toolbox (e.g. part of spm2 instead of the complete version) and bug fixes if the external parter does not provide them in time (e.g. the isfinite function which fails on recent matlabs and therefore had to be replaced by the finite function on afni and spm2). SPM8 works with a particular version of fieldtrip, and the SPM developers are responsible for keeping their fieldtrip version in synch with our developments. Vice versa, the fieldtrip developers are responsible for keeping the fieldtrip/external. The challenge in package management on linux is of course also dependencies. With the matlab toolboxes we are joinly trying to work towards better dependency management, but are clearly not there yet. How do you envision that your debian packaging ensures correct versions to be co- installed? Regarding mex files: not all users have compilers on their system by default (esp. on windows 64 bit and osx in general), therefore we provide the packaged fieldtrip version including binaries. This also facilitates the fieldtrip release to be installed and maintained by a single user in a larger research group, e.g. on a shared network drive that is read only for all users except the maintainer. Recompiling by individual users requires individual users to have write access. Of course if you consider every user to be super user on his own linux box, that is not a problem. But in reality many researchers have limited rights to the computers on which they are working. Recompiling the mex files is of course always an option, but it would be cumbersome to force this on the users. Why would you want to exclude the mex binaries from the release version? Regarding your observation of files being replicated: fieldtrip (as all matlab toolboxes) consists of interpreted code and not compield code. To ensure a consistent and long-term stable user interface to the functions, part of the functions are hidden (in the private directories). Those hidden functions are also hidden from each other, i.e. fieldtrip/fileio/private and fieldtrip/forward/private functions cannot access each other. Hence some of the low-level functions (and also mex files) have to be replicated. That is why we use svn file externals. Checking out so many svn file externals is very slow due to the suboptimal implementation of the svn client software. However, the regular users (95% of all users) don't notice and don't care, because they are just getting a packaged zip file, unzip it and can get to work. Then some general questions: which part of the FieldTrip audience do you expect to benefit from the packaged version? I presume that it would be limited to the linux users, with root access to their own computers, and debian based releases. Actually I would expect those people to benefit more from the read-only SVN version of fieldtrip that we make available to all users. Working with SVN should be simple for this particular sub-class of fieldtrip users. And using svn allows the user to roll back to older versions, and to make changes in his copy of the code without those changes being overwritten with the next "svn update". If you want to discuss this in more detail, feel free to drop me an email to schedule a phone or skype call. Probably that is more efficient for both of us in getting things done. 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 ----------------------------------------------------------- On 4 Dec 2010, at 14:27, Michael Hanke wrote: > Hi, > > I'm one of the NeuroDebian (http://neuro.debian.net) developers and > I am > looking into packaging fieldtrip for the Debian operating system. > I'd be > glad if you could provide me with some information concerning the > following questions: > > 1. I cloned the public SVN repository. There are no tags in it. Does > fieldtrip do actual releases, or is every revision intended to be > used by users? > > 2. The repository contains a large number of binaries for various > platforms. A Debian package cannot ship any of these, as all > binaries > have to be buildable from source. Therefore I stripped all MEX > extension and third party binaries. This raises the question of how > to get them rebuilt ;-) > > There are no Makefiles, but there is ft_compile_mex.m. However, that > doesn't seem to build everything that is shipped with the fieldtrip > distribution. > > 3. My initial goal was simply to get enough of fieldtrip running to > be able to > serve as a dependency for our package of the Matlab version of SPM8. > However, I now discovered that there is a "port" of fieldtrip to > octave: http://kurage.nimh.nih.gov/meglab/Meg/Software which makes > it > mandatory for me to try to integrate it properly into Debian octave > infrastructure. > > Are you aware of this octave port? Is there any plan to incorporate > this effort? To what degree is it complete or usable? Or maybe > current fieldtrip code already runs (partially) on octave? > > 4. Distribution packaging can sometimes cause problems, because the > maintainer is not aware of some peculiarities. Do you have a test > suite that can be used to assess proper functioning of fieldtrip? > > I saw the tutorial and associated data that could serve as a test > suite, but some tutorial parts only mention compatibility with > versions of the past, and I wasn't able to locate the actual > tutorial > _code_ for download. > > I also saw http://fieldtrip.fcdonders.nl/development/infrastructure_for_testing > but it looks more like a plan for the future, correct? > > 5. I had to strip all 'external' software due to various > licensing/distribution problems. I wonder to what degree the > presence > of these pieces is critical for fieldtrip functionality -- beside > obvious lack of support for some file formats? > > Thanks in advance for your answers to this long list, > > Michael > > -- > GPG key: 4096R/7FFB9E9B Michael Hanke > http://mih.voxindeserto.de > _______________________________________________ > Fieldtrip mailing list > Fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From maya.zuckerman at gmail.com Mon Dec 6 15:19:25 2010 From: maya.zuckerman at gmail.com (Maya Zuckerman) Date: Mon, 6 Dec 2010 16:19:25 +0200 Subject: [FieldTrip] nonparametric statistics Message-ID: Hi, I was recently referred to your paper on the subject of nonparametric statistical testing in Journal of Neuroscience Methods (2007). I find the paper very interesting and it has contributed a lot to the statistical analyses I'm currently using. My experiment includes 3 conditions, of which I was a priori interested in two. Thus, I ran the analysis proposed by you for two of the conditions only that were of relevant theoretical interest, and found significant differences at a specific time window and cluster of electrodes. Now I'm interested in examining the third condition at this specific time and space frame. I was wondering if you could advise what would the appropriate statistical threshold/correction be, as I'm unsure after consulting several of my colleagues. Thanks, Maya Zuckerman -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.hanke at gmail.com Mon Dec 6 16:32:17 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Mon, 6 Dec 2010 10:32:17 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> References: <20101204132725.GA6337@meiner> <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> Message-ID: <20101206153217.GA31612@meiner> Hi Robert, thanks for your detailed explanations. Please see my in-line responses below: On Mon, Dec 06, 2010 at 03:13:11PM +0100, Robert Oostenveld wrote: > Regarding octave: It would of course be nice if it ran both on > octave and matlab. However, the active developers at the moment do > not have a need for octave as alternative for Matlab. At the donders > we have enough matlab licenses and I believe this applies to the > other developers as well. The consequence is that maintaining > compatibility with octave is not high on the priority list of any of > these developers. Octave compatibility has many advantages (not talking about abstract philosophical ones now). Let say I want to run a simulation that involves fieldtrip code on our cluster. I'd suddenly need 500! matlab licenses for me alone. Money is not a severe problem here, but I bet my institution would not appreciate having to double the number of licenses if everybody wants to do like me. Moreover, cloud-computing becomes really accessible these days. Few lines of code allow me to send jobs to e.g. Amazon's EC. However, not for Matlab-based computing... BUT: if fieldtrip works fine with octave you can quickly get an army of users that help with maintaining compatibility, just expose it to people. If there is code to perform an automatic functionality check it would facilitate things significantly. > The automatic testing remains a desireable feature, but currently we > lack manpower and expertise for properly implementing this. At NeuroDebian we are working with many neuroscience projects to implement test suites and cross-toolkit interoperability tests. We'd be happy to contribute. > Regarding openmeeg: where do you in general envision the "glue code" > between project A and project B to go? In this particular example, I > think that the openmeeg glue code should go into the fieldtrip > package. The reason for this is that it is maintained by the whole > fieldtrip developer team, and hosted on the fieldtrip svn. Part of > the glue is actually even in the fieldtrip/forward directory, so > taking away fieldtrip/external/openmeeg might make it more confusing > for users. Note that the openmeeg package in fieldtrip does > automatic checking of the required binaries and provides > instructions if the binaries are missing, so towards end-users it is > friendlier to rely on that checking mechanism. I feared that, and that is why I asked. I did not see that the externals are more than just externals. Ideally you could make a clear distinction between 3rd-party code and fieldtrip-specific glue. I agree that such code belongs to fieldtrip, but it should not be labeled 'external', because it is not really that. < snip reasoning about tested dependencies > > How do you envision that your debian packaging ensures correct > versions to be co-installed? This is a common problem that we have to deal with every day. The short answer is: Debian packaging allows me to specify arbitrarily detailed versioned dependencies. If fieldtrip of yesterday works with SPM2 older than 10 years OR SPM8 of the very last release, I can say that and the Debian package manager ensures that these dependencies become available on the system -- if not possible it would refuse to install fieldtrip. (softer dependencies are also possible, of course). The issue of "tested" dependencies is more tricky. Your approach (and the one of many others for that matter) is to "fork" 3rd-party code and include it into fieldtrip. However, this entitles you to be responsible for all bugs that affect the code that ships with fieldtrip. If some external doesn't see support from its original developers anymore (SPM2?) you even inherit all responsibility. But do you have enough manpower to support all that additional code. Typically projects simply assume that their forked dependencies work and do not monitor other people's bugs (also because having public bugtrackers isn't common in neuroscience -- fieldtrip being one of the noble exceptions!). However, we believe this trust only works because so few people use the code and so few bugs get reported -- the true health state of research software code is, sadly, much worse. We believe that the only way to ensure proper functioning is proper testing. This exposes bugs, makes people aware, attracts contributions, increases quality, make software more portable and eventually simply better. I could talk at length about the benefits of free-and-open-source-software development models, but I'll skip that. We have seen a number of serious bugs in core neuro-imaging libraries and applications in the past that affected research results, but only became apparent by built/run-time tests of Debian packages on hardware architectures that the original developers had no access to -- but nevertheless affected common platforms like amd64. That being said, I do not want to blame anyone for having manually tested and frozen dependencies to ensure proper functioning. This is often the only reasonable strategy that can be done with limited manpower. What I'm arguing for is simply to enable more people/machines to do testing and by that get access to "unlimited" manpower. Having your software in Debian causes even non-neuroscientist developers to check your code, run tests, send patches -- without you having to motivate/pay/ask them at all. > Of course if you consider every user to be super user on his own linux > box, that is not a problem. But in reality many researchers have > limited rights to the computers on which they are working. Recompiling > the mex files is of course always an option, but it would be > cumbersome to force this on the users. Debian packaging does not enforce compilation on users. Everything is performed automatically without any required interaction. If you do not have the permissions to install things on a system you cannot install packages. However, this issue is completely orthogonal to fieldtrip providing a build system to allow (not enforce) recompiling MEX files. > Why would you want to exclude the mex binaries from the > release version? The Debian policy mandates it. Every Debian source package must be compilable by anybody (given access to all build-dependencies). There is a trust path between Debian and its users that requires anybody to be able to verify what is shipped in Debian's binary package. Compiling EVERYTHING from source is the only way to ensure this. We don't even ship pre-generated PDF, but rebuild them to make sure we can fix typos in the manuals whenever we find them (over-simplified example ;-). > Then some general questions: which part of the FieldTrip audience do > you expect to benefit from the packaged version? Almost everybody -- especially those you do not use fieldtrip yet. Almost every single neuroscience software project that we packaged in the past 6 years has seen an enormous increase in its user base after it became available in the official Debian/ubuntu archives. > I presume that it would be limited to the linux users, with root > access to their own computers, and debian based releases. Somewhat, but root access is only necessary for installing the package, which is typically done by a sysadmin. The primary customer of a package is a user that is served with readily usable software -- not a hacker. Debian packaging also makes arbitrary software deployment very simple. It doesn't matter whether you deploy Matlab-code, C-code, Python scripts or data -- all is done with the same infrastructure and the same command. This kind of deployment system is used in some large research institutions to be able to handle complex systems with affordable administration. If you want to get some first-hand reports you could consider contacting some people listed in the 'research institutions' section of our testimonials page: http://neuro.debian.net/testimonials.html > Actually I would expect those people to benefit more from the > read-only SVN version of fieldtrip that we make available to all > users. Working with SVN should be simple for this particular sub-class > of fieldtrip users. And using svn allows the user to roll back to > older versions, and to make changes in his copy of the code without > those changes being overwritten with the next "svn update". Acknowledged. But as I said, Debian packaging is a global integration effort that abstracts development and deployment workflows beyond the level of a single project. What looks simple when working with fieldtrip alone, becomes tedious when working with fieldtrip, AFNI, FSL, SPM, openmeeg, ITK-SNAP, ANTS, ... http://neuro.debian.net/pkgs.html > If you want to discuss this in more detail, feel free to drop me an > email to schedule a phone or skype call. Probably that is more > efficient for both of us in getting things done. Replied in a private message with my contact details. Thanks again, Michael -- Michael Hanke http://mih.voxindeserto.de From holroydt at mail.nih.gov Mon Dec 6 17:16:09 2010 From: holroydt at mail.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Mon, 06 Dec 2010 11:16:09 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204161029.GA8032@meiner> References: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> <20101204161029.GA8032@meiner> Message-ID: <4CFD0C49.9060902@mail.nih.gov> I think Robert answered a lot; I didn't know it ran under Octave 3.2, the last I checked was 3.0. Anyway, it doesn't need anything from Kurage (kuh-rah-ge -- it's Japanese for Jellyfish). That stuff is really old anyway. Michael Hanke wrote: > On Sat, Dec 04, 2010 at 10:55:42AM -0500, Tom Holroyd wrote: >>> However, I now discovered that there is a "port" of fieldtrip to octave: >>> http://kurage.nimh.nih.gov/meglab/Meg/Software >> That isn't a port, just a few tools written long ago to make some things easier. > > Thanks for the clarification. Do you know who did that? Was it you? > Where can I find information on what things were made easier? > >> Fieldtrip has changed a great deal since then. Getting it to work correctly >> under Octave is something that needs to be done by the Fieldtrip developers. > > I agree. Does anyone have experience with or further information about the > current state of compatibility between fieldtrip and octave? > > Thanks in advance, > > Michael > -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow From e.maris at donders.ru.nl Mon Dec 6 17:56:16 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Mon, 6 Dec 2010 17:56:16 +0100 Subject: [FieldTrip] nonparametric statistics In-Reply-To: References: Message-ID: <005b01cb9566$82539670$86fac350$@maris@donders.ru.nl> Dear Maya, I was recently referred to your paper on the subject of nonparametric statistical testing in Journal of Neuroscience Methods (2007). I find the paper very interesting and it has contributed a lot to the statistical analyses I'm currently using. My experiment includes 3 conditions, of which I was a priori interested in two. Thus, I ran the analysis proposed by you for two of the conditions only that were of relevant theoretical interest, and found significant differences at a specific time window and cluster of electrodes. Now I'm interested in examining the third condition at this specific time and space frame. I was wondering if you could advise what would the appropriate statistical threshold/correction be, as I'm unsure after consulting several of my colleagues. I see the following options: 1. Compare the third condition with each of the other two conditions and do Bonferroni-correction to account for the fact that you perform three tests. 2. Compare all three conditions with a cluster-based permutation test using an F-statistic statfun (depsamplesF for a within-UO design and indepsamplesF for a between-UO design). The power of this test will be somewhat lower than the power of the cluster-based permutation test using the t-statistic that you have already performed. Examining the difference between the third condition and the first two at the data-selected time and space frame does not in general control the false alarm rate (because the selection of the time and space frame is based on the data). Best, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Dec 9 11:34:16 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 9 Dec 2010 11:34:16 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101206153217.GA31612@meiner> References: <20101204132725.GA6337@meiner> <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> <20101206153217.GA31612@meiner> Message-ID: <5DE0077D-9A10-4EB5-91F5-860560D1B0E0@donders.ru.nl> Hi Michael Thanks for your detailled response. I don't think that we have big differences in how we would like to see things develop, only in how we are personally and with our respective teams able to further that development. Working together and combining our complementary expertise is certainly a good move. Let's continue this specific collaboration discussion off-line. Regarding octave: that is certainly something that I see the value in. But the practical situation at our Donders Centre where ~150 people work is that we have ~100 MATLAB floating network licenses, and a 50 node linux cluster. That number of licenses is enough to give people a comfortable number of data analysis sessions on their desktop workstations and on the linux cluster. We don't have the scientific manpower nor comuting hardware to keep many more than these 100 MATLAB sessions busy at any given point in time. The MATLAB maintenance contract (which entitles us to MATLAB updates) costs us ~6000 euro/ year. This includes a small increase in the number of licenses every year. This 6000 euros is peanuts compared to the scanner and personel costs, and compares more to the amount of money we spend on our coffee machine (yes, we do have a nice machine!). So from a scientific budget point of view I currently cannot warrant investing effort from people of _our_ centre (i.e. salary costs) into the octave compatibility. But the prospect of outsourcing part of the computations to large clusters, grids or the cloud is of course interesting. For that reason I also started a distributed computing sub-project to fieldtrip (see http://fieldtrip.fcdonders.nl/development/peer) and in that project the licenses do become more of an issue. If I were able to get an "army of octave users" (as you write) to help me out with improving the compatibility of the code, I certainly would welcome that and would be willing to coordinate those efforts. If there are people on this mailing list interested in this, please do contact me! Also people that are willing to contribute to improving the testing infrastructure are very welcome. best regards, Robert On 6 Dec 2010, at 16:32, Michael Hanke wrote: > Hi Robert, > > thanks for your detailed explanations. Please see my in-line responses > below: > > On Mon, Dec 06, 2010 at 03:13:11PM +0100, Robert Oostenveld wrote: >> Regarding octave: It would of course be nice if it ran both on >> octave and matlab. However, the active developers at the moment do >> not have a need for octave as alternative for Matlab. At the donders >> we have enough matlab licenses and I believe this applies to the >> other developers as well. The consequence is that maintaining >> compatibility with octave is not high on the priority list of any of >> these developers. > > Octave compatibility has many advantages (not talking about abstract > philosophical ones now). Let say I want to run a simulation that > involves fieldtrip code on our cluster. I'd suddenly need 500! matlab > licenses for me alone. Money is not a severe problem here, but I bet > my > institution would not appreciate having to double the number of > licenses > if everybody wants to do like me. Moreover, cloud-computing becomes > really accessible these days. Few lines of code allow me to send > jobs to > e.g. Amazon's EC. However, not for Matlab-based computing... > > BUT: if fieldtrip works fine with octave you can quickly get an army > of > users that help with maintaining compatibility, just expose it to > people. If there is code to perform an automatic functionality check > it > would facilitate things significantly. > >> The automatic testing remains a desireable feature, but currently we >> lack manpower and expertise for properly implementing this. > > At NeuroDebian we are working with many neuroscience projects to > implement test suites and cross-toolkit interoperability tests. We'd > be > happy to contribute. > >> Regarding openmeeg: where do you in general envision the "glue code" >> between project A and project B to go? In this particular example, I >> think that the openmeeg glue code should go into the fieldtrip >> package. The reason for this is that it is maintained by the whole >> fieldtrip developer team, and hosted on the fieldtrip svn. Part of >> the glue is actually even in the fieldtrip/forward directory, so >> taking away fieldtrip/external/openmeeg might make it more confusing >> for users. Note that the openmeeg package in fieldtrip does >> automatic checking of the required binaries and provides >> instructions if the binaries are missing, so towards end-users it is >> friendlier to rely on that checking mechanism. > > I feared that, and that is why I asked. I did not see that the > externals > are more than just externals. Ideally you could make a clear > distinction > between 3rd-party code and fieldtrip-specific glue. I agree that such > code belongs to fieldtrip, but it should not be labeled 'external', > because > it is not really that. > > < snip reasoning about tested dependencies > >> How do you envision that your debian packaging ensures correct >> versions to be co-installed? > > This is a common problem that we have to deal with every day. The > short > answer is: Debian packaging allows me to specify arbitrarily detailed > versioned dependencies. If fieldtrip of yesterday works with SPM2 > older > than 10 years OR SPM8 of the very last release, I can say that and the > Debian package manager ensures that these dependencies become > available > on the system -- if not possible it would refuse to install fieldtrip. > (softer dependencies are also possible, of course). > > The issue of "tested" dependencies is more tricky. Your approach (and > the one of many others for that matter) is to "fork" 3rd-party code > and > include it into fieldtrip. However, this entitles you to be > responsible > for all bugs that affect the code that ships with fieldtrip. If some > external doesn't see support from its original developers anymore > (SPM2?) you even inherit all responsibility. But do you have enough > manpower to support all that additional code. Typically projects > simply > assume that their forked dependencies work and do not monitor other > people's bugs (also because having public bugtrackers isn't common in > neuroscience -- fieldtrip being one of the noble exceptions!). > However, > we believe this trust only works because so few people use the code > and > so few bugs get reported -- the true health state of research software > code is, sadly, much worse. > > We believe that the only way to ensure proper functioning is proper > testing. This exposes bugs, makes people aware, attracts > contributions, > increases quality, make software more portable and eventually simply > better. I could talk at length about the benefits of > free-and-open-source-software development models, but I'll skip that. > We have seen a number of serious bugs in core neuro-imaging > libraries and > applications in the past that affected research results, but only > became > apparent by built/run-time tests of Debian packages on hardware > architectures that the original developers had no access to -- but > nevertheless affected common platforms like amd64. > > That being said, I do not want to blame anyone for having manually > tested and frozen dependencies to ensure proper functioning. This is > often the only reasonable strategy that can be done with limited > manpower. What I'm arguing for is simply to enable more people/ > machines > to do testing and by that get access to "unlimited" manpower. Having > your software in Debian causes even non-neuroscientist developers to > check your code, run tests, send patches -- without you having to > motivate/pay/ask them at all. > >> Of course if you consider every user to be super user on his own >> linux >> box, that is not a problem. But in reality many researchers have >> limited rights to the computers on which they are working. >> Recompiling >> the mex files is of course always an option, but it would be >> cumbersome to force this on the users. > > Debian packaging does not enforce compilation on users. Everything is > performed automatically without any required interaction. If you do > not > have the permissions to install things on a system you cannot install > packages. However, this issue is completely orthogonal to fieldtrip > providing a build system to allow (not enforce) recompiling MEX files. > >> Why would you want to exclude the mex binaries from the >> release version? > > The Debian policy mandates it. Every Debian source package must be > compilable by anybody (given access to all build-dependencies). > There is > a trust path between Debian and its users that requires anybody to be > able to verify what is shipped in Debian's binary package. Compiling > EVERYTHING from source is the only way to ensure this. We don't even > ship pre-generated PDF, but rebuild them to make sure we can fix typos > in the manuals whenever we find them (over-simplified example ;-). > >> Then some general questions: which part of the FieldTrip audience do >> you expect to benefit from the packaged version? > > Almost everybody -- especially those you do not use fieldtrip yet. > Almost every single neuroscience software project that we packaged in > the past 6 years has seen an enormous increase in its user base > after it > became available in the official Debian/ubuntu archives. > >> I presume that it would be limited to the linux users, with root >> access to their own computers, and debian based releases. > > Somewhat, but root access is only necessary for installing the > package, > which is typically done by a sysadmin. The primary customer of a > package > is a user that is served with readily usable software -- not a hacker. > Debian packaging also makes arbitrary software deployment very simple. > It doesn't matter whether you deploy Matlab-code, C-code, Python > scripts > or data -- all is done with the same infrastructure and the same > command. This kind of deployment system is used in some large research > institutions to be able to handle complex systems with affordable > administration. If you want to get some first-hand reports you could > consider contacting some people listed in the 'research institutions' > section of our testimonials page: > > http://neuro.debian.net/testimonials.html > >> Actually I would expect those people to benefit more from the >> read-only SVN version of fieldtrip that we make available to all >> users. Working with SVN should be simple for this particular sub- >> class >> of fieldtrip users. And using svn allows the user to roll back to >> older versions, and to make changes in his copy of the code without >> those changes being overwritten with the next "svn update". > > Acknowledged. But as I said, Debian packaging is a global integration > effort that abstracts development and deployment workflows beyond the > level of a single project. What looks simple when working with > fieldtrip > alone, becomes tedious when working with fieldtrip, AFNI, FSL, SPM, > openmeeg, ITK-SNAP, ANTS, ... > > http://neuro.debian.net/pkgs.html > >> If you want to discuss this in more detail, feel free to drop me an >> email to schedule a phone or skype call. Probably that is more >> efficient for both of us in getting things done. > > Replied in a private message with my contact details. > > > Thanks again, > > Michael > > -- > Michael Hanke > http://mih.voxindeserto.de > _______________________________________________ > Fieldtrip mailing list > Fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sid.kouider at gmail.com Fri Dec 10 18:40:34 2010 From: sid.kouider at gmail.com (Sid Kouider) Date: Fri, 10 Dec 2010 18:40:34 +0100 Subject: [FieldTrip] research engineer position in neuroimaging - Paris, France Message-ID: <4d026613.82eed80a.6564.ffff9589@mx.google.com> The Department of Cognitive Science at the Ecole Normale Supérieure (Paris) invites applications for a research engineer position to work on Neuroimaging data in the framework of the DynaMind ERC project held by Dr Sid Kouider. The successful applicant will mainly be in charge of managing and analyzing data obtained on human subjects with fMRI in adults and high-density EEG in infants. The successful applicant will also be involved in the design and elaboration of research protocols. Candidates should have at least a master degree in a relevant domain and a solid training in neuroimaging data analysis, with robust experience in signal processing and programming. Experience with Matlab and the SPM toolbox is desirable but not a prerequisite. The successful applicant will be affiliated to the Perception, Attention and Consciousness team of Dr Sid Kouider. The Department of Cognitive Science offers a rich research environment composed of a multidisciplinary set of research units on philosophy, cognitive psychology, cognitive neurosciences and computational neurosciences. Our research team, at the interface of these disciplines, is working on the cognitive and neural determinants of consciousness, with an emphasis on the distinction between unconscious perception and perceptual awareness. Our lab is located in central Paris, within the historical Quartier Latin. Consideration of applicants will commence December 15th, 2010 and will continue until the position is filled. The net salary will range between 2 100 to 2 800 Euros per month depending on qualifications. The appointment is for two years initially but can be extended later on. Please send a CV (including the names and contact information of two references) to sid.kouider at ens.fr Do not hesitate to contact us for further questions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr Sid Kouider, CNRS research scientist Ecole Normale Supérieure LSCP, Pavillon Jardin, 29 rue d'Ulm, 75005 Paris, France www.lscp.net/persons/sidk/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From TAVABIK at email.chop.edu Mon Dec 13 17:33:50 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 11:33:50 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting Message-ID: Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. ExpHi = freq: [1x158 double] time: [1x2880 double] powspctrm: [4-D double] dimord: 'subj_chan_freq_time' lable: {2x1 cell} (ie., {['MLT']; ['MRT']} size(ExpHi.powspctrm) = 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) Currently I am recieving the following errors ??? Reference to non-existent field 'label'. Error in ==> prepare_timefreq_data>forcedimord at 509 output.label = input.label; Error in ==> prepare_timefreq_data at 87 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); -K. ------------------------------------------------------------ Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_freqstats_script.m Type: text/x-objcsrc Size: 697 bytes Desc: ft_freqstats_script.m URL: From nathanweisz at mac.com Mon Dec 13 20:12:54 2010 From: nathanweisz at mac.com (Nathan Weisz) Date: Mon, 13 Dec 2010 20:12:54 +0100 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: Message-ID: <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From TAVABIK at email.chop.edu Mon Dec 13 20:42:00 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 14:42:00 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 e.maris at donders.ru.nl Mon Dec 13 21:21:39 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Mon, 13 Dec 2010 21:21:39 +0100 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: <035b01cb9b03$59a5b3f0$0cf11bd0$@maris@donders.ru.nl> Dear Kambiz, Type "help ft_neighbourselection" on the Matlab command line. This will provide you with some information. Most likely you will decide not to cluster in space (but only in time and frequency). I this case, the neighbourhood structure of both channels has to be empty. Good luck, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip- > bounces at donders.ru.nl] On Behalf Of Tavabi, Kambiz > Sent: maandag 13 december 2010 20:42 > To: nathanweisz at me.com > Cc: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Cluster Permutation Data Formatting > > Embarassing, off course I do! I apologize about that. However I am > still having other downstream errors due to some of the definitions. > FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script > resulted in > > ??? Undefined function or variable "sens". > Error in ==> ft_neighbourselection at 95 > if ~isstruct(sens) > Error in ==> neighbourselection at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > Error in ==> statistics_wrapper at 241 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> ft_freqstatistics at 125 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > I maybe misunderstanding what is clustered. Is it sensors or adjacent > time-frequency bins? Because I only have two channels clustering > adjacent sensors will fail. Perhaps you could advise on whether > cfg.correctm ='cluster'; is the right choice. Should I consider another > option? and if so what happens to: > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.clustertail = 0; > > Is there another tutorial which discusses other routines for the > various multiple comparison correction routines? > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Nathan Weisz [nathanweisz at mac.com] > Sent: Monday, December 13, 2010 2:12 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Cluster Permutation Data Formatting > > hi, > > looks like you have a typo in your data structure (lable instead of > label). > > good luck, > n > > On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > > > Greetings, I am using the recommendations on > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#wit > hin-subjects_experiments to carry out within-subjects permutation tests > on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject > I have the conditional source-space (2 virtual electrodes) time- > frequency representations computed between 1.5-80Hz (0.5 freq step) > using Morlet wavelets throughout the stimulus duration (i.e., trial > epochs from -0.8 - 1.6 sec). As per tutorial I have created data > structures, which to the best of my knowledge are suitable for use with > ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified > the routine in the tutorial to create the cfg structure. As the final > state of the dataset was not arrived at using the FT pipeline I am > afraid there might be input structure field(s) I may have not defined, > or defined incorrectly (e.g. channel labling and layout). Essentially I > simply wish to run the tests and view res > ults on two time-frequency representation plots (eg., imagesc)! I > would very much appreciate if someone with more experience in these > routines would take a look at my script (see attachment) and e.g. data > structure and let me know what is missing and/or wrong with them. > > > > ExpHi = > > freq: [1x158 double] > > time: [1x2880 double] > > powspctrm: [4-D double] > > dimord: 'subj_chan_freq_time' > > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > > > size(ExpHi.powspctrm) = > > 10 2 158 2880 (i.e., Subjects x > channes x freqs x timepoints) > > > > Currently I am recieving the following errors > > > > ??? Reference to non-existent field 'label'. > > Error in ==> prepare_timefreq_data>forcedimord at 509 > > output.label = input.label; > > Error in ==> prepare_timefreq_data at 87 > > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> > statistics_wrapper at 217 > > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> > ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, > varargin{:}); > > > > > > -K. > > ------------------------------------------------------------ > > Kambiz Tavabi PhD > > Biomedical Imaging Laboratory > > The Children's Hospital of Philadelphia > > 34th Street and Civic Center Boulevard > > Philadelphia, Pa. 19104 > > Tel: 267.426.0302 > > email: tavabik at email.chop.edu > > ------------------------------------------------------------ > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > 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 Douglas.Rose at cchmc.org Mon Dec 13 21:29:53 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Mon, 13 Dec 2010 15:29:53 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: <4D063BF3.0668.003A.1@cchmc.org> Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 TAVABIK at email.chop.edu Mon Dec 13 21:42:49 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 15:42:49 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: <4D063BF3.0668.003A.1@cchmc.org> References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> <4D063BF3.0668.003A.1@cchmc.org> Message-ID: I am sorry but I don't understand this response from Doug. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Douglas Rose Sent: Monday, December 13, 2010 3:30 PM To: nathanweisz at me.com Cc: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Cluster Permutation Data Formatting Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 TAVABIK at email.chop.edu Mon Dec 13 23:02:30 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 17:02:30 -0500 Subject: [FieldTrip] Plotting cluster permutation results Message-ID: Greetings, Based on FT tutorials and user advice I have managed to create a stat structure using ft_freqstatistics. stat = prob [2x158x1800 double] posclusters: [1x43 struct] posclusterslabelmat: [2x158x1800 double] posdistribution: [1x500 double] negclusters: [1x63 struct] negclusterslabelmat: [2x158x1800 double] negdistribution: [1x500 double] mask: [2x158x1800 logical] stat: [2x158x1800 double] ref: [2x158x1800 double] dimord: 'chan_freq_time' label: {2x1 cell} (i.e., {['MLT'];['MRT']} freq: [1x158 double] time: [1x1800 double] cfg: [1x1 struct] Please note that the cluster permuation tests were performed on source space time-frequency representations, thus data is only available for two channels. As such the statistics was done without cfg.minnbchan and cfg.neighbours=[ ]. and clustering was done on the time-frequency bins throuought the entire epoch for wide-band data (i.e., no averaging over frequencies). The initial conditional power spectra used in the statistics were 10 x 2 x 158 x 2880 (subjects x channels x frequencies x time). I did manage to use ft_singleplotTFR(cfg, stat) to plot the results for single channel -after masking time-frequency points by clusterlabels information belonging to a specific cluster (see attached). But I cannot really make much sense out of the results. Am I doing something wrong here? When I use cfg = []; cfg.alpha = 0.025; cfg.zparam = 'stat'; cfg.zlim = [-4 4]; ft_clusterplot(cfg, stat); I get the following: ??? Error using ==> ft_clusterplot at 75 stat contains multiple frequencies which is not allowed because it should be averaged over frequencies Technically I don't have any apriori frequency band(s) of interest, thus I used the wide-band data. How does ft_clusterplot accept frequency averaging? And is it possible to work around this criterion? Is it possible to customize cfg.layout? Thanks in advance -Kambiz -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_singleplotTFR.jpg Type: image/jpeg Size: 12468 bytes Desc: ft_singleplotTFR.jpg URL: From Douglas.Rose at cchmc.org Tue Dec 14 20:18:56 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Tue, 14 Dec 2010 14:18:56 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> <4D063BF3.0668.003A.1@cchmc.org> Message-ID: <4D077CD0.0668.003A.1@cchmc.org> Ooops. My apologies. Clicked on the wrong email to answer. So sorry. Not related at all to your thread. Doug >>> "Tavabi, Kambiz" 12/13/2010 3:42 PM >>> I am sorry but I don't understand this response from Doug. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Douglas Rose Sent: Monday, December 13, 2010 3:30 PM To: nathanweisz at me.com Cc: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Cluster Permutation Data Formatting Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From TAVABIK at email.chop.edu Wed Dec 15 16:52:44 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Wed, 15 Dec 2010 10:52:44 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) Message-ID: Greetings Fieldstrippers - Would someone savvy in cluster permutation testing kindly take a look at the attached plots. Briefly, Top left upper & lower panels are conditional grand averaged (n=10), time-frequency representation (TFR) of single virtual electrode. The TFR shows %change in power relative to baseline (i.e., baseline corrected power spectrum). The top right panel is the p-value map of sample-wise paired t-testing (two-tailed) of the data. To deal with the multiple comparison problem, I used ft_freqstatistics to carryout out permuation tests on the source space time-frequency representations from my virtual sensors (2), as such the statistics were done without cfg.minnbchan and cfg.neighbours=[ ]. Testing was done on the time-frequency bins throughout the epochs of wide band data (i.e., no averaging over frequencies). In the attached file the bottom panel is the plot of the permutation result for the same data and channel in the grand averages. As per advice from other fieldtrip users I created the plot by: stat.stat2=stat.stat.*(stat.posclusterlabelmat == 1); cfg.zparam='stat2'; ft_singleplotTFR(cfg, stat); When I use ft_clusterplot(cfg, stat); for obvious reasons I get the following error. As I have no apriori freqs interval of interest I am not sure how to get around this.: ??? Error using ==> ft_clusterplot at 75 stat contains multiple frequencies which is not allowed because it should be averaged over frequencies My problem with the results in the attachment is that in the grand averages there is an obvious event related desynchrony (cold colors, negative values) difference between 0.4-0.8sec; 10-40hz which somehow doesn't get picked up, but the small blip of noise/event-related synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed as different between conditions by the permutations! To carry out the permutations I used cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.neighbours = [ ]; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 500; So I presume that the result is not due to a signs (pos/neg values) issue, if I am using a two-tailed test. Changing cfg.tail & cfg.clustertail to 1 makes little to no difference, and a value of -1 results in errors. Basically, I'd appreciate if someone, based on what is observable in the grand averages, could confirm that the permutation result makes sense? And if not then some advice on what I am doing wrong. Thank you. -Kambiz -K. ------------------------------------------------------------ Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: TFR_testing.pdf Type: application/pdf Size: 103055 bytes Desc: TFR_testing.pdf URL: From smoratti at psi.ucm.es Wed Dec 15 21:52:22 2010 From: smoratti at psi.ucm.es (Stephan Moratti) Date: Wed, 15 Dec 2010 21:52:22 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: Message-ID: <7A31E3CD-4B93-4759-8D76-5ACE5D7D395C@psi.ucm.es> Hi Kambiz, Probably you should consider to use cfg.alpha and cfg.clusteralpha = 0.025 if you test two sided (cfg.tail and cfg.clustertail=0). Doing so, will give you a the p values of 0.05 alltogether. Best, Stephan El 15/12/2010, a las 16:52, Tavabi, Kambiz escribió: > Greetings Fieldstrippers - Would someone savvy in cluster > permutation testing kindly take a look at the attached plots. > Briefly, Top left upper & lower panels are conditional grand > averaged (n=10), time-frequency representation (TFR) of single > virtual electrode. The TFR shows %change in power relative to > baseline (i.e., baseline corrected power spectrum). The top right > panel is the p-value map of sample-wise paired t-testing (two- > tailed) of the data. > > To deal with the multiple comparison problem, I used > ft_freqstatistics to carryout out permuation tests on the source > space time-frequency representations from my virtual sensors (2), as > such the statistics were done without cfg.minnbchan and > cfg.neighbours=[ ]. Testing was done on the time-frequency bins > throughout the epochs of wide band data (i.e., no averaging over > frequencies). > > In the attached file the bottom panel is the plot of the permutation > result for the same data and channel in the grand averages. As per > advice from other fieldtrip users I created the plot by: > stat.stat2=stat.stat.*(stat.posclusterlabelmat == 1); > cfg.zparam='stat2'; > ft_singleplotTFR(cfg, stat); > > When I use ft_clusterplot(cfg, stat); for obvious reasons I get the > following error. As I have no apriori freqs interval of interest I > am not sure how to get around this.: > ??? Error using ==> ft_clusterplot at 75 > stat contains multiple frequencies which is not allowed because it > should be > averaged over frequencies > > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which > somehow doesn't get picked up, but the small blip of noise/event- > related synchrony (hot colors, positive values) c. 0.5sec at 50Hz is > revealed as different between conditions by the permutations! To > carry out the permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of > -1 results in errors. Basically, I'd appreciate if someone, based on > what is observable in the grand averages, could confirm that the > permutation result makes sense? And if not then some advice on what > I am doing wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Dec 15 23:36:17 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Wed, 15 Dec 2010 23:36:17 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: Message-ID: <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Dear Kambiz, > Greetings Fieldstrippers "Fieldtrippers" may have connotations that a scientist does not always appreciate, but what to think of "Fieldstrippers"? > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > doesn't get picked up, but the small blip of noise/event-related > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > as different between conditions by the permutations! Have a look at the (channel,frequency)-specific paired t-tests. Do these detect the big cold blob? If not, the variance across subjects is probably large. Best, Eric Maris To carry out the > permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of -1 > results in errors. Basically, I'd appreciate if someone, based on what > is observable in the grand averages, could confirm that the permutation > result makes sense? And if not then some advice on what I am doing > wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ From TAVABIK at email.chop.edu Thu Dec 16 05:29:10 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Wed, 15 Dec 2010 23:29:10 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> References: , <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Message-ID: Eric, >"Fieldtrippers" may have connotations that a scientist does not always >appreciate, but what to think of "Fieldstrippers"? Touche. >Have a look at the (channel,frequency)-specific paired t-tests. I am not sure exactly what you mean. By 'specific' do you mean sample wise testing in a narrow frequency range? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Eric Maris [e.maris at donders.ru.nl] Sent: Wednesday, December 15, 2010 5:36 PM To: 'Email discussion list for the FieldTrip project' Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) Dear Kambiz, > Greetings Fieldstrippers "Fieldtrippers" may have connotations that a scientist does not always appreciate, but what to think of "Fieldstrippers"? > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > doesn't get picked up, but the small blip of noise/event-related > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > as different between conditions by the permutations! Have a look at the (channel,frequency)-specific paired t-tests. Do these detect the big cold blob? If not, the variance across subjects is probably large. Best, Eric Maris To carry out the > permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of -1 > results in errors. Basically, I'd appreciate if someone, based on what > is observable in the grand averages, could confirm that the permutation > result makes sense? And if not then some advice on what I am doing > wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at donders.ru.nl Thu Dec 16 09:21:48 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 16 Dec 2010 09:21:48 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: , <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Message-ID: <001c01cb9cfa$4901e890$db05b9b0$@maris@donders.ru.nl> Kambiz, > >Have a look at the (channel,frequency)-specific paired t-tests. > I am not sure exactly what you mean. By 'specific' do you mean sample > wise testing in a narrow frequency range? Sorry, I forgot that you have time resolution. I mean the (channel,time,frequency)-specific paired t-tests, which are in the output of freqstatistics. Best, Eric > > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Eric Maris [e.maris at donders.ru.nl] > Sent: Wednesday, December 15, 2010 5:36 PM > To: 'Email discussion list for the FieldTrip project' > Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) > > Dear Kambiz, > > > > Greetings Fieldstrippers > > "Fieldtrippers" may have connotations that a scientist does not always > appreciate, but what to think of "Fieldstrippers"? > > > My problem with the results in the attachment is that in the grand > > averages there is an obvious event related desynchrony (cold colors, > > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > > doesn't get picked up, but the small blip of noise/event-related > > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > > as different between conditions by the permutations! > > Have a look at the (channel,frequency)-specific paired t-tests. Do > these > detect the big cold blob? If not, the variance across subjects is > probably > large. > > > Best, > > Eric Maris > > > > > > > To carry out the > > permutations I used > > cfg.method = 'montecarlo'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > cfg.clusterstatistic = 'maxsum'; > > cfg.neighbours = [ ]; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.alpha = 0.05; > > cfg.numrandomization = 500; > > So I presume that the result is not due to a signs (pos/neg values) > > issue, if I am using a two-tailed test. Changing cfg.tail & > > cfg.clustertail to 1 makes little to no difference, and a value of -1 > > results in errors. Basically, I'd appreciate if someone, based on > what > > is observable in the grand averages, could confirm that the > permutation > > result makes sense? And if not then some advice on what I am doing > > wrong. Thank you. -Kambiz > > > > -K. > > ------------------------------------------------------------ > > Kambiz Tavabi PhD > > Biomedical Imaging Laboratory > > The Children's Hospital of Philadelphia > > 34th Street and Civic Center Boulevard > > Philadelphia, Pa. 19104 > > Tel: 267.426.0302 > > email: tavabik at email.chop.edu > > ------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 nathanweisz at mac.com Thu Dec 16 10:48:09 2010 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 16 Dec 2010 10:48:09 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl> References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl> Message-ID: <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> hi kambiz, did you look at the actual p-values of you clusters? the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. good luck, n On 16.12.2010, at 09:21, Eric Maris wrote: > Kambiz, > >>> Have a look at the (channel,frequency)-specific paired t-tests. >> I am not sure exactly what you mean. By 'specific' do you mean sample >> wise testing in a narrow frequency range? > > Sorry, I forgot that you have time resolution. I mean the > (channel,time,frequency)-specific paired t-tests, which are in the output of > freqstatistics. > > > Best, > > Eric > > >> >> -K. >> ------------------------------------------------------------- >> Kambiz Tavabi PhD >> Biomedical Imaging Laboratory >> The Children's Hospital of Philadelphia >> 34th Street and Civic Center Boulevard >> Philadelphia, Pa. 19104 >> Tel: 267.426.0302 >> email: tavabik at email.chop.edu >> ------------------------------------------------------------- >> ________________________________________ >> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >> Sent: Wednesday, December 15, 2010 5:36 PM >> To: 'Email discussion list for the FieldTrip project' >> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >> >> Dear Kambiz, >> >> >>> Greetings Fieldstrippers >> >> "Fieldtrippers" may have connotations that a scientist does not always >> appreciate, but what to think of "Fieldstrippers"? >> >>> My problem with the results in the attachment is that in the grand >>> averages there is an obvious event related desynchrony (cold colors, >>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>> doesn't get picked up, but the small blip of noise/event-related >>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>> as different between conditions by the permutations! >> >> Have a look at the (channel,frequency)-specific paired t-tests. Do >> these >> detect the big cold blob? If not, the variance across subjects is >> probably >> large. >> >> >> Best, >> >> Eric Maris >> >> >> >> >> >> >> To carry out the >>> permutations I used >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistic = 'maxsum'; >>> cfg.neighbours = [ ]; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.05; >>> cfg.numrandomization = 500; >>> So I presume that the result is not due to a signs (pos/neg values) >>> issue, if I am using a two-tailed test. Changing cfg.tail & >>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>> results in errors. Basically, I'd appreciate if someone, based on >> what >>> is observable in the grand averages, could confirm that the >> permutation >>> result makes sense? And if not then some advice on what I am doing >>> wrong. Thank you. -Kambiz >>> >>> -K. >>> ------------------------------------------------------------ >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> 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 dgroppe at cogsci.ucsd.edu Thu Dec 16 15:01:52 2010 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Thu, 16 Dec 2010 09:01:52 -0500 Subject: [FieldTrip] Hann taper vs. single Slepian taper Message-ID: Hi Fieldtripians, Could anyone explain to me when, if ever, it would be better to perform a DFT with a Hann taper vs. a single Slepian taper? It was my understanding that Slepian tapers in general optimally maximized frequency resolution while minimizing leakage from distant frequencies. However, a colleague of mine says he was told at a workshop at the Donders Institute that a Hann taper was better than a single Slepian taper (if you are only going to use one taper). thanks for your help, -David -- David Groppe, Ph.D. dgroppe at cogsci.ucsd.edu http://www.cogsci.ucsd.edu/~dgroppe/ From inieuwenhuis at berkeley.edu Sat Dec 18 01:13:12 2010 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Fri, 17 Dec 2010 16:13:12 -0800 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: References: Message-ID: <4D0BFC98.3080000@berkeley.edu> Dear David, The Slepian tapers are sets of multiple (orthogonal) tapers, that only combined accomplish this "optimally maximized frequency resolution while minimizing leakage from distant frequencies". If you use only a single taper, the Slepian taper is suboptimal compared to the Hanning taper. I've attached some teaching slides I have with some background on multitapers. Hope this helps, Cheers, Ingrid On 12/16/2010 6:01 AM, David Groppe wrote: > Hi Fieldtripians, > Could anyone explain to me when, if ever, it would be better to > perform a DFT with a Hann taper vs. a single Slepian taper? It was my > understanding that Slepian tapers in general optimally maximized > frequency resolution while minimizing leakage from distant > frequencies. However, a colleague of mine says he was told at a > workshop at the Donders Institute that a Hann taper was better than a > single Slepian taper (if you are only going to use one taper). > thanks for your help, > -David > -- Ingrid Nieuwenhuis PhD Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 -------------- next part -------------- A non-text attachment was scrubbed... Name: multitapers.pdf Type: application/pdf Size: 150879 bytes Desc: not available URL: From r.oostenveld at donders.ru.nl Mon Dec 20 09:59:05 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 20 Dec 2010 09:59:05 +0100 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: <4D0BFC98.3080000@berkeley.edu> References: <4D0BFC98.3080000@berkeley.edu> Message-ID: To complement Ingrids good explanation: the shape of the Slepian tapers depend on how many you compute, i.e. if you compute one it will have a (slightly) different shape that the first one if you compute four. The first Slepian taper never goes exactly to zero at the edges, whereas the Hanning (or Hann, as it is also called) does. The consequence is that a single Slepian leaks more than a Hanning. The reason for using a Hanning taper is typically that you don't want to spectrally smooth (usually because the time window is already on the short side), so the leakage of a single Slepian is in that case not desired. Robert On 18 Dec 2010, at 1:13, Ingrid Nieuwenhuis wrote: > Dear David, > > The Slepian tapers are sets of multiple (orthogonal) tapers, that > only combined accomplish this "optimally maximized frequency > resolution while minimizing leakage from distant frequencies". If > you use only a single taper, the Slepian taper is suboptimal > compared to the Hanning taper. I've attached some teaching slides I > have with some background on multitapers. > > Hope this helps, > Cheers, > Ingrid > > > On 12/16/2010 6:01 AM, David Groppe wrote: >> Hi Fieldtripians, >> Could anyone explain to me when, if ever, it would be better to >> perform a DFT with a Hann taper vs. a single Slepian taper? It was >> my >> understanding that Slepian tapers in general optimally maximized >> frequency resolution while minimizing leakage from distant >> frequencies. However, a colleague of mine says he was told at a >> workshop at the Donders Institute that a Hann taper was better than a >> single Slepian taper (if you are only going to use one taper). >> thanks for your help, >> -David >> > > -- > Ingrid Nieuwenhuis PhD > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From dgroppe at cogsci.ucsd.edu Mon Dec 20 14:21:42 2010 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Mon, 20 Dec 2010 08:21:42 -0500 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: References: <4D0BFC98.3080000@berkeley.edu> Message-ID: Thanks very much for the helpful emails Ingrid & Robert. -David On Mon, Dec 20, 2010 at 3:59 AM, Robert Oostenveld wrote: > To complement Ingrids good explanation: the shape of the Slepian tapers > depend on how many you compute, i.e. if you compute one it will have a > (slightly) different shape that the first one if you compute four. The first > Slepian taper never goes exactly to zero at the edges, whereas the Hanning > (or Hann, as it is also called) does. The consequence is that a single > Slepian leaks more than a Hanning. The reason for using a Hanning taper is > typically that you don't want to spectrally smooth (usually because the time > window is already on the short side), so the leakage of a single Slepian is > in that case not desired. > > Robert > > > > > On 18 Dec 2010, at 1:13, Ingrid Nieuwenhuis wrote: > >> Dear David, >> >> The Slepian tapers are sets of multiple (orthogonal) tapers, that only >> combined accomplish this "optimally maximized frequency resolution while >> minimizing leakage from distant frequencies". If you use only a single >> taper, the Slepian taper is suboptimal compared to the Hanning taper. I've >> attached some teaching slides I have with some background on multitapers. >> >> Hope this helps, >> Cheers, >> Ingrid >> >> >> On 12/16/2010 6:01 AM, David Groppe wrote: >>> >>> Hi Fieldtripians, >>>   Could anyone explain to me when, if ever, it would be better to >>> perform a DFT with a Hann taper vs. a single Slepian taper?  It was my >>> understanding that Slepian tapers in general optimally maximized >>> frequency resolution while minimizing leakage from distant >>> frequencies.  However, a colleague of mine says he was told at a >>> workshop at the Donders Institute that a Hann taper was better than a >>> single Slepian taper (if you are only going to use one taper). >>>       thanks for your help, >>>            -David >>> >> >> -- >> Ingrid Nieuwenhuis PhD >> Sleep and Neuroimaging Laboratory >> Department of Psychology >> University of California, Berkeley >> California 94720-1650 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- David Groppe, Ph.D. dgroppe at cogsci.ucsd.edu http://www.cogsci.ucsd.edu/~dgroppe/ From TAVABIK at email.chop.edu Mon Dec 20 22:46:48 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 20 Dec 2010 16:46:48 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl>, <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> Message-ID: Greetings - where can I find a description of the output items for ft_freqstatistics? Or atleast the essential fields necessary for sensibly plotting results of the cluster permutation routine? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Thursday, December 16, 2010 4:48 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) hi kambiz, did you look at the actual p-values of you clusters? the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. good luck, n On 16.12.2010, at 09:21, Eric Maris wrote: > Kambiz, > >>> Have a look at the (channel,frequency)-specific paired t-tests. >> I am not sure exactly what you mean. By 'specific' do you mean sample >> wise testing in a narrow frequency range? > > Sorry, I forgot that you have time resolution. I mean the > (channel,time,frequency)-specific paired t-tests, which are in the output of > freqstatistics. > > > Best, > > Eric > > >> >> -K. >> ------------------------------------------------------------- >> Kambiz Tavabi PhD >> Biomedical Imaging Laboratory >> The Children's Hospital of Philadelphia >> 34th Street and Civic Center Boulevard >> Philadelphia, Pa. 19104 >> Tel: 267.426.0302 >> email: tavabik at email.chop.edu >> ------------------------------------------------------------- >> ________________________________________ >> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >> Sent: Wednesday, December 15, 2010 5:36 PM >> To: 'Email discussion list for the FieldTrip project' >> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >> >> Dear Kambiz, >> >> >>> Greetings Fieldstrippers >> >> "Fieldtrippers" may have connotations that a scientist does not always >> appreciate, but what to think of "Fieldstrippers"? >> >>> My problem with the results in the attachment is that in the grand >>> averages there is an obvious event related desynchrony (cold colors, >>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>> doesn't get picked up, but the small blip of noise/event-related >>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>> as different between conditions by the permutations! >> >> Have a look at the (channel,frequency)-specific paired t-tests. Do >> these >> detect the big cold blob? If not, the variance across subjects is >> probably >> large. >> >> >> Best, >> >> Eric Maris >> >> >> >> >> >> >> To carry out the >>> permutations I used >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistic = 'maxsum'; >>> cfg.neighbours = [ ]; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.05; >>> cfg.numrandomization = 500; >>> So I presume that the result is not due to a signs (pos/neg values) >>> issue, if I am using a two-tailed test. Changing cfg.tail & >>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>> results in errors. Basically, I'd appreciate if someone, based on >> what >>> is observable in the grand averages, could confirm that the >> permutation >>> result makes sense? And if not then some advice on what I am doing >>> wrong. Thank you. -Kambiz >>> >>> -K. >>> ------------------------------------------------------------ >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> 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 inieuwenhuis at berkeley.edu Tue Dec 21 08:20:55 2010 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 20 Dec 2010 23:20:55 -0800 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl>, <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> Message-ID: <4D105557.9030903@berkeley.edu> Hi Kambiz, I don't fully understand your question. Do you want to know what the fields mean that come out of ft_freqstatistics, or did you hacked some output, and want to know how to make the file in a way that FieldTrip can plot it? In either case, check out this tutorial: "Cluster-based permutation tests on time-frequency data" http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq Here you can find description of ft_freqstatistics with the cluster permutation routine, and it points to where you can find output items for ft_freqstatistics on the ftp server "The output can also be obtained from ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/cluster_permutation_freq/stat_freq_planar_FICvsFC.mat." Hope this helps, Ingrid Ingrid Nieuwenhuis PhD Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 On 20-12-2010 13:46, Tavabi, Kambiz wrote: > Greetings - where can I find a description of the output items for ft_freqstatistics? Or atleast the essential fields necessary for sensibly plotting results of the cluster permutation routine? > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] > Sent: Thursday, December 16, 2010 4:48 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) > > hi kambiz, > > did you look at the actual p-values of you clusters? > > the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. > > good luck, > n > > On 16.12.2010, at 09:21, Eric Maris wrote: > >> Kambiz, >> >>>> Have a look at the (channel,frequency)-specific paired t-tests. >>> I am not sure exactly what you mean. By 'specific' do you mean sample >>> wise testing in a narrow frequency range? >> Sorry, I forgot that you have time resolution. I mean the >> (channel,time,frequency)-specific paired t-tests, which are in the output of >> freqstatistics. >> >> >> Best, >> >> Eric >> >> >>> -K. >>> ------------------------------------------------------------- >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------- >>> ________________________________________ >>> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >>> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >>> Sent: Wednesday, December 15, 2010 5:36 PM >>> To: 'Email discussion list for the FieldTrip project' >>> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >>> >>> Dear Kambiz, >>> >>> >>>> Greetings Fieldstrippers >>> "Fieldtrippers" may have connotations that a scientist does not always >>> appreciate, but what to think of "Fieldstrippers"? >>> >>>> My problem with the results in the attachment is that in the grand >>>> averages there is an obvious event related desynchrony (cold colors, >>>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>>> doesn't get picked up, but the small blip of noise/event-related >>>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>>> as different between conditions by the permutations! >>> Have a look at the (channel,frequency)-specific paired t-tests. Do >>> these >>> detect the big cold blob? If not, the variance across subjects is >>> probably >>> large. >>> >>> >>> Best, >>> >>> Eric Maris >>> >>> >>> >>> >>> >>> >>> To carry out the >>>> permutations I used >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'depsamplesT'; >>>> cfg.correctm = 'cluster'; >>>> cfg.clusteralpha = 0.05; >>>> cfg.clusterstatistic = 'maxsum'; >>>> cfg.neighbours = [ ]; >>>> cfg.tail = 0; >>>> cfg.clustertail = 0; >>>> cfg.alpha = 0.05; >>>> cfg.numrandomization = 500; >>>> So I presume that the result is not due to a signs (pos/neg values) >>>> issue, if I am using a two-tailed test. Changing cfg.tail& >>>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>>> results in errors. Basically, I'd appreciate if someone, based on >>> what >>>> is observable in the grand averages, could confirm that the >>> permutation >>>> result makes sense? And if not then some advice on what I am doing >>>> wrong. Thank you. -Kambiz >>>> >>>> -K. >>>> ------------------------------------------------------------ >>>> Kambiz Tavabi PhD >>>> Biomedical Imaging Laboratory >>>> The Children's Hospital of Philadelphia >>>> 34th Street and Civic Center Boulevard >>>> Philadelphia, Pa. 19104 >>>> Tel: 267.426.0302 >>>> email: tavabik at email.chop.edu >>>> ------------------------------------------------------------ >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hanneke.meeren at uvt.nl Wed Dec 29 16:25:49 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Wed, 29 Dec 2010 16:25:49 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293636349.6d2a46cHkmeeren@atommail.uvt.nl> Hi, I would like to perform cluster-based permutation tests on MNE-surface data, which I obtained using the MNE/Freesurfer pipeline. So rather than use the whole FT pipeline and start from scratch, I would like to import my existing source data into FieldTrip, and export the resulting stats to my own matlab visualization tools. Reading the tutorial and reference documentation I understand that I could directly call ft_sourcestatistics, but it is not clear to me what the exact data structure should be for the source data and which fields the cfg should contain. I could not find a tutorial- or example dataset for ft_sourcestatistics. For each condition I have the source data in a (subjects x vertices x time) 3d-array for each condition. Is it possible to have a time-dimension in the source-data, or should I first convert to a two-dimensional array subjects x vertices? In addition I have generated a location matrix which contains the x, y, z - coordinates of the vertices of my surface, which I presume is necessary to define neighbors. It is however not clear to me how to pass the location matrix to the function (should it be defined in a cfg field?). I have also tried to search the archives of the discussion list but was unable to find any messages before December 2010. Does anyone have an example dataset available that can be used as input dataset for sourcestatistics, so I can see what the structure of the data should be? Could someone clarify how I should define the location data? Could someone help me out on how to search through the old messages in the discussion list archives. Any help is greatly appreciated, Thanks a lot in advance, Hanneke ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From hanneke.meeren at uvt.nl Thu Dec 30 00:14:52 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 00:14:52 +0100 Subject: [FieldTrip] Fw: Re: cluster-based permutation tests on MNE-surface data Message-ID: <1293664492.71b8c54Hkmeeren@atommail.uvt.nl> message from Jan-Mathijs forwarded to the list... ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl -------------- next part -------------- An embedded message was scrubbed... From: jan-mathijs schoffelen Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Date: Wed, 29 Dec 2010 16:43:42 +0100 Size: 6246 URL: From hanneke.meeren at uvt.nl Thu Dec 30 00:18:04 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 00:18:04 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> Dear Jan-Mathijs, Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. Best regards, Hanneke -----Original Message----- From: jan-mathijs schoffelen To: hanneke.meeren at uvt.nl Date: Wed, 29 Dec 2010 16:43:42 +0100 Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Hi Hanneke, Performing cluster based statistics on source reconstructed data based on a cortical sheet is as of yet not supported (I assume at least that you do the standard MNE cortical sheet reconstruction). At the moment, we are actually working on implementing an MNE-like pipeline in FieldTrip.Our first strategy would be to interpolate the 2D sheets onto a 3D volume, and use the standard machinery for statistics. Yet, another viable approach indeed would be to build in support for 2D- neighbourhood structures. Do you have any clear ideas on that? I would also be interested to see your recipe to warp the individual cortical sheets to a template. Regarding the mailing list: the list is hosted on a new server since the beginning of December. Apparently the archives have not been moved along, or at least are not accessible. We'll look into this. Best wishes, Jan-Mathijs PS: could you forward this message to the list; I am at home and cannot send mails from my regular account. On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > Hi, > > I would like to perform cluster-based permutation tests on MNE- > surface data, which I obtained using the MNE/Freesurfer pipeline. So > rather than use the whole FT pipeline and start from scratch, I > would like to import my existing source data into FieldTrip, and > export the resulting stats to my own matlab visualization tools. > Reading the tutorial and reference documentation I understand that I > could directly call ft_sourcestatistics, but it is not clear to me > what the exact data structure should be for the source data and > which fields the cfg should contain. I could not find a tutorial- or > example dataset for ft_sourcestatistics. > > For each condition I have the source data in a (subjects x vertices > x time) 3d-array for each condition. Is it possible to have a time- > dimension in the source-data, or should I first convert to a two- > dimensional array subjects x vertices? In addition I have generated > a location matrix which contains the x, y, z - coordinates of the > vertices of my surface, which I presume is necessary to define > neighbors. It is however not clear to me how to pass the location > matrix to the function (should it be defined in a cfg field?). I > have also tried to search the archives of the discussion list but > was unable to find any messages before December 2010. > > Does anyone have an example dataset available that can be used as > input dataset for sourcestatistics, so I can see what the structure > of the data should be? Could someone clarify how I should define the > location data? Could someone help me out on how to search through > the old messages in the discussion list archives. > > Any help is greatly appreciated, > > Thanks a lot in advance, > > Hanneke > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From smoratti at psi.ucm.es Thu Dec 30 10:12:43 2010 From: smoratti at psi.ucm.es (Stephan Moratti) Date: Thu, 30 Dec 2010 10:12:43 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data In-Reply-To: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> References: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> Message-ID: Dear Hanneke, Actually I do this kind of analysis using the MNE solution from the Brainstrom pipeline. I do the following. First you have to determine a connectivity matrix that determines which vertices of your cortical mesh are neighbors. I do that with a brainstrom script called tess_vertices_connectivity.m. You can download brainstrom for free. Let's call the connectivity matrix C. If C(i,j) = 1 then vertices i and j are connected, if C(i,j) = 0, then not. Later I changed the clusterstat.m of FT a little bit: lines 38 to 48 I changed: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) && ~isfield(cfg,'connectivity') channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; elseif isfield(cfg, 'connectivity') disp('Using precomputed connectivity matrix !'); channeighbstructmat = cfg.connectivity; % connectivity has been already computed this is what I introduced issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end By doing so, FT does not calculate a connectivity matrix based on distance, but using directly your connectivity matrix C (see below): The next trick is to create a FT data structure from your MNE data, so that you can use ft_timelockstatistics.m. As a cortical mesh has the same 3d coordinates as a sensor helmet, I "press" my MNE surface data in a sensor data structure that I can use later with ft_timelockstatistic.m. This could look like this: MneERF1.grad.pnt=brain.vert; %brain.vert contains the vertices of my cortical mesh; be sure that the unit is cm for i = 1:7000 MneERF1.label{i}=sprintf('A%g',i); end MneERF1.grad.label = MneERF1.label; MneERF1.grad.tra = eye(7000); MneERF1.cfg.channel = UmneERF1.label; MneERF1.grad.ori = zeros(7000,3); for i = 1:23 MneERF1.individual(i,:,:) = squeeze(MNEsolution(:,i,:)); % Here I put the individual MNE solutions if I have 23 subjects; this depends a little bit of your data matrix end MneERF1.dimord= 'subj_chan_time; Now you can use timelockstatistic.m as described in the FT tutorial on sensor space data to calculate a non-parametric cluster based permutation statistic on your MNE surface data (for example MneERF1, MneERF2 are two conditions that you want to compare). The only difference is that you would introduce cfg.connectivity = C;, so that later clusterstat.m uses your C matrix to determine your neighbours. I hope that helps, Best, Stephan El 30/12/2010, a las 00:18, Meeren.H.K.M. escribió: > Dear Jan-Mathijs, > > Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE > (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. > > Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. > > Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. > > It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. > > Best regards, > > Hanneke > > > -----Original Message----- > From: jan-mathijs schoffelen > To: hanneke.meeren at uvt.nl > Date: Wed, 29 Dec 2010 16:43:42 +0100 > Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data > > Hi Hanneke, > > Performing cluster based statistics on source reconstructed data based > on a cortical sheet is as of yet not supported (I assume at least that > you do the standard MNE cortical sheet reconstruction). At the moment, > we are actually working on implementing an MNE-like pipeline in > FieldTrip.Our first strategy would be to interpolate the 2D sheets > onto a 3D volume, and use the standard machinery for statistics. Yet, > another viable approach indeed would be to build in support for 2D- > neighbourhood structures. Do you have any clear ideas on that? I would > also be interested to see your recipe to warp the individual cortical > sheets to a template. > > Regarding the mailing list: the list is hosted on a new server since > the beginning of December. Apparently the archives have not been moved > along, or at least are not accessible. We'll look into this. > > Best wishes, > > Jan-Mathijs > > PS: could you forward this message to the list; I am at home and > cannot send mails from my regular account. > > > > On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > >> Hi, >> >> I would like to perform cluster-based permutation tests on MNE- >> surface data, which I obtained using the MNE/Freesurfer pipeline. So >> rather than use the whole FT pipeline and start from scratch, I >> would like to import my existing source data into FieldTrip, and >> export the resulting stats to my own matlab visualization tools. >> Reading the tutorial and reference documentation I understand that I >> could directly call ft_sourcestatistics, but it is not clear to me >> what the exact data structure should be for the source data and >> which fields the cfg should contain. I could not find a tutorial- or >> example dataset for ft_sourcestatistics. >> >> For each condition I have the source data in a (subjects x vertices >> x time) 3d-array for each condition. Is it possible to have a time- >> dimension in the source-data, or should I first convert to a two- >> dimensional array subjects x vertices? In addition I have generated >> a location matrix which contains the x, y, z - coordinates of the >> vertices of my surface, which I presume is necessary to define >> neighbors. It is however not clear to me how to pass the location >> matrix to the function (should it be defined in a cfg field?). I >> have also tried to search the archives of the discussion list but >> was unable to find any messages before December 2010. >> >> Does anyone have an example dataset available that can be used as >> input dataset for sourcestatistics, so I can see what the structure >> of the data should be? Could someone clarify how I should define the >> location data? Could someone help me out on how to search through >> the old messages in the discussion list archives. >> >> Any help is greatly appreciated, >> >> Thanks a lot in advance, >> >> Hanneke >> >> ---------------------------------- >> Hanneke K.M. Meeren, PhD. >> Research Fellow and Instructor >> Medical Psychology and Cognitive Neuroscience >> Tilburg University >> P.O. Box 90153 >> 5000 LE Tilburg >> The Netherlands >> email: hanneke.meeren at uvt.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.meeren at uvt.nl Thu Dec 30 14:02:23 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 14:02:23 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293714143.6d35b2cHkmeeren@atommail.uvt.nl> Dear Stephan, Thanks a lot for your explanation. I follow your line of reasoning well. I have already done some experimenting with FT_TIMELOCKSTATISTICS, and it seems to do the job, although I have still have to do some double-checking. I have indeed created a FT data structure from my MNE data very similar as the way you describe it. The main difference between you and my mne-data is I guess, that my functional (source) data are not on a cortical mesh. Although my anatomical surface data is a patch with vertices and faces, my source data is not. My source data consists of fixed dipole locations that are actually a subset of the vertices in my surface data. These dipoles each have an x,y,z position in MRI coordinates, but do not have faces or other connectivity-parameters. I guess your tess_vertices_connectivity.m script cannot do the job for a x,y,z position-matrix. So I consider my dipoles as a set of electrodes each having their x,y,z coordinates, and create the neighbourhood-structure with cfg.neigbourdist =5 (I have both my coordinates and distance in mm). Thanks a lot again, Best regards, Hanneke -----Original Message----- From: Stephan Moratti To: Email discussion list for the FieldTrip project Date: Thu, 30 Dec 2010 10:12:43 +0100 Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Dear Hanneke, Actually I do this kind of analysis using the MNE solution from the Brainstrom pipeline. I do the following. First you have to determine a connectivity matrix that determines which vertices of your cortical mesh are neighbors. I do that with a brainstrom script called tess_vertices_connectivity.m. You can download brainstrom for free. Let's call the connectivity matrix C. If C(i,j) = 1 then vertices i and j are connected, if C(i,j) = 0, then not. Later I changed the clusterstat.m of FT a little bit: lines 38 to 48 I changed: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) && ~isfield(cfg,'connectivity') channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; elseif isfield(cfg, 'connectivity') disp('Using precomputed connectivity matrix !'); channeighbstructmat = cfg.connectivity; % connectivity has been already computed this is what I introduced issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end By doing so, FT does not calculate a connectivity matrix based on distance, but using directly your connectivity matrix C (see below): The next trick is to create a FT data structure from your MNE data, so that you can use ft_timelockstatistics.m. As a cortical mesh has the same 3d coordinates as a sensor helmet, I "press" my MNE surface data in a sensor data structure that I can use later with ft_timelockstatistic.m. This could look like this: MneERF1.grad.pnt=brain.vert; %brain.vert contains the vertices of my cortical mesh; be sure that the unit is cm for i = 1:7000 MneERF1.label{i}=sprintf('A%g',i); end MneERF1.grad.label = MneERF1.label; MneERF1.grad.tra = eye(7000); MneERF1.cfg.channel = UmneERF1.label; MneERF1.grad.ori = zeros(7000,3); for i = 1:23 MneERF1.individual(i,:,:) = squeeze(MNEsolution(:,i,:)); % Here I put the individual MNE solutions if I have 23 subjects; this depends a little bit of your data matrix end MneERF1.dimord= 'subj_chan_time; Now you can use timelockstatistic.m as described in the FT tutorial on sensor space data to calculate a non-parametric cluster based permutation statistic on your MNE surface data (for example MneERF1, MneERF2 are two conditions that you want to compare). The only difference is that you would introduce cfg.connectivity = C;, so that later clusterstat.m uses your C matrix to determine your neighbours. I hope that helps, Best, Stephan El 30/12/2010, a las 00:18, Meeren.H.K.M. escribió: > Dear Jan-Mathijs, > > Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE > (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. > > Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. > > Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. > > It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. > > Best regards, > > Hanneke > > > -----Original Message----- > From: jan-mathijs schoffelen > To: hanneke.meeren at uvt.nl > Date: Wed, 29 Dec 2010 16:43:42 +0100 > Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data > > Hi Hanneke, > > Performing cluster based statistics on source reconstructed data based > on a cortical sheet is as of yet not supported (I assume at least that > you do the standard MNE cortical sheet reconstruction). At the moment, > we are actually working on implementing an MNE-like pipeline in > FieldTrip.Our first strategy would be to interpolate the 2D sheets > onto a 3D volume, and use the standard machinery for statistics. Yet, > another viable approach indeed would be to build in support for 2D- > neighbourhood structures. Do you have any clear ideas on that? I would > also be interested to see your recipe to warp the individual cortical > sheets to a template. > > Regarding the mailing list: the list is hosted on a new server since > the beginning of December. Apparently the archives have not been moved > along, or at least are not accessible. We'll look into this. > > Best wishes, > > Jan-Mathijs > > PS: could you forward this message to the list; I am at home and > cannot send mails from my regular account. > > > > On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > >> Hi, >> >> I would like to perform cluster-based permutation tests on MNE- >> surface data, which I obtained using the MNE/Freesurfer pipeline. So >> rather than use the whole FT pipeline and start from scratch, I >> would like to import my existing source data into FieldTrip, and >> export the resulting stats to my own matlab visualization tools. >> Reading the tutorial and reference documentation I understand that I >> could directly call ft_sourcestatistics, but it is not clear to me >> what the exact data structure should be for the source data and >> which fields the cfg should contain. I could not find a tutorial- or >> example dataset for ft_sourcestatistics. >> >> For each condition I have the source data in a (subjects x vertices >> x time) 3d-array for each condition. Is it possible to have a time- >> dimension in the source-data, or should I first convert to a two- >> dimensional array subjects x vertices? In addition I have generated >> a location matrix which contains the x, y, z - coordinates of the >> vertices of my surface, which I presume is necessary to define >> neighbors. It is however not clear to me how to pass the location >> matrix to the function (should it be defined in a cfg field?). I >> have also tried to search the archives of the discussion list but >> was unable to find any messages before December 2010. >> >> Does anyone have an example dataset available that can be used as >> input dataset for sourcestatistics, so I can see what the structure >> of the data should be? Could someone clarify how I should define the >> location data? Could someone help me out on how to search through >> the old messages in the discussion list archives. >> >> Any help is greatly appreciated, >> >> Thanks a lot in advance, >> >> Hanneke >> >> ---------------------------------- >> Hanneke K.M. Meeren, PhD. >> Research Fellow and Instructor >> Medical Psychology and Cognitive Neuroscience >> Tilburg University >> P.O. Box 90153 >> 5000 LE Tilburg >> The Netherlands >> email: hanneke.meeren at uvt.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From seapsy at GMAIL.COM Fri Dec 3 02:05:06 2010 From: seapsy at GMAIL.COM (seapsy seapsy) Date: Fri, 3 Dec 2010 09:05:06 +0800 Subject: read NeuroScan avg file In-Reply-To: <05B030CE-4ED9-4A61-B363-965270C7997A@donders.ru.nl> Message-ID: Dear Robert There still a problem when I plot the *.AVG file with FieldTrip. The figure I plotted with negative down, but I family with negative up, So, the question is how to plot with negative upward? Tthanks so much! Seapsy --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From michielvanelk at GMAIL.COM Fri Dec 3 15:28:58 2010 From: michielvanelk at GMAIL.COM (Michiel van Elk) Date: Fri, 3 Dec 2010 15:28:58 +0100 Subject: importing CeeGraph EEG data in Fieldtrip & iEEG analysis Message-ID: Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone interested: The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone knows about the right filter settings for preprocessing iEEG data for LFP and TFR analysis? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Best, Michiel van Elk --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From s.oosthoek at DONDERS.RU.NL Fri Dec 3 17:39:39 2010 From: s.oosthoek at DONDERS.RU.NL (Simon Oosthoek) Date: Fri, 3 Dec 2010 17:39:39 +0100 Subject: the list has MOVED Message-ID: Hello dear fieldtrippers As you may have heard, the maillist service at SurfNET is being terminated as of 1st of January 2011. Therefore the list has now moved to a different location and a different organisation. The Science Department of the Radboud University has kindly provided us with new maillists, to which I have subscribed all existing subscribers, EXCEPT those who were somehow invisible, so please check if you received this e-mail, but not something from fieldtrip at donders.ru.nl If you want to subscribe or unsubscribe to that list use: fieldtrip-subscribe at donders.ru.nl or fieldtrip-unsubscribe at donders.ru.nl Let's continue the discussion at fieldtrip at donders.ru.nl! Cheers Simon PS, I will try to make the old archives available at some point. --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From reyna.gordon at VANDERBILT.EDU Fri Dec 3 22:46:19 2010 From: reyna.gordon at VANDERBILT.EDU (Gordon, Reyna L) Date: Fri, 3 Dec 2010 15:46:19 -0600 Subject: read NeuroScan avg file In-Reply-To: Message-ID: Dear Seapsy, Try adding this line of code right after you call the plotting function. set(gca,'YDir','reverse'); Best, Reyna ------------------------------ Reyna L Gordon, Ph.D. Postdoctoral Fellow EEG/ERP Lab Vanderbilt Kennedy Center 227 MRL (615) 322-1324 reyna.gordon at Vanderbilt.Edu On Dec 2, 2010, at 7:05 PM, seapsy seapsy wrote: > Dear Robert > There still a problem when I plot the *.AVG file with FieldTrip. > The figure I plotted with negative down, but I family with negative up, > So, the question is how to plot with negative upward? > Tthanks so much! > > Seapsy > > --------------------------------------------------------------------------- > You are receiving this message because you are subscribed to > the FieldTrip list. The aim of this list is to facilitate the discussion > between users of the FieldTrip toolbox, to share experiences > and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > --------------------------------------------------------------------------- --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From seapsy at GMAIL.COM Sat Dec 4 03:33:58 2010 From: seapsy at GMAIL.COM (seapsy seapsy) Date: Sat, 4 Dec 2010 10:33:58 +0800 Subject: read NeuroScan avg file In-Reply-To: <98ED66E1-566A-4D0D-B38B-06542B8C5057@Vanderbilt.Edu> Message-ID: Dear Reyna Thanks for you reply. But still with problem that turning the figure up to down, left to right. Seapsy 2010/12/4 Gordon, Reyna L : > Dear Seapsy, > > Try adding this line of code right after you call the plotting function. > > set(gca,'YDir','reverse'); > > Best, > Reyna > > ------------------------------ > Reyna L Gordon, Ph.D. > Postdoctoral Fellow > EEG/ERP Lab > Vanderbilt Kennedy Center > 227 MRL > (615) 322-1324 > reyna.gordon at Vanderbilt.Edu > > > > > > On Dec 2, 2010, at 7:05 PM, seapsy seapsy wrote: > >> Dear Robert >> There still a problem when I plot the *.AVG file with FieldTrip. >> The figure I plotted with negative down, but I family with negative up, >> So, the question is how to plot with negative  upward? >> Tthanks so much! >> >>                  Seapsy >> >> --------------------------------------------------------------------------- >> You are receiving this message because you are subscribed to >> the  FieldTrip list. The aim of this list is to facilitate the discussion >> between  users of the FieldTrip  toolbox, to share experiences >> and to discuss  new ideas for MEG and EEG analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> --------------------------------------------------------------------------- > > --------------------------------------------------------------------------- > You are receiving this message because you are subscribed to > the  FieldTrip list. The aim of this list is to facilitate the discussion > between  users of the FieldTrip  toolbox, to share experiences > and to discuss  new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > --------------------------------------------------------------------------- > --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From batrod at GMAIL.COM Thu Dec 9 13:38:06 2010 From: batrod at GMAIL.COM (Rodolphe Nenert) Date: Thu, 9 Dec 2010 06:38:06 -0600 Subject: Awful Experience....(Rodolphe Nenert)..I Need Your Help!!!! Message-ID: Hi, I'm writing this with tears in my eyes.I'm presently in London,United Kingdom for a short vacation and I'm stuck...And really it was unannounced. I was attacked by four armed robbers on my way back to the hotel where i lodged.I was robbed and completely embarrassed. All my cash,credit cards and cellphone were stolen. I reported the incident to the embassy and the Police but to my dismay they seem not bothered...their response was just too casual.My flight is scheduled for tomorrow afternoon but I've got to settle my bills before I'm allowed to leave....Now am freaked out. Regards.. --------------------------------------------------------------------------- You are receiving this message because you are subscribed to the FieldTrip list. The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. --------------------------------------------------------------------------- From michielvanelk at gmail.com Fri Dec 3 17:07:51 2010 From: michielvanelk at gmail.com (Michiel van Elk) Date: Fri, 3 Dec 2010 17:07:51 +0100 Subject: [FieldTrip] importing CeeGraph EEG data in Fieldtrip & iEEG analysis Message-ID: Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone who ever runs into the same problem (should work for EEGlab as well). The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts (textread function) and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone has recommendations for the preprocessing of iEEG data for subsequent LFP and TFR analysis (e.g. re-reference data or not, which filter settings, where to put the baseline)? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Thanks, Michiel van Elk -- mail: michielvanelk at gmail.com phone: (+41) 76-2271095 web: www.michielvanelk.com From Douglas.Rose at cchmc.org Fri Dec 3 17:53:24 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Fri, 03 Dec 2010 11:53:24 -0500 Subject: [FieldTrip] importing CeeGraph EEG data in Fieldtrip & iEEG analysis In-Reply-To: References: Message-ID: <4CF8DA34.0668.003A.1@cchmc.org> Thank you for the heads up. We use CeeGraph for some studies. Did you try Insight from Persyst? ( http://www.eeg-persyst.com/). I use that to read CeeGraph and other Bio-logic files and I believe it outputs in a number of other formats including MatLab. Douglas Rose **************************************************** Douglas F. Rose, M.D. Medical Director, CCHMC MEG Center Professor of Pediatrics and Neurology Cincinnati Children's Hospital Medical Center 3333 Burnet Ave, ML #11006 Cincinnati, OH 45229, USA Phone 513-636-4222 Fax 513-636-3980 Email douglas.rose at cchmc.org **************************************************** >>> Michiel van Elk 12/3/2010 11:07 AM >>> Dear Fieldtrippers, Recently I acquired iEEG data with a BioLogic CeeGraph system which generates a single file with an '.eeg' extension. It took me quite some time to figure out how to read in the data in a format that is usable in Fieldtrip, so here is the trick for anyone who ever runs into the same problem (should work for EEGlab as well). The latest version of Cartool software is the only software I found that is capable of reading in the CeeGraph data (http://cartoolcommunity.unige.ch/). Next, the individual tracks can be exported in an 'eph'-format. This takes quite some time and generates 3 separate files: - an '.eph' file: which is a tab-separated text file with the dimensions [nr_samples x nr_ electrodes] - a '.mrk' file: containing the markers and the corresponding samples - a '.vrb' file: giving a summary of the conversion process. The first two files can be relatively easily imported in Matlab using custom-made scripts (textread function) and transformed in a format that Fieldtrip likes:) In addition I was wondering if anyone has recommendations for the preprocessing of iEEG data for subsequent LFP and TFR analysis (e.g. re-reference data or not, which filter settings, where to put the baseline)? In the literature I could not find a 'gold standard' and people from different groups are doing different things. Any help would be greatly appreciated! Thanks, Michiel van Elk -- mail: michielvanelk at gmail.com phone: (+41) 76-2271095 web: www.michielvanelk.com _______________________________________________ Fieldtrip mailing list Fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From michael.hanke at gmail.com Sat Dec 4 14:27:25 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 08:27:25 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip Message-ID: <20101204132725.GA6337@meiner> Hi, I'm one of the NeuroDebian (http://neuro.debian.net) developers and I am looking into packaging fieldtrip for the Debian operating system. I'd be glad if you could provide me with some information concerning the following questions: 1. I cloned the public SVN repository. There are no tags in it. Does fieldtrip do actual releases, or is every revision intended to be used by users? 2. The repository contains a large number of binaries for various platforms. A Debian package cannot ship any of these, as all binaries have to be buildable from source. Therefore I stripped all MEX extension and third party binaries. This raises the question of how to get them rebuilt ;-) There are no Makefiles, but there is ft_compile_mex.m. However, that doesn't seem to build everything that is shipped with the fieldtrip distribution. 3. My initial goal was simply to get enough of fieldtrip running to be able to serve as a dependency for our package of the Matlab version of SPM8. However, I now discovered that there is a "port" of fieldtrip to octave: http://kurage.nimh.nih.gov/meglab/Meg/Software which makes it mandatory for me to try to integrate it properly into Debian octave infrastructure. Are you aware of this octave port? Is there any plan to incorporate this effort? To what degree is it complete or usable? Or maybe current fieldtrip code already runs (partially) on octave? 4. Distribution packaging can sometimes cause problems, because the maintainer is not aware of some peculiarities. Do you have a test suite that can be used to assess proper functioning of fieldtrip? I saw the tutorial and associated data that could serve as a test suite, but some tutorial parts only mention compatibility with versions of the past, and I wasn't able to locate the actual tutorial _code_ for download. I also saw http://fieldtrip.fcdonders.nl/development/infrastructure_for_testing but it looks more like a plan for the future, correct? 5. I had to strip all 'external' software due to various licensing/distribution problems. I wonder to what degree the presence of these pieces is critical for fieldtrip functionality -- beside obvious lack of support for some file formats? Thanks in advance for your answers to this long list, Michael -- GPG key: 4096R/7FFB9E9B Michael Hanke http://mih.voxindeserto.de From tomh at kurage.nimh.nih.gov Sat Dec 4 16:55:42 2010 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Sat, 4 Dec 2010 10:55:42 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip Message-ID: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> >However, I now discovered that there is a "port" of fieldtrip to octave: >http://kurage.nimh.nih.gov/meglab/Meg/Software That isn't a port, just a few tools written long ago to make some things easier. Fieldtrip has changed a great deal since then. Getting it to work correctly under Octave is something that needs to be done by the Fieldtrip developers. From michael.hanke at gmail.com Sat Dec 4 17:10:29 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 11:10:29 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> References: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> Message-ID: <20101204161029.GA8032@meiner> On Sat, Dec 04, 2010 at 10:55:42AM -0500, Tom Holroyd wrote: > >However, I now discovered that there is a "port" of fieldtrip to octave: > >http://kurage.nimh.nih.gov/meglab/Meg/Software > > That isn't a port, just a few tools written long ago to make some things easier. Thanks for the clarification. Do you know who did that? Was it you? Where can I find information on what things were made easier? > Fieldtrip has changed a great deal since then. Getting it to work correctly > under Octave is something that needs to be done by the Fieldtrip developers. I agree. Does anyone have experience with or further information about the current state of compatibility between fieldtrip and octave? Thanks in advance, Michael -- Michael Hanke http://mih.voxindeserto.de GPG key: 4096R/7FFB9E9B From alexandre.gramfort at inria.fr Sat Dec 4 23:42:02 2010 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Sat, 4 Dec 2010 17:42:02 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: Hi Mickael, > 4. Distribution packaging can sometimes cause problems, because the >   maintainer is not aware of some peculiarities. Do you have a test >   suite that can be used to assess proper functioning of fieldtrip? To my knowledge fieldtrip do not have a full test suite. You do have one though for externals/openmeeg base on mtest: http://www.mathworks.com/matlabcentral/fileexchange/22846 Alex From michael.hanke at gmail.com Sun Dec 5 03:55:05 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sat, 4 Dec 2010 21:55:05 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: References: <20101204132725.GA6337@meiner> Message-ID: <20101205025505.GB14803@meiner> On Sat, Dec 04, 2010 at 05:42:02PM -0500, Alexandre Gramfort wrote: > To my knowledge fieldtrip do not have a full test suite. You do > have one though for externals/openmeeg base on mtest: > http://www.mathworks.com/matlabcentral/fileexchange/22846 Thanks Alex! However, the Debian package of fieldtrip will not ship with openmeeg. We already have a dedicated package for it and it is currently updated to also provide the Matlab functionality for fieldtrip. A corresponding dependency between the two packages will be specified to ensure that fieldtrip users will have access to openmeeg-related functionality. Special thanks for adding a test suite to openmeeg! Michael -- Michael Hanke http://mih.voxindeserto.de From michael.hanke at gmail.com Sun Dec 5 22:00:56 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Sun, 5 Dec 2010 16:00:56 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: <20101205210056.GA23636@meiner> On Sat, Dec 04, 2010 at 08:27:25AM -0500, Michael Hanke wrote: > 2. The repository contains a large number of binaries for various > platforms. A Debian package cannot ship any of these, as all binaries > have to be buildable from source. Therefore I stripped all MEX > extension and third party binaries. This raises the question of how > to get them rebuilt ;-) > > There are no Makefiles, but there is ft_compile_mex.m. However, that > doesn't seem to build everything that is shipped with the fieldtrip > distribution. Moreover the current SVN version doesn't run successfully, because it expects files in different locations. The following patch allows MEX files to be compiled. However, I'm not sure if this is half-way into a transition. For example 'routlm' seems to have moved into forward/private, but is still expected to be in private/. The current binary distribution also ships it in private/. What is the intented setup? ft_compile_mex.m now builds 22 of 35 MEX files in the binary distribution (excluding external ones). diff --git a/ft_compile_mex.m b/ft_compile_mex.m index 9fe1d63..cf191b3 100644 --- a/ft_compile_mex.m +++ b/ft_compile_mex.m @@ -51,11 +51,11 @@ L = addSource(L,'forward/private','meg_leadfield1'); L = addSource(L,'forward/private','lmoutr',[],[],'geometry.c -I.'); L = addSource(L,'forward/private','solid_angle',[],[],'geometry.c -I.'); L = addSource(L,'forward/private','ptriproj',[],[],'geometry.c -I.'); +L = addSource(L,'forward/private','routlm',[],[],'geometry.c -I.'); L = addSource(L,'private','splint_gh'); -L = addSource(L,'private','ltrisect',[],[],'geometry.c -I.'); -L = addSource(L,'private','routlm',[],[],'geometry.c -I.'); -L = addSource(L,'private','plinproj',[],[],'geometry.c -I.'); +L = addSource(L,'private','ltrisect',[],[],'../forward/private/geometry.c -I../forward/private'); +L = addSource(L,'private','plinproj',[],[],'../forward/private/geometry.c -I../forward/private'); L = addSource(L,'realtime/online_mri','ft_omri_smooth_volume'); Thanks again, Michael -- Michael Hanke http://mih.voxindeserto.de From s.klanke at donders.ru.nl Mon Dec 6 10:04:35 2010 From: s.klanke at donders.ru.nl (Stefan Klanke) Date: Mon, 06 Dec 2010 10:04:35 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101205210056.GA23636@meiner> References: <20101204132725.GA6337@meiner> <20101205210056.GA23636@meiner> Message-ID: <4CFCA723.50909@donders.ru.nl> Hey Michael, I'll try to answer some of your questions: > 1. Does fieldtrip do actual releases, or is every revision intended to be used by users? The latter is true, we don't do releases. > 2. There are no Makefiles, but there is ft_compile_mex.m. However, that doesn't seem to build everything that is shipped with the fieldtrip distribution. The ft_compile_mex file is fairly new itself, and indeed only compiles the "simple" MEX files without extra dependencies. The big three blocks of left-out MEX files are in the a) realtime b) peer and c) multivariate (sub-)toolboxes. For a) and b), we need extra stuff like pthreads and other system libraries, which is quite hard to build in a simple way that still works for all platforms (and compilers). Also, when I made the compile script, c) was under heavy restructuring and I didn't even know whether I'd have all the sources available. If you're only after a compile script or Makefile for Linux (and GCC), we can probably do a lot better (see below). > 3. Or maybe current fieldtrip code already runs (partially) on octave? I recently tested some FieldTrip code on Octave 3.2 myself (including the buffer mex file), and that ran fine. Nowadays, most of the code should run unmodified, since we don't heavily use OOP or Matlab GUI code. I won't make any promises, though. > Moreover the current SVN version doesn't run successfully, because it > expects files in different locations. The following patch allows MEX > files to be compiled. ... Some of the MEX files (and .m files) show up in multiple private directories, but we use SVN externals to maintain a single version in the repository, and copy this to the various places. If you want a source-only distribution, we'd need to adapt the ft_compile_mex script to take over the functionality of the SVN externals. Actually, I guess the proper solution for a source distribution would be a global Makefile (maybe based on autoconf) that compiles all the MEX files for the version of Matlab or Octave that is visible on the path. Until now we've shied away from that effort since our audience is usually happy to have the binaries provided for them, and for the Windows platform it's easier to compile the MEX files within Matlab. Cheers, Stefan From r.oostenveld at donders.ru.nl Mon Dec 6 15:13:11 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 6 Dec 2010 15:13:11 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204132725.GA6337@meiner> References: <20101204132725.GA6337@meiner> Message-ID: <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> Dear Michael As you may know, I am in charge of the fieldtrip project. Since you asked the questions on the email list, let me also reply through this channel. There are a number of techical issues that you raised, some of which have already been addressed by email lists subscribers. Let me just respond to some of the remaining points. Regarding octave: It would of course be nice if it ran both on octave and matlab. However, the active developers at the moment do not have a need for octave as alternative for Matlab. At the donders we have enough matlab licenses and I believe this applies to the other developers as well. The consequence is that maintaining compatibility with octave is not high on the priority list of any of these developers. However, I certainly welcome suggestions for improving the octave compatibility. Suggestions for improvements can be posted on http://bugzilla.fcdonders.nl . If someone wants to take up this responsibility, that person could get direct access to the svn server. Please note that we have external people already contributing to the project source code and documentation, it is not only a Donders project. Regarding test suite: there is the branches/testing directory in which you can find test code. It is not a complete suite, and most importantly is that the data files (which amount to many GBs are not in there. I am trying to encourage contributors to add test scripts there, but at the moment we do not have an automated testing procedure. We used to have one, but at a certain point it ran too long (more than one full night) and was not sufficiently sensitive in picking up the actual bugs, so that is why we abandoned the automatic (regression) testing. We now rely on our users to report problems and take quick action in fixing the bugs. The automatic testing remains a desireable feature, but currently we lack manpower and expertise for properly implementing this. Regarding openmeeg: where do you in general envision the "glue code" between project A and project B to go? In this particular example, I think that the openmeeg glue code should go into the fieldtrip package. The reason for this is that it is maintained by the whole fieldtrip developer team, and hosted on the fieldtrip svn. Part of the glue is actually even in the fieldtrip/forward directory, so taking away fieldtrip/external/openmeeg might make it more confusing for users. Note that the openmeeg package in fieldtrip does automatic checking of the required binaries and provides instructions if the binaries are missing, so towards end-users it is friendlier to rely on that checking mechanism. Regarding externals in general: the externals are more than just providing a version of some external software for easy download. The externals also provide a specific version (that is tested and known to work), a subset of the toolbox (e.g. part of spm2 instead of the complete version) and bug fixes if the external parter does not provide them in time (e.g. the isfinite function which fails on recent matlabs and therefore had to be replaced by the finite function on afni and spm2). SPM8 works with a particular version of fieldtrip, and the SPM developers are responsible for keeping their fieldtrip version in synch with our developments. Vice versa, the fieldtrip developers are responsible for keeping the fieldtrip/external. The challenge in package management on linux is of course also dependencies. With the matlab toolboxes we are joinly trying to work towards better dependency management, but are clearly not there yet. How do you envision that your debian packaging ensures correct versions to be co- installed? Regarding mex files: not all users have compilers on their system by default (esp. on windows 64 bit and osx in general), therefore we provide the packaged fieldtrip version including binaries. This also facilitates the fieldtrip release to be installed and maintained by a single user in a larger research group, e.g. on a shared network drive that is read only for all users except the maintainer. Recompiling by individual users requires individual users to have write access. Of course if you consider every user to be super user on his own linux box, that is not a problem. But in reality many researchers have limited rights to the computers on which they are working. Recompiling the mex files is of course always an option, but it would be cumbersome to force this on the users. Why would you want to exclude the mex binaries from the release version? Regarding your observation of files being replicated: fieldtrip (as all matlab toolboxes) consists of interpreted code and not compield code. To ensure a consistent and long-term stable user interface to the functions, part of the functions are hidden (in the private directories). Those hidden functions are also hidden from each other, i.e. fieldtrip/fileio/private and fieldtrip/forward/private functions cannot access each other. Hence some of the low-level functions (and also mex files) have to be replicated. That is why we use svn file externals. Checking out so many svn file externals is very slow due to the suboptimal implementation of the svn client software. However, the regular users (95% of all users) don't notice and don't care, because they are just getting a packaged zip file, unzip it and can get to work. Then some general questions: which part of the FieldTrip audience do you expect to benefit from the packaged version? I presume that it would be limited to the linux users, with root access to their own computers, and debian based releases. Actually I would expect those people to benefit more from the read-only SVN version of fieldtrip that we make available to all users. Working with SVN should be simple for this particular sub-class of fieldtrip users. And using svn allows the user to roll back to older versions, and to make changes in his copy of the code without those changes being overwritten with the next "svn update". If you want to discuss this in more detail, feel free to drop me an email to schedule a phone or skype call. Probably that is more efficient for both of us in getting things done. 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 ----------------------------------------------------------- On 4 Dec 2010, at 14:27, Michael Hanke wrote: > Hi, > > I'm one of the NeuroDebian (http://neuro.debian.net) developers and > I am > looking into packaging fieldtrip for the Debian operating system. > I'd be > glad if you could provide me with some information concerning the > following questions: > > 1. I cloned the public SVN repository. There are no tags in it. Does > fieldtrip do actual releases, or is every revision intended to be > used by users? > > 2. The repository contains a large number of binaries for various > platforms. A Debian package cannot ship any of these, as all > binaries > have to be buildable from source. Therefore I stripped all MEX > extension and third party binaries. This raises the question of how > to get them rebuilt ;-) > > There are no Makefiles, but there is ft_compile_mex.m. However, that > doesn't seem to build everything that is shipped with the fieldtrip > distribution. > > 3. My initial goal was simply to get enough of fieldtrip running to > be able to > serve as a dependency for our package of the Matlab version of SPM8. > However, I now discovered that there is a "port" of fieldtrip to > octave: http://kurage.nimh.nih.gov/meglab/Meg/Software which makes > it > mandatory for me to try to integrate it properly into Debian octave > infrastructure. > > Are you aware of this octave port? Is there any plan to incorporate > this effort? To what degree is it complete or usable? Or maybe > current fieldtrip code already runs (partially) on octave? > > 4. Distribution packaging can sometimes cause problems, because the > maintainer is not aware of some peculiarities. Do you have a test > suite that can be used to assess proper functioning of fieldtrip? > > I saw the tutorial and associated data that could serve as a test > suite, but some tutorial parts only mention compatibility with > versions of the past, and I wasn't able to locate the actual > tutorial > _code_ for download. > > I also saw http://fieldtrip.fcdonders.nl/development/infrastructure_for_testing > but it looks more like a plan for the future, correct? > > 5. I had to strip all 'external' software due to various > licensing/distribution problems. I wonder to what degree the > presence > of these pieces is critical for fieldtrip functionality -- beside > obvious lack of support for some file formats? > > Thanks in advance for your answers to this long list, > > Michael > > -- > GPG key: 4096R/7FFB9E9B Michael Hanke > http://mih.voxindeserto.de > _______________________________________________ > Fieldtrip mailing list > Fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From maya.zuckerman at gmail.com Mon Dec 6 15:19:25 2010 From: maya.zuckerman at gmail.com (Maya Zuckerman) Date: Mon, 6 Dec 2010 16:19:25 +0200 Subject: [FieldTrip] nonparametric statistics Message-ID: Hi, I was recently referred to your paper on the subject of nonparametric statistical testing in Journal of Neuroscience Methods (2007). I find the paper very interesting and it has contributed a lot to the statistical analyses I'm currently using. My experiment includes 3 conditions, of which I was a priori interested in two. Thus, I ran the analysis proposed by you for two of the conditions only that were of relevant theoretical interest, and found significant differences at a specific time window and cluster of electrodes. Now I'm interested in examining the third condition at this specific time and space frame. I was wondering if you could advise what would the appropriate statistical threshold/correction be, as I'm unsure after consulting several of my colleagues. Thanks, Maya Zuckerman -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.hanke at gmail.com Mon Dec 6 16:32:17 2010 From: michael.hanke at gmail.com (Michael Hanke) Date: Mon, 6 Dec 2010 10:32:17 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> References: <20101204132725.GA6337@meiner> <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> Message-ID: <20101206153217.GA31612@meiner> Hi Robert, thanks for your detailed explanations. Please see my in-line responses below: On Mon, Dec 06, 2010 at 03:13:11PM +0100, Robert Oostenveld wrote: > Regarding octave: It would of course be nice if it ran both on > octave and matlab. However, the active developers at the moment do > not have a need for octave as alternative for Matlab. At the donders > we have enough matlab licenses and I believe this applies to the > other developers as well. The consequence is that maintaining > compatibility with octave is not high on the priority list of any of > these developers. Octave compatibility has many advantages (not talking about abstract philosophical ones now). Let say I want to run a simulation that involves fieldtrip code on our cluster. I'd suddenly need 500! matlab licenses for me alone. Money is not a severe problem here, but I bet my institution would not appreciate having to double the number of licenses if everybody wants to do like me. Moreover, cloud-computing becomes really accessible these days. Few lines of code allow me to send jobs to e.g. Amazon's EC. However, not for Matlab-based computing... BUT: if fieldtrip works fine with octave you can quickly get an army of users that help with maintaining compatibility, just expose it to people. If there is code to perform an automatic functionality check it would facilitate things significantly. > The automatic testing remains a desireable feature, but currently we > lack manpower and expertise for properly implementing this. At NeuroDebian we are working with many neuroscience projects to implement test suites and cross-toolkit interoperability tests. We'd be happy to contribute. > Regarding openmeeg: where do you in general envision the "glue code" > between project A and project B to go? In this particular example, I > think that the openmeeg glue code should go into the fieldtrip > package. The reason for this is that it is maintained by the whole > fieldtrip developer team, and hosted on the fieldtrip svn. Part of > the glue is actually even in the fieldtrip/forward directory, so > taking away fieldtrip/external/openmeeg might make it more confusing > for users. Note that the openmeeg package in fieldtrip does > automatic checking of the required binaries and provides > instructions if the binaries are missing, so towards end-users it is > friendlier to rely on that checking mechanism. I feared that, and that is why I asked. I did not see that the externals are more than just externals. Ideally you could make a clear distinction between 3rd-party code and fieldtrip-specific glue. I agree that such code belongs to fieldtrip, but it should not be labeled 'external', because it is not really that. < snip reasoning about tested dependencies > > How do you envision that your debian packaging ensures correct > versions to be co-installed? This is a common problem that we have to deal with every day. The short answer is: Debian packaging allows me to specify arbitrarily detailed versioned dependencies. If fieldtrip of yesterday works with SPM2 older than 10 years OR SPM8 of the very last release, I can say that and the Debian package manager ensures that these dependencies become available on the system -- if not possible it would refuse to install fieldtrip. (softer dependencies are also possible, of course). The issue of "tested" dependencies is more tricky. Your approach (and the one of many others for that matter) is to "fork" 3rd-party code and include it into fieldtrip. However, this entitles you to be responsible for all bugs that affect the code that ships with fieldtrip. If some external doesn't see support from its original developers anymore (SPM2?) you even inherit all responsibility. But do you have enough manpower to support all that additional code. Typically projects simply assume that their forked dependencies work and do not monitor other people's bugs (also because having public bugtrackers isn't common in neuroscience -- fieldtrip being one of the noble exceptions!). However, we believe this trust only works because so few people use the code and so few bugs get reported -- the true health state of research software code is, sadly, much worse. We believe that the only way to ensure proper functioning is proper testing. This exposes bugs, makes people aware, attracts contributions, increases quality, make software more portable and eventually simply better. I could talk at length about the benefits of free-and-open-source-software development models, but I'll skip that. We have seen a number of serious bugs in core neuro-imaging libraries and applications in the past that affected research results, but only became apparent by built/run-time tests of Debian packages on hardware architectures that the original developers had no access to -- but nevertheless affected common platforms like amd64. That being said, I do not want to blame anyone for having manually tested and frozen dependencies to ensure proper functioning. This is often the only reasonable strategy that can be done with limited manpower. What I'm arguing for is simply to enable more people/machines to do testing and by that get access to "unlimited" manpower. Having your software in Debian causes even non-neuroscientist developers to check your code, run tests, send patches -- without you having to motivate/pay/ask them at all. > Of course if you consider every user to be super user on his own linux > box, that is not a problem. But in reality many researchers have > limited rights to the computers on which they are working. Recompiling > the mex files is of course always an option, but it would be > cumbersome to force this on the users. Debian packaging does not enforce compilation on users. Everything is performed automatically without any required interaction. If you do not have the permissions to install things on a system you cannot install packages. However, this issue is completely orthogonal to fieldtrip providing a build system to allow (not enforce) recompiling MEX files. > Why would you want to exclude the mex binaries from the > release version? The Debian policy mandates it. Every Debian source package must be compilable by anybody (given access to all build-dependencies). There is a trust path between Debian and its users that requires anybody to be able to verify what is shipped in Debian's binary package. Compiling EVERYTHING from source is the only way to ensure this. We don't even ship pre-generated PDF, but rebuild them to make sure we can fix typos in the manuals whenever we find them (over-simplified example ;-). > Then some general questions: which part of the FieldTrip audience do > you expect to benefit from the packaged version? Almost everybody -- especially those you do not use fieldtrip yet. Almost every single neuroscience software project that we packaged in the past 6 years has seen an enormous increase in its user base after it became available in the official Debian/ubuntu archives. > I presume that it would be limited to the linux users, with root > access to their own computers, and debian based releases. Somewhat, but root access is only necessary for installing the package, which is typically done by a sysadmin. The primary customer of a package is a user that is served with readily usable software -- not a hacker. Debian packaging also makes arbitrary software deployment very simple. It doesn't matter whether you deploy Matlab-code, C-code, Python scripts or data -- all is done with the same infrastructure and the same command. This kind of deployment system is used in some large research institutions to be able to handle complex systems with affordable administration. If you want to get some first-hand reports you could consider contacting some people listed in the 'research institutions' section of our testimonials page: http://neuro.debian.net/testimonials.html > Actually I would expect those people to benefit more from the > read-only SVN version of fieldtrip that we make available to all > users. Working with SVN should be simple for this particular sub-class > of fieldtrip users. And using svn allows the user to roll back to > older versions, and to make changes in his copy of the code without > those changes being overwritten with the next "svn update". Acknowledged. But as I said, Debian packaging is a global integration effort that abstracts development and deployment workflows beyond the level of a single project. What looks simple when working with fieldtrip alone, becomes tedious when working with fieldtrip, AFNI, FSL, SPM, openmeeg, ITK-SNAP, ANTS, ... http://neuro.debian.net/pkgs.html > If you want to discuss this in more detail, feel free to drop me an > email to schedule a phone or skype call. Probably that is more > efficient for both of us in getting things done. Replied in a private message with my contact details. Thanks again, Michael -- Michael Hanke http://mih.voxindeserto.de From holroydt at mail.nih.gov Mon Dec 6 17:16:09 2010 From: holroydt at mail.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Mon, 06 Dec 2010 11:16:09 -0500 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101204161029.GA8032@meiner> References: <201012041555.oB4FtgCE010840@kurage.nimh.nih.gov> <20101204161029.GA8032@meiner> Message-ID: <4CFD0C49.9060902@mail.nih.gov> I think Robert answered a lot; I didn't know it ran under Octave 3.2, the last I checked was 3.0. Anyway, it doesn't need anything from Kurage (kuh-rah-ge -- it's Japanese for Jellyfish). That stuff is really old anyway. Michael Hanke wrote: > On Sat, Dec 04, 2010 at 10:55:42AM -0500, Tom Holroyd wrote: >>> However, I now discovered that there is a "port" of fieldtrip to octave: >>> http://kurage.nimh.nih.gov/meglab/Meg/Software >> That isn't a port, just a few tools written long ago to make some things easier. > > Thanks for the clarification. Do you know who did that? Was it you? > Where can I find information on what things were made easier? > >> Fieldtrip has changed a great deal since then. Getting it to work correctly >> under Octave is something that needs to be done by the Fieldtrip developers. > > I agree. Does anyone have experience with or further information about the > current state of compatibility between fieldtrip and octave? > > Thanks in advance, > > Michael > -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow From e.maris at donders.ru.nl Mon Dec 6 17:56:16 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Mon, 6 Dec 2010 17:56:16 +0100 Subject: [FieldTrip] nonparametric statistics In-Reply-To: References: Message-ID: <005b01cb9566$82539670$86fac350$@maris@donders.ru.nl> Dear Maya, I was recently referred to your paper on the subject of nonparametric statistical testing in Journal of Neuroscience Methods (2007). I find the paper very interesting and it has contributed a lot to the statistical analyses I'm currently using. My experiment includes 3 conditions, of which I was a priori interested in two. Thus, I ran the analysis proposed by you for two of the conditions only that were of relevant theoretical interest, and found significant differences at a specific time window and cluster of electrodes. Now I'm interested in examining the third condition at this specific time and space frame. I was wondering if you could advise what would the appropriate statistical threshold/correction be, as I'm unsure after consulting several of my colleagues. I see the following options: 1. Compare the third condition with each of the other two conditions and do Bonferroni-correction to account for the fact that you perform three tests. 2. Compare all three conditions with a cluster-based permutation test using an F-statistic statfun (depsamplesF for a within-UO design and indepsamplesF for a between-UO design). The power of this test will be somewhat lower than the power of the cluster-based permutation test using the t-statistic that you have already performed. Examining the difference between the third condition and the first two at the data-selected time and space frame does not in general control the false alarm rate (because the selection of the time and space frame is based on the data). Best, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Dec 9 11:34:16 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 9 Dec 2010 11:34:16 +0100 Subject: [FieldTrip] Debian packaging of fieldtrip In-Reply-To: <20101206153217.GA31612@meiner> References: <20101204132725.GA6337@meiner> <424BFD47-6D38-411E-88F5-54003626ACE8@donders.ru.nl> <20101206153217.GA31612@meiner> Message-ID: <5DE0077D-9A10-4EB5-91F5-860560D1B0E0@donders.ru.nl> Hi Michael Thanks for your detailled response. I don't think that we have big differences in how we would like to see things develop, only in how we are personally and with our respective teams able to further that development. Working together and combining our complementary expertise is certainly a good move. Let's continue this specific collaboration discussion off-line. Regarding octave: that is certainly something that I see the value in. But the practical situation at our Donders Centre where ~150 people work is that we have ~100 MATLAB floating network licenses, and a 50 node linux cluster. That number of licenses is enough to give people a comfortable number of data analysis sessions on their desktop workstations and on the linux cluster. We don't have the scientific manpower nor comuting hardware to keep many more than these 100 MATLAB sessions busy at any given point in time. The MATLAB maintenance contract (which entitles us to MATLAB updates) costs us ~6000 euro/ year. This includes a small increase in the number of licenses every year. This 6000 euros is peanuts compared to the scanner and personel costs, and compares more to the amount of money we spend on our coffee machine (yes, we do have a nice machine!). So from a scientific budget point of view I currently cannot warrant investing effort from people of _our_ centre (i.e. salary costs) into the octave compatibility. But the prospect of outsourcing part of the computations to large clusters, grids or the cloud is of course interesting. For that reason I also started a distributed computing sub-project to fieldtrip (see http://fieldtrip.fcdonders.nl/development/peer) and in that project the licenses do become more of an issue. If I were able to get an "army of octave users" (as you write) to help me out with improving the compatibility of the code, I certainly would welcome that and would be willing to coordinate those efforts. If there are people on this mailing list interested in this, please do contact me! Also people that are willing to contribute to improving the testing infrastructure are very welcome. best regards, Robert On 6 Dec 2010, at 16:32, Michael Hanke wrote: > Hi Robert, > > thanks for your detailed explanations. Please see my in-line responses > below: > > On Mon, Dec 06, 2010 at 03:13:11PM +0100, Robert Oostenveld wrote: >> Regarding octave: It would of course be nice if it ran both on >> octave and matlab. However, the active developers at the moment do >> not have a need for octave as alternative for Matlab. At the donders >> we have enough matlab licenses and I believe this applies to the >> other developers as well. The consequence is that maintaining >> compatibility with octave is not high on the priority list of any of >> these developers. > > Octave compatibility has many advantages (not talking about abstract > philosophical ones now). Let say I want to run a simulation that > involves fieldtrip code on our cluster. I'd suddenly need 500! matlab > licenses for me alone. Money is not a severe problem here, but I bet > my > institution would not appreciate having to double the number of > licenses > if everybody wants to do like me. Moreover, cloud-computing becomes > really accessible these days. Few lines of code allow me to send > jobs to > e.g. Amazon's EC. However, not for Matlab-based computing... > > BUT: if fieldtrip works fine with octave you can quickly get an army > of > users that help with maintaining compatibility, just expose it to > people. If there is code to perform an automatic functionality check > it > would facilitate things significantly. > >> The automatic testing remains a desireable feature, but currently we >> lack manpower and expertise for properly implementing this. > > At NeuroDebian we are working with many neuroscience projects to > implement test suites and cross-toolkit interoperability tests. We'd > be > happy to contribute. > >> Regarding openmeeg: where do you in general envision the "glue code" >> between project A and project B to go? In this particular example, I >> think that the openmeeg glue code should go into the fieldtrip >> package. The reason for this is that it is maintained by the whole >> fieldtrip developer team, and hosted on the fieldtrip svn. Part of >> the glue is actually even in the fieldtrip/forward directory, so >> taking away fieldtrip/external/openmeeg might make it more confusing >> for users. Note that the openmeeg package in fieldtrip does >> automatic checking of the required binaries and provides >> instructions if the binaries are missing, so towards end-users it is >> friendlier to rely on that checking mechanism. > > I feared that, and that is why I asked. I did not see that the > externals > are more than just externals. Ideally you could make a clear > distinction > between 3rd-party code and fieldtrip-specific glue. I agree that such > code belongs to fieldtrip, but it should not be labeled 'external', > because > it is not really that. > > < snip reasoning about tested dependencies > >> How do you envision that your debian packaging ensures correct >> versions to be co-installed? > > This is a common problem that we have to deal with every day. The > short > answer is: Debian packaging allows me to specify arbitrarily detailed > versioned dependencies. If fieldtrip of yesterday works with SPM2 > older > than 10 years OR SPM8 of the very last release, I can say that and the > Debian package manager ensures that these dependencies become > available > on the system -- if not possible it would refuse to install fieldtrip. > (softer dependencies are also possible, of course). > > The issue of "tested" dependencies is more tricky. Your approach (and > the one of many others for that matter) is to "fork" 3rd-party code > and > include it into fieldtrip. However, this entitles you to be > responsible > for all bugs that affect the code that ships with fieldtrip. If some > external doesn't see support from its original developers anymore > (SPM2?) you even inherit all responsibility. But do you have enough > manpower to support all that additional code. Typically projects > simply > assume that their forked dependencies work and do not monitor other > people's bugs (also because having public bugtrackers isn't common in > neuroscience -- fieldtrip being one of the noble exceptions!). > However, > we believe this trust only works because so few people use the code > and > so few bugs get reported -- the true health state of research software > code is, sadly, much worse. > > We believe that the only way to ensure proper functioning is proper > testing. This exposes bugs, makes people aware, attracts > contributions, > increases quality, make software more portable and eventually simply > better. I could talk at length about the benefits of > free-and-open-source-software development models, but I'll skip that. > We have seen a number of serious bugs in core neuro-imaging > libraries and > applications in the past that affected research results, but only > became > apparent by built/run-time tests of Debian packages on hardware > architectures that the original developers had no access to -- but > nevertheless affected common platforms like amd64. > > That being said, I do not want to blame anyone for having manually > tested and frozen dependencies to ensure proper functioning. This is > often the only reasonable strategy that can be done with limited > manpower. What I'm arguing for is simply to enable more people/ > machines > to do testing and by that get access to "unlimited" manpower. Having > your software in Debian causes even non-neuroscientist developers to > check your code, run tests, send patches -- without you having to > motivate/pay/ask them at all. > >> Of course if you consider every user to be super user on his own >> linux >> box, that is not a problem. But in reality many researchers have >> limited rights to the computers on which they are working. >> Recompiling >> the mex files is of course always an option, but it would be >> cumbersome to force this on the users. > > Debian packaging does not enforce compilation on users. Everything is > performed automatically without any required interaction. If you do > not > have the permissions to install things on a system you cannot install > packages. However, this issue is completely orthogonal to fieldtrip > providing a build system to allow (not enforce) recompiling MEX files. > >> Why would you want to exclude the mex binaries from the >> release version? > > The Debian policy mandates it. Every Debian source package must be > compilable by anybody (given access to all build-dependencies). > There is > a trust path between Debian and its users that requires anybody to be > able to verify what is shipped in Debian's binary package. Compiling > EVERYTHING from source is the only way to ensure this. We don't even > ship pre-generated PDF, but rebuild them to make sure we can fix typos > in the manuals whenever we find them (over-simplified example ;-). > >> Then some general questions: which part of the FieldTrip audience do >> you expect to benefit from the packaged version? > > Almost everybody -- especially those you do not use fieldtrip yet. > Almost every single neuroscience software project that we packaged in > the past 6 years has seen an enormous increase in its user base > after it > became available in the official Debian/ubuntu archives. > >> I presume that it would be limited to the linux users, with root >> access to their own computers, and debian based releases. > > Somewhat, but root access is only necessary for installing the > package, > which is typically done by a sysadmin. The primary customer of a > package > is a user that is served with readily usable software -- not a hacker. > Debian packaging also makes arbitrary software deployment very simple. > It doesn't matter whether you deploy Matlab-code, C-code, Python > scripts > or data -- all is done with the same infrastructure and the same > command. This kind of deployment system is used in some large research > institutions to be able to handle complex systems with affordable > administration. If you want to get some first-hand reports you could > consider contacting some people listed in the 'research institutions' > section of our testimonials page: > > http://neuro.debian.net/testimonials.html > >> Actually I would expect those people to benefit more from the >> read-only SVN version of fieldtrip that we make available to all >> users. Working with SVN should be simple for this particular sub- >> class >> of fieldtrip users. And using svn allows the user to roll back to >> older versions, and to make changes in his copy of the code without >> those changes being overwritten with the next "svn update". > > Acknowledged. But as I said, Debian packaging is a global integration > effort that abstracts development and deployment workflows beyond the > level of a single project. What looks simple when working with > fieldtrip > alone, becomes tedious when working with fieldtrip, AFNI, FSL, SPM, > openmeeg, ITK-SNAP, ANTS, ... > > http://neuro.debian.net/pkgs.html > >> If you want to discuss this in more detail, feel free to drop me an >> email to schedule a phone or skype call. Probably that is more >> efficient for both of us in getting things done. > > Replied in a private message with my contact details. > > > Thanks again, > > Michael > > -- > Michael Hanke > http://mih.voxindeserto.de > _______________________________________________ > Fieldtrip mailing list > Fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sid.kouider at gmail.com Fri Dec 10 18:40:34 2010 From: sid.kouider at gmail.com (Sid Kouider) Date: Fri, 10 Dec 2010 18:40:34 +0100 Subject: [FieldTrip] research engineer position in neuroimaging - Paris, France Message-ID: <4d026613.82eed80a.6564.ffff9589@mx.google.com> The Department of Cognitive Science at the Ecole Normale Supérieure (Paris) invites applications for a research engineer position to work on Neuroimaging data in the framework of the DynaMind ERC project held by Dr Sid Kouider. The successful applicant will mainly be in charge of managing and analyzing data obtained on human subjects with fMRI in adults and high-density EEG in infants. The successful applicant will also be involved in the design and elaboration of research protocols. Candidates should have at least a master degree in a relevant domain and a solid training in neuroimaging data analysis, with robust experience in signal processing and programming. Experience with Matlab and the SPM toolbox is desirable but not a prerequisite. The successful applicant will be affiliated to the Perception, Attention and Consciousness team of Dr Sid Kouider. The Department of Cognitive Science offers a rich research environment composed of a multidisciplinary set of research units on philosophy, cognitive psychology, cognitive neurosciences and computational neurosciences. Our research team, at the interface of these disciplines, is working on the cognitive and neural determinants of consciousness, with an emphasis on the distinction between unconscious perception and perceptual awareness. Our lab is located in central Paris, within the historical Quartier Latin. Consideration of applicants will commence December 15th, 2010 and will continue until the position is filled. The net salary will range between 2 100 to 2 800 Euros per month depending on qualifications. The appointment is for two years initially but can be extended later on. Please send a CV (including the names and contact information of two references) to sid.kouider at ens.fr Do not hesitate to contact us for further questions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr Sid Kouider, CNRS research scientist Ecole Normale Supérieure LSCP, Pavillon Jardin, 29 rue d'Ulm, 75005 Paris, France www.lscp.net/persons/sidk/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From TAVABIK at email.chop.edu Mon Dec 13 17:33:50 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 11:33:50 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting Message-ID: Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. ExpHi = freq: [1x158 double] time: [1x2880 double] powspctrm: [4-D double] dimord: 'subj_chan_freq_time' lable: {2x1 cell} (ie., {['MLT']; ['MRT']} size(ExpHi.powspctrm) = 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) Currently I am recieving the following errors ??? Reference to non-existent field 'label'. Error in ==> prepare_timefreq_data>forcedimord at 509 output.label = input.label; Error in ==> prepare_timefreq_data at 87 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); -K. ------------------------------------------------------------ Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_freqstats_script.m Type: text/x-objcsrc Size: 697 bytes Desc: ft_freqstats_script.m URL: From nathanweisz at mac.com Mon Dec 13 20:12:54 2010 From: nathanweisz at mac.com (Nathan Weisz) Date: Mon, 13 Dec 2010 20:12:54 +0100 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: Message-ID: <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From TAVABIK at email.chop.edu Mon Dec 13 20:42:00 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 14:42:00 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 e.maris at donders.ru.nl Mon Dec 13 21:21:39 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Mon, 13 Dec 2010 21:21:39 +0100 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: <035b01cb9b03$59a5b3f0$0cf11bd0$@maris@donders.ru.nl> Dear Kambiz, Type "help ft_neighbourselection" on the Matlab command line. This will provide you with some information. Most likely you will decide not to cluster in space (but only in time and frequency). I this case, the neighbourhood structure of both channels has to be empty. Good luck, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip- > bounces at donders.ru.nl] On Behalf Of Tavabi, Kambiz > Sent: maandag 13 december 2010 20:42 > To: nathanweisz at me.com > Cc: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Cluster Permutation Data Formatting > > Embarassing, off course I do! I apologize about that. However I am > still having other downstream errors due to some of the definitions. > FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script > resulted in > > ??? Undefined function or variable "sens". > Error in ==> ft_neighbourselection at 95 > if ~isstruct(sens) > Error in ==> neighbourselection at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > Error in ==> statistics_wrapper at 241 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> ft_freqstatistics at 125 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > I maybe misunderstanding what is clustered. Is it sensors or adjacent > time-frequency bins? Because I only have two channels clustering > adjacent sensors will fail. Perhaps you could advise on whether > cfg.correctm ='cluster'; is the right choice. Should I consider another > option? and if so what happens to: > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.clustertail = 0; > > Is there another tutorial which discusses other routines for the > various multiple comparison correction routines? > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Nathan Weisz [nathanweisz at mac.com] > Sent: Monday, December 13, 2010 2:12 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Cluster Permutation Data Formatting > > hi, > > looks like you have a typo in your data structure (lable instead of > label). > > good luck, > n > > On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > > > Greetings, I am using the recommendations on > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#wit > hin-subjects_experiments to carry out within-subjects permutation tests > on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject > I have the conditional source-space (2 virtual electrodes) time- > frequency representations computed between 1.5-80Hz (0.5 freq step) > using Morlet wavelets throughout the stimulus duration (i.e., trial > epochs from -0.8 - 1.6 sec). As per tutorial I have created data > structures, which to the best of my knowledge are suitable for use with > ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified > the routine in the tutorial to create the cfg structure. As the final > state of the dataset was not arrived at using the FT pipeline I am > afraid there might be input structure field(s) I may have not defined, > or defined incorrectly (e.g. channel labling and layout). Essentially I > simply wish to run the tests and view res > ults on two time-frequency representation plots (eg., imagesc)! I > would very much appreciate if someone with more experience in these > routines would take a look at my script (see attachment) and e.g. data > structure and let me know what is missing and/or wrong with them. > > > > ExpHi = > > freq: [1x158 double] > > time: [1x2880 double] > > powspctrm: [4-D double] > > dimord: 'subj_chan_freq_time' > > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > > > size(ExpHi.powspctrm) = > > 10 2 158 2880 (i.e., Subjects x > channes x freqs x timepoints) > > > > Currently I am recieving the following errors > > > > ??? Reference to non-existent field 'label'. > > Error in ==> prepare_timefreq_data>forcedimord at 509 > > output.label = input.label; > > Error in ==> prepare_timefreq_data at 87 > > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> > statistics_wrapper at 217 > > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> > ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, > varargin{:}); > > > > > > -K. > > ------------------------------------------------------------ > > Kambiz Tavabi PhD > > Biomedical Imaging Laboratory > > The Children's Hospital of Philadelphia > > 34th Street and Civic Center Boulevard > > Philadelphia, Pa. 19104 > > Tel: 267.426.0302 > > email: tavabik at email.chop.edu > > ------------------------------------------------------------ > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > 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 Douglas.Rose at cchmc.org Mon Dec 13 21:29:53 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Mon, 13 Dec 2010 15:29:53 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> Message-ID: <4D063BF3.0668.003A.1@cchmc.org> Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 TAVABIK at email.chop.edu Mon Dec 13 21:42:49 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 15:42:49 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: <4D063BF3.0668.003A.1@cchmc.org> References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> <4D063BF3.0668.003A.1@cchmc.org> Message-ID: I am sorry but I don't understand this response from Doug. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Douglas Rose Sent: Monday, December 13, 2010 3:30 PM To: nathanweisz at me.com Cc: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Cluster Permutation Data Formatting Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 TAVABIK at email.chop.edu Mon Dec 13 23:02:30 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 13 Dec 2010 17:02:30 -0500 Subject: [FieldTrip] Plotting cluster permutation results Message-ID: Greetings, Based on FT tutorials and user advice I have managed to create a stat structure using ft_freqstatistics. stat = prob [2x158x1800 double] posclusters: [1x43 struct] posclusterslabelmat: [2x158x1800 double] posdistribution: [1x500 double] negclusters: [1x63 struct] negclusterslabelmat: [2x158x1800 double] negdistribution: [1x500 double] mask: [2x158x1800 logical] stat: [2x158x1800 double] ref: [2x158x1800 double] dimord: 'chan_freq_time' label: {2x1 cell} (i.e., {['MLT'];['MRT']} freq: [1x158 double] time: [1x1800 double] cfg: [1x1 struct] Please note that the cluster permuation tests were performed on source space time-frequency representations, thus data is only available for two channels. As such the statistics was done without cfg.minnbchan and cfg.neighbours=[ ]. and clustering was done on the time-frequency bins throuought the entire epoch for wide-band data (i.e., no averaging over frequencies). The initial conditional power spectra used in the statistics were 10 x 2 x 158 x 2880 (subjects x channels x frequencies x time). I did manage to use ft_singleplotTFR(cfg, stat) to plot the results for single channel -after masking time-frequency points by clusterlabels information belonging to a specific cluster (see attached). But I cannot really make much sense out of the results. Am I doing something wrong here? When I use cfg = []; cfg.alpha = 0.025; cfg.zparam = 'stat'; cfg.zlim = [-4 4]; ft_clusterplot(cfg, stat); I get the following: ??? Error using ==> ft_clusterplot at 75 stat contains multiple frequencies which is not allowed because it should be averaged over frequencies Technically I don't have any apriori frequency band(s) of interest, thus I used the wide-band data. How does ft_clusterplot accept frequency averaging? And is it possible to work around this criterion? Is it possible to customize cfg.layout? Thanks in advance -Kambiz -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_singleplotTFR.jpg Type: image/jpeg Size: 12468 bytes Desc: ft_singleplotTFR.jpg URL: From Douglas.Rose at cchmc.org Tue Dec 14 20:18:56 2010 From: Douglas.Rose at cchmc.org (Douglas Rose) Date: Tue, 14 Dec 2010 14:18:56 -0500 Subject: [FieldTrip] Cluster Permutation Data Formatting In-Reply-To: References: , <48C1A152-AC1F-4842-B19A-340CED28C0D1@mac.com> <4D063BF3.0668.003A.1@cchmc.org> Message-ID: <4D077CD0.0668.003A.1@cchmc.org> Ooops. My apologies. Clicked on the wrong email to answer. So sorry. Not related at all to your thread. Doug >>> "Tavabi, Kambiz" 12/13/2010 3:42 PM >>> I am sorry but I don't understand this response from Doug. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Douglas Rose Sent: Monday, December 13, 2010 3:30 PM To: nathanweisz at me.com Cc: fieldtrip at donders.ru.nl Subject: Re: [FieldTrip] Cluster Permutation Data Formatting Sounds good. I thought about it later and thought the shorter might not be too broad for someone not in the field. Doug >>> "Tavabi, Kambiz" 12/13/2010 2:42 PM >>> Embarassing, off course I do! I apologize about that. However I am still having other downstream errors due to some of the definitions. FYI I changed cfg.channel to {['MLT']; ['MRT']}. Running the script resulted in ??? Undefined function or variable "sens". Error in ==> ft_neighbourselection at 95 if ~isstruct(sens) Error in ==> neighbourselection at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> statistics_wrapper at 241 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> ft_freqstatistics at 125 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I maybe misunderstanding what is clustered. Is it sensors or adjacent time-frequency bins? Because I only have two channels clustering adjacent sensors will fail. Perhaps you could advise on whether cfg.correctm ='cluster'; is the right choice. Should I consider another option? and if so what happens to: cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.clustertail = 0; Is there another tutorial which discusses other routines for the various multiple comparison correction routines? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Monday, December 13, 2010 2:12 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Cluster Permutation Data Formatting hi, looks like you have a typo in your data structure (lable instead of label). good luck, n On 13.12.2010, at 17:33, Tavabi, Kambiz wrote: > Greetings, I am using the recommendations on http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#within-subjects_experiments to carry out within-subjects permutation tests on MEG data from 10 subjects in a 2x2 design. Briefly, for each subject I have the conditional source-space (2 virtual electrodes) time-frequency representations computed between 1.5-80Hz (0.5 freq step) using Morlet wavelets throughout the stimulus duration (i.e., trial epochs from -0.8 - 1.6 sec). As per tutorial I have created data structures, which to the best of my knowledge are suitable for use with ft_freqstatistics(cfg, cond1, cond2). Also, I have minimally modified the routine in the tutorial to create the cfg structure. As the final state of the dataset was not arrived at using the FT pipeline I am afraid there might be input structure field(s) I may have not defined, or defined incorrectly (e.g. channel labling and layout). Essentially I simply wish to run the tests and view results on two time-frequency representation plots (eg., imagesc)! I would very much appreciate if someone with more experience in these routines would take a look at my script (see attachment) and e.g. data structure and let me know what is missing and/or wrong with them. > > ExpHi = > freq: [1x158 double] > time: [1x2880 double] > powspctrm: [4-D double] > dimord: 'subj_chan_freq_time' > lable: {2x1 cell} (ie., {['MLT']; ['MRT']} > > size(ExpHi.powspctrm) = > 10 2 158 2880 (i.e., Subjects x channes x freqs x timepoints) > > Currently I am recieving the following errors > > ??? Reference to non-existent field 'label'. > Error in ==> prepare_timefreq_data>forcedimord at 509 > output.label = input.label; > Error in ==> prepare_timefreq_data at 87 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_timelockstatistics at 117 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From TAVABIK at email.chop.edu Wed Dec 15 16:52:44 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Wed, 15 Dec 2010 10:52:44 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) Message-ID: Greetings Fieldstrippers - Would someone savvy in cluster permutation testing kindly take a look at the attached plots. Briefly, Top left upper & lower panels are conditional grand averaged (n=10), time-frequency representation (TFR) of single virtual electrode. The TFR shows %change in power relative to baseline (i.e., baseline corrected power spectrum). The top right panel is the p-value map of sample-wise paired t-testing (two-tailed) of the data. To deal with the multiple comparison problem, I used ft_freqstatistics to carryout out permuation tests on the source space time-frequency representations from my virtual sensors (2), as such the statistics were done without cfg.minnbchan and cfg.neighbours=[ ]. Testing was done on the time-frequency bins throughout the epochs of wide band data (i.e., no averaging over frequencies). In the attached file the bottom panel is the plot of the permutation result for the same data and channel in the grand averages. As per advice from other fieldtrip users I created the plot by: stat.stat2=stat.stat.*(stat.posclusterlabelmat == 1); cfg.zparam='stat2'; ft_singleplotTFR(cfg, stat); When I use ft_clusterplot(cfg, stat); for obvious reasons I get the following error. As I have no apriori freqs interval of interest I am not sure how to get around this.: ??? Error using ==> ft_clusterplot at 75 stat contains multiple frequencies which is not allowed because it should be averaged over frequencies My problem with the results in the attachment is that in the grand averages there is an obvious event related desynchrony (cold colors, negative values) difference between 0.4-0.8sec; 10-40hz which somehow doesn't get picked up, but the small blip of noise/event-related synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed as different between conditions by the permutations! To carry out the permutations I used cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.neighbours = [ ]; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 500; So I presume that the result is not due to a signs (pos/neg values) issue, if I am using a two-tailed test. Changing cfg.tail & cfg.clustertail to 1 makes little to no difference, and a value of -1 results in errors. Basically, I'd appreciate if someone, based on what is observable in the grand averages, could confirm that the permutation result makes sense? And if not then some advice on what I am doing wrong. Thank you. -Kambiz -K. ------------------------------------------------------------ Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: TFR_testing.pdf Type: application/pdf Size: 103055 bytes Desc: TFR_testing.pdf URL: From smoratti at psi.ucm.es Wed Dec 15 21:52:22 2010 From: smoratti at psi.ucm.es (Stephan Moratti) Date: Wed, 15 Dec 2010 21:52:22 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: Message-ID: <7A31E3CD-4B93-4759-8D76-5ACE5D7D395C@psi.ucm.es> Hi Kambiz, Probably you should consider to use cfg.alpha and cfg.clusteralpha = 0.025 if you test two sided (cfg.tail and cfg.clustertail=0). Doing so, will give you a the p values of 0.05 alltogether. Best, Stephan El 15/12/2010, a las 16:52, Tavabi, Kambiz escribió: > Greetings Fieldstrippers - Would someone savvy in cluster > permutation testing kindly take a look at the attached plots. > Briefly, Top left upper & lower panels are conditional grand > averaged (n=10), time-frequency representation (TFR) of single > virtual electrode. The TFR shows %change in power relative to > baseline (i.e., baseline corrected power spectrum). The top right > panel is the p-value map of sample-wise paired t-testing (two- > tailed) of the data. > > To deal with the multiple comparison problem, I used > ft_freqstatistics to carryout out permuation tests on the source > space time-frequency representations from my virtual sensors (2), as > such the statistics were done without cfg.minnbchan and > cfg.neighbours=[ ]. Testing was done on the time-frequency bins > throughout the epochs of wide band data (i.e., no averaging over > frequencies). > > In the attached file the bottom panel is the plot of the permutation > result for the same data and channel in the grand averages. As per > advice from other fieldtrip users I created the plot by: > stat.stat2=stat.stat.*(stat.posclusterlabelmat == 1); > cfg.zparam='stat2'; > ft_singleplotTFR(cfg, stat); > > When I use ft_clusterplot(cfg, stat); for obvious reasons I get the > following error. As I have no apriori freqs interval of interest I > am not sure how to get around this.: > ??? Error using ==> ft_clusterplot at 75 > stat contains multiple frequencies which is not allowed because it > should be > averaged over frequencies > > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which > somehow doesn't get picked up, but the small blip of noise/event- > related synchrony (hot colors, positive values) c. 0.5sec at 50Hz is > revealed as different between conditions by the permutations! To > carry out the permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of > -1 results in errors. Basically, I'd appreciate if someone, based on > what is observable in the grand averages, could confirm that the > permutation result makes sense? And if not then some advice on what > I am doing wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Dec 15 23:36:17 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Wed, 15 Dec 2010 23:36:17 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: Message-ID: <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Dear Kambiz, > Greetings Fieldstrippers "Fieldtrippers" may have connotations that a scientist does not always appreciate, but what to think of "Fieldstrippers"? > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > doesn't get picked up, but the small blip of noise/event-related > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > as different between conditions by the permutations! Have a look at the (channel,frequency)-specific paired t-tests. Do these detect the big cold blob? If not, the variance across subjects is probably large. Best, Eric Maris To carry out the > permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of -1 > results in errors. Basically, I'd appreciate if someone, based on what > is observable in the grand averages, could confirm that the permutation > result makes sense? And if not then some advice on what I am doing > wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ From TAVABIK at email.chop.edu Thu Dec 16 05:29:10 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Wed, 15 Dec 2010 23:29:10 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> References: , <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Message-ID: Eric, >"Fieldtrippers" may have connotations that a scientist does not always >appreciate, but what to think of "Fieldstrippers"? Touche. >Have a look at the (channel,frequency)-specific paired t-tests. I am not sure exactly what you mean. By 'specific' do you mean sample wise testing in a narrow frequency range? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Eric Maris [e.maris at donders.ru.nl] Sent: Wednesday, December 15, 2010 5:36 PM To: 'Email discussion list for the FieldTrip project' Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) Dear Kambiz, > Greetings Fieldstrippers "Fieldtrippers" may have connotations that a scientist does not always appreciate, but what to think of "Fieldstrippers"? > My problem with the results in the attachment is that in the grand > averages there is an obvious event related desynchrony (cold colors, > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > doesn't get picked up, but the small blip of noise/event-related > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > as different between conditions by the permutations! Have a look at the (channel,frequency)-specific paired t-tests. Do these detect the big cold blob? If not, the variance across subjects is probably large. Best, Eric Maris To carry out the > permutations I used > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.neighbours = [ ]; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > So I presume that the result is not due to a signs (pos/neg values) > issue, if I am using a two-tailed test. Changing cfg.tail & > cfg.clustertail to 1 makes little to no difference, and a value of -1 > results in errors. Basically, I'd appreciate if someone, based on what > is observable in the grand averages, could confirm that the permutation > result makes sense? And if not then some advice on what I am doing > wrong. Thank you. -Kambiz > > -K. > ------------------------------------------------------------ > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at donders.ru.nl Thu Dec 16 09:21:48 2010 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 16 Dec 2010 09:21:48 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: , <001801cb9ca8$7fcb9bc0$7f62d340$@maris@donders.ru.nl> Message-ID: <001c01cb9cfa$4901e890$db05b9b0$@maris@donders.ru.nl> Kambiz, > >Have a look at the (channel,frequency)-specific paired t-tests. > I am not sure exactly what you mean. By 'specific' do you mean sample > wise testing in a narrow frequency range? Sorry, I forgot that you have time resolution. I mean the (channel,time,frequency)-specific paired t-tests, which are in the output of freqstatistics. Best, Eric > > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > On Behalf Of Eric Maris [e.maris at donders.ru.nl] > Sent: Wednesday, December 15, 2010 5:36 PM > To: 'Email discussion list for the FieldTrip project' > Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) > > Dear Kambiz, > > > > Greetings Fieldstrippers > > "Fieldtrippers" may have connotations that a scientist does not always > appreciate, but what to think of "Fieldstrippers"? > > > My problem with the results in the attachment is that in the grand > > averages there is an obvious event related desynchrony (cold colors, > > negative values) difference between 0.4-0.8sec; 10-40hz which somehow > > doesn't get picked up, but the small blip of noise/event-related > > synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed > > as different between conditions by the permutations! > > Have a look at the (channel,frequency)-specific paired t-tests. Do > these > detect the big cold blob? If not, the variance across subjects is > probably > large. > > > Best, > > Eric Maris > > > > > > > To carry out the > > permutations I used > > cfg.method = 'montecarlo'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > cfg.clusterstatistic = 'maxsum'; > > cfg.neighbours = [ ]; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.alpha = 0.05; > > cfg.numrandomization = 500; > > So I presume that the result is not due to a signs (pos/neg values) > > issue, if I am using a two-tailed test. Changing cfg.tail & > > cfg.clustertail to 1 makes little to no difference, and a value of -1 > > results in errors. Basically, I'd appreciate if someone, based on > what > > is observable in the grand averages, could confirm that the > permutation > > result makes sense? And if not then some advice on what I am doing > > wrong. Thank you. -Kambiz > > > > -K. > > ------------------------------------------------------------ > > Kambiz Tavabi PhD > > Biomedical Imaging Laboratory > > The Children's Hospital of Philadelphia > > 34th Street and Civic Center Boulevard > > Philadelphia, Pa. 19104 > > Tel: 267.426.0302 > > email: tavabik at email.chop.edu > > ------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > 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 nathanweisz at mac.com Thu Dec 16 10:48:09 2010 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 16 Dec 2010 10:48:09 +0100 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl> References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl> Message-ID: <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> hi kambiz, did you look at the actual p-values of you clusters? the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. good luck, n On 16.12.2010, at 09:21, Eric Maris wrote: > Kambiz, > >>> Have a look at the (channel,frequency)-specific paired t-tests. >> I am not sure exactly what you mean. By 'specific' do you mean sample >> wise testing in a narrow frequency range? > > Sorry, I forgot that you have time resolution. I mean the > (channel,time,frequency)-specific paired t-tests, which are in the output of > freqstatistics. > > > Best, > > Eric > > >> >> -K. >> ------------------------------------------------------------- >> Kambiz Tavabi PhD >> Biomedical Imaging Laboratory >> The Children's Hospital of Philadelphia >> 34th Street and Civic Center Boulevard >> Philadelphia, Pa. 19104 >> Tel: 267.426.0302 >> email: tavabik at email.chop.edu >> ------------------------------------------------------------- >> ________________________________________ >> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >> Sent: Wednesday, December 15, 2010 5:36 PM >> To: 'Email discussion list for the FieldTrip project' >> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >> >> Dear Kambiz, >> >> >>> Greetings Fieldstrippers >> >> "Fieldtrippers" may have connotations that a scientist does not always >> appreciate, but what to think of "Fieldstrippers"? >> >>> My problem with the results in the attachment is that in the grand >>> averages there is an obvious event related desynchrony (cold colors, >>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>> doesn't get picked up, but the small blip of noise/event-related >>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>> as different between conditions by the permutations! >> >> Have a look at the (channel,frequency)-specific paired t-tests. Do >> these >> detect the big cold blob? If not, the variance across subjects is >> probably >> large. >> >> >> Best, >> >> Eric Maris >> >> >> >> >> >> >> To carry out the >>> permutations I used >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistic = 'maxsum'; >>> cfg.neighbours = [ ]; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.05; >>> cfg.numrandomization = 500; >>> So I presume that the result is not due to a signs (pos/neg values) >>> issue, if I am using a two-tailed test. Changing cfg.tail & >>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>> results in errors. Basically, I'd appreciate if someone, based on >> what >>> is observable in the grand averages, could confirm that the >> permutation >>> result makes sense? And if not then some advice on what I am doing >>> wrong. Thank you. -Kambiz >>> >>> -K. >>> ------------------------------------------------------------ >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> 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 dgroppe at cogsci.ucsd.edu Thu Dec 16 15:01:52 2010 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Thu, 16 Dec 2010 09:01:52 -0500 Subject: [FieldTrip] Hann taper vs. single Slepian taper Message-ID: Hi Fieldtripians, Could anyone explain to me when, if ever, it would be better to perform a DFT with a Hann taper vs. a single Slepian taper? It was my understanding that Slepian tapers in general optimally maximized frequency resolution while minimizing leakage from distant frequencies. However, a colleague of mine says he was told at a workshop at the Donders Institute that a Hann taper was better than a single Slepian taper (if you are only going to use one taper). thanks for your help, -David -- David Groppe, Ph.D. dgroppe at cogsci.ucsd.edu http://www.cogsci.ucsd.edu/~dgroppe/ From inieuwenhuis at berkeley.edu Sat Dec 18 01:13:12 2010 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Fri, 17 Dec 2010 16:13:12 -0800 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: References: Message-ID: <4D0BFC98.3080000@berkeley.edu> Dear David, The Slepian tapers are sets of multiple (orthogonal) tapers, that only combined accomplish this "optimally maximized frequency resolution while minimizing leakage from distant frequencies". If you use only a single taper, the Slepian taper is suboptimal compared to the Hanning taper. I've attached some teaching slides I have with some background on multitapers. Hope this helps, Cheers, Ingrid On 12/16/2010 6:01 AM, David Groppe wrote: > Hi Fieldtripians, > Could anyone explain to me when, if ever, it would be better to > perform a DFT with a Hann taper vs. a single Slepian taper? It was my > understanding that Slepian tapers in general optimally maximized > frequency resolution while minimizing leakage from distant > frequencies. However, a colleague of mine says he was told at a > workshop at the Donders Institute that a Hann taper was better than a > single Slepian taper (if you are only going to use one taper). > thanks for your help, > -David > -- Ingrid Nieuwenhuis PhD Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 -------------- next part -------------- A non-text attachment was scrubbed... Name: multitapers.pdf Type: application/pdf Size: 150879 bytes Desc: not available URL: From r.oostenveld at donders.ru.nl Mon Dec 20 09:59:05 2010 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 20 Dec 2010 09:59:05 +0100 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: <4D0BFC98.3080000@berkeley.edu> References: <4D0BFC98.3080000@berkeley.edu> Message-ID: To complement Ingrids good explanation: the shape of the Slepian tapers depend on how many you compute, i.e. if you compute one it will have a (slightly) different shape that the first one if you compute four. The first Slepian taper never goes exactly to zero at the edges, whereas the Hanning (or Hann, as it is also called) does. The consequence is that a single Slepian leaks more than a Hanning. The reason for using a Hanning taper is typically that you don't want to spectrally smooth (usually because the time window is already on the short side), so the leakage of a single Slepian is in that case not desired. Robert On 18 Dec 2010, at 1:13, Ingrid Nieuwenhuis wrote: > Dear David, > > The Slepian tapers are sets of multiple (orthogonal) tapers, that > only combined accomplish this "optimally maximized frequency > resolution while minimizing leakage from distant frequencies". If > you use only a single taper, the Slepian taper is suboptimal > compared to the Hanning taper. I've attached some teaching slides I > have with some background on multitapers. > > Hope this helps, > Cheers, > Ingrid > > > On 12/16/2010 6:01 AM, David Groppe wrote: >> Hi Fieldtripians, >> Could anyone explain to me when, if ever, it would be better to >> perform a DFT with a Hann taper vs. a single Slepian taper? It was >> my >> understanding that Slepian tapers in general optimally maximized >> frequency resolution while minimizing leakage from distant >> frequencies. However, a colleague of mine says he was told at a >> workshop at the Donders Institute that a Hann taper was better than a >> single Slepian taper (if you are only going to use one taper). >> thanks for your help, >> -David >> > > -- > Ingrid Nieuwenhuis PhD > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From dgroppe at cogsci.ucsd.edu Mon Dec 20 14:21:42 2010 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Mon, 20 Dec 2010 08:21:42 -0500 Subject: [FieldTrip] Hann taper vs. single Slepian taper In-Reply-To: References: <4D0BFC98.3080000@berkeley.edu> Message-ID: Thanks very much for the helpful emails Ingrid & Robert. -David On Mon, Dec 20, 2010 at 3:59 AM, Robert Oostenveld wrote: > To complement Ingrids good explanation: the shape of the Slepian tapers > depend on how many you compute, i.e. if you compute one it will have a > (slightly) different shape that the first one if you compute four. The first > Slepian taper never goes exactly to zero at the edges, whereas the Hanning > (or Hann, as it is also called) does. The consequence is that a single > Slepian leaks more than a Hanning. The reason for using a Hanning taper is > typically that you don't want to spectrally smooth (usually because the time > window is already on the short side), so the leakage of a single Slepian is > in that case not desired. > > Robert > > > > > On 18 Dec 2010, at 1:13, Ingrid Nieuwenhuis wrote: > >> Dear David, >> >> The Slepian tapers are sets of multiple (orthogonal) tapers, that only >> combined accomplish this "optimally maximized frequency resolution while >> minimizing leakage from distant frequencies". If you use only a single >> taper, the Slepian taper is suboptimal compared to the Hanning taper. I've >> attached some teaching slides I have with some background on multitapers. >> >> Hope this helps, >> Cheers, >> Ingrid >> >> >> On 12/16/2010 6:01 AM, David Groppe wrote: >>> >>> Hi Fieldtripians, >>>   Could anyone explain to me when, if ever, it would be better to >>> perform a DFT with a Hann taper vs. a single Slepian taper?  It was my >>> understanding that Slepian tapers in general optimally maximized >>> frequency resolution while minimizing leakage from distant >>> frequencies.  However, a colleague of mine says he was told at a >>> workshop at the Donders Institute that a Hann taper was better than a >>> single Slepian taper (if you are only going to use one taper). >>>       thanks for your help, >>>            -David >>> >> >> -- >> Ingrid Nieuwenhuis PhD >> Sleep and Neuroimaging Laboratory >> Department of Psychology >> University of California, Berkeley >> California 94720-1650 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- David Groppe, Ph.D. dgroppe at cogsci.ucsd.edu http://www.cogsci.ucsd.edu/~dgroppe/ From TAVABIK at email.chop.edu Mon Dec 20 22:46:48 2010 From: TAVABIK at email.chop.edu (Tavabi, Kambiz) Date: Mon, 20 Dec 2010 16:46:48 -0500 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl>, <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> Message-ID: Greetings - where can I find a description of the output items for ft_freqstatistics? Or atleast the essential fields necessary for sensibly plotting results of the cluster permutation routine? -K. ------------------------------------------------------------- Kambiz Tavabi PhD Biomedical Imaging Laboratory The Children's Hospital of Philadelphia 34th Street and Civic Center Boulevard Philadelphia, Pa. 19104 Tel: 267.426.0302 email: tavabik at email.chop.edu ------------------------------------------------------------- ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] Sent: Thursday, December 16, 2010 4:48 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) hi kambiz, did you look at the actual p-values of you clusters? the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. good luck, n On 16.12.2010, at 09:21, Eric Maris wrote: > Kambiz, > >>> Have a look at the (channel,frequency)-specific paired t-tests. >> I am not sure exactly what you mean. By 'specific' do you mean sample >> wise testing in a narrow frequency range? > > Sorry, I forgot that you have time resolution. I mean the > (channel,time,frequency)-specific paired t-tests, which are in the output of > freqstatistics. > > > Best, > > Eric > > >> >> -K. >> ------------------------------------------------------------- >> Kambiz Tavabi PhD >> Biomedical Imaging Laboratory >> The Children's Hospital of Philadelphia >> 34th Street and Civic Center Boulevard >> Philadelphia, Pa. 19104 >> Tel: 267.426.0302 >> email: tavabik at email.chop.edu >> ------------------------------------------------------------- >> ________________________________________ >> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >> Sent: Wednesday, December 15, 2010 5:36 PM >> To: 'Email discussion list for the FieldTrip project' >> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >> >> Dear Kambiz, >> >> >>> Greetings Fieldstrippers >> >> "Fieldtrippers" may have connotations that a scientist does not always >> appreciate, but what to think of "Fieldstrippers"? >> >>> My problem with the results in the attachment is that in the grand >>> averages there is an obvious event related desynchrony (cold colors, >>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>> doesn't get picked up, but the small blip of noise/event-related >>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>> as different between conditions by the permutations! >> >> Have a look at the (channel,frequency)-specific paired t-tests. Do >> these >> detect the big cold blob? If not, the variance across subjects is >> probably >> large. >> >> >> Best, >> >> Eric Maris >> >> >> >> >> >> >> To carry out the >>> permutations I used >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistic = 'maxsum'; >>> cfg.neighbours = [ ]; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.05; >>> cfg.numrandomization = 500; >>> So I presume that the result is not due to a signs (pos/neg values) >>> issue, if I am using a two-tailed test. Changing cfg.tail & >>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>> results in errors. Basically, I'd appreciate if someone, based on >> what >>> is observable in the grand averages, could confirm that the >> permutation >>> result makes sense? And if not then some advice on what I am doing >>> wrong. Thank you. -Kambiz >>> >>> -K. >>> ------------------------------------------------------------ >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> 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 inieuwenhuis at berkeley.edu Tue Dec 21 08:20:55 2010 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 20 Dec 2010 23:20:55 -0800 Subject: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) In-Reply-To: References: <001801cb9ca8$7fcb9bc0$7f62d340$%maris@donders.ru.nl> <001c01cb9cfa$4901e890$db05b9b0$%maris@donders.ru.nl>, <72DBB133-C441-4F44-B50A-2FD161B8BF63@mac.com> Message-ID: <4D105557.9030903@berkeley.edu> Hi Kambiz, I don't fully understand your question. Do you want to know what the fields mean that come out of ft_freqstatistics, or did you hacked some output, and want to know how to make the file in a way that FieldTrip can plot it? In either case, check out this tutorial: "Cluster-based permutation tests on time-frequency data" http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq Here you can find description of ft_freqstatistics with the cluster permutation routine, and it points to where you can find output items for ft_freqstatistics on the ftp server "The output can also be obtained from ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/cluster_permutation_freq/stat_freq_planar_FICvsFC.mat." Hope this helps, Ingrid Ingrid Nieuwenhuis PhD Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 On 20-12-2010 13:46, Tavabi, Kambiz wrote: > Greetings - where can I find a description of the output items for ft_freqstatistics? Or atleast the essential fields necessary for sensibly plotting results of the cluster permutation routine? > -K. > ------------------------------------------------------------- > Kambiz Tavabi PhD > Biomedical Imaging Laboratory > The Children's Hospital of Philadelphia > 34th Street and Civic Center Boulevard > Philadelphia, Pa. 19104 > Tel: 267.426.0302 > email: tavabik at email.chop.edu > ------------------------------------------------------------- > ________________________________________ > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of Nathan Weisz [nathanweisz at mac.com] > Sent: Thursday, December 16, 2010 4:48 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) > > hi kambiz, > > did you look at the actual p-values of you clusters? > > the code that you posted plots only the positive cluster (doesn't mean it's significant). so it's no surprise that you don't see a blue blob, because you masked it. look at data structure and there should also be a field 'negclusters' and a 'negclusterlabelmat'. > > good luck, > n > > On 16.12.2010, at 09:21, Eric Maris wrote: > >> Kambiz, >> >>>> Have a look at the (channel,frequency)-specific paired t-tests. >>> I am not sure exactly what you mean. By 'specific' do you mean sample >>> wise testing in a narrow frequency range? >> Sorry, I forgot that you have time resolution. I mean the >> (channel,time,frequency)-specific paired t-tests, which are in the output of >> freqstatistics. >> >> >> Best, >> >> Eric >> >> >>> -K. >>> ------------------------------------------------------------- >>> Kambiz Tavabi PhD >>> Biomedical Imaging Laboratory >>> The Children's Hospital of Philadelphia >>> 34th Street and Civic Center Boulevard >>> Philadelphia, Pa. 19104 >>> Tel: 267.426.0302 >>> email: tavabik at email.chop.edu >>> ------------------------------------------------------------- >>> ________________________________________ >>> From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] >>> On Behalf Of Eric Maris [e.maris at donders.ru.nl] >>> Sent: Wednesday, December 15, 2010 5:36 PM >>> To: 'Email discussion list for the FieldTrip project' >>> Subject: Re: [FieldTrip] MEG Time-Frequency testing (ft_freqstatistics) >>> >>> Dear Kambiz, >>> >>> >>>> Greetings Fieldstrippers >>> "Fieldtrippers" may have connotations that a scientist does not always >>> appreciate, but what to think of "Fieldstrippers"? >>> >>>> My problem with the results in the attachment is that in the grand >>>> averages there is an obvious event related desynchrony (cold colors, >>>> negative values) difference between 0.4-0.8sec; 10-40hz which somehow >>>> doesn't get picked up, but the small blip of noise/event-related >>>> synchrony (hot colors, positive values) c. 0.5sec at 50Hz is revealed >>>> as different between conditions by the permutations! >>> Have a look at the (channel,frequency)-specific paired t-tests. Do >>> these >>> detect the big cold blob? If not, the variance across subjects is >>> probably >>> large. >>> >>> >>> Best, >>> >>> Eric Maris >>> >>> >>> >>> >>> >>> >>> To carry out the >>>> permutations I used >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'depsamplesT'; >>>> cfg.correctm = 'cluster'; >>>> cfg.clusteralpha = 0.05; >>>> cfg.clusterstatistic = 'maxsum'; >>>> cfg.neighbours = [ ]; >>>> cfg.tail = 0; >>>> cfg.clustertail = 0; >>>> cfg.alpha = 0.05; >>>> cfg.numrandomization = 500; >>>> So I presume that the result is not due to a signs (pos/neg values) >>>> issue, if I am using a two-tailed test. Changing cfg.tail& >>>> cfg.clustertail to 1 makes little to no difference, and a value of -1 >>>> results in errors. Basically, I'd appreciate if someone, based on >>> what >>>> is observable in the grand averages, could confirm that the >>> permutation >>>> result makes sense? And if not then some advice on what I am doing >>>> wrong. Thank you. -Kambiz >>>> >>>> -K. >>>> ------------------------------------------------------------ >>>> Kambiz Tavabi PhD >>>> Biomedical Imaging Laboratory >>>> The Children's Hospital of Philadelphia >>>> 34th Street and Civic Center Boulevard >>>> Philadelphia, Pa. 19104 >>>> Tel: 267.426.0302 >>>> email: tavabik at email.chop.edu >>>> ------------------------------------------------------------ >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hanneke.meeren at uvt.nl Wed Dec 29 16:25:49 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Wed, 29 Dec 2010 16:25:49 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293636349.6d2a46cHkmeeren@atommail.uvt.nl> Hi, I would like to perform cluster-based permutation tests on MNE-surface data, which I obtained using the MNE/Freesurfer pipeline. So rather than use the whole FT pipeline and start from scratch, I would like to import my existing source data into FieldTrip, and export the resulting stats to my own matlab visualization tools. Reading the tutorial and reference documentation I understand that I could directly call ft_sourcestatistics, but it is not clear to me what the exact data structure should be for the source data and which fields the cfg should contain. I could not find a tutorial- or example dataset for ft_sourcestatistics. For each condition I have the source data in a (subjects x vertices x time) 3d-array for each condition. Is it possible to have a time-dimension in the source-data, or should I first convert to a two-dimensional array subjects x vertices? In addition I have generated a location matrix which contains the x, y, z - coordinates of the vertices of my surface, which I presume is necessary to define neighbors. It is however not clear to me how to pass the location matrix to the function (should it be defined in a cfg field?). I have also tried to search the archives of the discussion list but was unable to find any messages before December 2010. Does anyone have an example dataset available that can be used as input dataset for sourcestatistics, so I can see what the structure of the data should be? Could someone clarify how I should define the location data? Could someone help me out on how to search through the old messages in the discussion list archives. Any help is greatly appreciated, Thanks a lot in advance, Hanneke ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From hanneke.meeren at uvt.nl Thu Dec 30 00:14:52 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 00:14:52 +0100 Subject: [FieldTrip] Fw: Re: cluster-based permutation tests on MNE-surface data Message-ID: <1293664492.71b8c54Hkmeeren@atommail.uvt.nl> message from Jan-Mathijs forwarded to the list... ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl -------------- next part -------------- An embedded message was scrubbed... From: jan-mathijs schoffelen Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Date: Wed, 29 Dec 2010 16:43:42 +0100 Size: 6246 URL: From hanneke.meeren at uvt.nl Thu Dec 30 00:18:04 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 00:18:04 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> Dear Jan-Mathijs, Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. Best regards, Hanneke -----Original Message----- From: jan-mathijs schoffelen To: hanneke.meeren at uvt.nl Date: Wed, 29 Dec 2010 16:43:42 +0100 Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Hi Hanneke, Performing cluster based statistics on source reconstructed data based on a cortical sheet is as of yet not supported (I assume at least that you do the standard MNE cortical sheet reconstruction). At the moment, we are actually working on implementing an MNE-like pipeline in FieldTrip.Our first strategy would be to interpolate the 2D sheets onto a 3D volume, and use the standard machinery for statistics. Yet, another viable approach indeed would be to build in support for 2D- neighbourhood structures. Do you have any clear ideas on that? I would also be interested to see your recipe to warp the individual cortical sheets to a template. Regarding the mailing list: the list is hosted on a new server since the beginning of December. Apparently the archives have not been moved along, or at least are not accessible. We'll look into this. Best wishes, Jan-Mathijs PS: could you forward this message to the list; I am at home and cannot send mails from my regular account. On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > Hi, > > I would like to perform cluster-based permutation tests on MNE- > surface data, which I obtained using the MNE/Freesurfer pipeline. So > rather than use the whole FT pipeline and start from scratch, I > would like to import my existing source data into FieldTrip, and > export the resulting stats to my own matlab visualization tools. > Reading the tutorial and reference documentation I understand that I > could directly call ft_sourcestatistics, but it is not clear to me > what the exact data structure should be for the source data and > which fields the cfg should contain. I could not find a tutorial- or > example dataset for ft_sourcestatistics. > > For each condition I have the source data in a (subjects x vertices > x time) 3d-array for each condition. Is it possible to have a time- > dimension in the source-data, or should I first convert to a two- > dimensional array subjects x vertices? In addition I have generated > a location matrix which contains the x, y, z - coordinates of the > vertices of my surface, which I presume is necessary to define > neighbors. It is however not clear to me how to pass the location > matrix to the function (should it be defined in a cfg field?). I > have also tried to search the archives of the discussion list but > was unable to find any messages before December 2010. > > Does anyone have an example dataset available that can be used as > input dataset for sourcestatistics, so I can see what the structure > of the data should be? Could someone clarify how I should define the > location data? Could someone help me out on how to search through > the old messages in the discussion list archives. > > Any help is greatly appreciated, > > Thanks a lot in advance, > > Hanneke > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl From smoratti at psi.ucm.es Thu Dec 30 10:12:43 2010 From: smoratti at psi.ucm.es (Stephan Moratti) Date: Thu, 30 Dec 2010 10:12:43 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data In-Reply-To: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> References: <1293664684.71b8c54Hkmeeren@atommail.uvt.nl> Message-ID: Dear Hanneke, Actually I do this kind of analysis using the MNE solution from the Brainstrom pipeline. I do the following. First you have to determine a connectivity matrix that determines which vertices of your cortical mesh are neighbors. I do that with a brainstrom script called tess_vertices_connectivity.m. You can download brainstrom for free. Let's call the connectivity matrix C. If C(i,j) = 1 then vertices i and j are connected, if C(i,j) = 0, then not. Later I changed the clusterstat.m of FT a little bit: lines 38 to 48 I changed: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) && ~isfield(cfg,'connectivity') channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; elseif isfield(cfg, 'connectivity') disp('Using precomputed connectivity matrix !'); channeighbstructmat = cfg.connectivity; % connectivity has been already computed this is what I introduced issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end By doing so, FT does not calculate a connectivity matrix based on distance, but using directly your connectivity matrix C (see below): The next trick is to create a FT data structure from your MNE data, so that you can use ft_timelockstatistics.m. As a cortical mesh has the same 3d coordinates as a sensor helmet, I "press" my MNE surface data in a sensor data structure that I can use later with ft_timelockstatistic.m. This could look like this: MneERF1.grad.pnt=brain.vert; %brain.vert contains the vertices of my cortical mesh; be sure that the unit is cm for i = 1:7000 MneERF1.label{i}=sprintf('A%g',i); end MneERF1.grad.label = MneERF1.label; MneERF1.grad.tra = eye(7000); MneERF1.cfg.channel = UmneERF1.label; MneERF1.grad.ori = zeros(7000,3); for i = 1:23 MneERF1.individual(i,:,:) = squeeze(MNEsolution(:,i,:)); % Here I put the individual MNE solutions if I have 23 subjects; this depends a little bit of your data matrix end MneERF1.dimord= 'subj_chan_time; Now you can use timelockstatistic.m as described in the FT tutorial on sensor space data to calculate a non-parametric cluster based permutation statistic on your MNE surface data (for example MneERF1, MneERF2 are two conditions that you want to compare). The only difference is that you would introduce cfg.connectivity = C;, so that later clusterstat.m uses your C matrix to determine your neighbours. I hope that helps, Best, Stephan El 30/12/2010, a las 00:18, Meeren.H.K.M. escribió: > Dear Jan-Mathijs, > > Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE > (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. > > Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. > > Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. > > It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. > > Best regards, > > Hanneke > > > -----Original Message----- > From: jan-mathijs schoffelen > To: hanneke.meeren at uvt.nl > Date: Wed, 29 Dec 2010 16:43:42 +0100 > Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data > > Hi Hanneke, > > Performing cluster based statistics on source reconstructed data based > on a cortical sheet is as of yet not supported (I assume at least that > you do the standard MNE cortical sheet reconstruction). At the moment, > we are actually working on implementing an MNE-like pipeline in > FieldTrip.Our first strategy would be to interpolate the 2D sheets > onto a 3D volume, and use the standard machinery for statistics. Yet, > another viable approach indeed would be to build in support for 2D- > neighbourhood structures. Do you have any clear ideas on that? I would > also be interested to see your recipe to warp the individual cortical > sheets to a template. > > Regarding the mailing list: the list is hosted on a new server since > the beginning of December. Apparently the archives have not been moved > along, or at least are not accessible. We'll look into this. > > Best wishes, > > Jan-Mathijs > > PS: could you forward this message to the list; I am at home and > cannot send mails from my regular account. > > > > On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > >> Hi, >> >> I would like to perform cluster-based permutation tests on MNE- >> surface data, which I obtained using the MNE/Freesurfer pipeline. So >> rather than use the whole FT pipeline and start from scratch, I >> would like to import my existing source data into FieldTrip, and >> export the resulting stats to my own matlab visualization tools. >> Reading the tutorial and reference documentation I understand that I >> could directly call ft_sourcestatistics, but it is not clear to me >> what the exact data structure should be for the source data and >> which fields the cfg should contain. I could not find a tutorial- or >> example dataset for ft_sourcestatistics. >> >> For each condition I have the source data in a (subjects x vertices >> x time) 3d-array for each condition. Is it possible to have a time- >> dimension in the source-data, or should I first convert to a two- >> dimensional array subjects x vertices? In addition I have generated >> a location matrix which contains the x, y, z - coordinates of the >> vertices of my surface, which I presume is necessary to define >> neighbors. It is however not clear to me how to pass the location >> matrix to the function (should it be defined in a cfg field?). I >> have also tried to search the archives of the discussion list but >> was unable to find any messages before December 2010. >> >> Does anyone have an example dataset available that can be used as >> input dataset for sourcestatistics, so I can see what the structure >> of the data should be? Could someone clarify how I should define the >> location data? Could someone help me out on how to search through >> the old messages in the discussion list archives. >> >> Any help is greatly appreciated, >> >> Thanks a lot in advance, >> >> Hanneke >> >> ---------------------------------- >> Hanneke K.M. Meeren, PhD. >> Research Fellow and Instructor >> Medical Psychology and Cognitive Neuroscience >> Tilburg University >> P.O. Box 90153 >> 5000 LE Tilburg >> The Netherlands >> email: hanneke.meeren at uvt.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.meeren at uvt.nl Thu Dec 30 14:02:23 2010 From: hanneke.meeren at uvt.nl (Meeren.H.K.M. ) Date: Thu, 30 Dec 2010 14:02:23 +0100 Subject: [FieldTrip] cluster-based permutation tests on MNE-surface data Message-ID: <1293714143.6d35b2cHkmeeren@atommail.uvt.nl> Dear Stephan, Thanks a lot for your explanation. I follow your line of reasoning well. I have already done some experimenting with FT_TIMELOCKSTATISTICS, and it seems to do the job, although I have still have to do some double-checking. I have indeed created a FT data structure from my MNE data very similar as the way you describe it. The main difference between you and my mne-data is I guess, that my functional (source) data are not on a cortical mesh. Although my anatomical surface data is a patch with vertices and faces, my source data is not. My source data consists of fixed dipole locations that are actually a subset of the vertices in my surface data. These dipoles each have an x,y,z position in MRI coordinates, but do not have faces or other connectivity-parameters. I guess your tess_vertices_connectivity.m script cannot do the job for a x,y,z position-matrix. So I consider my dipoles as a set of electrodes each having their x,y,z coordinates, and create the neighbourhood-structure with cfg.neigbourdist =5 (I have both my coordinates and distance in mm). Thanks a lot again, Best regards, Hanneke -----Original Message----- From: Stephan Moratti To: Email discussion list for the FieldTrip project Date: Thu, 30 Dec 2010 10:12:43 +0100 Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data Dear Hanneke, Actually I do this kind of analysis using the MNE solution from the Brainstrom pipeline. I do the following. First you have to determine a connectivity matrix that determines which vertices of your cortical mesh are neighbors. I do that with a brainstrom script called tess_vertices_connectivity.m. You can download brainstrom for free. Let's call the connectivity matrix C. If C(i,j) = 1 then vertices i and j are connected, if C(i,j) = 0, then not. Later I changed the clusterstat.m of FT a little bit: lines 38 to 48 I changed: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) && ~isfield(cfg,'connectivity') channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; elseif isfield(cfg, 'connectivity') disp('Using precomputed connectivity matrix !'); channeighbstructmat = cfg.connectivity; % connectivity has been already computed this is what I introduced issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end By doing so, FT does not calculate a connectivity matrix based on distance, but using directly your connectivity matrix C (see below): The next trick is to create a FT data structure from your MNE data, so that you can use ft_timelockstatistics.m. As a cortical mesh has the same 3d coordinates as a sensor helmet, I "press" my MNE surface data in a sensor data structure that I can use later with ft_timelockstatistic.m. This could look like this: MneERF1.grad.pnt=brain.vert; %brain.vert contains the vertices of my cortical mesh; be sure that the unit is cm for i = 1:7000 MneERF1.label{i}=sprintf('A%g',i); end MneERF1.grad.label = MneERF1.label; MneERF1.grad.tra = eye(7000); MneERF1.cfg.channel = UmneERF1.label; MneERF1.grad.ori = zeros(7000,3); for i = 1:23 MneERF1.individual(i,:,:) = squeeze(MNEsolution(:,i,:)); % Here I put the individual MNE solutions if I have 23 subjects; this depends a little bit of your data matrix end MneERF1.dimord= 'subj_chan_time; Now you can use timelockstatistic.m as described in the FT tutorial on sensor space data to calculate a non-parametric cluster based permutation statistic on your MNE surface data (for example MneERF1, MneERF2 are two conditions that you want to compare). The only difference is that you would introduce cfg.connectivity = C;, so that later clusterstat.m uses your C matrix to determine your neighbours. I hope that helps, Best, Stephan El 30/12/2010, a las 00:18, Meeren.H.K.M. escribió: > Dear Jan-Mathijs, > > Thank you for your quick answer. I have used the MNE/mne_analyze stream developed by Matti Hamalainen which implements the anatomically-constrained noise-normalized MNE > (Dale et al.2000). The spatial structure of the data is indeed the cortical sheet segmented and reconstructed using Freesurfer. The individual cortical sheets were morphed onto each other using Matti's mne-stream which performs intersubject alignment of cortical landmarks based on a spherical surface-based coordinate system according to the method of Fischl et al. (1999, Hum. Brain Mapping 8:272–284). I it makes use of a Freesurfer algorithm. > > Although the cortical sheet can functionally be considered as a folded 2D-sheet, computation-wise it is a 3D-patch of vertices, with each vertex having an x, y and z-coordinate, being the positions of the dipoles. I presume FT_SOURCESTATISTICS uses a 3D-voxel-grid, with the neighbors of each voxel being automatically defined on the basis of this grid (?). The trick would be then to translate the 3D-patch into a 3D-grid..., or not? No, I haven't thought of it yet how to do this. Also I don't know in which field and which format I should put the spatial info.. > > Alternatively, I was wondering whether I could work my way around it by using FT_TIMELOCKSTATISTICS instead and to consider the vertices as a set of (intracranial) electrodes with their x,y,z coordinates (and their time-course!). For the spatial clustering I would need to generate a neighborhood-structure. I don't know, however, how I should exactly pass the vertex positions info to the function. Using cfg.elec or cfg.elecfile, or data.elec, but it is not clear to me what should be the exact format of the structure. It is also not clear to me whether it is necessary to give each vertex a label (in which field should I put this?), or whether only setting cfg.neigbourdist would do the trick. > > It would be very helpful to have an example EEG input dataset for FT_TIMELOCKSTATISTICS and an example input dataset for FT_SOURCESTATISTICS to see what the exact format of the data should be! I couldn't find either of them in the tutorial. > > Best regards, > > Hanneke > > > -----Original Message----- > From: jan-mathijs schoffelen > To: hanneke.meeren at uvt.nl > Date: Wed, 29 Dec 2010 16:43:42 +0100 > Subject: Re: [FieldTrip] cluster-based permutation tests on MNE-surface data > > Hi Hanneke, > > Performing cluster based statistics on source reconstructed data based > on a cortical sheet is as of yet not supported (I assume at least that > you do the standard MNE cortical sheet reconstruction). At the moment, > we are actually working on implementing an MNE-like pipeline in > FieldTrip.Our first strategy would be to interpolate the 2D sheets > onto a 3D volume, and use the standard machinery for statistics. Yet, > another viable approach indeed would be to build in support for 2D- > neighbourhood structures. Do you have any clear ideas on that? I would > also be interested to see your recipe to warp the individual cortical > sheets to a template. > > Regarding the mailing list: the list is hosted on a new server since > the beginning of December. Apparently the archives have not been moved > along, or at least are not accessible. We'll look into this. > > Best wishes, > > Jan-Mathijs > > PS: could you forward this message to the list; I am at home and > cannot send mails from my regular account. > > > > On Dec 29, 2010, at 4:25 PM, Meeren.H.K.M. wrote: > >> Hi, >> >> I would like to perform cluster-based permutation tests on MNE- >> surface data, which I obtained using the MNE/Freesurfer pipeline. So >> rather than use the whole FT pipeline and start from scratch, I >> would like to import my existing source data into FieldTrip, and >> export the resulting stats to my own matlab visualization tools. >> Reading the tutorial and reference documentation I understand that I >> could directly call ft_sourcestatistics, but it is not clear to me >> what the exact data structure should be for the source data and >> which fields the cfg should contain. I could not find a tutorial- or >> example dataset for ft_sourcestatistics. >> >> For each condition I have the source data in a (subjects x vertices >> x time) 3d-array for each condition. Is it possible to have a time- >> dimension in the source-data, or should I first convert to a two- >> dimensional array subjects x vertices? In addition I have generated >> a location matrix which contains the x, y, z - coordinates of the >> vertices of my surface, which I presume is necessary to define >> neighbors. It is however not clear to me how to pass the location >> matrix to the function (should it be defined in a cfg field?). I >> have also tried to search the archives of the discussion list but >> was unable to find any messages before December 2010. >> >> Does anyone have an example dataset available that can be used as >> input dataset for sourcestatistics, so I can see what the structure >> of the data should be? Could someone clarify how I should define the >> location data? Could someone help me out on how to search through >> the old messages in the discussion list archives. >> >> Any help is greatly appreciated, >> >> Thanks a lot in advance, >> >> Hanneke >> >> ---------------------------------- >> Hanneke K.M. Meeren, PhD. >> Research Fellow and Instructor >> Medical Psychology and Cognitive Neuroscience >> Tilburg University >> P.O. Box 90153 >> 5000 LE Tilburg >> The Netherlands >> email: hanneke.meeren at uvt.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > ---------------------------------- > Hanneke K.M. Meeren, PhD. > Research Fellow and Instructor > Medical Psychology and Cognitive Neuroscience > Tilburg University > P.O. Box 90153 > 5000 LE Tilburg > The Netherlands > email: hanneke.meeren at uvt.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Department of Basic Psychology Universidad Complutense de Madrid Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: smoratti at psi.ucm.es Tel.: +34 91 394 2186 Fax.: +34 91 394 2294 ---------------------------------- Hanneke K.M. Meeren, PhD. Research Fellow and Instructor Medical Psychology and Cognitive Neuroscience Tilburg University P.O. Box 90153 5000 LE Tilburg The Netherlands email: hanneke.meeren at uvt.nl