From Ingmar.Schneider at BIO.UNI-GIESSEN.DE Mon Feb 2 14:00:17 2009 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Mon, 2 Feb 2009 14:00:17 +0100 Subject: Activation vs. baseline testing Message-ID: Dear listusers, I am currently programming a script for the activation vs. baseline testing of MEG-data. As far as I can see from the fieldtrip documentation there are two functions incorporated (clusterrandanalysis and freqstatistics) that allow to compute such a test. It seems to me that both have a quite broad intersection of function. Do these functions differ in any way? Best regards, Ingmar -- Ingmar Schneider Max-Planck-Institut für Hirnforschung Deutschordenstraße 46 D-60528 Frankfurt/Main Tel.: 069/6301-83221 Fax: 069/96769-327 Mail1: schneider at mpih-frankfurt.mpg.de Mail2: ingmar.schneider at bio.uni-giessen.de ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 2 14:19:41 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 2 Feb 2009 13:19:41 +0000 Subject: Activation vs. baseline testing In-Reply-To: <20090202140017.zbjd8gyqs4k8ggg0@imap.stud.uni-giessen.de> Message-ID: Dear Ingmar, clusterrandanalysis is the original implementation of cluster-based statistical testing in FIeldtrip whereas freqstatistics is a newer and more well structured and flexible implementation. If you are just getting started, use freqstatistics. Best, Vladimir On Mon, Feb 2, 2009 at 1:00 PM, Ingmar Schneider wrote: > Dear listusers, > > I am currently programming a script for the activation vs. baseline testing > of MEG-data. As far as I can see from the fieldtrip documentation there are > two functions incorporated (clusterrandanalysis and freqstatistics) that > allow to compute such a test. It seems to me that both have a quite broad > intersection of function. > > Do these functions differ in any way? > > Best regards, > Ingmar > > -- > Ingmar Schneider > > Max-Planck-Institut für Hirnforschung > Deutschordenstraße 46 > D-60528 Frankfurt/Main > > Tel.: 069/6301-83221 > Fax: 069/96769-327 > Mail1: schneider at mpih-frankfurt.mpg.de > Mail2: ingmar.schneider at bio.uni-giessen.de > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ---------------------------------- > 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/fcdonders/fieldtrip. > > ---------------------------------- 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/fcdonders/fieldtrip. From Ingmar.Schneider at BIO.UNI-GIESSEN.DE Mon Feb 2 14:50:14 2009 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Mon, 2 Feb 2009 14:50:14 +0100 Subject: Activation vs. baseline testing In-Reply-To: Message-ID: Dear Vladimir, thanks for your quick reply. I assumed that from the documentation, but as I am not an expert on statistics and could not determine obvious functional differences I thought it best to ask. Best regards, Ingmar Quoting Vladimir Litvak : > Dear Ingmar, > > clusterrandanalysis is the original implementation of cluster-based > statistical testing in FIeldtrip whereas freqstatistics is a newer and > more well structured and flexible implementation. If you are just > getting started, use freqstatistics. > > Best, > > Vladimir > > > On Mon, Feb 2, 2009 at 1:00 PM, Ingmar Schneider > wrote: >> Dear listusers, >> >> I am currently programming a script for the activation vs. baseline testing >> of MEG-data. As far as I can see from the fieldtrip documentation there are >> two functions incorporated (clusterrandanalysis and freqstatistics) that >> allow to compute such a test. It seems to me that both have a quite broad >> intersection of function. >> >> Do these functions differ in any way? >> >> Best regards, >> Ingmar >> >> -- >> Ingmar Schneider >> >> Max-Planck-Institut für Hirnforschung >> Deutschordenstraße 46 >> D-60528 Frankfurt/Main >> >> Tel.: 069/6301-83221 >> Fax: 069/96769-327 >> Mail1: schneider at mpih-frankfurt.mpg.de >> Mail2: ingmar.schneider at bio.uni-giessen.de >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> >> > > ---------------------------------- > 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/fcdonders/fieldtrip. > -- Ingmar Schneider Max-Planck-Institut für Hirnforschung Deutschordenstraße 46 D-60528 Frankfurt/Main Tel.: 069/6301-83221 Fax: 069/96769-327 Mail1: schneider at mpih-frankfurt.mpg.de Mail2: ingmar.schneider at bio.uni-giessen.de ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- 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/fcdonders/fieldtrip. From e.maris at DONDERS.RU.NL Mon Feb 2 16:47:20 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 2 Feb 2009 16:47:20 +0100 Subject: Activation vs. baseline testing In-Reply-To: <20090202140017.zbjd8gyqs4k8ggg0@imap.stud.uni-giessen.de> Message-ID: Dear Ingmar, > I am currently programming a script for the activation vs. baseline > testing of MEG-data. As far as I can see from the fieldtrip > documentation there are two functions incorporated > (clusterrandanalysis and freqstatistics) that allow to compute such a > test. It seems to me that both have a quite broad intersection of > function. > > Do these functions differ in any way? They should provide the same output. If they don't, let me know. Good luck, Eric Maris > > Best regards, > Ingmar > > -- > Ingmar Schneider > > Max-Planck-Institut für Hirnforschung > Deutschordenstraße 46 > D-60528 Frankfurt/Main > > Tel.: 069/6301-83221 > Fax: 069/96769-327 > Mail1: schneider at mpih-frankfurt.mpg.de > Mail2: ingmar.schneider at bio.uni-giessen.de > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Feb 2 18:28:10 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 2 Feb 2009 18:28:10 +0100 Subject: Lambda Message-ID: Dear users, i'm using the function sourceanaylis, which is the meaning of the lambda parameter? my results change a lot depending on the value i use, so i would like to know in which way i should choose this value. thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue Feb 3 12:11:56 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 3 Feb 2009 12:11:56 +0100 Subject: Lambda Message-ID: Hi Marco, in a nutshell the effect of the lambda parameter is to smoothe your solution in space, it also makes it more stable in the presence of noise. You might know that the estimation of the covariance matrix for beamforming requires quite a lot of data. CTF/VSM (a MEG manufacturer) used to suggest to have your data satisfy the following relationship: 3000 < BW[Hz] * #trials *EffectLength[s] Where BW[Hz] is the bandwidth of your effect of interest in Hz, #trials is the number of trials that contain that effect, and EffectLength[s] is the length of your effect in seconds (NOT ms!). Here's an example: You have an effect between 30 and 60Hz, so the bandwidth of that effect is 30Hz. The effect is visible (say at the electrode level) for 400ms=0.4s in each trial. Now you calculate the number of trials to be: #trials > 3000 / ( BW[Hz] * EffectLength[s]) = 3000/(0.4*30)= 250. This means that you would need 250 artifact free, valid trials. Choosing a larger lambda can help to reduce the amount of data necessary, but you get a more smeared out solution. A good introduction and simulation results for various values of lambda can be found in: Neuroimage. 2008 Feb 15;39(4):1788-802. Epub 2007 Oct 10 Optimising experimental design for MEG beamformer imaging. Brookes MJ, Vrba J, Robinson SE, Stevenson CM, Peters AM, Barnes GR, Hillebrand A, Morris PG. Hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "Marco SPERDUTI" > Gesendet: 02.02.09 18:28:50 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] Lambda > Dear users, > > i'm using the function sourceanaylis, which is the meaning of the > lambda parameter? > > my results change a lot depending on the value i use, so i would like > to know in which way i should choose this value. > > thank you, > > Marco > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Tue Feb 3 12:11:59 2009 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Tue, 3 Feb 2009 11:11:59 +0000 Subject: Lambda In-Reply-To: <890983272@web.de> Message-ID: Thanks for your message. I am away until Monday 9th February. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Tue Feb 3 14:53:06 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Tue, 3 Feb 2009 14:53:06 +0100 Subject: Lambda In-Reply-To: <890983272@web.de> Message-ID: Thank you Michael, Marco Quoting Michael Wibral : > Hi Marco, > > in a nutshell the effect of the lambda parameter is to smoothe your > solution in space, it also makes it more stable in the presence of > noise. You might know that the estimation of the covariance matrix > for beamforming requires quite a lot of data. CTF/VSM (a MEG > manufacturer) used to suggest to have your data satisfy the > following relationship: > > 3000 < BW[Hz] * #trials *EffectLength[s] > > Where BW[Hz] is the bandwidth of your effect of interest in Hz, > #trials is the number of trials that contain that effect, and > EffectLength[s] is the length of your effect in seconds (NOT ms!). > Here's an example: You have an effect between 30 and 60Hz, so the > bandwidth of that effect is 30Hz. The effect is visible (say at the > electrode level) for 400ms=0.4s in each trial. Now you calculate the > number of trials to be: > #trials > 3000 / ( BW[Hz] * EffectLength[s]) = 3000/(0.4*30)= 250. > This means that you would need 250 artifact free, valid trials. > Choosing a larger lambda can help to reduce the amount of data > necessary, but you get a more smeared out solution. > > A good introduction and simulation results for various values of > lambda can be found in: > > Neuroimage. 2008 Feb 15;39(4):1788-802. Epub 2007 Oct 10 > Optimising experimental design for MEG beamformer imaging. > Brookes MJ, Vrba J, Robinson SE, Stevenson CM, Peters AM, Barnes GR, > Hillebrand A, Morris PG. > > > Hope this helps, > Michael > >> -----Ursprüngliche Nachricht----- >> Von: "Marco SPERDUTI" >> Gesendet: 02.02.09 18:28:50 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: [FIELDTRIP] Lambda > > >> Dear users, >> >> i'm using the function sourceanaylis, which is the meaning of the >> lambda parameter? >> >> my results change a lot depending on the value i use, so i would like >> to know in which way i should choose this value. >> >> thank you, >> >> Marco >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From tobias.donner at NYU.EDU Tue Feb 3 17:20:45 2009 From: tobias.donner at NYU.EDU (Tobias Donner) Date: Tue, 3 Feb 2009 11:20:45 -0500 Subject: Research Assistant Position in Cognitive Neuroscience at NYU Message-ID: Research Assistant Position in Cognitive Neuroscience Department of Neurology, School of Medicine, New York University We are seeking a full-time Research Assistant to assist with cognitive neuroscience experiments involving human intracranial EEG. Main topics of investigation are language, memory, multisensory, brain-computer interface, seizures and others. Responsibilities include, but are not limited to, recruiting and scheduling of control subjects and patients, testing and recording from intracranial patients, maintenance of equipment, databases and files, as well as data analysis and manuscript preparation. Candidates who have experience with neuroimaging data collection and analysis are especially encouraged to apply. Other neuroimaging methods employed by the lab include fMRI and MEG. The laboratory provides a unique exposure to both basic research and clinical neuroscience. The position requires interaction with patients and hospital staff and therefore excellent verbal and interpersonal skills are required. Must be well-organized and detail oriented; extensive computer experience strongly preferred, with programming highly desirable. B.A. or B.S. required, such as in neuroscience, psychology, biology, computer science or biomedical engineering. The position is ideal for exceptional candidates seeking to pursue an advanced research degree in neuroscience or a related field. Likely start date is June 2009. Please visit our web lab page for more information: http:// mmil.ucsd.edu/thomas/group Please send resume and cover letter to: Thomas Thesen, Ph.D. Assistant Professor of Neurology New York University School of Medicine thomas.thesen at med.nyu.edu ---------------------------------- 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/fcdonders/fieldtrip. From florisdelange at GMAIL.COM Wed Feb 4 12:50:50 2009 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Wed, 4 Feb 2009 12:50:50 +0100 Subject: question about lcmv beamforming Message-ID: Dear Fieldtrippers, I have a question about the beamforming procedure, which I'm carrying out in the time-domain using LCMV. The strange thing I run into is that irrespective of what data I feed the function, I get the same inverse solution (with sourceanalysis.m). I first calculate the forward model and discretize it in a grid, using these lines: [vol,cfg]=prepare_singleshell([],segmentedmriF); (..) [grid] = prepare_leadfield(cfg); Then, I run the source-analysis as follows: data = {}; for t = 1:6 % six epochs of 50 ms data{t} = mradata{2}; data{t}.avg = data{t}.avg(:,(t-1)*30+1:t*30); data{t}.time = [1:30]; cfg = []; cfg.method = 'lcmv'; cfg.projectnoise = 'yes'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; cfg.lambda = 0; %1e-29; sourcet{t} = sourceanalysis(cfg,data{t}); end I checked, and the data-avg fields from different time-windows are (substantially) different from each other; while the avg.pow-values in sourcet from different time-windows are numerically identical. I don't understand how different data on the sensor-level can lead to identical source-reconstructions. But when I look in beamformer_lcmv.m, I see this line: dipout.pow(i) = trace(filt * Cy * ctranspose(filt)); suggesting that the power at each voxel is a function only of the spatial filter and covariance matrix? Does this make sense? Any input very much appreciated! Best wishes, Floris -- Floris de Lange http://www.florisdelange.com ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 4 14:42:01 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 4 Feb 2009 14:42:01 +0100 Subject: question about lcmv beamforming In-Reply-To: <9fb563140902040350x1ff447fdp5a29229e6cd05ef@mail.gmail.com> Message-ID: Hi Floris, On 4 Feb 2009, at 12:50, Floris de Lange wrote: > I have a question about the beamforming procedure, which I'm carrying > out in the time-domain using LCMV. > The strange thing I run into is that irrespective of what data I feed > the function, I get the same inverse solution (with sourceanalysis.m). [...] > Then, I run the source-analysis as follows: > data = {}; > for t = 1:6 % six epochs of 50 ms > data{t} = mradata{2}; > data{t}.avg = data{t}.avg(:,(t-1)*30+1:t*30); > data{t}.time = [1:30]; you might want to do these few lines above using the redefinetrial function prior to the timelockanalysis. But that is not related to your question. > cfg = []; > cfg.method = 'lcmv'; > cfg.projectnoise = 'yes'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > cfg.lambda = 0; %1e-29; > sourcet{t} = sourceanalysis(cfg,data{t}); > end > > I checked, and the data-avg fields from different time-windows are > (substantially) different from each other; while the avg.pow-values in > sourcet from different time-windows are numerically identical. The power in LCMV beamforming is computed based on the data covariance in your timelocked data structure. You are making subselections from the average ERF, but the data covariance is not based on those subselections. > I don't understand how different data on the sensor-level can lead to > identical source-reconstructions. But when I look in > beamformer_lcmv.m, I see this line: > dipout.pow(i) = trace(filt * Cy * ctranspose(filt)); > suggesting that the power at each voxel is a function only of the > spatial filter and covariance matrix? Does this make sense? The spatial filter is estimated from the data covariance, which in your 6 estimates is the same. The power at a certain dipole location is also estimated using this data covariance. The line of code you refer to corresponds to equation 24 in the 1997 van Veen paper. Subsequently in the beamformer_lcmv implementation, the average ERF is projected through the filter. > Any input very much appreciated! Last week I discussed similar issues with Jan-Mathijs. Sofar at the FCDC we have not really optimized the data handling for LCMV beamforming. Markus Bauer is one of the few who had a go at it, and for him it did not really work that well. Jan-Mathijs mentioned that sofar we have been working with the data covariance that was estimated based on the single trialsd, and not with th edata covariance estimated on the average (note that the order matters for the covariance computation and averaging). Right now I don't know the details of your experiment and data any more, but you might want to try data = preprocessing(cfg) avg1 = timelockanalysis(cfg, data) with keeptrials=no, covariance=no avg2 = timelockanalysis(cfg, avg1) with keeptrials=no, covariance=yes and then use avg2 which includes the covariance of the average in the sourceanalysis. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Wed Feb 4 16:55:51 2009 From: masaki.maruyama at CEA.FR (Masaki Maruyama) Date: Wed, 4 Feb 2009 16:55:51 +0100 Subject: meg-pd function "rawdata" Message-ID: Hello, The Fieldtrip function "preprocessing" cannot exactly detect timings of trials from one of our MEG dataset recorded using Neuromag 306 ch MEG system. The trials often precede by 0.1 second and sometimes delay by 0.9 second with respect to the exact time. I looked into several programs and the output of meg-pd function "rawdata" seems to be unusual. It reads the data file one second by one second from the begining of data, and the rawdata('goto', T) outputs a start time of read epoch as rawdata('goto', 100.0) = 100.0 rawdata('goto', 100.1) = 100.0 … rawdata('goto', 100.9) = 100.0 rawdata('goto', 101.0) = 101.0 These outputs are fine. However, in later period its output becomes rawdata('goto', 102.0) = 102.0 rawdata('goto', 102.1) = 102.1 rawdata('goto', 102.2) = 102.1 … rawdata('goto', 102.9) = 102.1 rawdata('goto', 103.0) = 102.1 rawdata('goto', 103.1) = 103.1 … After 102.1 second the output delays by 0.1 second, which seems to be a causal of the wrong time detection of trials. I cannot find out why it happened in the MEG recording, but I like to see averaged fields from the data. Could you please give me advices? Thank you in advance for your kind advices. Sincerely yours, Masaki Maruyama Inserm U.562 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 4 17:50:50 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 4 Feb 2009 17:50:50 +0100 Subject: meg-pd function "rawdata" In-Reply-To: Message-ID: Hi Masaki On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > After 102.1 second the output delays by 0.1 second, which seems to > be a > causal of the wrong time detection of trials. I cannot find out why > it happened > in the MEG recording, but I like to see averaged fields from the > data. Could > you please give me advices? > > Thank you in advance for your kind advices. It seems due to a (rounding-off?) bug in rawdata. The fif access mex files are causing a lot of problems, and that is why we recently decided to switch to a new implementation for reading the fif files in fieldtrip. The new implementation for fieldtrip is based on low-level functions from the MNE toolbox by Matti Hamalainen: see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php and try the fieldtrip functions read_header and read_data with an explicit specification of headerformat=neuromag_nme and dataformat=neuromag_mne respectively. That should cause the low-level readers from Matti to be used. Also read_event should be able to give you the correct trial markers. Laurence (CC) should be able to tell you more about the current status of this new implementation. best regards, Robert PS note that the MNE toolbox functions are not released together with fieldtrip, due to licensing limitations. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Feb 5 10:14:26 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 5 Feb 2009 10:14:26 +0100 Subject: Sources Message-ID: Dear users, i'm trying to localize the sources of time-frequency data. At the scalp level i have, in the gamma range, two effects: a power's increase for some sensors on the right hemisphere and a power's decrease on the left. When i run the source reconstruction i find the sources for the power increase in some areas that are compatible with the power's distribution at the scalp, but i don't find anything for the power's decrease. Is that normal? Is it a problem to reconstruct the sources for the power's decreas? Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu Feb 5 10:39:12 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 5 Feb 2009 10:39:12 +0100 Subject: Sources Message-ID: Hi Marco, I think there is no fundamental reason why you shouldn't be able to spot a power decrease in source space. What could be is that the source of the power decrease varies more over subjects (in anatomical location) than the source of the power increase - maybe you could run your analysis with a higher lambda to check this. Another physiological reason could be that the source of the power decrease actually consists of two sources that are at some distance, but highly synchronous - in which case they will cancel each other using beamforming. Then there are three silly mistakes I made previously, so I give you a list to check - not necessarily assuming you did the same mistakes: 1. Do your functional limits and your opacity limits allow to plot negative values? 2. Do you do a two-sided test in sourcestatistics ? 3. Do you possibly look at a relative (% or z-score) measure at the electrode level but at absolute (non-basline corrected) values in source space - or vice versa? This can sometimes give seemingly opposing effects, especially when you are comparing two groups of subjects that might have systematic differences in baseline power already. 'hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "Marco SPERDUTI" > Gesendet: 05.02.09 10:18:08 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] Sources > Dear users, > > i'm trying to localize the sources of time-frequency data. > At the scalp level i have, in the gamma range, two effects: a power's > increase for some sensors on the right hemisphere and a power's > decrease on the left. > When i run the source reconstruction i find the sources for the power > increase in some areas that are compatible with the power's > distribution at the scalp, but i don't find anything for the power's > decrease. > > Is that normal? Is it a problem to reconstruct the sources for the > power's decreas? > > Thank you, > > Marco > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From lhunt at FMRIB.OX.AC.UK Thu Feb 5 11:01:44 2009 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Thu, 5 Feb 2009 10:01:44 +0000 Subject: meg-pd function "rawdata" In-Reply-To: <3011DB14-128A-4001-97FF-E445A66E05D2@fcdonders.ru.nl> Message-ID: Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. From marco.rotonda at GMAIL.COM Thu Feb 5 20:09:44 2009 From: marco.rotonda at GMAIL.COM (Marco Rotonda) Date: Thu, 5 Feb 2009 20:09:44 +0100 Subject: trigger on FieldTripBuffer Message-ID: Hi there, I would like to ask you how is it possible to give back a trigger signal if I need to trigger the signal of the application module of BCI2000 if I have not to trigger something happening in the signal processing module (FTBuffer), which actually is performing other things. I'm explain better: I'm using FTBuffer as a signal processing and I plot something is happening from matlab. I'm using this as the feedback to the user. Meanwhile, as user application, I'm using the StimulusPresentation to give some audio stimulation that I whish to trigger. Reading the documentation the trigger should be give back to the amplifier via the signal processing module (http://www.bci2000.org/phpbb/viewtopic.php?t=453&highlight=trigger) which is FTBuffer... Is it possible to solve this problem? ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Fri Feb 6 12:13:13 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Fri, 6 Feb 2009 12:13:13 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Laurence and Robert, Thank you for your prompt response and the continuous revision of programs. I try to compute with the latest version. Best regards, Masaki -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt Envoyé : Thursday, February 05, 2009 11:02 AM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From T.sanders at UMCUTRECHT.NL Fri Feb 6 14:38:20 2009 From: T.sanders at UMCUTRECHT.NL (sanders, T.) Date: Fri, 6 Feb 2009 14:38:20 +0100 Subject: Import Channel locations from EEGLAB Message-ID: Hello, I was wondering if there is an easy way to convert the channel labels and locations from EEGLAB to Fieldtrip. We are using the international 10-10 system with 118 electrodes and have a EEG.chanlocs datastructure for that. Our labels are slightly different than than the default labels and channel locations known by Fieldtrip (possibly due to us using 118 electrodes) which means we cannot create a multiplot in Fieldtrip at the moment. If anyone knows a way to convert the chanlocs datastructure from EEGLAB to a layout datastructure of Fieldtrip I would greatly appreciate it. Thank you in advance. Kind Regards, Tom Sanders BCI group Rudolf Magnus Institute Department of Neurology & Neurosurgery University Medical Center Utrecht ---------------------------------- 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/fcdonders/fieldtrip. From j.gross at PSY.GLA.AC.UK Fri Feb 6 14:54:35 2009 From: j.gross at PSY.GLA.AC.UK (Joachim Gross) Date: Fri, 6 Feb 2009 13:54:35 +0000 Subject: Postdoctoral position in Glasgow Message-ID: -------------------------------------------------------------------- University of Glasgow Department of Statistics Postdoctoral research associate (ref 14880/DPO/A3) -------------------------------------------------------------------- An exciting opportunity has arisen as a result of Faculty/departmental investment to pursue a research programme in statistical methodology with specific application to cognitive neuro-imaging. Further information about the post and how to apply is available at www.gla.ac.uk/jobs/vacancies Further information about the department can be found at www.gla.ac.uk/departments/statistics and about the Centre for Cognitive Neuro-Imaging at www.ccni.gla.ac.uk Enquiries are welcomed. Please contact: Prof. Adrian Bowman Dept. of Statistics The UNiversity of Glasgow Glasgow G12 8QQ Tel: +44-141-330-4046 E-mail: adrian at stats.gla.ac.uk ---------------------------------- 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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Mon Feb 9 07:18:18 2009 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Mon, 9 Feb 2009 01:18:18 -0500 Subject: the output of the function-freqdescriptives Message-ID: Dear Users, By setting cfg.cohmethod = 'plv', there are four types of output after running freqdescriptives: powspctrm, powspctrmsem, plvpsctrm and plvspctrmsem. I was wondering which one stands for phase locking values. Many thanks in advance. Shen-Mou Hsu ---------------------------------- 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/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Mon Feb 9 08:02:47 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Mon, 9 Feb 2009 02:02:47 -0500 Subject: subject too low in ctf scanner Message-ID: When the subject is too low, the source analysis cuts off any activity below the dewar. Radial gradiometers can pick up sources below the sensor but Fieldtrip clips them. Is there an easy way to extend the grid so that source analysis can go below the sensor? ---------------------------------- 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/fcdonders/fieldtrip. From r.vandermeij at DONDERS.RU.NL Mon Feb 9 09:32:49 2009 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 9 Feb 2009 09:32:49 +0100 Subject: the output of the function-freqdescriptives In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B57021E5FC07D@iu-mssg-mbx05.ads.iu.edu> Message-ID: Hi Shen-Mou, /Plv/pspctrm contains the /p/hase /l/ocking /v/alues, /plv/pscptrm/sem/ contains the /s/tandard /e/rror of the /m/ean of those phase locking values. The variables without the 'plv' in front of them contain the regular power spectrum. Hope it helps, Best, Roemer Hsu, Shen-Mou wrote: > Dear Users, > > By setting cfg.cohmethod = 'plv', there are four types of output after running freqdescriptives: powspctrm, powspctrmsem, plvpsctrm and plvspctrmsem. I was wondering which one stands for phase locking values. Many thanks in advance. > > Shen-Mou Hsu > ---------------------------------- > 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/fcdonders/fieldtrip. > > -- Roemer van der Meij Intern (MSc-student) Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 6500 HB Nijmegen The Netherlands E-mail: roemer.vandermeij at donders.ru.nl ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From masaki.maruyama at CEA.FR Mon Feb 9 16:59:31 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Mon, 9 Feb 2009 16:59:31 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Laurence, I used the latest version of Fieldtrip, updated on 2009/02/08. However, I found the same problem again in the timing of trial definition. Defined trials often precede by 100 ms or delay 900 ms with respect to its correct time. As far as I understand "read_data.m" lines 885-905, the program assumes that the beginning of buffer always starts with an integral multiple of hdr.nSamples. However, it is not always the case, as I previously show the examples of rawdata('goto', ***). I would like to attach an example provided by Dr. Kimmo to read data at 102.9 s. I think the output of rawdata('goto',***) should be used in the program. %%%%%%Example start%%%%%%%%%%%%%% %Go to the buffer containing the sample you want and get the current time point t0 = rawdata('goto', 102.9); %Get the buffer buffer = rawdata('next'); %Find out the correct sample in the buffer ind = floor((102.9-t0)*sf+1); % Get the correct vector from the buffer B = buffer(:, ind); %%%%%%Example end%%%%%%%%%%%%%% Thank you in advance for your further consideration on this issue. With best regards, Masaki Maruyama -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt Envoyé : Thursday, February 05, 2009 11:02 AM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.sperduti at UPMC.FR Mon Feb 9 17:34:41 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 9 Feb 2009 17:34:41 +0100 Subject: sourceplot Message-ID: Dear all, when using sourceplot whit surface method is it possible to plot only values exceding a certain threshold? for example, i have values between -1.5 and 1.5, but i would like to plot only values between -1.5 and -0.075 and between 0.075 and 1.5. Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 9 17:46:05 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 9 Feb 2009 17:46:05 +0100 Subject: sourceplot In-Reply-To: <20090209173441.zztotv4gsgkswgo4@courriel.upmc.fr> Message-ID: Dear Marco, Indeed this is possible. You can make a mask field in your data yourdata.mask = (yourdata.funparameter > 0.075 & yourdata.funparameter < -0.075) Subsequently you set cfg.maskparameter = 'mask' and you can also use the cfg.opacitylim to set the opacity to the desired values. See also the plotting tutorial on the FieldTrip webpage lowest part for more info. http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentati on:tutorial:plotting Best Ingrid Nieuwenhuis -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marco SPERDUTI Sent: Monday, February 09, 2009 5:35 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sourceplot Dear all, when using sourceplot whit surface method is it possible to plot only values exceding a certain threshold? for example, i have values between -1.5 and 1.5, but i would like to plot only values between -1.5 and -0.075 and between 0.075 and 1.5. Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 9 17:40:33 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 9 Feb 2009 16:40:33 +0000 Subject: meg-pd function "rawdata" In-Reply-To: Message-ID: Dear Masaki, It sounds like you haven't actually used a different reader, the one that Laurence had developed. As Robert suggested you should specify cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; in your preprocessing. Then you will get an error message which tells you to download the MNE Matlab toolbox and when you have this toolbox in your path then you'll be able to use the new reader. You'll see the difference right away as the MNE toolbox prints out a lot of messages, quite different from meg_pd. If you still have the problem after all that, please let us know. Best, Vladimir On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM wrote: > Hello Laurence, > > > > I used the latest version of Fieldtrip, updated on 2009/02/08. However, I > found the same problem again in the timing of trial definition. Defined > trials often precede by 100 ms or delay 900 ms with respect to its correct > time. > > > > As far as I understand "read_data.m" lines 885-905, the program assumes that > the beginning of buffer always starts with an integral multiple of > hdr.nSamples. However, it is not always the case, as I previously show the > examples of rawdata('goto', ***). > > > > I would like to attach an example provided by Dr. Kimmo to read data at > 102.9 s. I think the output of rawdata('goto',***) should be used in the > program. > > > > %%%%%%Example start%%%%%%%%%%%%%% > > > > %Go to the buffer containing the sample you want and get the current time > point > > t0 = rawdata('goto', 102.9); > > %Get the buffer > > buffer = rawdata('next'); > > %Find out the correct sample in the buffer > > ind = floor((102.9-t0)*sf+1); > > % Get the correct vector from the buffer > > B = buffer(:, ind); > > > > %%%%%%Example end%%%%%%%%%%%%%% > > > > Thank you in advance for your further consideration on this issue. > > > > > > With best regards, > > Masaki Maruyama > > > > > > -----Message d'origine----- > De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part > de Laurence Hunt > Envoyé : Thursday, February 05, 2009 11:02 AM > À : FIELDTRIP at NIC.SURFNET.NL > Objet : Re: [FIELDTRIP] meg-pd function "rawdata" > > > > Hi Masaki, > > > > The MNE-based functions should be ready to use, to read raw fif data - > > but we've only developed them over the last week or two, so please let > > me know if you come across any bugs, or whether it solves the problem > > you encountered with rawdata. We should have a version that's able to > > read evoked .fif files also in the next week or two. > > > > Regards, > > Laurence > > > > > > On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > > > >> Hi Masaki > >> > >> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> > >>> After 102.1 second the output delays by 0.1 second, which seems to > >>> be a > >>> causal of the wrong time detection of trials. I cannot find out why > >>> it happened > >>> in the MEG recording, but I like to see averaged fields from the > >>> data. Could > >>> you please give me advices? > >>> > >>> Thank you in advance for your kind advices. > >> > >> It seems due to a (rounding-off?) bug in rawdata. The fif access mex > >> files are causing a lot of problems, and that is why we recently > >> decided to switch to a new implementation for reading the fif files > >> in fieldtrip. > >> > >> The new implementation for fieldtrip is based on low-level functions > >> from the MNE toolbox by Matti Hamalainen: > >> see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > >> and try the fieldtrip functions read_header and read_data with an > >> explicit specification of headerformat=neuromag_nme and > >> dataformat=neuromag_mne respectively. That should cause the low- > >> level readers from Matti to be used. Also read_event should be able > >> to give you the correct trial markers. > >> > >> Laurence (CC) should be able to tell you more about the current > >> status of this new implementation. > >> > >> best regards, > >> Robert > >> > >> PS note that the MNE toolbox functions are not released together > >> with fieldtrip, due to licensing limitations. > >> > > > > =========================================== > > Laurence Hunt, DPhil Student > > Centre for Functional MRI of the Brain (FMRIB), > > University of Oxford > > lhunt at fmrib.ox.ac.uk > > Phone: (+44)1865-(2)22738 > > =========================================== > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 9 17:51:40 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 9 Feb 2009 17:51:40 +0100 Subject: subject too low in ctf scanner In-Reply-To: <200902090702.n1972lkC019587@kurage.nimh.nih.gov> Message-ID: Hi Tom The default behaviour of the prepare_dipole_grid helper function for sourceanalysis in case of MEG is to make a 3D dipole grid that covers the helmet ("~30x30x30cm wide box"), subsequently detect points that are inside the head (actually inside the volume conductor), and then reduce the size of the 3D grid to a "narrow box" that tightly fits around the brain. So if the subject is seated very low compared to th edewar, then indeed the lower part of his brain might have been skipped for the 3D grid generation. You can also start with your own specification of the 3D grid, using cfg.xgrid/ygrid/zgrid. The grid is specified in individual subjects headcoordinates, i.e. in cm in the CTF case, which means that the position of the head relative to the dewar does not matter. Something like this should do the trick cfg.grid.xgrid = -12:14 % back to front cfg.grid.ygrid = -12:12 % right to left cfg.grid.zgrid = -2:14 % bottom to top if you then also specify cfg.grid.tight=yes, then you'll still get a nice tight/narrow box without too many points that are outside the head. best regards, Robert On 9 Feb 2009, at 8:02, Tom Holroyd wrote: > When the subject is too low, > the source analysis cuts off > any activity below the dewar. > Radial gradiometers can pick > up sources below the sensor > but Fieldtrip clips them. > > Is there an easy way to extend > the grid so that source analysis > can go below the sensor? > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 9 17:56:08 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 9 Feb 2009 17:56:08 +0100 Subject: Import Channel locations from EEGLAB In-Reply-To: <7865FEBD8DFE2942973AD4CD19784ECB01D7C3F4@EXV4.ds.umcutrecht.nl> Message-ID: Hi Tom, You should have an eeglab2fieldtrip function in your EEGLAB distribution. It works like this % Use as % [data] = eeglab2fieldtrip( EEG, fieldbox ) % % where the inputs are % EEG - [struct] EEGLAB structure % fieldbox - ['preprocessing'|'timelockanalysis'|'componentanalysis'|... % 'chanloc', 'chanloc_withfid'] and if you specify 'chanloc' as fieldbox, you should get a data structure that has the field "elec" in it. That is the electrode definition according to fieldtrip standards, and you can e.g. use it in prepare_layout to make a layout for plotting. best regards Robert On 6 Feb 2009, at 14:38, sanders, T. wrote: > Hello, > > I was wondering if there is an easy way to convert the channel > labels and locations from EEGLAB to Fieldtrip. We are using the > international 10-10 system with 118 electrodes and have a > EEG.chanlocs datastructure for that. Our labels are slightly > different than than the default labels and channel locations known > by Fieldtrip (possibly due to us using 118 electrodes) which means > we cannot create a multiplot in Fieldtrip at the moment. If anyone > knows a way to convert the chanlocs datastructure from EEGLAB to a > layout datastructure of Fieldtrip I would greatly appreciate it. > > Thank you in advance. > > Kind Regards, > Tom Sanders > > BCI group > Rudolf Magnus Institute > Department of Neurology & Neurosurgery > University Medical Center Utrecht > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Mon Feb 9 18:37:06 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Mon, 9 Feb 2009 18:37:06 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Vladimir, Thank you for your prompt response. You are right. I didn't specify the cfg parameters and the path to MNE toolbox. Now I obtained a different result. Trials are still often defined 100 ms earlier than its correct timing, but no trial are defined with the delay of 900 ms. So the problem is not completely fixed yet. When you need more information, please tell me without any hesitation. With best regards, Masaki Maruyama -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Vladimir Litvak Envoyé : Monday, February 09, 2009 5:41 PM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Dear Masaki, It sounds like you haven't actually used a different reader, the one that Laurence had developed. As Robert suggested you should specify cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; in your preprocessing. Then you will get an error message which tells you to download the MNE Matlab toolbox and when you have this toolbox in your path then you'll be able to use the new reader. You'll see the difference right away as the MNE toolbox prints out a lot of messages, quite different from meg_pd. If you still have the problem after all that, please let us know. Best, Vladimir On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM wrote: > Hello Laurence, > > > > I used the latest version of Fieldtrip, updated on 2009/02/08. However, I > found the same problem again in the timing of trial definition. Defined > trials often precede by 100 ms or delay 900 ms with respect to its correct > time. > > > > As far as I understand "read_data.m" lines 885-905, the program assumes that > the beginning of buffer always starts with an integral multiple of > hdr.nSamples. However, it is not always the case, as I previously show the > examples of rawdata('goto', ***). > > > > I would like to attach an example provided by Dr. Kimmo to read data at > 102.9 s. I think the output of rawdata('goto',***) should be used in the > program. > > > > %%%%%%Example start%%%%%%%%%%%%%% > > > > %Go to the buffer containing the sample you want and get the current time > point > > t0 = rawdata('goto', 102.9); > > %Get the buffer > > buffer = rawdata('next'); > > %Find out the correct sample in the buffer > > ind = floor((102.9-t0)*sf+1); > > % Get the correct vector from the buffer > > B = buffer(:, ind); > > > > %%%%%%Example end%%%%%%%%%%%%%% > > > > Thank you in advance for your further consideration on this issue. > > > > > > With best regards, > > Masaki Maruyama > > > > > > -----Message d'origine----- > De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part > de Laurence Hunt > Envoyé : Thursday, February 05, 2009 11:02 AM > À : FIELDTRIP at NIC.SURFNET.NL > Objet : Re: [FIELDTRIP] meg-pd function "rawdata" > > > > Hi Masaki, > > > > The MNE-based functions should be ready to use, to read raw fif data - > > but we've only developed them over the last week or two, so please let > > me know if you come across any bugs, or whether it solves the problem > > you encountered with rawdata. We should have a version that's able to > > read evoked .fif files also in the next week or two. > > > > Regards, > > Laurence > > > > > > On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > > > >> Hi Masaki > >> > >> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> > >>> After 102.1 second the output delays by 0.1 second, which seems to > >>> be a > >>> causal of the wrong time detection of trials. I cannot find out why > >>> it happened > >>> in the MEG recording, but I like to see averaged fields from the > >>> data. Could > >>> you please give me advices? > >>> > >>> Thank you in advance for your kind advices. > >> > >> It seems due to a (rounding-off?) bug in rawdata. The fif access mex > >> files are causing a lot of problems, and that is why we recently > >> decided to switch to a new implementation for reading the fif files > >> in fieldtrip. > >> > >> The new implementation for fieldtrip is based on low-level functions > >> from the MNE toolbox by Matti Hamalainen: > >> see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > >> and try the fieldtrip functions read_header and read_data with an > >> explicit specification of headerformat=neuromag_nme and > >> dataformat=neuromag_mne respectively. That should cause the low- > >> level readers from Matti to be used. Also read_event should be able > >> to give you the correct trial markers. > >> > >> Laurence (CC) should be able to tell you more about the current > >> status of this new implementation. > >> > >> best regards, > >> Robert > >> > >> PS note that the MNE toolbox functions are not released together > >> with fieldtrip, due to licensing limitations. > >> > > > > =========================================== > > Laurence Hunt, DPhil Student > > Centre for Functional MRI of the Brain (FMRIB), > > University of Oxford > > lhunt at fmrib.ox.ac.uk > > Phone: (+44)1865-(2)22738 > > =========================================== > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Tue Feb 10 12:18:17 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Tue, 10 Feb 2009 12:18:17 +0100 Subject: dipolefitting output format Message-ID: I have some doubts about format of dipolefitting's output. I have wrote the scirpt which use dipolefitting. Finally I have the line: dip1 = dipolefitting(cfg, avg1); So I have dipole coordinates in "dip1" variable. I tried to visualise it with: source.posxyz = dip1.dip.pos; source.momxyz = dip1.dip.mom; source.rv = dip1.dip.rv; dipplot(source); I can also use the following instead of the previous one: dipplot(source_plot, 'coordformat', 'MNI'); Difference between dipplot(source) and dipplot(source, 'coordformat', 'MNI') is very important - it is visualised in completely different location. My question is: what coordinates does the dipolefitting use at the output? How should I properly visualise its output? Thank you all in advance! Kind regards, Szymon ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Tue Feb 10 17:35:06 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 10 Feb 2009 16:35:06 +0000 Subject: dipolefitting output format In-Reply-To: <8834c95d0902100318o1515309pa06cd9b184fd9f0f@mail.gmail.com> Message-ID: Dear Szymon, dipolefitting works in any coordinate system. So the coordinate system of the output is the same as the coordinate system of the input - your vol and sens. I'm not familiar with the dipplot function you are using. It doesn't sound like a Fieldtrip function. In Fieldtrip you can use headmodelplot to visualize your volume model and then add your dipole using plot3. Best, Vladimir On Tue, Feb 10, 2009 at 11:18 AM, Szymon Piłat wrote: > I have some doubts about format of dipolefitting's output. > > I have wrote the scirpt which use dipolefitting. Finally I have the line: > dip1 = dipolefitting(cfg, avg1); > > So I have dipole coordinates in "dip1" variable. > I tried to visualise it with: > > source.posxyz = dip1.dip.pos; > source.momxyz = dip1.dip.mom; > source.rv = dip1.dip.rv; > dipplot(source); > > I can also use the following instead of the previous one: > > dipplot(source_plot, 'coordformat', 'MNI'); > > Difference between > > dipplot(source) > and > dipplot(source, 'coordformat', 'MNI') > > is very important - it is visualised in completely different location. > > My question is: what coordinates does the dipolefitting use at the output? > How should I properly visualise its output? > > Thank you all in advance! > > Kind regards, > Szymon > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. From arno at SALK.EDU Tue Feb 10 18:39:53 2009 From: arno at SALK.EDU (arno delorme) Date: Tue, 10 Feb 2009 18:39:53 +0100 Subject: dipolefitting output format In-Reply-To: <8834c95d0902100318o1515309pa06cd9b184fd9f0f@mail.gmail.com> Message-ID: The dipplot function can plot dipoles from spherical models or dipoles in MNI coordinates. I happens that these two models are oriented with 90 degrees different (the nose points toward different directions). Also the transformation to plot on the MNI brain is different. In the spherical cases, spherical coordinates are transformed to MNI coordinates first using the sph2spm function. So if you used a MNI model to locate your dipoles, you must enter the 'coordformat', 'MNI' option. Hope this helps, Arno On 10 févr. 09, at 12:18, Szymon Piłat wrote: > I have some doubts about format of dipolefitting's output. > > I have wrote the scirpt which use dipolefitting. Finally I have the > line: > dip1 = dipolefitting(cfg, avg1); > > So I have dipole coordinates in "dip1" variable. > I tried to visualise it with: > > source.posxyz = dip1.dip.pos; > source.momxyz = dip1.dip.mom; > source.rv = dip1.dip.rv; > dipplot(source); > > I can also use the following instead of the previous one: > > dipplot(source_plot, 'coordformat', 'MNI'); > > Difference between > > dipplot(source) > and > dipplot(source, 'coordformat', 'MNI') > > is very important - it is visualised in completely different location. > > My question is: what coordinates does the dipolefitting use at the > output? > How should I properly visualise its output? > > Thank you all in advance! > > Kind regards, > Szymon > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Wed Feb 11 16:12:42 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Wed, 11 Feb 2009 16:12:42 +0100 Subject: [SPAM] Re: [FIELDTRIP] dipolefitting output format In-Reply-To: Message-ID: Thaks for your help. It was very useful. I did some research on it so I can summurize it: you can use dipolefiitting function to find source and visualise it using dipplot (from EEGLAB). The only thing you have to do is to implement assumption that head radius is 85mm (dippot assummes that). No transformation is required - localization is the same as using headmodelplot and plot3 functions (suggested by Vladimir). Note that dipplot uses 'spherical' or "MNI" coordinates. If you want to visualise dipolefitting output you need to choose 'spherical' coords. If fact it is not the spherical coordinates as we understand it in physics (radius and 2 angles: r, theta, phi) - it uses regular cartesian coordinates (x,y,z). Kind regadrs, Szymon W dniu 10 lutego 2009 18:39 użytkownik arno delorme napisał: > The dipplot function can plot dipoles from spherical models or dipoles > in MNI coordinates. I happens that these two models are oriented with > 90 degrees different (the nose points toward different directions). > Also the transformation to plot on the MNI brain is different. > > In the spherical cases, spherical coordinates are transformed to MNI > coordinates first using the sph2spm function. > > So if you used a MNI model to locate your dipoles, you must enter the > 'coordformat', 'MNI' option. > > Hope this helps, > > Arno > > > On 10 févr. 09, at 12:18, Szymon Piłat wrote: > > I have some doubts about format of dipolefitting's output. >> >> I have wrote the scirpt which use dipolefitting. Finally I have the line: >> dip1 = dipolefitting(cfg, avg1); >> >> So I have dipole coordinates in "dip1" variable. >> I tried to visualise it with: >> >> source.posxyz = dip1.dip.pos; >> source.momxyz = dip1.dip.mom; >> source.rv = dip1.dip.rv; >> dipplot(source); >> >> I can also use the following instead of the previous one: >> >> dipplot(source_plot, 'coordformat', 'MNI'); >> >> Difference between >> >> dipplot(source) >> and >> dipplot(source, 'coordformat', 'MNI') >> >> is very important - it is visualised in completely different location. >> >> My question is: what coordinates does the dipolefitting use at the output? >> How should I properly visualise its output? >> >> Thank you all in advance! >> >> Kind regards, >> Szymon >> ---------------------------------- >> >> 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. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nina.Kahlbrock at UNI-DUESSELDORF.DE Wed Feb 11 16:14:33 2009 From: Nina.Kahlbrock at UNI-DUESSELDORF.DE (Nina Kahlbrock) Date: Wed, 11 Feb 2009 16:14:33 +0100 Subject: partial artefact rejection Message-ID: Dear all, I have a question concerning partial artefact rejection. In my experiment, I have used trials of different lengths. For preprocessing, I have extended all of the trials to a certain length in order to avoid filter artefacts from cutting trials. I have then used partial artefact rejection and preprocessed the trials. In order to calculate TFRs, I would like to use the actual lengths of the trials again by cutting the trials to the former lengths. Now my questions: How exactly is partial artefact rejection done? As I see it from my data, the data points contaminated by artefacts are removed from the structure, right? The offset seems to be adjusted to the cut trials, though. How do you suggest that I get my actual trial lengths back? It seems that I cannot know what part of the remaining data still belongs to my old trial and which part belongs to the part that was only used for preprocessing but needs to be cut out. I appreciate your help! Thanks in advance, Nina ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Wed Feb 11 16:24:13 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Wed, 11 Feb 2009 16:24:13 +0100 Subject: LORETA - what file Message-ID: Hi everybody! Is LORETA implemented in FieldTrip? I would like to localize source using it. I want to find source using only 1 timepoint of EEG (19 electrodes) so I want to use low-level script. Can you tell me what file performs LORETA's algorithm? Kind regards, Szymon ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Wed Feb 11 20:24:34 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 11 Feb 2009 19:24:34 +0000 Subject: partial artefact rejection In-Reply-To: Message-ID: Dear Nina, I am not sure whether I understand your question exactly, because as far as I can judge from your concern, there is none ;o). No doubt you already had a look at the tutorial documentation: 'automatic artifact rejection' on the website. It is indeed the case that data points identified as artifact are removed from the data. As a consequence, the cell array that represents your data is changed (data.trial). Also, the field data.time changes obviously, because some parts of the data are removed. One of the following scenarios can occur: -there is no artifact in the trial -> so this particular trial survives unchanged -there is an artifact at one of the edges of the trial. As a consequence, the trial and time axis are shortened. Importantly, when the trial is shortened on the left, the offset should also change, because this value defines the offset of the first sample in this trial with respect to the user-defined timepoint 0. To ensure a correct subsequent time-locked analysis (or TFR for that sake), a trial that loses 100 milliseconds on the left should have its offset updated with 100 (if the sampling rate is a 1000 Hz). (Tonight's question is whether this should be an increase or a decrease). -there is one or more artifacts in the middle of the trial. As a consequence, the trial is cut into several pieces; correspondingly the time axes have to be adjusted, and also the offsets. This means that it could be that your original 100th trial ends up in several different new 'trials'. All this should not be a big problem, because each step in the analysis should output a structure containing the configuration used in earlier steps of the analysis. If you would want to keep track of the original trials, you should always be able to match the cfg.trl in the output of rejectartifact, with the cfg.trl obtained after definetrial. With respect to your second question: if you want to pad your trials with data for the purpose of filtering, you can specify the option cfg.padding before calling preprocessing. If you for example defined your trials to last between event-of-interest - 1 second, and event- of-interest + 1 second, and your cfg.trl is defined accordingly, you can specify cfg.padding to be for example 3 seconds. This means that on each side of the trial, 0.5 seconds of extra data is read from the raw datafile, filtering (or similar things) is applied, and the edges are cut off again, so that you end up with 2-second segments. If you want to do artifact rejection prior to the actual reading and preprocessing of your data, you have to specify cfg.padding prior to calling rejectartifact, and then the routines will look for artifacts in the padded data. This makes sense, because filtering of an artifact (such as a squid-jump) could lead to nasty effects. I hope this helps, JM On Feb 11, 2009, at 3:14 PM, Nina Kahlbrock wrote: > Dear all, > > I have a question concerning partial artefact rejection. > In my experiment, I have used trials of different lengths. For > preprocessing, I have extended all of the trials to a certain > length in > order to avoid filter artefacts from cutting trials. I have then used > partial artefact rejection and preprocessed the trials. > In order to calculate TFRs, I would like to use the actual lengths > of the > trials again by cutting the trials to the former lengths. > Now my questions: How exactly is partial artefact rejection done? > As I see > it from my data, the data points contaminated by artefacts are > removed from > the structure, right? The offset seems to be adjusted to the cut > trials, though. > How do you suggest that I get my actual trial lengths back? It > seems that I > cannot know what part of the remaining data still belongs to my old > trial > and which part belongs to the part that was only used for > preprocessing but > needs to be cut out. > > I appreciate your help! > > Thanks in advance, > > Nina > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Wed Feb 11 20:43:41 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Wed, 11 Feb 2009 20:43:41 +0100 Subject: First steps with FIELDTRIP Message-ID: Dear all, Just starting to work with FIELDTRIP, I have the typical problems of a beginner and wondered whether you could help me with these. I conducted an MEG study (CTF, Vancouver whole-head system) in an old-new recognition paradigm. 1. From the tutorial it was not clear to me what the very first step is to analyze the data, and I tried the 'read_data' command (dat = read_data ('filename.ds');). However, there is an error message Error in ==> /Applications/fieldtrip/fieldtrip-20090128/external/ctf/getCTFdata.p>getCTFdata at 28 Error in ==> read_data at 654 dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', 'double'); both for my own and your tutorial data. Do you have any idea, why the command does not work? 2. Could you maybe provide me with a skript 'from the very beginning" to avoid this kind of problems? I do not know either how the header information can be integrated (presumably with "read_header"), and how to go on to the next step of preprocessing. Thank you very much for your help. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Feb 11 21:37:34 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 11 Feb 2009 21:37:34 +0100 Subject: First steps with FIELDTRIP In-Reply-To: <20090211204341.18415ppb691zaq99@webmail.uni-tuebingen.de> Message-ID: dear nicola, i'm not sure what tutorial you are refering too. take a look here: http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial read_data already is a low-level function that you should not have to deal with as enduser. the first step is to tell fieldtrip when your relevant events occured (definetrial) and then to apply some preprocessing options (preprocessing.m). from there on it all depends on what you want to find out and actually the nice examples in the tutorial should get you going (i.e. sending you scripts wouldn't help you more). in the intro there is a useful overview of the major functions and how they relate. Good luck & don't give up! nathan On 11.02.2009, at 20:43, Nicola Neumann wrote: > Dear all, > > Just starting to work with FIELDTRIP, I have the typical problems of > a beginner and wondered whether you could help me with these. I > conducted an MEG study (CTF, Vancouver whole-head system) in an old- > new recognition paradigm. > > 1. From the tutorial it was not clear to me what the very first step > is to analyze the data, and I tried the 'read_data' command (dat = > read_data ('filename.ds');). However, there is an error message > Error in ==> /Applications/fieldtrip/fieldtrip-20090128/external/ctf/ > getCTFdata.p>getCTFdata at 28 > Error in ==> read_data at 654 > dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', > 'double'); > > both for my own and your tutorial data. Do you have any idea, why > the command does not work? > > 2. Could you maybe provide me with a skript 'from the very > beginning" to avoid this kind of problems? I do not know either how > the header information can be integrated (presumably with > "read_header"), and how to go on to the next step of preprocessing. > > Thank you very much for your help. > Nicola > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Feb 12 09:29:22 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Feb 2009 09:29:22 +0100 Subject: LORETA - what file In-Reply-To: <8834c95d0902110724h36a14069jfc30376c00e3473e@mail.gmail.com> Message-ID: On 11 Feb 2009, at 16:24, Szymon Piłat wrote: > Hi everybody! > > Is LORETA implemented in FieldTrip? I would like to localize source > using it. > I want to find source using only 1 timepoint of EEG (19 electrodes) > so I want to use low-level script. Can you tell me what file > performs LORETA's algorithm? Hi Szymon Note that there are various LORETA algoritms, which are distinguished by a prefix (e.g. sLORETA, eLORETA). The original one with Laplacian- weighted regularization is plain LORETA without a prefix. But Fieldtrip does not include an implementation of any LORETA version. An implementation of LORETA for EEG is available from Roberto Pascual- Marqui at http://www.uzh.ch/keyinst/loreta.htm. Fieldtrip does have a helper function to read the resulting files from thaht software, it is called loreta2fieldtrip. It can be used for post-processing the source reconstructions in fieldtrip, e.g. for statistics. I think that it has not been used for a long time, so I am not 100% confident that loreta2fieldtrip will work out of the box, but you could have a look at it. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Thu Feb 12 09:31:28 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 12 Feb 2009 09:31:28 +0100 Subject: LORETA - what file In-Reply-To: <9E44A0C1-718C-4ED6-A8A8-8F34524082E5@fcdonders.ru.nl> Message-ID: hi, if you're looking for a matlab implementation you could also take a look at srang dalal's nutmeg-toolbox: http://nutmeg.berkeley.edu/index.php?title=Main_Page don't know if it works out with eeg though ... best, nathan On 12.02.2009, at 09:29, Robert Oostenveld wrote: > On 11 Feb 2009, at 16:24, Szymon Piłat wrote: >> Hi everybody! >> >> Is LORETA implemented in FieldTrip? I would like to localize source >> using it. >> I want to find source using only 1 timepoint of EEG (19 electrodes) >> so I want to use low-level script. Can you tell me what file >> performs LORETA's algorithm? > > Hi Szymon > > Note that there are various LORETA algoritms, which are > distinguished by a prefix (e.g. sLORETA, eLORETA). The original one > with Laplacian-weighted regularization is plain LORETA without a > prefix. But Fieldtrip does not include an implementation of any > LORETA version. > > An implementation of LORETA for EEG is available from Roberto > Pascual-Marqui at http://www.uzh.ch/keyinst/loreta.htm. Fieldtrip > does have a helper function to read the resulting files from thaht > software, it is called loreta2fieldtrip. It can be used for post- > processing the source reconstructions in fieldtrip, e.g. for > statistics. I think that it has not been used for a long time, so I > am not 100% confident that loreta2fieldtrip will work out of the > box, but you could have a look at it. > > best regards, > Robert---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From A.Stancak at LIVERPOOL.AC.UK Thu Feb 12 15:49:27 2009 From: A.Stancak at LIVERPOOL.AC.UK (Stancak, Andrej) Date: Thu, 12 Feb 2009 14:49:27 -0000 Subject: ECG artifacts in MEG Message-ID: Dear colleagues, I would like to clean MEG data from ECG artifacts. There is a routine artefact_ECG.m enabling to detect the QRS complex in an ECG trace. The question is whether there is (in FieldTrip or SPM8b) a method similar to the one implemented in BESA which takes the template (basically an averaged QRS plus interval encompassing the P and the T wave) and subtract it from each MEG (or EEG) trace. Compared to ICA, this method works much faster although it definitely may alter certain topographical features of MEG. Best regards Andrej Andrej Stancak, PhD. Professor for normal physiology Senior lecturer in psychology School of Psychology Eleanor Rathbone Building Bedford Street South L69 7ZA Liverpool United Kingdom Phone: 0044 0151 7946951 E-mail: a.stancak at liverpool.ac.uk (primary)         stancak at lf3.cuni.cz (secondary) Office hours: Mo 10-12, Wed 10-12 ---------------------------------- 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/fcdonders/fieldtrip. From ghocepie at ULB.AC.BE Thu Feb 12 17:12:00 2009 From: ghocepie at ULB.AC.BE (Gatien Hocepied) Date: Thu, 12 Feb 2009 17:12:00 +0100 Subject: Problems with fieldtrip toolbox Message-ID: Dear all, I recently used your toolbox. In order to find the amplitude of several dipoles, I ran different functions of the toolbox. However, even the results seem to be correct for test signals, when I used these functions for my 25-ELEC EEG signals (time window : 10 sec, Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, the results are not the same from one experiment to the other (obviously the initial positions are random) I used regional non-linear technique. Would you have some clues for me ? Anyway, thanks very much for this useful toolbox. Best regards, Gatien Hocepied ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Thu Feb 12 17:20:03 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 12 Feb 2009 16:20:03 +0000 Subject: ECG artifacts in MEG In-Reply-To: <45FEBCBE11DAC142A421BF00CBC7349D861D3F@EVSSTAFF2.livad.liv.ac.uk> Message-ID: Dear Andrej, There is no Matlab function I know of that corrects the sensor data like in BESA. In SPM8b there is a possibility to discard artefact sub-space during 3D source reconstruction. This is done using the 'Define spatial confounds' option in MEEGtools toolbox. In principle if you come up with a montage matrix that projects out your artefact you can use the montage functionality of SPM to correct your data. This would be somewhat more distortive than in BESA though and at the moment I'm not sure whether source analysis of such data would work correctly in SPM and FT. Best, Vladimir On Thu, Feb 12, 2009 at 2:49 PM, Stancak, Andrej wrote: > Dear colleagues, > > I would like to clean MEG data from ECG artifacts. There is a routine > artefact_ECG.m enabling to detect the QRS complex in an ECG trace. The question > is whether there is (in FieldTrip or SPM8b) a method similar to the one > implemented in BESA which takes the template (basically an averaged QRS plus > interval encompassing the P and the T wave) and subtract it from each MEG (or > EEG) trace. Compared to ICA, this method works much faster although it > definitely may alter certain topographical features of MEG. > > Best regards > Andrej > > Andrej Stancak, PhD. > Professor for normal physiology > Senior lecturer in psychology > > School of Psychology > Eleanor Rathbone Building > Bedford Street South > L69 7ZA > Liverpool > United Kingdom > > Phone: 0044 0151 7946951 > E-mail: a.stancak at liverpool.ac.uk (primary) > stancak at lf3.cuni.cz (secondary) > > Office hours: Mo 10-12, Wed 10-12 > > ---------------------------------- > 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/fcdonders/fieldtrip. > > ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Feb 12 18:02:05 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Feb 2009 18:02:05 +0100 Subject: ECG artifacts in MEG In-Reply-To: <45FEBCBE11DAC142A421BF00CBC7349D861D3F@EVSSTAFF2.livad.liv.ac.uk> Message-ID: Dear Andrej We initially (i.e. relatively early in fieldtrip development and in developing our MEG analysis skills) have attempted to remove the ECG artifact by QRS detection, averaging and then subtracting the template from the original data at the location of the QRS peaks. That is what you seem to describe, and that is where the function you're refering to originates from. However, in our opinion at that time it was not satisfactory. There is considerable variance in the shape (spatial and temporal) of the ECG artifact as it appears in the MEG channels, which means that a resudue of the artifact remains. An alternative strategy that we have subsequently used is described here http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:use_independent_component_analysis_ica_to_remove_ecg_artifacts best regards, Robert On 12 Feb 2009, at 15:49, Stancak, Andrej wrote: > Dear colleagues, > > I would like to clean MEG data from ECG artifacts. There is a routine > artefact_ECG.m enabling to detect the QRS complex in an ECG trace. > The question > is whether there is (in FieldTrip or SPM8b) a method similar to the > one > implemented in BESA which takes the template (basically an averaged > QRS plus > interval encompassing the P and the T wave) and subtract it from > each MEG (or > EEG) trace. Compared to ICA, this method works much faster although it > definitely may alter certain topographical features of MEG. > > Best regards > Andrej > > Andrej Stancak, PhD. > Professor for normal physiology > Senior lecturer in psychology > > School of Psychology > Eleanor Rathbone Building > Bedford Street South > L69 7ZA > Liverpool > United Kingdom > > Phone: 0044 0151 7946951 > E-mail: a.stancak at liverpool.ac.uk (primary) > stancak at lf3.cuni.cz (secondary) > > Office hours: Mo 10-12, Wed 10-12 > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Fri Feb 13 21:40:26 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Fri, 13 Feb 2009 21:40:26 +0100 Subject: ClassFile information for selecting trials Message-ID: Dear all, For trial selection I am trying to figure out how I can enter information of the ClassFile.cls of the CTF dataset. I have CLASSIDs for different kind of trials, but it seems to me that the examples in the tutorial only refer to different triggers that are stored in another part of the dataset (?). Has anyone ever used ClassFile information and maybe has a skript for that? Thanks. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From wanglinsisi at GMAIL.COM Mon Feb 16 11:30:27 2009 From: wanglinsisi at GMAIL.COM (=?GB2312?B?wdXN9Q==?=) Date: Mon, 16 Feb 2009 11:30:27 +0100 Subject: common filter in source analysis Message-ID: Dear all, I'm trying to use beamforming to calculate the sources of beta activities to the tutorial's data. I got very different results by using common filter to pre and post (according to the event) conditions comparing with the un-common filtered method. Do you have any idea why this happens? Thank you very much! Best, Lin ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 16 12:07:22 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 16 Feb 2009 12:07:22 +0100 Subject: common filter in source analysis In-Reply-To: Message-ID: Dear Lin, It could have multiple causes. Under the assumption that the location of the sources is not different in pre and post, only the power, the common filters can lead to better results, because you use more data to construct the filters. Especially when you have a strong beta decrease in post compared to pre (almost no power in post, much power in pre) using the data in pre in the filters, can help to get better localization in post. It all depends to a large degree on your data. To decide which result you can trust, you could compare the results on source level, with the sensor level. I hope this helps, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of ?? Sent: Monday, February 16, 2009 11:30 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] common filter in source analysis Dear all, I'm trying to use beamforming to calculate the sources of beta activities to the tutorial's data. I got very different results by using common filter to pre and post (according to the event) conditions comparing with the un-common filtered method. Do you have any idea why this happens? Thank you very much! Best, Lin ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:13:06 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:13:06 +0100 Subject: Problems with fieldtrip toolbox In-Reply-To: <006401c98d2c$a2de87e0$e89b97a0$@ac.be> Message-ID: On 12 Feb 2009, at 17:12, Gatien Hocepied wrote: > Dear all, > > I recently used your toolbox. In order to find the amplitude of > several dipoles, I ran different functions of the toolbox. However, > even the results seem to be correct for test signals, when I used > these functions for my 25-ELEC EEG signals (time window : 10 sec, > Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, > the results are not the same from one experiment to the other > (obviously the initial positions are random)… I used regional non- > linear technique. Would you have some clues for me ? Dear Gatien The strength of the fitted dipoles depends strongly on the position. So if you see different dipole strength/moment, then you should check whether the positions are the same. The position that is found after dipole fitting, and especially for multi-dipole models, can depend on the initial starting positions. I.e., the dipoles can end up in a local minimum of the error landscape, instead of the global minimum. To improve the robustness of the dipole fitting approach, you should start the nonlinear search with an initial location for your dipoles that is as close as possible to the optimal location. So if you have some prior knowledge about where your dipoles might be, then you should use that. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:33:04 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:33:04 +0100 Subject: ClassFile information for selecting trials In-Reply-To: <20090213214026.19425hqqo016exfe@webmail.uni-tuebingen.de> Message-ID: On 13 Feb 2009, at 21:40, Nicola Neumann wrote: > Dear all, > > For trial selection I am trying to figure out how I can enter > information of the ClassFile.cls of the CTF dataset. I have CLASSIDs > for different kind of trials, but it seems to me that the examples > in the tutorial only refer to different triggers that are stored in > another part of the dataset (?). Has anyone ever used ClassFile > information and maybe has a skript for that? Hi Nicola At the Donders Centre we used the CTF class (*.cls) files for epoched data. That was about 5 years ago, since after some experience with the ClassFile and MarkerFile, we standardized on continuous MEG recordings in combination with triggers, and not to use the CTF DataEditor and other utilities at all. However, FieldTrip still should support class files. E.g. the Subject01 example tutorial file from the fcdonders ftp server is an old one and was recorded trial-based and it contains some ClassFile and MarkerFile entries. You can see that in matlab/Fieldtrip by the following: >> event = read_event('Subject01.ds') event = 1343x1 struct array with fields: type sample value offset duration >> unique({event.type}) ans = 'FC' 'FIC' 'IC' 'STIM' 'Tr15' 'Tr21' 'Trial' 'backpanel trigger' 'classification' 'frontpanel trigger' 'trial' The "FIC" event is one that is derived from the class file (*). It happens 87 times. >> find(strcmp({event.type}, 'FIC')) ans = Columns 1 through 17 24 44 55 65 96 101 106 116 ... Columns 86 through 87 1313 1333 In the tutorial documentation we are using the trigger code to find the segments corresponding with the FIC (fully incongruent) stimulus. (*) Actually, when I was just looking at the ClassFile and MarkerFile in an editor, the "FIC" turned out to be in the MarkerFile and not in the ClassFile. The ClassFile contains the class "BAD", i.e. manually detected artifacts. The BAD events can be found like this >> find(strcmp({event.type}, 'classification')) ans = 46 92 422 536 611 632 763 804 939 1070 1280 1309 >> event(46) ans = type: 'classification' sample: 8101 value: 'BAD' offset: -300 duration: 900 So if you use read_event on your dataset, you should be able to get all the info that you need. Subsequently you can make your own trial function. See http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:making_your_own_trialfun_for_conditional_trial_definition for more details on that. Hope this helps, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:34:51 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:34:51 +0100 Subject: maintenance on wiki Message-ID: Dear fieldtrip users, We are restructuring the FieldTrip wiki website and for this purpose the wiki will have to be temporarily read-only. You still can access it, but you cannot edit the pages. Within a few days, the wiki will again be available for everyone to contribute to, and hopefully with a structure that will make finding and contributing documentation easier. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From pacodiaz at UB.EDU Mon Feb 16 15:58:57 2009 From: pacodiaz at UB.EDU (Paco Diaz) Date: Mon, 16 Feb 2009 15:58:57 +0100 Subject: Question on Freqanalysis_tfr Message-ID: Dear fieldtrip users, While reading carefully what the function freqanalysis_tfr do, I have found something that seems very extrange to me. I think that the general procedure for the wavelet transformation is clear but I can't get why do you multiply by 2, and divide by the sampling rate, the absolute value of the convolution. I have still used the function with very good results, but I would like to understand that step in order to sleep well. Here is a piece of the code: for k=1:size(dat,1) for j=1:length(cfg.foi) cTmp = conv(dat(k,:),M{j}); cTmp = (2*abs(cTmp)/data.fsample).^2; cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2)); cTmp = cTmp(:,1:cfg.downsample:end); if strcmp(cfg.keeptrials, 'yes') freq.powspctrm(i,k,j,:) = cTmp'; else freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + cTmp'; % compute the running sum end end end Thank you very much in advance, Paco. ---------------------------------- 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Mon Feb 16 21:25:51 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 16 Feb 2009 20:25:51 +0000 Subject: Question on Freqanalysis_tfr In-Reply-To: Message-ID: Dear Paco, This looks like a bug to me. One way of normalizing fft'ed data, is to obtain a so-called spectral density, i.e. the amount of power per frequency bin. Because you have data.fsample/2 (=Nyquist frequency) frequency bins, this normalization would be: 2*(abs(cTmp).^2)/data.fsample. In the code it seems abs(cTmp)^2 is normalized with the square root of 2./data.fsample. Thanks for finding this; I will fix it and the fixed version will be available in the downloadable toolbox as of tomorrow. However, probably a good reason why this has gone unnoticed that long, is that freqanalysis_tfr is a very old piece of code (and very slow), and the exact same functionality should be covered by freqanalysis_wltconvol (but this guy is much faster). Even better, freqanalysis_mtmconvol operates in a very similar way (and you can even get it to mimick a classical waveletanalysis, given the proper settings), but here you have much more flexibility in defining your time-frequency resolution by playing with 'multitapers'. To give you a look in the kitchen: freqanalysis_tfr operates by applying a convolution in the time domain, between the time domain data and the wavelet. Convolution in the time domain is equivalent to multiplication in the frequency domain. Freqanalysis_mtmconvol/ wltconvol operate by performing this multiplication in the frequency domain, rather than the slow convolution. Yours, Jan-Mathijs On Feb 16, 2009, at 2:58 PM, Paco Diaz wrote: > Dear fieldtrip users, > > While reading carefully what the function freqanalysis_tfr do, I > have > found something that seems very extrange to me. I think that the > general > procedure for the wavelet transformation is clear but I can't get > why do you > multiply by 2, and divide by the sampling rate, the absolute value > of the > convolution. > I have still used the function with very good results, but I > would like to > understand that step in order to sleep well. > > Here is a piece of the code: > > for k=1:size(dat,1) > for j=1:length(cfg.foi) > cTmp = conv(dat(k,:),M{j}); > cTmp = (2*abs(cTmp)/data.fsample).^2; > cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M > {j})/2)); > cTmp = cTmp(:,1:cfg.downsample:end); > if strcmp(cfg.keeptrials, 'yes') > freq.powspctrm(i,k,j,:) = cTmp'; > else > freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + > cTmp'; % > compute the running sum > end > end > end > > > Thank you very much in advance, Paco. > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From pacodiaz at UB.EDU Tue Feb 17 09:01:46 2009 From: pacodiaz at UB.EDU (=?ISO-8859-1?Q?Paco_D=EDaz?=) Date: Tue, 17 Feb 2009 09:01:46 +0100 Subject: Question on Freqanalysis_tfr In-Reply-To: <2AE2B73E-4CBC-4F97-A647-BDD22EC81D6D@psy.gla.ac.uk> Message-ID: Thank you Jan, it's great to have your questions answered so quickly. jan-mathijs schoffelen escribió: > Dear Paco, > > This looks like a bug to me. > One way of normalizing fft'ed data, is to obtain a so-called spectral > density, i.e. the amount of power per frequency bin. Because you have > data.fsample/2 (=Nyquist frequency) frequency bins, this normalization > would be: > > 2*(abs(cTmp).^2)/data.fsample. > > In the code it seems abs(cTmp)^2 is normalized with the square root of > 2./data.fsample. > > Thanks for finding this; I will fix it and the fixed version will be > available in the downloadable toolbox as of tomorrow. However, > probably a good reason why this has gone unnoticed that long, is that > freqanalysis_tfr is a very old piece of code (and very slow), and the > exact same functionality should be covered by freqanalysis_wltconvol > (but this guy is much faster). Even better, freqanalysis_mtmconvol > operates in a very similar way (and you can even get it to mimick a > classical waveletanalysis, given the proper settings), but here you > have much more flexibility in defining your time-frequency resolution > by playing with 'multitapers'. > To give you a look in the kitchen: freqanalysis_tfr operates by > applying a convolution in the time domain, between the time domain > data and the wavelet. Convolution in the time domain is equivalent to > multiplication in the frequency domain. > Freqanalysis_mtmconvol/wltconvol operate by performing this > multiplication in the frequency domain, rather than the slow convolution. > > Yours, > > Jan-Mathijs > > On Feb 16, 2009, at 2:58 PM, Paco Diaz wrote: > >> Dear fieldtrip users, >> >> While reading carefully what the function freqanalysis_tfr do, I have >> found something that seems very extrange to me. I think that the general >> procedure for the wavelet transformation is clear but I can't get why >> do you >> multiply by 2, and divide by the sampling rate, the absolute value of >> the >> convolution. >> I have still used the function with very good results, but I would >> like to >> understand that step in order to sleep well. >> >> Here is a piece of the code: >> >> for k=1:size(dat,1) >> for j=1:length(cfg.foi) >> cTmp = conv(dat(k,:),M{j}); >> cTmp = (2*abs(cTmp)/data.fsample).^2; >> cTmp = >> cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2)); >> cTmp = cTmp(:,1:cfg.downsample:end); >> if strcmp(cfg.keeptrials, 'yes') >> freq.powspctrm(i,k,j,:) = cTmp'; >> else >> freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + >> cTmp'; % >> compute the running sum >> end >> end >> end >> >> >> Thank you very much in advance, Paco. >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. > > ---------------------------------- > 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/fcdonders/fieldtrip. > -- --------------------------------------------------------- Francisco Javier Díaz Santaella Department of Psychiatry and Clinical Psychobiology University of Barcelona P. Vall d'Hebron 171 * 08035 Barcelona * Spain Telf.: +34 93 3125035 * Cell Phone: +34 678 89 47 57 email: pacodiaz at ub.edu http://www.ub.edu/brainlab --------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue Feb 17 11:16:00 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 17 Feb 2009 11:16:00 +0100 Subject: RAM use of freqstatistics Message-ID: Dear Listusers, I have recently started to use freqstatistics with the cfg.correctm = 'cluster' option again and I am a bit puzzled by the amount of RAM it uses - but maybe that's normal. I just want to make sure I am not overlooking some stupid mistake. Here is the code (it uses ~20GB per 1000 randomization draws, never got it to run through 5000+ iterations): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PathName='/data/home1/wibral/Projects/HysteresisMEG/'; FileType='.mat'; AnalysisStr='TF_MTM_win125ms_fsm16p0Hz_Rel_'; PreprocStr='_0_cond_Preproc4LCMV_denoised_fmin0.5Hz_fmax200Hz_'; % contains the subject and date part of filename Design={ 'AEF29_HysteresisMEG_20080428'; 'AKN13_HysteresisMEG_20080901'; 'AZN28_HysteresisMEG_20080811'; 'BAP07_HysteresisMEG_20090204'; 'BRA29_HysteresisMEG_20080829'; 'CHN03_HysteresisMEG_20080818'; 'EKD25_HysteresisMEG_20080815'; 'HZA25_HysteresisMEG_20080725'; 'IWA05_HysteresisMEG_20080606'; 'MBA11_HysteresisMEG_20080728'; 'MTA07_HysteresisMEG_20090128'; 'RRA18_HysteresisMEG_20080825'; 'SKA29_HysteresisMEG_20090211'; 'TSS07_HysteresisMEG_20080822'; }; for i=1:length(Design) fullname1=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr1,FileType); load(fullname1); % a variable named TFdata or TFdataRel exists after this step data1{i}=TFdataRel; % clear TFdata; clear TFdataRel; fullname2=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr2,FileType); load(fullname2); %a variable named TFdata or TFdataRel exists after this step data2{i}=TFdataRel; % clear TFdata; clear TFdataRel; end; cfg=[]; cfg.keepindividual='yes'; TFGA1 = freqgrandaverage(cfg,data1{:}); TFGA1.grad=data1{1}.grad; %get some gradiometer information for plotting TFGA2 = freqgrandaverage(cfg,data2{:}); TFGA2.grad=data2{1}.grad; %get some gradiometer information for plotting % do freqstatistics cfg4stat=[]; cfg4stat.clusteralpha = 0.05; % control admission to a cluster cfg4stat.alpha = 0.05; % control the false alarm rate of the permutation test cfg4stat.avgovertime = 'no'; cfg4stat.avgoverfreq = 'no'; cfg4stat.avgoverchan = 'no'; cfg4stat.statistic = 'depsamplesT'; % test statistic to evaluate the effect at the sample level cfg4stat.numrandomization = (2^12); % cfg4stat.correctm = 'cluster'; cfg4stat.method = 'montecarlo'; cfg4stat.dimord = 'chan_freq_time'; cfg4stat.dim = 'chan_freq_time'; nSubjects = length(Design); a = [1:nSubjects]; b = ones(1,nSubjects); cfg4stat.design = [a a; b (2*b)]; cfg4stat.uvar = 1; % "subject" is unit of observation cfg4stat.ivar = 2; % row of the design matrix that contains the independent variable FreqStatResult = freqstatistics(cfg4stat,TFGA1,TFGA2) ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Feb 17 20:40:11 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 17 Feb 2009 20:40:11 +0100 Subject: RAM use of freqstatistics In-Reply-To: <902003749@web.de> Message-ID: Dear Michael, As far as I can see you did not make any stupid mistakes. I think the reason that freqstatistics uses so much RAM is because you are looking for clusters over time, frequency and channels. Therefore you get a matrix with size Nchan*Nfreq*Ntime for each randomization. With a fine time and frequency resolution, this can become a lot of bites! If you already have a priory hypothesis on the frequency band of interest, or the time of interest, you could consider averaging over freq or time. If you don't want to do this, you could maybe choose a coarser time and/or frequency resolution. I hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Tuesday, February 17, 2009 11:16 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] RAM use of freqstatistics Dear Listusers, I have recently started to use freqstatistics with the cfg.correctm = 'cluster' option again and I am a bit puzzled by the amount of RAM it uses - but maybe that's normal. I just want to make sure I am not overlooking some stupid mistake. Here is the code (it uses ~20GB per 1000 randomization draws, never got it to run through 5000+ iterations): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PathName='/data/home1/wibral/Projects/HysteresisMEG/'; FileType='.mat'; AnalysisStr='TF_MTM_win125ms_fsm16p0Hz_Rel_'; PreprocStr='_0_cond_Preproc4LCMV_denoised_fmin0.5Hz_fmax200Hz_'; % contains the subject and date part of filename Design={ 'AEF29_HysteresisMEG_20080428'; 'AKN13_HysteresisMEG_20080901'; 'AZN28_HysteresisMEG_20080811'; 'BAP07_HysteresisMEG_20090204'; 'BRA29_HysteresisMEG_20080829'; 'CHN03_HysteresisMEG_20080818'; 'EKD25_HysteresisMEG_20080815'; 'HZA25_HysteresisMEG_20080725'; 'IWA05_HysteresisMEG_20080606'; 'MBA11_HysteresisMEG_20080728'; 'MTA07_HysteresisMEG_20090128'; 'RRA18_HysteresisMEG_20080825'; 'SKA29_HysteresisMEG_20090211'; 'TSS07_HysteresisMEG_20080822'; }; for i=1:length(Design) fullname1=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr1,FileType); load(fullname1); % a variable named TFdata or TFdataRel exists after this step data1{i}=TFdataRel; % clear TFdata; clear TFdataRel; fullname2=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr2,FileType); load(fullname2); %a variable named TFdata or TFdataRel exists after this step data2{i}=TFdataRel; % clear TFdata; clear TFdataRel; end; cfg=[]; cfg.keepindividual='yes'; TFGA1 = freqgrandaverage(cfg,data1{:}); TFGA1.grad=data1{1}.grad; %get some gradiometer information for plotting TFGA2 = freqgrandaverage(cfg,data2{:}); TFGA2.grad=data2{1}.grad; %get some gradiometer information for plotting % do freqstatistics cfg4stat=[]; cfg4stat.clusteralpha = 0.05; % control admission to a cluster cfg4stat.alpha = 0.05; % control the false alarm rate of the permutation test cfg4stat.avgovertime = 'no'; cfg4stat.avgoverfreq = 'no'; cfg4stat.avgoverchan = 'no'; cfg4stat.statistic = 'depsamplesT'; % test statistic to evaluate the effect at the sample level cfg4stat.numrandomization = (2^12); % cfg4stat.correctm = 'cluster'; cfg4stat.method = 'montecarlo'; cfg4stat.dimord = 'chan_freq_time'; cfg4stat.dim = 'chan_freq_time'; nSubjects = length(Design); a = [1:nSubjects]; b = ones(1,nSubjects); cfg4stat.design = [a a; b (2*b)]; cfg4stat.uvar = 1; % "subject" is unit of observation cfg4stat.ivar = 2; % row of the design matrix that contains the independent variable FreqStatResult = freqstatistics(cfg4stat,TFGA1,TFGA2) ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 18 09:10:46 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 18 Feb 2009 09:10:46 +0100 Subject: ClassFile information for selecting trials 2 In-Reply-To: <20090217211726.80634qbesey29nx2@webmail.uni-tuebingen.de> Message-ID: Dear Nicola, Please describe in detail what you are doing to get up to this point where you seem to have a problem. It would help most if you would include your trial function into the email and descibe the steps, which I would assume to be cfg = [] cfg.dataset = 'Subject01.ds' cfg.trialfun = 'your_trial_function' % your trial function would call the read_event function and make a "trl" matrix cfg = definetrial(cfg) data = preprocessing(cfg) Is this indeed what you are doing? best regards, Robert On 17 Feb 2009, at 21:17, Nicola Neumann wrote: > > Dear Robert, > > Thanks for the detailed reply! However, I get error messages even > with your "Subject01" data. The program cannot read the data at > > dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', > 'double'); > dimord = 'samples_chans_trials'; > > Do you know why this happens? > > Thanks again. > nicola > ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Fri Feb 20 10:44:58 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Fri, 20 Feb 2009 10:44:58 +0100 Subject: Definetrial Message-ID: Dear all, Still trying to define trials, I am stuck at the following point: cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 2; cfg = definetrial(cfg); readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) ??? Attempt to reference field of non-structure array. Error in ==> trialfun_general at 126 for i=find(strcmp(cfg.trialdef.eventtype, {event.type})) Error in ==> definetrial at 205 [trl, event] = feval(cfg.trialfun, cfg); Since the skript is from the tutorial and seems to work at everybody else's, it must be some stupid kind of mistake. But which? Thanks for your help. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From ghocepie at ULB.AC.BE Fri Feb 20 11:18:14 2009 From: ghocepie at ULB.AC.BE (Gatien Hocepied) Date: Fri, 20 Feb 2009 11:18:14 +0100 Subject: Problems with fieldtrip toolbox In-Reply-To: <11E973AC-714A-4BFF-A8E9-F570B35E0F9B@fcdonders.ru.nl> Message-ID: Dear all, Robert, thank you for the advice. I will turn to an heuristic approach for my work. I would have another question. The vector dip.mom given by the fitting function is the dipole moment. He permits to know the time-varying orientation of the dipole and I suppose the amplitude of this vector. By using that, I would like to know how I could have the time-varying current amplitude of the source ? Best regards, Gatien Hocepied -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Robert Oostenveld Envoyé : lundi 16 février 2009 13:13 À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] Problems with fieldtrip toolbox On 12 Feb 2009, at 17:12, Gatien Hocepied wrote: > Dear all, > > I recently used your toolbox. In order to find the amplitude of > several dipoles, I ran different functions of the toolbox. However, > even the results seem to be correct for test signals, when I used > these functions for my 25-ELEC EEG signals (time window : 10 sec, > Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, > the results are not the same from one experiment to the other > (obviously the initial positions are random) I used regional non- > linear technique. Would you have some clues for me ? Dear Gatien The strength of the fitted dipoles depends strongly on the position. So if you see different dipole strength/moment, then you should check whether the positions are the same. The position that is found after dipole fitting, and especially for multi-dipole models, can depend on the initial starting positions. I.e., the dipoles can end up in a local minimum of the error landscape, instead of the global minimum. To improve the robustness of the dipole fitting approach, you should start the nonlinear search with an initial location for your dipoles that is as close as possible to the optimal location. So if you have some prior knowledge about where your dipoles might be, then you should use that. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Feb 20 17:18:32 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 20 Feb 2009 17:18:32 +0100 Subject: sources' coordinates Message-ID: Dear all, I reconstructed the sources of my time-frequency data. Now i would like to have the coordinates of my sources. Is there an easy way to have the coordinates of sources exceeding a given value? Is it possible to only have the coordinates of the cluster's center? thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 20 17:35:00 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 20 Feb 2009 17:35:00 +0100 Subject: sources' coordinates In-Reply-To: <20090220171832.5mudhtjlcs80sc0w@courriel.upmc.fr> Message-ID: Dear Marco, You can use the interactive mode in sourceplot (method = 'ortho', interactive = 'yes') and than click on the cluster's center (or use location = 'max' and then the cursor will automatically be set on the voxel with the maximum value). Then the coordinates are printed on the screen. Or you can make a logical mask with only the voxels that are exceeding a certain value, and look at the .pos of those voxels. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marco SPERDUTI Sent: Friday, February 20, 2009 5:19 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sources' coordinates Dear all, I reconstructed the sources of my time-frequency data. Now i would like to have the coordinates of my sources. Is there an easy way to have the coordinates of sources exceeding a given value? Is it possible to only have the coordinates of the cluster's center? thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Mon Feb 23 12:45:08 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 23 Feb 2009 12:45:08 +0100 Subject: DICS, complex filter coeffcients and Virtual Electrodes Message-ID: Dear Fieldtrippers, I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. Any suggestion would be appreciated, Michael ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Mon Feb 23 13:16:21 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 23 Feb 2009 12:16:21 +0000 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: <906478771@web.de> Message-ID: Dear Michael, On Feb 23, 2009, at 11:45 AM, Michael Wibral wrote: > Dear Fieldtrippers, > > I was wondering about the correct way to get SAM-like virtual > electrodes using DICS. I naively tried to compute some virtual > electrodes using the DICS filter coeffcients on the raw > timecourses, but that obviously doesn't work because DICS filter > coefficients are complex (at least in Fieldtrip 20081208 ?). Yes, by default the filter-coefficients are complex-valued, when using cfg.method = 'dics'. There's an option for sourceanalysis, cfg.realfilter which can be set to 'yes'. When cfg.realfilter = 'yes'. The filter-coefficients are computed from the real part of the cross-spectral density matrix only. The rationale behind this would be that 'true' sources only live in the real part of the csd-matrix in the first place, because the forward mapping from source to signal is instantaneous (hence also of course the real-valued leadfields). On the other hand, including extra information in the computation of your filters (i.e. allowing them to be complex, thus using also the imaginary part), probably influences the suppressive properties of the filter. This would mean that noise sources in your data (which are not necessarily at zero phase-lag) may be more effectively suppressed. So I am not sure which is 'the correct' way here. However, if you want to use DICS-based filters to project your sensor data, I would use the option cfg.realfilter = 'yes', to obtain more 'meaningful' voxel-level time courses (but not that these time- courses are only optimised for the frequency band on which the filters had been computed). > Next thing I thought about was to FFT the single trial, filter it > and then inverse FFT it, because the DICS filters are supposed to > work in the frequency domain. But that shouldn't work either, > because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) > = filter(trial), because all operation are linear. This is true (so indeed that exercise is meaningless), but the subsequent estimate of power (i.e. squaring the fourier coefficients) is not linear. (power from the filtered data: abs(filter(FFT (trial))).^2 will be obviously different from filter(abs(FFT (trial)).^2) ). In general, if you want to approximate SAM, to me it would make more sense to use a time-domain beamformer in the first place, because DICS filters are optimised for a specific frequency bin in the first place. In other words, inverse-fft'ing the filtered sensor-fourier coefficients (across all frequencies) does not seem to make too much sense to me. This would boil down to bandpass-filtering your sensor data, calling timelockanalysis with cfg.covariance = 'yes' and cfg.covariancewindow = [something]. Then sourceanalysis with cfg.method = 'lcmv', after which you can project your bp-filtered data through the filters. > Next thing I am puzzled about is that the Filters (A) times the > leadfield matrix (L) should be the identity matrix: AL=1 (see the > Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip > -, then we would also have a complex leadfield, which seems odd to me. Not necessarily: the leadfield is always real-valued. If you interpret the product A*L just as a weighted sum of the complex numbers in A (weighted by L), the values in L can be such that the real part of the sum ends up to be 1, and the imaginary part ends up to be 0. (For your and my peace of mind you could try this by running sourceanalysis with cfg.keepfilter = 'yes' and cfg.realfilter = 'no' and cfg.keepleadfield = 'yes' and looking at a random filter*leadfield). Yours, Jan-Mathijs ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 23 13:33:50 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 23 Feb 2009 12:33:50 +0000 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: <906478771@web.de> Message-ID: Hi Michael, I'm doing this kind of things and I use LCMV beamformer (where the locations of the sources might come from your DICS analysis). This was Robert's suggestion. The reason is that DICS is only optimized for the particular frequency you are looking at and if you want to extract source data that contains other frequencies you need to look at the full frequency range. There are options in lcmv (cfg.lcmv.fixedori = 'yes') that reduces the two orthogonal sources (in MEG case) to one based on the direction of maximal variance. That's something similar to what SAM does (although I'm not sure exactly the same). Best, Vladimir On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral wrote: > Dear Fieldtrippers, > > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. > > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. > > Any suggestion would be appreciated, > Michael > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Mon Feb 23 14:40:20 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 23 Feb 2009 14:40:20 +0100 Subject: DICS, complex filter coeffcients and V irtual Electrodes Message-ID: Dear Jan-Mathijs, dear Vladimir, thanks for your quick replies. I indeed overlooked the cfg.realfilter option. Things seem to work fine now. I also have some comments on the optimization of DICS for a certain frequency: I think that's just the same in LCMV/SAM, where you also specify the band and time you're looking at and where you shouldn't project unfiltered raw data that contain other bands than the ones used for the computation of the filters. In my opinion you choose the frequency limits explicitly (via preprocessing) in LCMV and implicitly (via the spectral smoothing in the computation of the CSD matrix and the subsequent choice of a centre frequency for beamforming) in DICS. This, of course, also means that you should not compute narrow band beamformer filters (say for higher gamma frequencies) and project unfiltered (broadband) data through your filter. What I wanted to do was to compute narrow band sources (tpsmofrq = 5 or 10, center ferquency of 80Hz), prefilter the rawdata in the appropriate range and then project and interpret them. Should be ok, shouldn't it? Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 23.02.09 13:45:11 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] DICS, complex filter coeffcients and Virtual Electrodes > Hi Michael, > > I'm doing this kind of things and I use LCMV beamformer (where the > locations of the sources might come from your DICS analysis). This was > Robert's suggestion. The reason is that DICS is only optimized for the > particular frequency you are looking at and if you want to extract > source data that contains other frequencies you need to look at the > full frequency range. There are options in lcmv (cfg.lcmv.fixedori = > 'yes') that reduces the two orthogonal sources (in MEG case) to one > based on the direction of maximal variance. That's something similar > to what SAM does (although I'm not sure exactly the same). > > Best, > > Vladimir > > > On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral > wrote: > > Dear Fieldtrippers, > > > > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. > > > > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. > > > > Any suggestion would be appreciated, > > Michael > > > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Mon Feb 23 15:14:25 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 23 Feb 2009 15:14:25 +0100 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: Message-ID: Dear FT-colleagues, > Yes, by default the filter-coefficients are complex-valued, when > using cfg.method = 'dics'. There's an option for sourceanalysis, > cfg.realfilter which can be set to 'yes'. When cfg.realfilter = > 'yes'. The filter-coefficients are computed from the real part of the > cross-spectral density matrix only. The rationale behind this would > be that 'true' sources only live in the real part of the csd-matrix > in the first place, because the forward mapping from source to signal > is instantaneous (hence also of course the real-valued leadfields). > On the other hand, including extra information in the computation of > your filters (i.e. allowing them to be complex, thus using also the > imaginary part), probably influences the suppressive properties of > the filter. This would mean that noise sources in your data (which > are not necessarily at zero phase-lag) may be more effectively > suppressed. So I am not sure which is 'the correct' way here. > However, if you want to use DICS-based filters to project your sensor > data, I would use the option cfg.realfilter = 'yes', to obtain more > 'meaningful' voxel-level time courses (but not that these time- > courses are only optimised for the frequency band on which the > filters had been computed). If you believe that the sensor signal is an instantaneous mapping of a source signal, then complex filter weights do not make sense. You can incorporate this constraint (Imag(filter)=0) in the calculation of your filter weights from the complex CSD matrix and the real-valued leadfields. After some linear algebra, you obtain that the solution to this constrained least-squares minimization is equal to usual solution (see, van Veen et al, IEEE-TBME; Gross et all, PNAS) but applied to Real(CSD) instead of the complex-valued CSD matrix. Kind regards, Eric Maris > > > Next thing I thought about was to FFT the single trial, filter it > > and then inverse FFT it, because the DICS filters are supposed to > > work in the frequency domain. But that shouldn't work either, > > because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) > > = filter(trial), because all operation are linear. > > This is true (so indeed that exercise is meaningless), but the > subsequent estimate of power (i.e. squaring the fourier coefficients) > is not linear. (power from the filtered data: abs(filter(FFT > (trial))).^2 will be obviously different from filter(abs(FFT > (trial)).^2) ). > > In general, if you want to approximate SAM, to me it would make more > sense to use a time-domain beamformer in the first place, because > DICS filters are optimised for a specific frequency bin in the first > place. In other words, inverse-fft'ing the filtered sensor-fourier > coefficients (across all frequencies) does not seem to make too much > sense to me. This would boil down to bandpass-filtering your sensor > data, calling timelockanalysis with cfg.covariance = 'yes' and > cfg.covariancewindow = [something]. Then sourceanalysis with > cfg.method = 'lcmv', after which you can project your bp-filtered > data through the filters. > > > > Next thing I am puzzled about is that the Filters (A) times the > > leadfield matrix (L) should be the identity matrix: AL=1 (see the > > Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip > > -, then we would also have a complex leadfield, which seems odd to me. > > Not necessarily: the leadfield is always real-valued. If you > interpret the product A*L just as a weighted sum of the complex > numbers in A (weighted by L), the values in L can be such that the > real part of the sum ends up to be 1, and the imaginary part ends up > to be 0. (For your and my peace of mind you could try this by running > sourceanalysis with cfg.keepfilter = 'yes' and cfg.realfilter = 'no' > and cfg.keepleadfield = 'yes' and looking at a random filter*leadfield). > > Yours, > > Jan-Mathijs > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 23 18:47:21 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 23 Feb 2009 17:47:21 +0000 Subject: DICS, complex filter coeffcients and V irtual Electrodes In-Reply-To: <906564488@web.de> Message-ID: I'm not sure whether averaging in the frequency domain and using it to compute the filters is the same as filtering in the time domain and using LCMV on the filtered data. Think about running DICS on a very broad range from 5 to 95 Hz. Would it mean something then? For a narrow enough range it probably gets quite close but what is 'narrow enough'? Probably depends on the data. Vladimir On Mon, Feb 23, 2009 at 1:40 PM, Michael Wibral wrote: > Dear Jan-Mathijs, dear Vladimir, > > thanks for your quick replies. I indeed overlooked the cfg.realfilter option. Things seem to work fine now. > > I also have some comments on the optimization of DICS for a certain frequency: I think that's just the same in LCMV/SAM, where you also specify the band and time you're looking at and where you shouldn't project unfiltered raw data that contain other bands than the ones used for the computation of the filters. In my opinion you choose the frequency limits explicitly (via preprocessing) in LCMV and implicitly (via the spectral smoothing in the computation of the CSD matrix and the subsequent choice of a centre frequency for beamforming) in DICS. This, of course, also means that you should not compute narrow band beamformer filters (say for higher gamma frequencies) and project unfiltered (broadband) data through your filter. What I wanted to do was to compute narrow band sources (tpsmofrq = 5 or 10, center ferquency of 80Hz), prefilter the rawdata in the appropriate range and then project and interpret them. Should be ok, shouldn't it? > > Michael > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 23.02.09 13:45:11 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] DICS, complex filter coeffcients and Virtual Electrodes > > >> Hi Michael, >> >> I'm doing this kind of things and I use LCMV beamformer (where the >> locations of the sources might come from your DICS analysis). This was >> Robert's suggestion. The reason is that DICS is only optimized for the >> particular frequency you are looking at and if you want to extract >> source data that contains other frequencies you need to look at the >> full frequency range. There are options in lcmv (cfg.lcmv.fixedori = >> 'yes') that reduces the two orthogonal sources (in MEG case) to one >> based on the direction of maximal variance. That's something similar >> to what SAM does (although I'm not sure exactly the same). >> >> Best, >> >> Vladimir >> >> >> On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral >> wrote: >> > Dear Fieldtrippers, >> > >> > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. >> > >> > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. >> > >> > Any suggestion would be appreciated, >> > Michael >> > >> > >> > ---------------------------------- >> > 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/fcdonders/fieldtrip. >> > >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Tue Feb 24 15:20:55 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 24 Feb 2009 15:20:55 +0100 Subject: reading ANT cnt files Message-ID: hi everyone, i'm trying to read some ANT cnt files. however i get following error: ??? Error using ==> read_eep_cnt at 26 could not locate mex file looking at that m-file, it consists only of the error message. in fieldtrip/fileio/private i can see some c-file called read_eep_cnt.c. do i need to compile them? is this issue in some kind related to an older inquiry (in it, it says the issue could only be solved with ANT support)? https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0608&L=FIELDTRIP&P=R4227 i am working on a Intel-Mac using Matlab R2008a. has anyone using ANT cnt's encoutered a similar problem and found a solution to the issue? any help greatly appreciated. cheers, nathan ---------------------------------- 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/fcdonders/fieldtrip. From lwn_07 at YAHOO.COM.CN Wed Feb 25 08:36:13 2009 From: lwn_07 at YAHOO.COM.CN (=?utf-8?B?5p2O5Y2r5aic?=) Date: Wed, 25 Feb 2009 15:36:13 +0800 Subject: How to set the baseline in TFRs results plot? Message-ID: Hi everyone,      I've calculated the TFRs of my MEG signals recorded in the finger tapping experiments, now I want to plot result. My problem is that I don't  know how to set the parameter 'cfg.baseline' (in tutorial, it was set cfg.baseline=[-0.5 -0.1]).  Is there anyone has ever processed MEG signals in the similar experiment?       ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Feb 25 14:08:18 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Feb 2009 14:08:18 +0100 Subject: reading ANT cnt files In-Reply-To: <0E3727C9-CB04-4BF1-AE45-D25B5A064BBB@mac.com> Message-ID: Hi Nathan, On 24 Feb 2009, at 15:20, Nathan Weisz wrote: > i'm trying to read some ANT cnt files. however i get following error: > ??? Error using ==> read_eep_cnt at 26 > could not locate mex file > > looking at that m-file, it consists only of the error message. That is the usual mechanism to detect that the mex file is missing. By default Matlab will execute the mex file (if available) and will only fall back to the m-file if the mex file is missing. > in fieldtrip/fileio/private i can see some c-file called > read_eep_cnt.c. do i need to compile them? Yes. And the source code for the mex file requires an additional library, which was released as open source software by the manufacturer. A copy of the open source ANT source code is available from ftp://ftp.fcdonders.nl/pub/fieldtrip/external I am planning to move the ANT/EEProbe mex files and associated source code to a seperate directory under fieldtrip/external/eeprobe to make more clear that it is not a fully integral part of the regular fieldtrip release > is this issue in some kind related to an older inquiry (in it, it > says the issue could only be solved with ANT support)? > https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0608&L=FIELDTRIP&P=R4227 contrary to the previous mail you are referring to, the ANT source code is now available. So you might be able to fix it without help from ANT. > i am working on a Intel-Mac using Matlab R2008a. The ANT source code is platform aware and I know that it can be compiled on a variety of operating systems and hardware (SGI, i386, dos, windows, linux, irix). However, you probably have to make some modifications to the Makefile. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 25 14:09:15 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Feb 2009 14:09:15 +0100 Subject: How to set the baseline in TFRs results plot? In-Reply-To: <451029.91734.qm@web15602.mail.cnb.yahoo.com> Message-ID: Hi 李卫娜, The baseline depends on the interval that is available prior to stimulation in which you can estimate the time-frequency resolved MEG power. If your subject is intermittently tapping, then you should choose the time between the tapping. If the subject is continuously fingertapping, then you should do the baseline correction differently by estimating the power in a section of your experiment in which the subject was resting. best regards, Robert On 25 Feb 2009, at 8:36, 李卫娜 wrote: > Hi everyone, > > I've calculated the TFRs of my MEG signals recorded in the finger > tapping experiments, now I want to plot result. My problem is that I > don't know how to set the parameter 'cfg.baseline' (in tutorial, it > was set cfg.baseline=[-0.5 -0.1]). Is there anyone has ever > processed MEG signals in the similar experiment? > > > > > 好玩贺卡等你发,邮箱贺卡全新上线! > ---------------------------------- 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/fcdonders/fieldtrip. From Roozbeh.Rezaie at UTH.TMC.EDU Wed Feb 25 21:35:39 2009 From: Roozbeh.Rezaie at UTH.TMC.EDU (Rezaie, Roozbeh) Date: Wed, 25 Feb 2009 14:35:39 -0600 Subject: 2nd Biannual ISACM Conference Message-ID: ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2009 ISACM Conference Announcement.pdf Type: application/pdf Size: 118212 bytes Desc: 2009 ISACM Conference Announcement.pdf URL: From ole.jensen at DONDERS.RU.NL Thu Feb 26 11:56:49 2009 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 26 Feb 2009 11:56:49 +0100 Subject: Toolkit course on EEG/MEG data analysis/Nijmegen In-Reply-To: Message-ID: Dear all, I would like to announce the TOOL-KIT OF COGNITIVE NEUROSCIENCE 2009: advanced data analysis and source modelling of EEG and MEG data Date: May 4-7, 2009 Organizer: Ole Jensen Location: Donders Centre for Cognitive Neuroimaging, Nijmegen http://www.ru.nl/neuroimaging/courses/toolkit_2009/ Best regards, Ole Jensen -- Ole Jensen Principal Investigator Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- 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/fcdonders/fieldtrip. From fraschini at UNICA.IT Thu Feb 26 15:38:22 2009 From: fraschini at UNICA.IT (Matteo Fraschini) Date: Thu, 26 Feb 2009 15:38:22 +0100 Subject: Problem with neuroscan eeg definetrial Message-ID: Dear all, i have a problem trying to define trials with my eeg neuroscan file. At the end of the following steps i can not see any trials on my cfg structure... cfg.datafile='my_eeg_file.eeg'; cfg.headerfile='my_eeg_file.eeg'; (where my_eeg_file.eeg is the full path to my file... 'C:\...\my_eeg_file.eeg') Now, if i type cfg.trialdef.eventtype = '?' i have: datafile: 'my_eeg_file.eeg' headerfile: 'my_eeg_file.eeg' trialdef: [1x1 struct] Typing cfg = definetrial(cfg); i have: evaluating trialfunction 'trialfun_general' the following events were found in the datafile event type: 'accept' with event values: 1 event type: 'trial' with event values: 1 2 no trials have been defined yet, see DEFINETRIAL for further help found 400 events created 0 trials So it looks good with my events. Still have to define the trials, ok. Now i use cfg.trialdef.eventtype and cfg.trialdef.eventvalue to define trials but the trl[] field on cfg structure is still empty... Can anyone give me a suggestion please? Thank you very much, Matteo ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Feb 26 21:08:35 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 26 Feb 2009 21:08:35 +0100 Subject: fieldtrip website moved (again) Message-ID: Dear FieldTrip users You may have noticed over the last few weeks that occasionally pages on this wiki appear empty. After quite some efforts this was pinpointed to a poor performance of the ruhosting webserver and the underlying NFS server. Therefore I have decided to move the fieldtrip website once more to a new location with a new address (URL). Most importantly is that it is now running on hardware that we actually control ourselves instead of depending on the university-wide hosting server. I hope that this finally resolves the problems. The new address that you can use on daily basis is http://fieldtrip.fcdonders.nl . The preferred (long-term) address to use in your publications to refer to remains http://www.ru.nl/neuroimaging/fieldtrip. All references to the old location will automatically be forwarded to the new site. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From luqiangxu at YAHOO.COM.CN Fri Feb 27 08:22:05 2009 From: luqiangxu at YAHOO.COM.CN (xu luqiang) Date: Fri, 27 Feb 2009 15:22:05 +0800 Subject: =?gb2312?Q?=BB=D8=B8=B4=A3=BA?= [FIELDTRIP] Toolkit course on EEG/MEG data analysis/Nijmegen In-Reply-To: <49A67571.7050009@donders.ru.nl> Message-ID: Dear sir, I hope to download tutorial data from your website. I try to login with username 'anonymous' and use my email address "luqiangxu at yahoo.com.cn"as password,but It does not work. Can I login with username 'anonymous' and use my email address "luqiangxu at yahoo.com.cn"as password? thanks luqiang --- 09年2月26日,周四, Ole Jensen 写道: > 发件人: Ole Jensen > 主题: [FIELDTRIP] Toolkit course on EEG/MEG data analysis/Nijmegen > 收件人: FIELDTRIP at NIC.SURFNET.NL > 日期: 2009,226,周四,6:56下午 > Dear all, > > I would like to announce the > > TOOL-KIT OF COGNITIVE NEUROSCIENCE 2009: advanced data > analysis and source modelling of EEG and MEG data > > Date: May 4-7, 2009 > Organizer: Ole Jensen > Location: Donders Centre for Cognitive Neuroimaging, > Nijmegen > > > http://www.ru.nl/neuroimaging/courses/toolkit_2009/ > > Best regards, > > Ole Jensen > > -- Ole Jensen > Principal Investigator > Donders Institute for Brain, Cognition and Behaviour Centre > for Cognitive Neuroimaging P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Office : +31 24 36 10884 > MEG lab : +31 24 36 10988 > > Fax : +31 24 36 10989 > > e-mail : ole.jensen at donders.ru.nl > URL : http://ojensen.ruhosting.nl/ > > ---------------------------------- > 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/fcdonders/fieldtrip. ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ ---------------------------------- 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/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Fri Feb 27 11:01:32 2009 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Fri, 27 Feb 2009 11:01:32 +0100 Subject: incomplete CSD Matrix Message-ID: Dear fieldtrip users, I am running sourceanalysis for different subjects. In 18 of 20 sujbects everything works out, however for 2 subjects in particular I am getting the following error message: ???Error using==>fieldtrip-20081208/private/prepare_freq_matrices at201 The cross-spectral-density matrix is not complete Error in==>sourceanalysis at 723 [Cf, Cr, Pr, Ntrials , cfg] = prepare_freq_matrices(cfg, data); Error in==>computeLead fields at 105 [pressource]= sourceanalysis(cfg,preTFdata); I checked the Cf matrix and found out that it contains 2 NaN entries. Does anyone have an idea what this could possibly be related to or what I should check my data for? I used exactly the same parameters as for all the other subjects. Best, Frederic _________________________________________________________________ http://redirect.gimas.net/?n=M0902xHMMobile Nie wieder eine Mail verpassen mit Hotmail fürs Handy! ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vgomez at IUA.UPF.EDU Fri Feb 27 14:07:19 2009 From: vgomez at IUA.UPF.EDU (Vicen) Date: Fri, 27 Feb 2009 14:07:19 +0100 Subject: Matlab warnings Message-ID: Hi, I'm starting with Fieldtrip (outside of the Donders) and every time I try to use any of the Fieldtrip functions I get a large list of warnings of the type: "Warning: Function /vol/snn/vicen/bci/fieldtrip-20090224/external/biosig/private/strncmpi.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict." Is there any sort of startup.m file that can be used to start Fieldtrip correctly so that these warnings do not appear? I'm running this in the cnXX.science.ru.nl cluster nodes. Thanks in advance, Vicenç ---------------------------------- 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/fcdonders/fieldtrip. From jdien07 at MAC.COM Fri Feb 27 16:32:35 2009 From: jdien07 at MAC.COM (Joseph Dien) Date: Fri, 27 Feb 2009 10:32:35 -0500 Subject: Matlab warnings In-Reply-To: <49A7E587.30707@iua.upf.edu> Message-ID: I just remove those biosig files. I don't think it's a good idea for Biosig to be messing with Matlab's built-in functions anyway. At least on my system, I find that the ones in the maybe-missing folder cause Matlab to become unstable. Cheers! Joe On Feb 27, 2009, at 8:07 AM, Vicen wrote: > Hi, > > I'm starting with Fieldtrip (outside of the Donders) and every time > I try to use any of the Fieldtrip functions I get a large list of > warnings of the type: > > "Warning: Function /vol/snn/vicen/bci/fieldtrip-20090224/external/ > biosig/private/strncmpi.m > has the same name as a MATLAB builtin. We suggest you rename the > function to avoid a > potential name conflict." > > Is there any sort of startup.m file that can be used to start > Fieldtrip correctly so that these warnings do not appear? I'm > running this in the cnXX.science.ru.nl cluster nodes. > Thanks in advance, > > > > Vicenç > > ---------------------------------- > 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/fcdonders/fieldtrip. -------------------------------------------------------------------------------- Joseph Dien, Ph.D. Birth Defects Center Davidson Hall, Room 314A Belknap Campus University of Louisville Louisville, KY 40292 Office: Davidson Hall 314d (Belknap) E-mail: jdien07 at mac.com Phone: 502-852-2512 Fax: 502-852-2408 http://homepage.mac.com/jdien07/ ---------------------------------- 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/fcdonders/fieldtrip. From Ingmar.Schneider at BIO.UNI-GIESSEN.DE Mon Feb 2 14:00:17 2009 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Mon, 2 Feb 2009 14:00:17 +0100 Subject: Activation vs. baseline testing Message-ID: Dear listusers, I am currently programming a script for the activation vs. baseline testing of MEG-data. As far as I can see from the fieldtrip documentation there are two functions incorporated (clusterrandanalysis and freqstatistics) that allow to compute such a test. It seems to me that both have a quite broad intersection of function. Do these functions differ in any way? Best regards, Ingmar -- Ingmar Schneider Max-Planck-Institut für Hirnforschung Deutschordenstraße 46 D-60528 Frankfurt/Main Tel.: 069/6301-83221 Fax: 069/96769-327 Mail1: schneider at mpih-frankfurt.mpg.de Mail2: ingmar.schneider at bio.uni-giessen.de ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 2 14:19:41 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 2 Feb 2009 13:19:41 +0000 Subject: Activation vs. baseline testing In-Reply-To: <20090202140017.zbjd8gyqs4k8ggg0@imap.stud.uni-giessen.de> Message-ID: Dear Ingmar, clusterrandanalysis is the original implementation of cluster-based statistical testing in FIeldtrip whereas freqstatistics is a newer and more well structured and flexible implementation. If you are just getting started, use freqstatistics. Best, Vladimir On Mon, Feb 2, 2009 at 1:00 PM, Ingmar Schneider wrote: > Dear listusers, > > I am currently programming a script for the activation vs. baseline testing > of MEG-data. As far as I can see from the fieldtrip documentation there are > two functions incorporated (clusterrandanalysis and freqstatistics) that > allow to compute such a test. It seems to me that both have a quite broad > intersection of function. > > Do these functions differ in any way? > > Best regards, > Ingmar > > -- > Ingmar Schneider > > Max-Planck-Institut für Hirnforschung > Deutschordenstraße 46 > D-60528 Frankfurt/Main > > Tel.: 069/6301-83221 > Fax: 069/96769-327 > Mail1: schneider at mpih-frankfurt.mpg.de > Mail2: ingmar.schneider at bio.uni-giessen.de > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ---------------------------------- > 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/fcdonders/fieldtrip. > > ---------------------------------- 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/fcdonders/fieldtrip. From Ingmar.Schneider at BIO.UNI-GIESSEN.DE Mon Feb 2 14:50:14 2009 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Mon, 2 Feb 2009 14:50:14 +0100 Subject: Activation vs. baseline testing In-Reply-To: Message-ID: Dear Vladimir, thanks for your quick reply. I assumed that from the documentation, but as I am not an expert on statistics and could not determine obvious functional differences I thought it best to ask. Best regards, Ingmar Quoting Vladimir Litvak : > Dear Ingmar, > > clusterrandanalysis is the original implementation of cluster-based > statistical testing in FIeldtrip whereas freqstatistics is a newer and > more well structured and flexible implementation. If you are just > getting started, use freqstatistics. > > Best, > > Vladimir > > > On Mon, Feb 2, 2009 at 1:00 PM, Ingmar Schneider > wrote: >> Dear listusers, >> >> I am currently programming a script for the activation vs. baseline testing >> of MEG-data. As far as I can see from the fieldtrip documentation there are >> two functions incorporated (clusterrandanalysis and freqstatistics) that >> allow to compute such a test. It seems to me that both have a quite broad >> intersection of function. >> >> Do these functions differ in any way? >> >> Best regards, >> Ingmar >> >> -- >> Ingmar Schneider >> >> Max-Planck-Institut für Hirnforschung >> Deutschordenstraße 46 >> D-60528 Frankfurt/Main >> >> Tel.: 069/6301-83221 >> Fax: 069/96769-327 >> Mail1: schneider at mpih-frankfurt.mpg.de >> Mail2: ingmar.schneider at bio.uni-giessen.de >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> >> > > ---------------------------------- > 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/fcdonders/fieldtrip. > -- Ingmar Schneider Max-Planck-Institut für Hirnforschung Deutschordenstraße 46 D-60528 Frankfurt/Main Tel.: 069/6301-83221 Fax: 069/96769-327 Mail1: schneider at mpih-frankfurt.mpg.de Mail2: ingmar.schneider at bio.uni-giessen.de ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- 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/fcdonders/fieldtrip. From e.maris at DONDERS.RU.NL Mon Feb 2 16:47:20 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 2 Feb 2009 16:47:20 +0100 Subject: Activation vs. baseline testing In-Reply-To: <20090202140017.zbjd8gyqs4k8ggg0@imap.stud.uni-giessen.de> Message-ID: Dear Ingmar, > I am currently programming a script for the activation vs. baseline > testing of MEG-data. As far as I can see from the fieldtrip > documentation there are two functions incorporated > (clusterrandanalysis and freqstatistics) that allow to compute such a > test. It seems to me that both have a quite broad intersection of > function. > > Do these functions differ in any way? They should provide the same output. If they don't, let me know. Good luck, Eric Maris > > Best regards, > Ingmar > > -- > Ingmar Schneider > > Max-Planck-Institut für Hirnforschung > Deutschordenstraße 46 > D-60528 Frankfurt/Main > > Tel.: 069/6301-83221 > Fax: 069/96769-327 > Mail1: schneider at mpih-frankfurt.mpg.de > Mail2: ingmar.schneider at bio.uni-giessen.de > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Feb 2 18:28:10 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 2 Feb 2009 18:28:10 +0100 Subject: Lambda Message-ID: Dear users, i'm using the function sourceanaylis, which is the meaning of the lambda parameter? my results change a lot depending on the value i use, so i would like to know in which way i should choose this value. thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue Feb 3 12:11:56 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 3 Feb 2009 12:11:56 +0100 Subject: Lambda Message-ID: Hi Marco, in a nutshell the effect of the lambda parameter is to smoothe your solution in space, it also makes it more stable in the presence of noise. You might know that the estimation of the covariance matrix for beamforming requires quite a lot of data. CTF/VSM (a MEG manufacturer) used to suggest to have your data satisfy the following relationship: 3000 < BW[Hz] * #trials *EffectLength[s] Where BW[Hz] is the bandwidth of your effect of interest in Hz, #trials is the number of trials that contain that effect, and EffectLength[s] is the length of your effect in seconds (NOT ms!). Here's an example: You have an effect between 30 and 60Hz, so the bandwidth of that effect is 30Hz. The effect is visible (say at the electrode level) for 400ms=0.4s in each trial. Now you calculate the number of trials to be: #trials > 3000 / ( BW[Hz] * EffectLength[s]) = 3000/(0.4*30)= 250. This means that you would need 250 artifact free, valid trials. Choosing a larger lambda can help to reduce the amount of data necessary, but you get a more smeared out solution. A good introduction and simulation results for various values of lambda can be found in: Neuroimage. 2008 Feb 15;39(4):1788-802. Epub 2007 Oct 10 Optimising experimental design for MEG beamformer imaging. Brookes MJ, Vrba J, Robinson SE, Stevenson CM, Peters AM, Barnes GR, Hillebrand A, Morris PG. Hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "Marco SPERDUTI" > Gesendet: 02.02.09 18:28:50 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] Lambda > Dear users, > > i'm using the function sourceanaylis, which is the meaning of the > lambda parameter? > > my results change a lot depending on the value i use, so i would like > to know in which way i should choose this value. > > thank you, > > Marco > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Tue Feb 3 12:11:59 2009 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Tue, 3 Feb 2009 11:11:59 +0000 Subject: Lambda In-Reply-To: <890983272@web.de> Message-ID: Thanks for your message. I am away until Monday 9th February. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Tue Feb 3 14:53:06 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Tue, 3 Feb 2009 14:53:06 +0100 Subject: Lambda In-Reply-To: <890983272@web.de> Message-ID: Thank you Michael, Marco Quoting Michael Wibral : > Hi Marco, > > in a nutshell the effect of the lambda parameter is to smoothe your > solution in space, it also makes it more stable in the presence of > noise. You might know that the estimation of the covariance matrix > for beamforming requires quite a lot of data. CTF/VSM (a MEG > manufacturer) used to suggest to have your data satisfy the > following relationship: > > 3000 < BW[Hz] * #trials *EffectLength[s] > > Where BW[Hz] is the bandwidth of your effect of interest in Hz, > #trials is the number of trials that contain that effect, and > EffectLength[s] is the length of your effect in seconds (NOT ms!). > Here's an example: You have an effect between 30 and 60Hz, so the > bandwidth of that effect is 30Hz. The effect is visible (say at the > electrode level) for 400ms=0.4s in each trial. Now you calculate the > number of trials to be: > #trials > 3000 / ( BW[Hz] * EffectLength[s]) = 3000/(0.4*30)= 250. > This means that you would need 250 artifact free, valid trials. > Choosing a larger lambda can help to reduce the amount of data > necessary, but you get a more smeared out solution. > > A good introduction and simulation results for various values of > lambda can be found in: > > Neuroimage. 2008 Feb 15;39(4):1788-802. Epub 2007 Oct 10 > Optimising experimental design for MEG beamformer imaging. > Brookes MJ, Vrba J, Robinson SE, Stevenson CM, Peters AM, Barnes GR, > Hillebrand A, Morris PG. > > > Hope this helps, > Michael > >> -----Ursprüngliche Nachricht----- >> Von: "Marco SPERDUTI" >> Gesendet: 02.02.09 18:28:50 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: [FIELDTRIP] Lambda > > >> Dear users, >> >> i'm using the function sourceanaylis, which is the meaning of the >> lambda parameter? >> >> my results change a lot depending on the value i use, so i would like >> to know in which way i should choose this value. >> >> thank you, >> >> Marco >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From tobias.donner at NYU.EDU Tue Feb 3 17:20:45 2009 From: tobias.donner at NYU.EDU (Tobias Donner) Date: Tue, 3 Feb 2009 11:20:45 -0500 Subject: Research Assistant Position in Cognitive Neuroscience at NYU Message-ID: Research Assistant Position in Cognitive Neuroscience Department of Neurology, School of Medicine, New York University We are seeking a full-time Research Assistant to assist with cognitive neuroscience experiments involving human intracranial EEG. Main topics of investigation are language, memory, multisensory, brain-computer interface, seizures and others. Responsibilities include, but are not limited to, recruiting and scheduling of control subjects and patients, testing and recording from intracranial patients, maintenance of equipment, databases and files, as well as data analysis and manuscript preparation. Candidates who have experience with neuroimaging data collection and analysis are especially encouraged to apply. Other neuroimaging methods employed by the lab include fMRI and MEG. The laboratory provides a unique exposure to both basic research and clinical neuroscience. The position requires interaction with patients and hospital staff and therefore excellent verbal and interpersonal skills are required. Must be well-organized and detail oriented; extensive computer experience strongly preferred, with programming highly desirable. B.A. or B.S. required, such as in neuroscience, psychology, biology, computer science or biomedical engineering. The position is ideal for exceptional candidates seeking to pursue an advanced research degree in neuroscience or a related field. Likely start date is June 2009. Please visit our web lab page for more information: http:// mmil.ucsd.edu/thomas/group Please send resume and cover letter to: Thomas Thesen, Ph.D. Assistant Professor of Neurology New York University School of Medicine thomas.thesen at med.nyu.edu ---------------------------------- 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/fcdonders/fieldtrip. From florisdelange at GMAIL.COM Wed Feb 4 12:50:50 2009 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Wed, 4 Feb 2009 12:50:50 +0100 Subject: question about lcmv beamforming Message-ID: Dear Fieldtrippers, I have a question about the beamforming procedure, which I'm carrying out in the time-domain using LCMV. The strange thing I run into is that irrespective of what data I feed the function, I get the same inverse solution (with sourceanalysis.m). I first calculate the forward model and discretize it in a grid, using these lines: [vol,cfg]=prepare_singleshell([],segmentedmriF); (..) [grid] = prepare_leadfield(cfg); Then, I run the source-analysis as follows: data = {}; for t = 1:6 % six epochs of 50 ms data{t} = mradata{2}; data{t}.avg = data{t}.avg(:,(t-1)*30+1:t*30); data{t}.time = [1:30]; cfg = []; cfg.method = 'lcmv'; cfg.projectnoise = 'yes'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; cfg.lambda = 0; %1e-29; sourcet{t} = sourceanalysis(cfg,data{t}); end I checked, and the data-avg fields from different time-windows are (substantially) different from each other; while the avg.pow-values in sourcet from different time-windows are numerically identical. I don't understand how different data on the sensor-level can lead to identical source-reconstructions. But when I look in beamformer_lcmv.m, I see this line: dipout.pow(i) = trace(filt * Cy * ctranspose(filt)); suggesting that the power at each voxel is a function only of the spatial filter and covariance matrix? Does this make sense? Any input very much appreciated! Best wishes, Floris -- Floris de Lange http://www.florisdelange.com ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 4 14:42:01 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 4 Feb 2009 14:42:01 +0100 Subject: question about lcmv beamforming In-Reply-To: <9fb563140902040350x1ff447fdp5a29229e6cd05ef@mail.gmail.com> Message-ID: Hi Floris, On 4 Feb 2009, at 12:50, Floris de Lange wrote: > I have a question about the beamforming procedure, which I'm carrying > out in the time-domain using LCMV. > The strange thing I run into is that irrespective of what data I feed > the function, I get the same inverse solution (with sourceanalysis.m). [...] > Then, I run the source-analysis as follows: > data = {}; > for t = 1:6 % six epochs of 50 ms > data{t} = mradata{2}; > data{t}.avg = data{t}.avg(:,(t-1)*30+1:t*30); > data{t}.time = [1:30]; you might want to do these few lines above using the redefinetrial function prior to the timelockanalysis. But that is not related to your question. > cfg = []; > cfg.method = 'lcmv'; > cfg.projectnoise = 'yes'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > cfg.lambda = 0; %1e-29; > sourcet{t} = sourceanalysis(cfg,data{t}); > end > > I checked, and the data-avg fields from different time-windows are > (substantially) different from each other; while the avg.pow-values in > sourcet from different time-windows are numerically identical. The power in LCMV beamforming is computed based on the data covariance in your timelocked data structure. You are making subselections from the average ERF, but the data covariance is not based on those subselections. > I don't understand how different data on the sensor-level can lead to > identical source-reconstructions. But when I look in > beamformer_lcmv.m, I see this line: > dipout.pow(i) = trace(filt * Cy * ctranspose(filt)); > suggesting that the power at each voxel is a function only of the > spatial filter and covariance matrix? Does this make sense? The spatial filter is estimated from the data covariance, which in your 6 estimates is the same. The power at a certain dipole location is also estimated using this data covariance. The line of code you refer to corresponds to equation 24 in the 1997 van Veen paper. Subsequently in the beamformer_lcmv implementation, the average ERF is projected through the filter. > Any input very much appreciated! Last week I discussed similar issues with Jan-Mathijs. Sofar at the FCDC we have not really optimized the data handling for LCMV beamforming. Markus Bauer is one of the few who had a go at it, and for him it did not really work that well. Jan-Mathijs mentioned that sofar we have been working with the data covariance that was estimated based on the single trialsd, and not with th edata covariance estimated on the average (note that the order matters for the covariance computation and averaging). Right now I don't know the details of your experiment and data any more, but you might want to try data = preprocessing(cfg) avg1 = timelockanalysis(cfg, data) with keeptrials=no, covariance=no avg2 = timelockanalysis(cfg, avg1) with keeptrials=no, covariance=yes and then use avg2 which includes the covariance of the average in the sourceanalysis. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Wed Feb 4 16:55:51 2009 From: masaki.maruyama at CEA.FR (Masaki Maruyama) Date: Wed, 4 Feb 2009 16:55:51 +0100 Subject: meg-pd function "rawdata" Message-ID: Hello, The Fieldtrip function "preprocessing" cannot exactly detect timings of trials from one of our MEG dataset recorded using Neuromag 306 ch MEG system. The trials often precede by 0.1 second and sometimes delay by 0.9 second with respect to the exact time. I looked into several programs and the output of meg-pd function "rawdata" seems to be unusual. It reads the data file one second by one second from the begining of data, and the rawdata('goto', T) outputs a start time of read epoch as rawdata('goto', 100.0) = 100.0 rawdata('goto', 100.1) = 100.0 … rawdata('goto', 100.9) = 100.0 rawdata('goto', 101.0) = 101.0 These outputs are fine. However, in later period its output becomes rawdata('goto', 102.0) = 102.0 rawdata('goto', 102.1) = 102.1 rawdata('goto', 102.2) = 102.1 … rawdata('goto', 102.9) = 102.1 rawdata('goto', 103.0) = 102.1 rawdata('goto', 103.1) = 103.1 … After 102.1 second the output delays by 0.1 second, which seems to be a causal of the wrong time detection of trials. I cannot find out why it happened in the MEG recording, but I like to see averaged fields from the data. Could you please give me advices? Thank you in advance for your kind advices. Sincerely yours, Masaki Maruyama Inserm U.562 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 4 17:50:50 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 4 Feb 2009 17:50:50 +0100 Subject: meg-pd function "rawdata" In-Reply-To: Message-ID: Hi Masaki On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > After 102.1 second the output delays by 0.1 second, which seems to > be a > causal of the wrong time detection of trials. I cannot find out why > it happened > in the MEG recording, but I like to see averaged fields from the > data. Could > you please give me advices? > > Thank you in advance for your kind advices. It seems due to a (rounding-off?) bug in rawdata. The fif access mex files are causing a lot of problems, and that is why we recently decided to switch to a new implementation for reading the fif files in fieldtrip. The new implementation for fieldtrip is based on low-level functions from the MNE toolbox by Matti Hamalainen: see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php and try the fieldtrip functions read_header and read_data with an explicit specification of headerformat=neuromag_nme and dataformat=neuromag_mne respectively. That should cause the low-level readers from Matti to be used. Also read_event should be able to give you the correct trial markers. Laurence (CC) should be able to tell you more about the current status of this new implementation. best regards, Robert PS note that the MNE toolbox functions are not released together with fieldtrip, due to licensing limitations. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Feb 5 10:14:26 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 5 Feb 2009 10:14:26 +0100 Subject: Sources Message-ID: Dear users, i'm trying to localize the sources of time-frequency data. At the scalp level i have, in the gamma range, two effects: a power's increase for some sensors on the right hemisphere and a power's decrease on the left. When i run the source reconstruction i find the sources for the power increase in some areas that are compatible with the power's distribution at the scalp, but i don't find anything for the power's decrease. Is that normal? Is it a problem to reconstruct the sources for the power's decreas? Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu Feb 5 10:39:12 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 5 Feb 2009 10:39:12 +0100 Subject: Sources Message-ID: Hi Marco, I think there is no fundamental reason why you shouldn't be able to spot a power decrease in source space. What could be is that the source of the power decrease varies more over subjects (in anatomical location) than the source of the power increase - maybe you could run your analysis with a higher lambda to check this. Another physiological reason could be that the source of the power decrease actually consists of two sources that are at some distance, but highly synchronous - in which case they will cancel each other using beamforming. Then there are three silly mistakes I made previously, so I give you a list to check - not necessarily assuming you did the same mistakes: 1. Do your functional limits and your opacity limits allow to plot negative values? 2. Do you do a two-sided test in sourcestatistics ? 3. Do you possibly look at a relative (% or z-score) measure at the electrode level but at absolute (non-basline corrected) values in source space - or vice versa? This can sometimes give seemingly opposing effects, especially when you are comparing two groups of subjects that might have systematic differences in baseline power already. 'hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "Marco SPERDUTI" > Gesendet: 05.02.09 10:18:08 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] Sources > Dear users, > > i'm trying to localize the sources of time-frequency data. > At the scalp level i have, in the gamma range, two effects: a power's > increase for some sensors on the right hemisphere and a power's > decrease on the left. > When i run the source reconstruction i find the sources for the power > increase in some areas that are compatible with the power's > distribution at the scalp, but i don't find anything for the power's > decrease. > > Is that normal? Is it a problem to reconstruct the sources for the > power's decreas? > > Thank you, > > Marco > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From lhunt at FMRIB.OX.AC.UK Thu Feb 5 11:01:44 2009 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Thu, 5 Feb 2009 10:01:44 +0000 Subject: meg-pd function "rawdata" In-Reply-To: <3011DB14-128A-4001-97FF-E445A66E05D2@fcdonders.ru.nl> Message-ID: Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. From marco.rotonda at GMAIL.COM Thu Feb 5 20:09:44 2009 From: marco.rotonda at GMAIL.COM (Marco Rotonda) Date: Thu, 5 Feb 2009 20:09:44 +0100 Subject: trigger on FieldTripBuffer Message-ID: Hi there, I would like to ask you how is it possible to give back a trigger signal if I need to trigger the signal of the application module of BCI2000 if I have not to trigger something happening in the signal processing module (FTBuffer), which actually is performing other things. I'm explain better: I'm using FTBuffer as a signal processing and I plot something is happening from matlab. I'm using this as the feedback to the user. Meanwhile, as user application, I'm using the StimulusPresentation to give some audio stimulation that I whish to trigger. Reading the documentation the trigger should be give back to the amplifier via the signal processing module (http://www.bci2000.org/phpbb/viewtopic.php?t=453&highlight=trigger) which is FTBuffer... Is it possible to solve this problem? ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Fri Feb 6 12:13:13 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Fri, 6 Feb 2009 12:13:13 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Laurence and Robert, Thank you for your prompt response and the continuous revision of programs. I try to compute with the latest version. Best regards, Masaki -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt Envoyé : Thursday, February 05, 2009 11:02 AM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From T.sanders at UMCUTRECHT.NL Fri Feb 6 14:38:20 2009 From: T.sanders at UMCUTRECHT.NL (sanders, T.) Date: Fri, 6 Feb 2009 14:38:20 +0100 Subject: Import Channel locations from EEGLAB Message-ID: Hello, I was wondering if there is an easy way to convert the channel labels and locations from EEGLAB to Fieldtrip. We are using the international 10-10 system with 118 electrodes and have a EEG.chanlocs datastructure for that. Our labels are slightly different than than the default labels and channel locations known by Fieldtrip (possibly due to us using 118 electrodes) which means we cannot create a multiplot in Fieldtrip at the moment. If anyone knows a way to convert the chanlocs datastructure from EEGLAB to a layout datastructure of Fieldtrip I would greatly appreciate it. Thank you in advance. Kind Regards, Tom Sanders BCI group Rudolf Magnus Institute Department of Neurology & Neurosurgery University Medical Center Utrecht ---------------------------------- 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/fcdonders/fieldtrip. From j.gross at PSY.GLA.AC.UK Fri Feb 6 14:54:35 2009 From: j.gross at PSY.GLA.AC.UK (Joachim Gross) Date: Fri, 6 Feb 2009 13:54:35 +0000 Subject: Postdoctoral position in Glasgow Message-ID: -------------------------------------------------------------------- University of Glasgow Department of Statistics Postdoctoral research associate (ref 14880/DPO/A3) -------------------------------------------------------------------- An exciting opportunity has arisen as a result of Faculty/departmental investment to pursue a research programme in statistical methodology with specific application to cognitive neuro-imaging. Further information about the post and how to apply is available at www.gla.ac.uk/jobs/vacancies Further information about the department can be found at www.gla.ac.uk/departments/statistics and about the Centre for Cognitive Neuro-Imaging at www.ccni.gla.ac.uk Enquiries are welcomed. Please contact: Prof. Adrian Bowman Dept. of Statistics The UNiversity of Glasgow Glasgow G12 8QQ Tel: +44-141-330-4046 E-mail: adrian at stats.gla.ac.uk ---------------------------------- 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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Mon Feb 9 07:18:18 2009 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Mon, 9 Feb 2009 01:18:18 -0500 Subject: the output of the function-freqdescriptives Message-ID: Dear Users, By setting cfg.cohmethod = 'plv', there are four types of output after running freqdescriptives: powspctrm, powspctrmsem, plvpsctrm and plvspctrmsem. I was wondering which one stands for phase locking values. Many thanks in advance. Shen-Mou Hsu ---------------------------------- 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/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Mon Feb 9 08:02:47 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Mon, 9 Feb 2009 02:02:47 -0500 Subject: subject too low in ctf scanner Message-ID: When the subject is too low, the source analysis cuts off any activity below the dewar. Radial gradiometers can pick up sources below the sensor but Fieldtrip clips them. Is there an easy way to extend the grid so that source analysis can go below the sensor? ---------------------------------- 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/fcdonders/fieldtrip. From r.vandermeij at DONDERS.RU.NL Mon Feb 9 09:32:49 2009 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 9 Feb 2009 09:32:49 +0100 Subject: the output of the function-freqdescriptives In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B57021E5FC07D@iu-mssg-mbx05.ads.iu.edu> Message-ID: Hi Shen-Mou, /Plv/pspctrm contains the /p/hase /l/ocking /v/alues, /plv/pscptrm/sem/ contains the /s/tandard /e/rror of the /m/ean of those phase locking values. The variables without the 'plv' in front of them contain the regular power spectrum. Hope it helps, Best, Roemer Hsu, Shen-Mou wrote: > Dear Users, > > By setting cfg.cohmethod = 'plv', there are four types of output after running freqdescriptives: powspctrm, powspctrmsem, plvpsctrm and plvspctrmsem. I was wondering which one stands for phase locking values. Many thanks in advance. > > Shen-Mou Hsu > ---------------------------------- > 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/fcdonders/fieldtrip. > > -- Roemer van der Meij Intern (MSc-student) Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 6500 HB Nijmegen The Netherlands E-mail: roemer.vandermeij at donders.ru.nl ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From masaki.maruyama at CEA.FR Mon Feb 9 16:59:31 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Mon, 9 Feb 2009 16:59:31 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Laurence, I used the latest version of Fieldtrip, updated on 2009/02/08. However, I found the same problem again in the timing of trial definition. Defined trials often precede by 100 ms or delay 900 ms with respect to its correct time. As far as I understand "read_data.m" lines 885-905, the program assumes that the beginning of buffer always starts with an integral multiple of hdr.nSamples. However, it is not always the case, as I previously show the examples of rawdata('goto', ***). I would like to attach an example provided by Dr. Kimmo to read data at 102.9 s. I think the output of rawdata('goto',***) should be used in the program. %%%%%%Example start%%%%%%%%%%%%%% %Go to the buffer containing the sample you want and get the current time point t0 = rawdata('goto', 102.9); %Get the buffer buffer = rawdata('next'); %Find out the correct sample in the buffer ind = floor((102.9-t0)*sf+1); % Get the correct vector from the buffer B = buffer(:, ind); %%%%%%Example end%%%%%%%%%%%%%% Thank you in advance for your further consideration on this issue. With best regards, Masaki Maruyama -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt Envoyé : Thursday, February 05, 2009 11:02 AM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.sperduti at UPMC.FR Mon Feb 9 17:34:41 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 9 Feb 2009 17:34:41 +0100 Subject: sourceplot Message-ID: Dear all, when using sourceplot whit surface method is it possible to plot only values exceding a certain threshold? for example, i have values between -1.5 and 1.5, but i would like to plot only values between -1.5 and -0.075 and between 0.075 and 1.5. Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 9 17:46:05 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 9 Feb 2009 17:46:05 +0100 Subject: sourceplot In-Reply-To: <20090209173441.zztotv4gsgkswgo4@courriel.upmc.fr> Message-ID: Dear Marco, Indeed this is possible. You can make a mask field in your data yourdata.mask = (yourdata.funparameter > 0.075 & yourdata.funparameter < -0.075) Subsequently you set cfg.maskparameter = 'mask' and you can also use the cfg.opacitylim to set the opacity to the desired values. See also the plotting tutorial on the FieldTrip webpage lowest part for more info. http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentati on:tutorial:plotting Best Ingrid Nieuwenhuis -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marco SPERDUTI Sent: Monday, February 09, 2009 5:35 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sourceplot Dear all, when using sourceplot whit surface method is it possible to plot only values exceding a certain threshold? for example, i have values between -1.5 and 1.5, but i would like to plot only values between -1.5 and -0.075 and between 0.075 and 1.5. Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 9 17:40:33 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 9 Feb 2009 16:40:33 +0000 Subject: meg-pd function "rawdata" In-Reply-To: Message-ID: Dear Masaki, It sounds like you haven't actually used a different reader, the one that Laurence had developed. As Robert suggested you should specify cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; in your preprocessing. Then you will get an error message which tells you to download the MNE Matlab toolbox and when you have this toolbox in your path then you'll be able to use the new reader. You'll see the difference right away as the MNE toolbox prints out a lot of messages, quite different from meg_pd. If you still have the problem after all that, please let us know. Best, Vladimir On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM wrote: > Hello Laurence, > > > > I used the latest version of Fieldtrip, updated on 2009/02/08. However, I > found the same problem again in the timing of trial definition. Defined > trials often precede by 100 ms or delay 900 ms with respect to its correct > time. > > > > As far as I understand "read_data.m" lines 885-905, the program assumes that > the beginning of buffer always starts with an integral multiple of > hdr.nSamples. However, it is not always the case, as I previously show the > examples of rawdata('goto', ***). > > > > I would like to attach an example provided by Dr. Kimmo to read data at > 102.9 s. I think the output of rawdata('goto',***) should be used in the > program. > > > > %%%%%%Example start%%%%%%%%%%%%%% > > > > %Go to the buffer containing the sample you want and get the current time > point > > t0 = rawdata('goto', 102.9); > > %Get the buffer > > buffer = rawdata('next'); > > %Find out the correct sample in the buffer > > ind = floor((102.9-t0)*sf+1); > > % Get the correct vector from the buffer > > B = buffer(:, ind); > > > > %%%%%%Example end%%%%%%%%%%%%%% > > > > Thank you in advance for your further consideration on this issue. > > > > > > With best regards, > > Masaki Maruyama > > > > > > -----Message d'origine----- > De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part > de Laurence Hunt > Envoyé : Thursday, February 05, 2009 11:02 AM > À : FIELDTRIP at NIC.SURFNET.NL > Objet : Re: [FIELDTRIP] meg-pd function "rawdata" > > > > Hi Masaki, > > > > The MNE-based functions should be ready to use, to read raw fif data - > > but we've only developed them over the last week or two, so please let > > me know if you come across any bugs, or whether it solves the problem > > you encountered with rawdata. We should have a version that's able to > > read evoked .fif files also in the next week or two. > > > > Regards, > > Laurence > > > > > > On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > > > >> Hi Masaki > >> > >> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> > >>> After 102.1 second the output delays by 0.1 second, which seems to > >>> be a > >>> causal of the wrong time detection of trials. I cannot find out why > >>> it happened > >>> in the MEG recording, but I like to see averaged fields from the > >>> data. Could > >>> you please give me advices? > >>> > >>> Thank you in advance for your kind advices. > >> > >> It seems due to a (rounding-off?) bug in rawdata. The fif access mex > >> files are causing a lot of problems, and that is why we recently > >> decided to switch to a new implementation for reading the fif files > >> in fieldtrip. > >> > >> The new implementation for fieldtrip is based on low-level functions > >> from the MNE toolbox by Matti Hamalainen: > >> see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > >> and try the fieldtrip functions read_header and read_data with an > >> explicit specification of headerformat=neuromag_nme and > >> dataformat=neuromag_mne respectively. That should cause the low- > >> level readers from Matti to be used. Also read_event should be able > >> to give you the correct trial markers. > >> > >> Laurence (CC) should be able to tell you more about the current > >> status of this new implementation. > >> > >> best regards, > >> Robert > >> > >> PS note that the MNE toolbox functions are not released together > >> with fieldtrip, due to licensing limitations. > >> > > > > =========================================== > > Laurence Hunt, DPhil Student > > Centre for Functional MRI of the Brain (FMRIB), > > University of Oxford > > lhunt at fmrib.ox.ac.uk > > Phone: (+44)1865-(2)22738 > > =========================================== > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 9 17:51:40 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 9 Feb 2009 17:51:40 +0100 Subject: subject too low in ctf scanner In-Reply-To: <200902090702.n1972lkC019587@kurage.nimh.nih.gov> Message-ID: Hi Tom The default behaviour of the prepare_dipole_grid helper function for sourceanalysis in case of MEG is to make a 3D dipole grid that covers the helmet ("~30x30x30cm wide box"), subsequently detect points that are inside the head (actually inside the volume conductor), and then reduce the size of the 3D grid to a "narrow box" that tightly fits around the brain. So if the subject is seated very low compared to th edewar, then indeed the lower part of his brain might have been skipped for the 3D grid generation. You can also start with your own specification of the 3D grid, using cfg.xgrid/ygrid/zgrid. The grid is specified in individual subjects headcoordinates, i.e. in cm in the CTF case, which means that the position of the head relative to the dewar does not matter. Something like this should do the trick cfg.grid.xgrid = -12:14 % back to front cfg.grid.ygrid = -12:12 % right to left cfg.grid.zgrid = -2:14 % bottom to top if you then also specify cfg.grid.tight=yes, then you'll still get a nice tight/narrow box without too many points that are outside the head. best regards, Robert On 9 Feb 2009, at 8:02, Tom Holroyd wrote: > When the subject is too low, > the source analysis cuts off > any activity below the dewar. > Radial gradiometers can pick > up sources below the sensor > but Fieldtrip clips them. > > Is there an easy way to extend > the grid so that source analysis > can go below the sensor? > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 9 17:56:08 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 9 Feb 2009 17:56:08 +0100 Subject: Import Channel locations from EEGLAB In-Reply-To: <7865FEBD8DFE2942973AD4CD19784ECB01D7C3F4@EXV4.ds.umcutrecht.nl> Message-ID: Hi Tom, You should have an eeglab2fieldtrip function in your EEGLAB distribution. It works like this % Use as % [data] = eeglab2fieldtrip( EEG, fieldbox ) % % where the inputs are % EEG - [struct] EEGLAB structure % fieldbox - ['preprocessing'|'timelockanalysis'|'componentanalysis'|... % 'chanloc', 'chanloc_withfid'] and if you specify 'chanloc' as fieldbox, you should get a data structure that has the field "elec" in it. That is the electrode definition according to fieldtrip standards, and you can e.g. use it in prepare_layout to make a layout for plotting. best regards Robert On 6 Feb 2009, at 14:38, sanders, T. wrote: > Hello, > > I was wondering if there is an easy way to convert the channel > labels and locations from EEGLAB to Fieldtrip. We are using the > international 10-10 system with 118 electrodes and have a > EEG.chanlocs datastructure for that. Our labels are slightly > different than than the default labels and channel locations known > by Fieldtrip (possibly due to us using 118 electrodes) which means > we cannot create a multiplot in Fieldtrip at the moment. If anyone > knows a way to convert the chanlocs datastructure from EEGLAB to a > layout datastructure of Fieldtrip I would greatly appreciate it. > > Thank you in advance. > > Kind Regards, > Tom Sanders > > BCI group > Rudolf Magnus Institute > Department of Neurology & Neurosurgery > University Medical Center Utrecht > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Mon Feb 9 18:37:06 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Mon, 9 Feb 2009 18:37:06 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Vladimir, Thank you for your prompt response. You are right. I didn't specify the cfg parameters and the path to MNE toolbox. Now I obtained a different result. Trials are still often defined 100 ms earlier than its correct timing, but no trial are defined with the delay of 900 ms. So the problem is not completely fixed yet. When you need more information, please tell me without any hesitation. With best regards, Masaki Maruyama -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Vladimir Litvak Envoyé : Monday, February 09, 2009 5:41 PM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Dear Masaki, It sounds like you haven't actually used a different reader, the one that Laurence had developed. As Robert suggested you should specify cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; in your preprocessing. Then you will get an error message which tells you to download the MNE Matlab toolbox and when you have this toolbox in your path then you'll be able to use the new reader. You'll see the difference right away as the MNE toolbox prints out a lot of messages, quite different from meg_pd. If you still have the problem after all that, please let us know. Best, Vladimir On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM wrote: > Hello Laurence, > > > > I used the latest version of Fieldtrip, updated on 2009/02/08. However, I > found the same problem again in the timing of trial definition. Defined > trials often precede by 100 ms or delay 900 ms with respect to its correct > time. > > > > As far as I understand "read_data.m" lines 885-905, the program assumes that > the beginning of buffer always starts with an integral multiple of > hdr.nSamples. However, it is not always the case, as I previously show the > examples of rawdata('goto', ***). > > > > I would like to attach an example provided by Dr. Kimmo to read data at > 102.9 s. I think the output of rawdata('goto',***) should be used in the > program. > > > > %%%%%%Example start%%%%%%%%%%%%%% > > > > %Go to the buffer containing the sample you want and get the current time > point > > t0 = rawdata('goto', 102.9); > > %Get the buffer > > buffer = rawdata('next'); > > %Find out the correct sample in the buffer > > ind = floor((102.9-t0)*sf+1); > > % Get the correct vector from the buffer > > B = buffer(:, ind); > > > > %%%%%%Example end%%%%%%%%%%%%%% > > > > Thank you in advance for your further consideration on this issue. > > > > > > With best regards, > > Masaki Maruyama > > > > > > -----Message d'origine----- > De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part > de Laurence Hunt > Envoyé : Thursday, February 05, 2009 11:02 AM > À : FIELDTRIP at NIC.SURFNET.NL > Objet : Re: [FIELDTRIP] meg-pd function "rawdata" > > > > Hi Masaki, > > > > The MNE-based functions should be ready to use, to read raw fif data - > > but we've only developed them over the last week or two, so please let > > me know if you come across any bugs, or whether it solves the problem > > you encountered with rawdata. We should have a version that's able to > > read evoked .fif files also in the next week or two. > > > > Regards, > > Laurence > > > > > > On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > > > >> Hi Masaki > >> > >> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> > >>> After 102.1 second the output delays by 0.1 second, which seems to > >>> be a > >>> causal of the wrong time detection of trials. I cannot find out why > >>> it happened > >>> in the MEG recording, but I like to see averaged fields from the > >>> data. Could > >>> you please give me advices? > >>> > >>> Thank you in advance for your kind advices. > >> > >> It seems due to a (rounding-off?) bug in rawdata. The fif access mex > >> files are causing a lot of problems, and that is why we recently > >> decided to switch to a new implementation for reading the fif files > >> in fieldtrip. > >> > >> The new implementation for fieldtrip is based on low-level functions > >> from the MNE toolbox by Matti Hamalainen: > >> see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > >> and try the fieldtrip functions read_header and read_data with an > >> explicit specification of headerformat=neuromag_nme and > >> dataformat=neuromag_mne respectively. That should cause the low- > >> level readers from Matti to be used. Also read_event should be able > >> to give you the correct trial markers. > >> > >> Laurence (CC) should be able to tell you more about the current > >> status of this new implementation. > >> > >> best regards, > >> Robert > >> > >> PS note that the MNE toolbox functions are not released together > >> with fieldtrip, due to licensing limitations. > >> > > > > =========================================== > > Laurence Hunt, DPhil Student > > Centre for Functional MRI of the Brain (FMRIB), > > University of Oxford > > lhunt at fmrib.ox.ac.uk > > Phone: (+44)1865-(2)22738 > > =========================================== > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Tue Feb 10 12:18:17 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Tue, 10 Feb 2009 12:18:17 +0100 Subject: dipolefitting output format Message-ID: I have some doubts about format of dipolefitting's output. I have wrote the scirpt which use dipolefitting. Finally I have the line: dip1 = dipolefitting(cfg, avg1); So I have dipole coordinates in "dip1" variable. I tried to visualise it with: source.posxyz = dip1.dip.pos; source.momxyz = dip1.dip.mom; source.rv = dip1.dip.rv; dipplot(source); I can also use the following instead of the previous one: dipplot(source_plot, 'coordformat', 'MNI'); Difference between dipplot(source) and dipplot(source, 'coordformat', 'MNI') is very important - it is visualised in completely different location. My question is: what coordinates does the dipolefitting use at the output? How should I properly visualise its output? Thank you all in advance! Kind regards, Szymon ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Tue Feb 10 17:35:06 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 10 Feb 2009 16:35:06 +0000 Subject: dipolefitting output format In-Reply-To: <8834c95d0902100318o1515309pa06cd9b184fd9f0f@mail.gmail.com> Message-ID: Dear Szymon, dipolefitting works in any coordinate system. So the coordinate system of the output is the same as the coordinate system of the input - your vol and sens. I'm not familiar with the dipplot function you are using. It doesn't sound like a Fieldtrip function. In Fieldtrip you can use headmodelplot to visualize your volume model and then add your dipole using plot3. Best, Vladimir On Tue, Feb 10, 2009 at 11:18 AM, Szymon Piłat wrote: > I have some doubts about format of dipolefitting's output. > > I have wrote the scirpt which use dipolefitting. Finally I have the line: > dip1 = dipolefitting(cfg, avg1); > > So I have dipole coordinates in "dip1" variable. > I tried to visualise it with: > > source.posxyz = dip1.dip.pos; > source.momxyz = dip1.dip.mom; > source.rv = dip1.dip.rv; > dipplot(source); > > I can also use the following instead of the previous one: > > dipplot(source_plot, 'coordformat', 'MNI'); > > Difference between > > dipplot(source) > and > dipplot(source, 'coordformat', 'MNI') > > is very important - it is visualised in completely different location. > > My question is: what coordinates does the dipolefitting use at the output? > How should I properly visualise its output? > > Thank you all in advance! > > Kind regards, > Szymon > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. From arno at SALK.EDU Tue Feb 10 18:39:53 2009 From: arno at SALK.EDU (arno delorme) Date: Tue, 10 Feb 2009 18:39:53 +0100 Subject: dipolefitting output format In-Reply-To: <8834c95d0902100318o1515309pa06cd9b184fd9f0f@mail.gmail.com> Message-ID: The dipplot function can plot dipoles from spherical models or dipoles in MNI coordinates. I happens that these two models are oriented with 90 degrees different (the nose points toward different directions). Also the transformation to plot on the MNI brain is different. In the spherical cases, spherical coordinates are transformed to MNI coordinates first using the sph2spm function. So if you used a MNI model to locate your dipoles, you must enter the 'coordformat', 'MNI' option. Hope this helps, Arno On 10 févr. 09, at 12:18, Szymon Piłat wrote: > I have some doubts about format of dipolefitting's output. > > I have wrote the scirpt which use dipolefitting. Finally I have the > line: > dip1 = dipolefitting(cfg, avg1); > > So I have dipole coordinates in "dip1" variable. > I tried to visualise it with: > > source.posxyz = dip1.dip.pos; > source.momxyz = dip1.dip.mom; > source.rv = dip1.dip.rv; > dipplot(source); > > I can also use the following instead of the previous one: > > dipplot(source_plot, 'coordformat', 'MNI'); > > Difference between > > dipplot(source) > and > dipplot(source, 'coordformat', 'MNI') > > is very important - it is visualised in completely different location. > > My question is: what coordinates does the dipolefitting use at the > output? > How should I properly visualise its output? > > Thank you all in advance! > > Kind regards, > Szymon > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Wed Feb 11 16:12:42 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Wed, 11 Feb 2009 16:12:42 +0100 Subject: [SPAM] Re: [FIELDTRIP] dipolefitting output format In-Reply-To: Message-ID: Thaks for your help. It was very useful. I did some research on it so I can summurize it: you can use dipolefiitting function to find source and visualise it using dipplot (from EEGLAB). The only thing you have to do is to implement assumption that head radius is 85mm (dippot assummes that). No transformation is required - localization is the same as using headmodelplot and plot3 functions (suggested by Vladimir). Note that dipplot uses 'spherical' or "MNI" coordinates. If you want to visualise dipolefitting output you need to choose 'spherical' coords. If fact it is not the spherical coordinates as we understand it in physics (radius and 2 angles: r, theta, phi) - it uses regular cartesian coordinates (x,y,z). Kind regadrs, Szymon W dniu 10 lutego 2009 18:39 użytkownik arno delorme napisał: > The dipplot function can plot dipoles from spherical models or dipoles > in MNI coordinates. I happens that these two models are oriented with > 90 degrees different (the nose points toward different directions). > Also the transformation to plot on the MNI brain is different. > > In the spherical cases, spherical coordinates are transformed to MNI > coordinates first using the sph2spm function. > > So if you used a MNI model to locate your dipoles, you must enter the > 'coordformat', 'MNI' option. > > Hope this helps, > > Arno > > > On 10 févr. 09, at 12:18, Szymon Piłat wrote: > > I have some doubts about format of dipolefitting's output. >> >> I have wrote the scirpt which use dipolefitting. Finally I have the line: >> dip1 = dipolefitting(cfg, avg1); >> >> So I have dipole coordinates in "dip1" variable. >> I tried to visualise it with: >> >> source.posxyz = dip1.dip.pos; >> source.momxyz = dip1.dip.mom; >> source.rv = dip1.dip.rv; >> dipplot(source); >> >> I can also use the following instead of the previous one: >> >> dipplot(source_plot, 'coordformat', 'MNI'); >> >> Difference between >> >> dipplot(source) >> and >> dipplot(source, 'coordformat', 'MNI') >> >> is very important - it is visualised in completely different location. >> >> My question is: what coordinates does the dipolefitting use at the output? >> How should I properly visualise its output? >> >> Thank you all in advance! >> >> Kind regards, >> Szymon >> ---------------------------------- >> >> 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. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nina.Kahlbrock at UNI-DUESSELDORF.DE Wed Feb 11 16:14:33 2009 From: Nina.Kahlbrock at UNI-DUESSELDORF.DE (Nina Kahlbrock) Date: Wed, 11 Feb 2009 16:14:33 +0100 Subject: partial artefact rejection Message-ID: Dear all, I have a question concerning partial artefact rejection. In my experiment, I have used trials of different lengths. For preprocessing, I have extended all of the trials to a certain length in order to avoid filter artefacts from cutting trials. I have then used partial artefact rejection and preprocessed the trials. In order to calculate TFRs, I would like to use the actual lengths of the trials again by cutting the trials to the former lengths. Now my questions: How exactly is partial artefact rejection done? As I see it from my data, the data points contaminated by artefacts are removed from the structure, right? The offset seems to be adjusted to the cut trials, though. How do you suggest that I get my actual trial lengths back? It seems that I cannot know what part of the remaining data still belongs to my old trial and which part belongs to the part that was only used for preprocessing but needs to be cut out. I appreciate your help! Thanks in advance, Nina ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Wed Feb 11 16:24:13 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Wed, 11 Feb 2009 16:24:13 +0100 Subject: LORETA - what file Message-ID: Hi everybody! Is LORETA implemented in FieldTrip? I would like to localize source using it. I want to find source using only 1 timepoint of EEG (19 electrodes) so I want to use low-level script. Can you tell me what file performs LORETA's algorithm? Kind regards, Szymon ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Wed Feb 11 20:24:34 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 11 Feb 2009 19:24:34 +0000 Subject: partial artefact rejection In-Reply-To: Message-ID: Dear Nina, I am not sure whether I understand your question exactly, because as far as I can judge from your concern, there is none ;o). No doubt you already had a look at the tutorial documentation: 'automatic artifact rejection' on the website. It is indeed the case that data points identified as artifact are removed from the data. As a consequence, the cell array that represents your data is changed (data.trial). Also, the field data.time changes obviously, because some parts of the data are removed. One of the following scenarios can occur: -there is no artifact in the trial -> so this particular trial survives unchanged -there is an artifact at one of the edges of the trial. As a consequence, the trial and time axis are shortened. Importantly, when the trial is shortened on the left, the offset should also change, because this value defines the offset of the first sample in this trial with respect to the user-defined timepoint 0. To ensure a correct subsequent time-locked analysis (or TFR for that sake), a trial that loses 100 milliseconds on the left should have its offset updated with 100 (if the sampling rate is a 1000 Hz). (Tonight's question is whether this should be an increase or a decrease). -there is one or more artifacts in the middle of the trial. As a consequence, the trial is cut into several pieces; correspondingly the time axes have to be adjusted, and also the offsets. This means that it could be that your original 100th trial ends up in several different new 'trials'. All this should not be a big problem, because each step in the analysis should output a structure containing the configuration used in earlier steps of the analysis. If you would want to keep track of the original trials, you should always be able to match the cfg.trl in the output of rejectartifact, with the cfg.trl obtained after definetrial. With respect to your second question: if you want to pad your trials with data for the purpose of filtering, you can specify the option cfg.padding before calling preprocessing. If you for example defined your trials to last between event-of-interest - 1 second, and event- of-interest + 1 second, and your cfg.trl is defined accordingly, you can specify cfg.padding to be for example 3 seconds. This means that on each side of the trial, 0.5 seconds of extra data is read from the raw datafile, filtering (or similar things) is applied, and the edges are cut off again, so that you end up with 2-second segments. If you want to do artifact rejection prior to the actual reading and preprocessing of your data, you have to specify cfg.padding prior to calling rejectartifact, and then the routines will look for artifacts in the padded data. This makes sense, because filtering of an artifact (such as a squid-jump) could lead to nasty effects. I hope this helps, JM On Feb 11, 2009, at 3:14 PM, Nina Kahlbrock wrote: > Dear all, > > I have a question concerning partial artefact rejection. > In my experiment, I have used trials of different lengths. For > preprocessing, I have extended all of the trials to a certain > length in > order to avoid filter artefacts from cutting trials. I have then used > partial artefact rejection and preprocessed the trials. > In order to calculate TFRs, I would like to use the actual lengths > of the > trials again by cutting the trials to the former lengths. > Now my questions: How exactly is partial artefact rejection done? > As I see > it from my data, the data points contaminated by artefacts are > removed from > the structure, right? The offset seems to be adjusted to the cut > trials, though. > How do you suggest that I get my actual trial lengths back? It > seems that I > cannot know what part of the remaining data still belongs to my old > trial > and which part belongs to the part that was only used for > preprocessing but > needs to be cut out. > > I appreciate your help! > > Thanks in advance, > > Nina > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Wed Feb 11 20:43:41 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Wed, 11 Feb 2009 20:43:41 +0100 Subject: First steps with FIELDTRIP Message-ID: Dear all, Just starting to work with FIELDTRIP, I have the typical problems of a beginner and wondered whether you could help me with these. I conducted an MEG study (CTF, Vancouver whole-head system) in an old-new recognition paradigm. 1. From the tutorial it was not clear to me what the very first step is to analyze the data, and I tried the 'read_data' command (dat = read_data ('filename.ds');). However, there is an error message Error in ==> /Applications/fieldtrip/fieldtrip-20090128/external/ctf/getCTFdata.p>getCTFdata at 28 Error in ==> read_data at 654 dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', 'double'); both for my own and your tutorial data. Do you have any idea, why the command does not work? 2. Could you maybe provide me with a skript 'from the very beginning" to avoid this kind of problems? I do not know either how the header information can be integrated (presumably with "read_header"), and how to go on to the next step of preprocessing. Thank you very much for your help. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Feb 11 21:37:34 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 11 Feb 2009 21:37:34 +0100 Subject: First steps with FIELDTRIP In-Reply-To: <20090211204341.18415ppb691zaq99@webmail.uni-tuebingen.de> Message-ID: dear nicola, i'm not sure what tutorial you are refering too. take a look here: http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial read_data already is a low-level function that you should not have to deal with as enduser. the first step is to tell fieldtrip when your relevant events occured (definetrial) and then to apply some preprocessing options (preprocessing.m). from there on it all depends on what you want to find out and actually the nice examples in the tutorial should get you going (i.e. sending you scripts wouldn't help you more). in the intro there is a useful overview of the major functions and how they relate. Good luck & don't give up! nathan On 11.02.2009, at 20:43, Nicola Neumann wrote: > Dear all, > > Just starting to work with FIELDTRIP, I have the typical problems of > a beginner and wondered whether you could help me with these. I > conducted an MEG study (CTF, Vancouver whole-head system) in an old- > new recognition paradigm. > > 1. From the tutorial it was not clear to me what the very first step > is to analyze the data, and I tried the 'read_data' command (dat = > read_data ('filename.ds');). However, there is an error message > Error in ==> /Applications/fieldtrip/fieldtrip-20090128/external/ctf/ > getCTFdata.p>getCTFdata at 28 > Error in ==> read_data at 654 > dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', > 'double'); > > both for my own and your tutorial data. Do you have any idea, why > the command does not work? > > 2. Could you maybe provide me with a skript 'from the very > beginning" to avoid this kind of problems? I do not know either how > the header information can be integrated (presumably with > "read_header"), and how to go on to the next step of preprocessing. > > Thank you very much for your help. > Nicola > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Feb 12 09:29:22 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Feb 2009 09:29:22 +0100 Subject: LORETA - what file In-Reply-To: <8834c95d0902110724h36a14069jfc30376c00e3473e@mail.gmail.com> Message-ID: On 11 Feb 2009, at 16:24, Szymon Piłat wrote: > Hi everybody! > > Is LORETA implemented in FieldTrip? I would like to localize source > using it. > I want to find source using only 1 timepoint of EEG (19 electrodes) > so I want to use low-level script. Can you tell me what file > performs LORETA's algorithm? Hi Szymon Note that there are various LORETA algoritms, which are distinguished by a prefix (e.g. sLORETA, eLORETA). The original one with Laplacian- weighted regularization is plain LORETA without a prefix. But Fieldtrip does not include an implementation of any LORETA version. An implementation of LORETA for EEG is available from Roberto Pascual- Marqui at http://www.uzh.ch/keyinst/loreta.htm. Fieldtrip does have a helper function to read the resulting files from thaht software, it is called loreta2fieldtrip. It can be used for post-processing the source reconstructions in fieldtrip, e.g. for statistics. I think that it has not been used for a long time, so I am not 100% confident that loreta2fieldtrip will work out of the box, but you could have a look at it. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Thu Feb 12 09:31:28 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 12 Feb 2009 09:31:28 +0100 Subject: LORETA - what file In-Reply-To: <9E44A0C1-718C-4ED6-A8A8-8F34524082E5@fcdonders.ru.nl> Message-ID: hi, if you're looking for a matlab implementation you could also take a look at srang dalal's nutmeg-toolbox: http://nutmeg.berkeley.edu/index.php?title=Main_Page don't know if it works out with eeg though ... best, nathan On 12.02.2009, at 09:29, Robert Oostenveld wrote: > On 11 Feb 2009, at 16:24, Szymon Piłat wrote: >> Hi everybody! >> >> Is LORETA implemented in FieldTrip? I would like to localize source >> using it. >> I want to find source using only 1 timepoint of EEG (19 electrodes) >> so I want to use low-level script. Can you tell me what file >> performs LORETA's algorithm? > > Hi Szymon > > Note that there are various LORETA algoritms, which are > distinguished by a prefix (e.g. sLORETA, eLORETA). The original one > with Laplacian-weighted regularization is plain LORETA without a > prefix. But Fieldtrip does not include an implementation of any > LORETA version. > > An implementation of LORETA for EEG is available from Roberto > Pascual-Marqui at http://www.uzh.ch/keyinst/loreta.htm. Fieldtrip > does have a helper function to read the resulting files from thaht > software, it is called loreta2fieldtrip. It can be used for post- > processing the source reconstructions in fieldtrip, e.g. for > statistics. I think that it has not been used for a long time, so I > am not 100% confident that loreta2fieldtrip will work out of the > box, but you could have a look at it. > > best regards, > Robert---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From A.Stancak at LIVERPOOL.AC.UK Thu Feb 12 15:49:27 2009 From: A.Stancak at LIVERPOOL.AC.UK (Stancak, Andrej) Date: Thu, 12 Feb 2009 14:49:27 -0000 Subject: ECG artifacts in MEG Message-ID: Dear colleagues, I would like to clean MEG data from ECG artifacts. There is a routine artefact_ECG.m enabling to detect the QRS complex in an ECG trace. The question is whether there is (in FieldTrip or SPM8b) a method similar to the one implemented in BESA which takes the template (basically an averaged QRS plus interval encompassing the P and the T wave) and subtract it from each MEG (or EEG) trace. Compared to ICA, this method works much faster although it definitely may alter certain topographical features of MEG. Best regards Andrej Andrej Stancak, PhD. Professor for normal physiology Senior lecturer in psychology School of Psychology Eleanor Rathbone Building Bedford Street South L69 7ZA Liverpool United Kingdom Phone: 0044 0151 7946951 E-mail: a.stancak at liverpool.ac.uk (primary)         stancak at lf3.cuni.cz (secondary) Office hours: Mo 10-12, Wed 10-12 ---------------------------------- 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/fcdonders/fieldtrip. From ghocepie at ULB.AC.BE Thu Feb 12 17:12:00 2009 From: ghocepie at ULB.AC.BE (Gatien Hocepied) Date: Thu, 12 Feb 2009 17:12:00 +0100 Subject: Problems with fieldtrip toolbox Message-ID: Dear all, I recently used your toolbox. In order to find the amplitude of several dipoles, I ran different functions of the toolbox. However, even the results seem to be correct for test signals, when I used these functions for my 25-ELEC EEG signals (time window : 10 sec, Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, the results are not the same from one experiment to the other (obviously the initial positions are random) I used regional non-linear technique. Would you have some clues for me ? Anyway, thanks very much for this useful toolbox. Best regards, Gatien Hocepied ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Thu Feb 12 17:20:03 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 12 Feb 2009 16:20:03 +0000 Subject: ECG artifacts in MEG In-Reply-To: <45FEBCBE11DAC142A421BF00CBC7349D861D3F@EVSSTAFF2.livad.liv.ac.uk> Message-ID: Dear Andrej, There is no Matlab function I know of that corrects the sensor data like in BESA. In SPM8b there is a possibility to discard artefact sub-space during 3D source reconstruction. This is done using the 'Define spatial confounds' option in MEEGtools toolbox. In principle if you come up with a montage matrix that projects out your artefact you can use the montage functionality of SPM to correct your data. This would be somewhat more distortive than in BESA though and at the moment I'm not sure whether source analysis of such data would work correctly in SPM and FT. Best, Vladimir On Thu, Feb 12, 2009 at 2:49 PM, Stancak, Andrej wrote: > Dear colleagues, > > I would like to clean MEG data from ECG artifacts. There is a routine > artefact_ECG.m enabling to detect the QRS complex in an ECG trace. The question > is whether there is (in FieldTrip or SPM8b) a method similar to the one > implemented in BESA which takes the template (basically an averaged QRS plus > interval encompassing the P and the T wave) and subtract it from each MEG (or > EEG) trace. Compared to ICA, this method works much faster although it > definitely may alter certain topographical features of MEG. > > Best regards > Andrej > > Andrej Stancak, PhD. > Professor for normal physiology > Senior lecturer in psychology > > School of Psychology > Eleanor Rathbone Building > Bedford Street South > L69 7ZA > Liverpool > United Kingdom > > Phone: 0044 0151 7946951 > E-mail: a.stancak at liverpool.ac.uk (primary) > stancak at lf3.cuni.cz (secondary) > > Office hours: Mo 10-12, Wed 10-12 > > ---------------------------------- > 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/fcdonders/fieldtrip. > > ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Feb 12 18:02:05 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Feb 2009 18:02:05 +0100 Subject: ECG artifacts in MEG In-Reply-To: <45FEBCBE11DAC142A421BF00CBC7349D861D3F@EVSSTAFF2.livad.liv.ac.uk> Message-ID: Dear Andrej We initially (i.e. relatively early in fieldtrip development and in developing our MEG analysis skills) have attempted to remove the ECG artifact by QRS detection, averaging and then subtracting the template from the original data at the location of the QRS peaks. That is what you seem to describe, and that is where the function you're refering to originates from. However, in our opinion at that time it was not satisfactory. There is considerable variance in the shape (spatial and temporal) of the ECG artifact as it appears in the MEG channels, which means that a resudue of the artifact remains. An alternative strategy that we have subsequently used is described here http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:use_independent_component_analysis_ica_to_remove_ecg_artifacts best regards, Robert On 12 Feb 2009, at 15:49, Stancak, Andrej wrote: > Dear colleagues, > > I would like to clean MEG data from ECG artifacts. There is a routine > artefact_ECG.m enabling to detect the QRS complex in an ECG trace. > The question > is whether there is (in FieldTrip or SPM8b) a method similar to the > one > implemented in BESA which takes the template (basically an averaged > QRS plus > interval encompassing the P and the T wave) and subtract it from > each MEG (or > EEG) trace. Compared to ICA, this method works much faster although it > definitely may alter certain topographical features of MEG. > > Best regards > Andrej > > Andrej Stancak, PhD. > Professor for normal physiology > Senior lecturer in psychology > > School of Psychology > Eleanor Rathbone Building > Bedford Street South > L69 7ZA > Liverpool > United Kingdom > > Phone: 0044 0151 7946951 > E-mail: a.stancak at liverpool.ac.uk (primary) > stancak at lf3.cuni.cz (secondary) > > Office hours: Mo 10-12, Wed 10-12 > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Fri Feb 13 21:40:26 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Fri, 13 Feb 2009 21:40:26 +0100 Subject: ClassFile information for selecting trials Message-ID: Dear all, For trial selection I am trying to figure out how I can enter information of the ClassFile.cls of the CTF dataset. I have CLASSIDs for different kind of trials, but it seems to me that the examples in the tutorial only refer to different triggers that are stored in another part of the dataset (?). Has anyone ever used ClassFile information and maybe has a skript for that? Thanks. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From wanglinsisi at GMAIL.COM Mon Feb 16 11:30:27 2009 From: wanglinsisi at GMAIL.COM (=?GB2312?B?wdXN9Q==?=) Date: Mon, 16 Feb 2009 11:30:27 +0100 Subject: common filter in source analysis Message-ID: Dear all, I'm trying to use beamforming to calculate the sources of beta activities to the tutorial's data. I got very different results by using common filter to pre and post (according to the event) conditions comparing with the un-common filtered method. Do you have any idea why this happens? Thank you very much! Best, Lin ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 16 12:07:22 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 16 Feb 2009 12:07:22 +0100 Subject: common filter in source analysis In-Reply-To: Message-ID: Dear Lin, It could have multiple causes. Under the assumption that the location of the sources is not different in pre and post, only the power, the common filters can lead to better results, because you use more data to construct the filters. Especially when you have a strong beta decrease in post compared to pre (almost no power in post, much power in pre) using the data in pre in the filters, can help to get better localization in post. It all depends to a large degree on your data. To decide which result you can trust, you could compare the results on source level, with the sensor level. I hope this helps, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of ?? Sent: Monday, February 16, 2009 11:30 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] common filter in source analysis Dear all, I'm trying to use beamforming to calculate the sources of beta activities to the tutorial's data. I got very different results by using common filter to pre and post (according to the event) conditions comparing with the un-common filtered method. Do you have any idea why this happens? Thank you very much! Best, Lin ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:13:06 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:13:06 +0100 Subject: Problems with fieldtrip toolbox In-Reply-To: <006401c98d2c$a2de87e0$e89b97a0$@ac.be> Message-ID: On 12 Feb 2009, at 17:12, Gatien Hocepied wrote: > Dear all, > > I recently used your toolbox. In order to find the amplitude of > several dipoles, I ran different functions of the toolbox. However, > even the results seem to be correct for test signals, when I used > these functions for my 25-ELEC EEG signals (time window : 10 sec, > Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, > the results are not the same from one experiment to the other > (obviously the initial positions are random)… I used regional non- > linear technique. Would you have some clues for me ? Dear Gatien The strength of the fitted dipoles depends strongly on the position. So if you see different dipole strength/moment, then you should check whether the positions are the same. The position that is found after dipole fitting, and especially for multi-dipole models, can depend on the initial starting positions. I.e., the dipoles can end up in a local minimum of the error landscape, instead of the global minimum. To improve the robustness of the dipole fitting approach, you should start the nonlinear search with an initial location for your dipoles that is as close as possible to the optimal location. So if you have some prior knowledge about where your dipoles might be, then you should use that. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:33:04 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:33:04 +0100 Subject: ClassFile information for selecting trials In-Reply-To: <20090213214026.19425hqqo016exfe@webmail.uni-tuebingen.de> Message-ID: On 13 Feb 2009, at 21:40, Nicola Neumann wrote: > Dear all, > > For trial selection I am trying to figure out how I can enter > information of the ClassFile.cls of the CTF dataset. I have CLASSIDs > for different kind of trials, but it seems to me that the examples > in the tutorial only refer to different triggers that are stored in > another part of the dataset (?). Has anyone ever used ClassFile > information and maybe has a skript for that? Hi Nicola At the Donders Centre we used the CTF class (*.cls) files for epoched data. That was about 5 years ago, since after some experience with the ClassFile and MarkerFile, we standardized on continuous MEG recordings in combination with triggers, and not to use the CTF DataEditor and other utilities at all. However, FieldTrip still should support class files. E.g. the Subject01 example tutorial file from the fcdonders ftp server is an old one and was recorded trial-based and it contains some ClassFile and MarkerFile entries. You can see that in matlab/Fieldtrip by the following: >> event = read_event('Subject01.ds') event = 1343x1 struct array with fields: type sample value offset duration >> unique({event.type}) ans = 'FC' 'FIC' 'IC' 'STIM' 'Tr15' 'Tr21' 'Trial' 'backpanel trigger' 'classification' 'frontpanel trigger' 'trial' The "FIC" event is one that is derived from the class file (*). It happens 87 times. >> find(strcmp({event.type}, 'FIC')) ans = Columns 1 through 17 24 44 55 65 96 101 106 116 ... Columns 86 through 87 1313 1333 In the tutorial documentation we are using the trigger code to find the segments corresponding with the FIC (fully incongruent) stimulus. (*) Actually, when I was just looking at the ClassFile and MarkerFile in an editor, the "FIC" turned out to be in the MarkerFile and not in the ClassFile. The ClassFile contains the class "BAD", i.e. manually detected artifacts. The BAD events can be found like this >> find(strcmp({event.type}, 'classification')) ans = 46 92 422 536 611 632 763 804 939 1070 1280 1309 >> event(46) ans = type: 'classification' sample: 8101 value: 'BAD' offset: -300 duration: 900 So if you use read_event on your dataset, you should be able to get all the info that you need. Subsequently you can make your own trial function. See http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:making_your_own_trialfun_for_conditional_trial_definition for more details on that. Hope this helps, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:34:51 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:34:51 +0100 Subject: maintenance on wiki Message-ID: Dear fieldtrip users, We are restructuring the FieldTrip wiki website and for this purpose the wiki will have to be temporarily read-only. You still can access it, but you cannot edit the pages. Within a few days, the wiki will again be available for everyone to contribute to, and hopefully with a structure that will make finding and contributing documentation easier. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From pacodiaz at UB.EDU Mon Feb 16 15:58:57 2009 From: pacodiaz at UB.EDU (Paco Diaz) Date: Mon, 16 Feb 2009 15:58:57 +0100 Subject: Question on Freqanalysis_tfr Message-ID: Dear fieldtrip users, While reading carefully what the function freqanalysis_tfr do, I have found something that seems very extrange to me. I think that the general procedure for the wavelet transformation is clear but I can't get why do you multiply by 2, and divide by the sampling rate, the absolute value of the convolution. I have still used the function with very good results, but I would like to understand that step in order to sleep well. Here is a piece of the code: for k=1:size(dat,1) for j=1:length(cfg.foi) cTmp = conv(dat(k,:),M{j}); cTmp = (2*abs(cTmp)/data.fsample).^2; cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2)); cTmp = cTmp(:,1:cfg.downsample:end); if strcmp(cfg.keeptrials, 'yes') freq.powspctrm(i,k,j,:) = cTmp'; else freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + cTmp'; % compute the running sum end end end Thank you very much in advance, Paco. ---------------------------------- 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Mon Feb 16 21:25:51 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 16 Feb 2009 20:25:51 +0000 Subject: Question on Freqanalysis_tfr In-Reply-To: Message-ID: Dear Paco, This looks like a bug to me. One way of normalizing fft'ed data, is to obtain a so-called spectral density, i.e. the amount of power per frequency bin. Because you have data.fsample/2 (=Nyquist frequency) frequency bins, this normalization would be: 2*(abs(cTmp).^2)/data.fsample. In the code it seems abs(cTmp)^2 is normalized with the square root of 2./data.fsample. Thanks for finding this; I will fix it and the fixed version will be available in the downloadable toolbox as of tomorrow. However, probably a good reason why this has gone unnoticed that long, is that freqanalysis_tfr is a very old piece of code (and very slow), and the exact same functionality should be covered by freqanalysis_wltconvol (but this guy is much faster). Even better, freqanalysis_mtmconvol operates in a very similar way (and you can even get it to mimick a classical waveletanalysis, given the proper settings), but here you have much more flexibility in defining your time-frequency resolution by playing with 'multitapers'. To give you a look in the kitchen: freqanalysis_tfr operates by applying a convolution in the time domain, between the time domain data and the wavelet. Convolution in the time domain is equivalent to multiplication in the frequency domain. Freqanalysis_mtmconvol/ wltconvol operate by performing this multiplication in the frequency domain, rather than the slow convolution. Yours, Jan-Mathijs On Feb 16, 2009, at 2:58 PM, Paco Diaz wrote: > Dear fieldtrip users, > > While reading carefully what the function freqanalysis_tfr do, I > have > found something that seems very extrange to me. I think that the > general > procedure for the wavelet transformation is clear but I can't get > why do you > multiply by 2, and divide by the sampling rate, the absolute value > of the > convolution. > I have still used the function with very good results, but I > would like to > understand that step in order to sleep well. > > Here is a piece of the code: > > for k=1:size(dat,1) > for j=1:length(cfg.foi) > cTmp = conv(dat(k,:),M{j}); > cTmp = (2*abs(cTmp)/data.fsample).^2; > cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M > {j})/2)); > cTmp = cTmp(:,1:cfg.downsample:end); > if strcmp(cfg.keeptrials, 'yes') > freq.powspctrm(i,k,j,:) = cTmp'; > else > freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + > cTmp'; % > compute the running sum > end > end > end > > > Thank you very much in advance, Paco. > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From pacodiaz at UB.EDU Tue Feb 17 09:01:46 2009 From: pacodiaz at UB.EDU (=?ISO-8859-1?Q?Paco_D=EDaz?=) Date: Tue, 17 Feb 2009 09:01:46 +0100 Subject: Question on Freqanalysis_tfr In-Reply-To: <2AE2B73E-4CBC-4F97-A647-BDD22EC81D6D@psy.gla.ac.uk> Message-ID: Thank you Jan, it's great to have your questions answered so quickly. jan-mathijs schoffelen escribió: > Dear Paco, > > This looks like a bug to me. > One way of normalizing fft'ed data, is to obtain a so-called spectral > density, i.e. the amount of power per frequency bin. Because you have > data.fsample/2 (=Nyquist frequency) frequency bins, this normalization > would be: > > 2*(abs(cTmp).^2)/data.fsample. > > In the code it seems abs(cTmp)^2 is normalized with the square root of > 2./data.fsample. > > Thanks for finding this; I will fix it and the fixed version will be > available in the downloadable toolbox as of tomorrow. However, > probably a good reason why this has gone unnoticed that long, is that > freqanalysis_tfr is a very old piece of code (and very slow), and the > exact same functionality should be covered by freqanalysis_wltconvol > (but this guy is much faster). Even better, freqanalysis_mtmconvol > operates in a very similar way (and you can even get it to mimick a > classical waveletanalysis, given the proper settings), but here you > have much more flexibility in defining your time-frequency resolution > by playing with 'multitapers'. > To give you a look in the kitchen: freqanalysis_tfr operates by > applying a convolution in the time domain, between the time domain > data and the wavelet. Convolution in the time domain is equivalent to > multiplication in the frequency domain. > Freqanalysis_mtmconvol/wltconvol operate by performing this > multiplication in the frequency domain, rather than the slow convolution. > > Yours, > > Jan-Mathijs > > On Feb 16, 2009, at 2:58 PM, Paco Diaz wrote: > >> Dear fieldtrip users, >> >> While reading carefully what the function freqanalysis_tfr do, I have >> found something that seems very extrange to me. I think that the general >> procedure for the wavelet transformation is clear but I can't get why >> do you >> multiply by 2, and divide by the sampling rate, the absolute value of >> the >> convolution. >> I have still used the function with very good results, but I would >> like to >> understand that step in order to sleep well. >> >> Here is a piece of the code: >> >> for k=1:size(dat,1) >> for j=1:length(cfg.foi) >> cTmp = conv(dat(k,:),M{j}); >> cTmp = (2*abs(cTmp)/data.fsample).^2; >> cTmp = >> cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2)); >> cTmp = cTmp(:,1:cfg.downsample:end); >> if strcmp(cfg.keeptrials, 'yes') >> freq.powspctrm(i,k,j,:) = cTmp'; >> else >> freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + >> cTmp'; % >> compute the running sum >> end >> end >> end >> >> >> Thank you very much in advance, Paco. >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. > > ---------------------------------- > 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/fcdonders/fieldtrip. > -- --------------------------------------------------------- Francisco Javier Díaz Santaella Department of Psychiatry and Clinical Psychobiology University of Barcelona P. Vall d'Hebron 171 * 08035 Barcelona * Spain Telf.: +34 93 3125035 * Cell Phone: +34 678 89 47 57 email: pacodiaz at ub.edu http://www.ub.edu/brainlab --------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue Feb 17 11:16:00 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 17 Feb 2009 11:16:00 +0100 Subject: RAM use of freqstatistics Message-ID: Dear Listusers, I have recently started to use freqstatistics with the cfg.correctm = 'cluster' option again and I am a bit puzzled by the amount of RAM it uses - but maybe that's normal. I just want to make sure I am not overlooking some stupid mistake. Here is the code (it uses ~20GB per 1000 randomization draws, never got it to run through 5000+ iterations): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PathName='/data/home1/wibral/Projects/HysteresisMEG/'; FileType='.mat'; AnalysisStr='TF_MTM_win125ms_fsm16p0Hz_Rel_'; PreprocStr='_0_cond_Preproc4LCMV_denoised_fmin0.5Hz_fmax200Hz_'; % contains the subject and date part of filename Design={ 'AEF29_HysteresisMEG_20080428'; 'AKN13_HysteresisMEG_20080901'; 'AZN28_HysteresisMEG_20080811'; 'BAP07_HysteresisMEG_20090204'; 'BRA29_HysteresisMEG_20080829'; 'CHN03_HysteresisMEG_20080818'; 'EKD25_HysteresisMEG_20080815'; 'HZA25_HysteresisMEG_20080725'; 'IWA05_HysteresisMEG_20080606'; 'MBA11_HysteresisMEG_20080728'; 'MTA07_HysteresisMEG_20090128'; 'RRA18_HysteresisMEG_20080825'; 'SKA29_HysteresisMEG_20090211'; 'TSS07_HysteresisMEG_20080822'; }; for i=1:length(Design) fullname1=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr1,FileType); load(fullname1); % a variable named TFdata or TFdataRel exists after this step data1{i}=TFdataRel; % clear TFdata; clear TFdataRel; fullname2=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr2,FileType); load(fullname2); %a variable named TFdata or TFdataRel exists after this step data2{i}=TFdataRel; % clear TFdata; clear TFdataRel; end; cfg=[]; cfg.keepindividual='yes'; TFGA1 = freqgrandaverage(cfg,data1{:}); TFGA1.grad=data1{1}.grad; %get some gradiometer information for plotting TFGA2 = freqgrandaverage(cfg,data2{:}); TFGA2.grad=data2{1}.grad; %get some gradiometer information for plotting % do freqstatistics cfg4stat=[]; cfg4stat.clusteralpha = 0.05; % control admission to a cluster cfg4stat.alpha = 0.05; % control the false alarm rate of the permutation test cfg4stat.avgovertime = 'no'; cfg4stat.avgoverfreq = 'no'; cfg4stat.avgoverchan = 'no'; cfg4stat.statistic = 'depsamplesT'; % test statistic to evaluate the effect at the sample level cfg4stat.numrandomization = (2^12); % cfg4stat.correctm = 'cluster'; cfg4stat.method = 'montecarlo'; cfg4stat.dimord = 'chan_freq_time'; cfg4stat.dim = 'chan_freq_time'; nSubjects = length(Design); a = [1:nSubjects]; b = ones(1,nSubjects); cfg4stat.design = [a a; b (2*b)]; cfg4stat.uvar = 1; % "subject" is unit of observation cfg4stat.ivar = 2; % row of the design matrix that contains the independent variable FreqStatResult = freqstatistics(cfg4stat,TFGA1,TFGA2) ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Feb 17 20:40:11 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 17 Feb 2009 20:40:11 +0100 Subject: RAM use of freqstatistics In-Reply-To: <902003749@web.de> Message-ID: Dear Michael, As far as I can see you did not make any stupid mistakes. I think the reason that freqstatistics uses so much RAM is because you are looking for clusters over time, frequency and channels. Therefore you get a matrix with size Nchan*Nfreq*Ntime for each randomization. With a fine time and frequency resolution, this can become a lot of bites! If you already have a priory hypothesis on the frequency band of interest, or the time of interest, you could consider averaging over freq or time. If you don't want to do this, you could maybe choose a coarser time and/or frequency resolution. I hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Tuesday, February 17, 2009 11:16 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] RAM use of freqstatistics Dear Listusers, I have recently started to use freqstatistics with the cfg.correctm = 'cluster' option again and I am a bit puzzled by the amount of RAM it uses - but maybe that's normal. I just want to make sure I am not overlooking some stupid mistake. Here is the code (it uses ~20GB per 1000 randomization draws, never got it to run through 5000+ iterations): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PathName='/data/home1/wibral/Projects/HysteresisMEG/'; FileType='.mat'; AnalysisStr='TF_MTM_win125ms_fsm16p0Hz_Rel_'; PreprocStr='_0_cond_Preproc4LCMV_denoised_fmin0.5Hz_fmax200Hz_'; % contains the subject and date part of filename Design={ 'AEF29_HysteresisMEG_20080428'; 'AKN13_HysteresisMEG_20080901'; 'AZN28_HysteresisMEG_20080811'; 'BAP07_HysteresisMEG_20090204'; 'BRA29_HysteresisMEG_20080829'; 'CHN03_HysteresisMEG_20080818'; 'EKD25_HysteresisMEG_20080815'; 'HZA25_HysteresisMEG_20080725'; 'IWA05_HysteresisMEG_20080606'; 'MBA11_HysteresisMEG_20080728'; 'MTA07_HysteresisMEG_20090128'; 'RRA18_HysteresisMEG_20080825'; 'SKA29_HysteresisMEG_20090211'; 'TSS07_HysteresisMEG_20080822'; }; for i=1:length(Design) fullname1=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr1,FileType); load(fullname1); % a variable named TFdata or TFdataRel exists after this step data1{i}=TFdataRel; % clear TFdata; clear TFdataRel; fullname2=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr2,FileType); load(fullname2); %a variable named TFdata or TFdataRel exists after this step data2{i}=TFdataRel; % clear TFdata; clear TFdataRel; end; cfg=[]; cfg.keepindividual='yes'; TFGA1 = freqgrandaverage(cfg,data1{:}); TFGA1.grad=data1{1}.grad; %get some gradiometer information for plotting TFGA2 = freqgrandaverage(cfg,data2{:}); TFGA2.grad=data2{1}.grad; %get some gradiometer information for plotting % do freqstatistics cfg4stat=[]; cfg4stat.clusteralpha = 0.05; % control admission to a cluster cfg4stat.alpha = 0.05; % control the false alarm rate of the permutation test cfg4stat.avgovertime = 'no'; cfg4stat.avgoverfreq = 'no'; cfg4stat.avgoverchan = 'no'; cfg4stat.statistic = 'depsamplesT'; % test statistic to evaluate the effect at the sample level cfg4stat.numrandomization = (2^12); % cfg4stat.correctm = 'cluster'; cfg4stat.method = 'montecarlo'; cfg4stat.dimord = 'chan_freq_time'; cfg4stat.dim = 'chan_freq_time'; nSubjects = length(Design); a = [1:nSubjects]; b = ones(1,nSubjects); cfg4stat.design = [a a; b (2*b)]; cfg4stat.uvar = 1; % "subject" is unit of observation cfg4stat.ivar = 2; % row of the design matrix that contains the independent variable FreqStatResult = freqstatistics(cfg4stat,TFGA1,TFGA2) ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 18 09:10:46 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 18 Feb 2009 09:10:46 +0100 Subject: ClassFile information for selecting trials 2 In-Reply-To: <20090217211726.80634qbesey29nx2@webmail.uni-tuebingen.de> Message-ID: Dear Nicola, Please describe in detail what you are doing to get up to this point where you seem to have a problem. It would help most if you would include your trial function into the email and descibe the steps, which I would assume to be cfg = [] cfg.dataset = 'Subject01.ds' cfg.trialfun = 'your_trial_function' % your trial function would call the read_event function and make a "trl" matrix cfg = definetrial(cfg) data = preprocessing(cfg) Is this indeed what you are doing? best regards, Robert On 17 Feb 2009, at 21:17, Nicola Neumann wrote: > > Dear Robert, > > Thanks for the detailed reply! However, I get error messages even > with your "Subject01" data. The program cannot read the data at > > dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', > 'double'); > dimord = 'samples_chans_trials'; > > Do you know why this happens? > > Thanks again. > nicola > ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Fri Feb 20 10:44:58 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Fri, 20 Feb 2009 10:44:58 +0100 Subject: Definetrial Message-ID: Dear all, Still trying to define trials, I am stuck at the following point: cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 2; cfg = definetrial(cfg); readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) ??? Attempt to reference field of non-structure array. Error in ==> trialfun_general at 126 for i=find(strcmp(cfg.trialdef.eventtype, {event.type})) Error in ==> definetrial at 205 [trl, event] = feval(cfg.trialfun, cfg); Since the skript is from the tutorial and seems to work at everybody else's, it must be some stupid kind of mistake. But which? Thanks for your help. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From ghocepie at ULB.AC.BE Fri Feb 20 11:18:14 2009 From: ghocepie at ULB.AC.BE (Gatien Hocepied) Date: Fri, 20 Feb 2009 11:18:14 +0100 Subject: Problems with fieldtrip toolbox In-Reply-To: <11E973AC-714A-4BFF-A8E9-F570B35E0F9B@fcdonders.ru.nl> Message-ID: Dear all, Robert, thank you for the advice. I will turn to an heuristic approach for my work. I would have another question. The vector dip.mom given by the fitting function is the dipole moment. He permits to know the time-varying orientation of the dipole and I suppose the amplitude of this vector. By using that, I would like to know how I could have the time-varying current amplitude of the source ? Best regards, Gatien Hocepied -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Robert Oostenveld Envoyé : lundi 16 février 2009 13:13 À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] Problems with fieldtrip toolbox On 12 Feb 2009, at 17:12, Gatien Hocepied wrote: > Dear all, > > I recently used your toolbox. In order to find the amplitude of > several dipoles, I ran different functions of the toolbox. However, > even the results seem to be correct for test signals, when I used > these functions for my 25-ELEC EEG signals (time window : 10 sec, > Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, > the results are not the same from one experiment to the other > (obviously the initial positions are random) I used regional non- > linear technique. Would you have some clues for me ? Dear Gatien The strength of the fitted dipoles depends strongly on the position. So if you see different dipole strength/moment, then you should check whether the positions are the same. The position that is found after dipole fitting, and especially for multi-dipole models, can depend on the initial starting positions. I.e., the dipoles can end up in a local minimum of the error landscape, instead of the global minimum. To improve the robustness of the dipole fitting approach, you should start the nonlinear search with an initial location for your dipoles that is as close as possible to the optimal location. So if you have some prior knowledge about where your dipoles might be, then you should use that. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Feb 20 17:18:32 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 20 Feb 2009 17:18:32 +0100 Subject: sources' coordinates Message-ID: Dear all, I reconstructed the sources of my time-frequency data. Now i would like to have the coordinates of my sources. Is there an easy way to have the coordinates of sources exceeding a given value? Is it possible to only have the coordinates of the cluster's center? thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 20 17:35:00 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 20 Feb 2009 17:35:00 +0100 Subject: sources' coordinates In-Reply-To: <20090220171832.5mudhtjlcs80sc0w@courriel.upmc.fr> Message-ID: Dear Marco, You can use the interactive mode in sourceplot (method = 'ortho', interactive = 'yes') and than click on the cluster's center (or use location = 'max' and then the cursor will automatically be set on the voxel with the maximum value). Then the coordinates are printed on the screen. Or you can make a logical mask with only the voxels that are exceeding a certain value, and look at the .pos of those voxels. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marco SPERDUTI Sent: Friday, February 20, 2009 5:19 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sources' coordinates Dear all, I reconstructed the sources of my time-frequency data. Now i would like to have the coordinates of my sources. Is there an easy way to have the coordinates of sources exceeding a given value? Is it possible to only have the coordinates of the cluster's center? thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Mon Feb 23 12:45:08 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 23 Feb 2009 12:45:08 +0100 Subject: DICS, complex filter coeffcients and Virtual Electrodes Message-ID: Dear Fieldtrippers, I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. Any suggestion would be appreciated, Michael ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Mon Feb 23 13:16:21 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 23 Feb 2009 12:16:21 +0000 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: <906478771@web.de> Message-ID: Dear Michael, On Feb 23, 2009, at 11:45 AM, Michael Wibral wrote: > Dear Fieldtrippers, > > I was wondering about the correct way to get SAM-like virtual > electrodes using DICS. I naively tried to compute some virtual > electrodes using the DICS filter coeffcients on the raw > timecourses, but that obviously doesn't work because DICS filter > coefficients are complex (at least in Fieldtrip 20081208 ?). Yes, by default the filter-coefficients are complex-valued, when using cfg.method = 'dics'. There's an option for sourceanalysis, cfg.realfilter which can be set to 'yes'. When cfg.realfilter = 'yes'. The filter-coefficients are computed from the real part of the cross-spectral density matrix only. The rationale behind this would be that 'true' sources only live in the real part of the csd-matrix in the first place, because the forward mapping from source to signal is instantaneous (hence also of course the real-valued leadfields). On the other hand, including extra information in the computation of your filters (i.e. allowing them to be complex, thus using also the imaginary part), probably influences the suppressive properties of the filter. This would mean that noise sources in your data (which are not necessarily at zero phase-lag) may be more effectively suppressed. So I am not sure which is 'the correct' way here. However, if you want to use DICS-based filters to project your sensor data, I would use the option cfg.realfilter = 'yes', to obtain more 'meaningful' voxel-level time courses (but not that these time- courses are only optimised for the frequency band on which the filters had been computed). > Next thing I thought about was to FFT the single trial, filter it > and then inverse FFT it, because the DICS filters are supposed to > work in the frequency domain. But that shouldn't work either, > because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) > = filter(trial), because all operation are linear. This is true (so indeed that exercise is meaningless), but the subsequent estimate of power (i.e. squaring the fourier coefficients) is not linear. (power from the filtered data: abs(filter(FFT (trial))).^2 will be obviously different from filter(abs(FFT (trial)).^2) ). In general, if you want to approximate SAM, to me it would make more sense to use a time-domain beamformer in the first place, because DICS filters are optimised for a specific frequency bin in the first place. In other words, inverse-fft'ing the filtered sensor-fourier coefficients (across all frequencies) does not seem to make too much sense to me. This would boil down to bandpass-filtering your sensor data, calling timelockanalysis with cfg.covariance = 'yes' and cfg.covariancewindow = [something]. Then sourceanalysis with cfg.method = 'lcmv', after which you can project your bp-filtered data through the filters. > Next thing I am puzzled about is that the Filters (A) times the > leadfield matrix (L) should be the identity matrix: AL=1 (see the > Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip > -, then we would also have a complex leadfield, which seems odd to me. Not necessarily: the leadfield is always real-valued. If you interpret the product A*L just as a weighted sum of the complex numbers in A (weighted by L), the values in L can be such that the real part of the sum ends up to be 1, and the imaginary part ends up to be 0. (For your and my peace of mind you could try this by running sourceanalysis with cfg.keepfilter = 'yes' and cfg.realfilter = 'no' and cfg.keepleadfield = 'yes' and looking at a random filter*leadfield). Yours, Jan-Mathijs ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 23 13:33:50 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 23 Feb 2009 12:33:50 +0000 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: <906478771@web.de> Message-ID: Hi Michael, I'm doing this kind of things and I use LCMV beamformer (where the locations of the sources might come from your DICS analysis). This was Robert's suggestion. The reason is that DICS is only optimized for the particular frequency you are looking at and if you want to extract source data that contains other frequencies you need to look at the full frequency range. There are options in lcmv (cfg.lcmv.fixedori = 'yes') that reduces the two orthogonal sources (in MEG case) to one based on the direction of maximal variance. That's something similar to what SAM does (although I'm not sure exactly the same). Best, Vladimir On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral wrote: > Dear Fieldtrippers, > > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. > > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. > > Any suggestion would be appreciated, > Michael > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Mon Feb 23 14:40:20 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 23 Feb 2009 14:40:20 +0100 Subject: DICS, complex filter coeffcients and V irtual Electrodes Message-ID: Dear Jan-Mathijs, dear Vladimir, thanks for your quick replies. I indeed overlooked the cfg.realfilter option. Things seem to work fine now. I also have some comments on the optimization of DICS for a certain frequency: I think that's just the same in LCMV/SAM, where you also specify the band and time you're looking at and where you shouldn't project unfiltered raw data that contain other bands than the ones used for the computation of the filters. In my opinion you choose the frequency limits explicitly (via preprocessing) in LCMV and implicitly (via the spectral smoothing in the computation of the CSD matrix and the subsequent choice of a centre frequency for beamforming) in DICS. This, of course, also means that you should not compute narrow band beamformer filters (say for higher gamma frequencies) and project unfiltered (broadband) data through your filter. What I wanted to do was to compute narrow band sources (tpsmofrq = 5 or 10, center ferquency of 80Hz), prefilter the rawdata in the appropriate range and then project and interpret them. Should be ok, shouldn't it? Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 23.02.09 13:45:11 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] DICS, complex filter coeffcients and Virtual Electrodes > Hi Michael, > > I'm doing this kind of things and I use LCMV beamformer (where the > locations of the sources might come from your DICS analysis). This was > Robert's suggestion. The reason is that DICS is only optimized for the > particular frequency you are looking at and if you want to extract > source data that contains other frequencies you need to look at the > full frequency range. There are options in lcmv (cfg.lcmv.fixedori = > 'yes') that reduces the two orthogonal sources (in MEG case) to one > based on the direction of maximal variance. That's something similar > to what SAM does (although I'm not sure exactly the same). > > Best, > > Vladimir > > > On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral > wrote: > > Dear Fieldtrippers, > > > > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. > > > > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. > > > > Any suggestion would be appreciated, > > Michael > > > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Mon Feb 23 15:14:25 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 23 Feb 2009 15:14:25 +0100 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: Message-ID: Dear FT-colleagues, > Yes, by default the filter-coefficients are complex-valued, when > using cfg.method = 'dics'. There's an option for sourceanalysis, > cfg.realfilter which can be set to 'yes'. When cfg.realfilter = > 'yes'. The filter-coefficients are computed from the real part of the > cross-spectral density matrix only. The rationale behind this would > be that 'true' sources only live in the real part of the csd-matrix > in the first place, because the forward mapping from source to signal > is instantaneous (hence also of course the real-valued leadfields). > On the other hand, including extra information in the computation of > your filters (i.e. allowing them to be complex, thus using also the > imaginary part), probably influences the suppressive properties of > the filter. This would mean that noise sources in your data (which > are not necessarily at zero phase-lag) may be more effectively > suppressed. So I am not sure which is 'the correct' way here. > However, if you want to use DICS-based filters to project your sensor > data, I would use the option cfg.realfilter = 'yes', to obtain more > 'meaningful' voxel-level time courses (but not that these time- > courses are only optimised for the frequency band on which the > filters had been computed). If you believe that the sensor signal is an instantaneous mapping of a source signal, then complex filter weights do not make sense. You can incorporate this constraint (Imag(filter)=0) in the calculation of your filter weights from the complex CSD matrix and the real-valued leadfields. After some linear algebra, you obtain that the solution to this constrained least-squares minimization is equal to usual solution (see, van Veen et al, IEEE-TBME; Gross et all, PNAS) but applied to Real(CSD) instead of the complex-valued CSD matrix. Kind regards, Eric Maris > > > Next thing I thought about was to FFT the single trial, filter it > > and then inverse FFT it, because the DICS filters are supposed to > > work in the frequency domain. But that shouldn't work either, > > because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) > > = filter(trial), because all operation are linear. > > This is true (so indeed that exercise is meaningless), but the > subsequent estimate of power (i.e. squaring the fourier coefficients) > is not linear. (power from the filtered data: abs(filter(FFT > (trial))).^2 will be obviously different from filter(abs(FFT > (trial)).^2) ). > > In general, if you want to approximate SAM, to me it would make more > sense to use a time-domain beamformer in the first place, because > DICS filters are optimised for a specific frequency bin in the first > place. In other words, inverse-fft'ing the filtered sensor-fourier > coefficients (across all frequencies) does not seem to make too much > sense to me. This would boil down to bandpass-filtering your sensor > data, calling timelockanalysis with cfg.covariance = 'yes' and > cfg.covariancewindow = [something]. Then sourceanalysis with > cfg.method = 'lcmv', after which you can project your bp-filtered > data through the filters. > > > > Next thing I am puzzled about is that the Filters (A) times the > > leadfield matrix (L) should be the identity matrix: AL=1 (see the > > Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip > > -, then we would also have a complex leadfield, which seems odd to me. > > Not necessarily: the leadfield is always real-valued. If you > interpret the product A*L just as a weighted sum of the complex > numbers in A (weighted by L), the values in L can be such that the > real part of the sum ends up to be 1, and the imaginary part ends up > to be 0. (For your and my peace of mind you could try this by running > sourceanalysis with cfg.keepfilter = 'yes' and cfg.realfilter = 'no' > and cfg.keepleadfield = 'yes' and looking at a random filter*leadfield). > > Yours, > > Jan-Mathijs > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 23 18:47:21 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 23 Feb 2009 17:47:21 +0000 Subject: DICS, complex filter coeffcients and V irtual Electrodes In-Reply-To: <906564488@web.de> Message-ID: I'm not sure whether averaging in the frequency domain and using it to compute the filters is the same as filtering in the time domain and using LCMV on the filtered data. Think about running DICS on a very broad range from 5 to 95 Hz. Would it mean something then? For a narrow enough range it probably gets quite close but what is 'narrow enough'? Probably depends on the data. Vladimir On Mon, Feb 23, 2009 at 1:40 PM, Michael Wibral wrote: > Dear Jan-Mathijs, dear Vladimir, > > thanks for your quick replies. I indeed overlooked the cfg.realfilter option. Things seem to work fine now. > > I also have some comments on the optimization of DICS for a certain frequency: I think that's just the same in LCMV/SAM, where you also specify the band and time you're looking at and where you shouldn't project unfiltered raw data that contain other bands than the ones used for the computation of the filters. In my opinion you choose the frequency limits explicitly (via preprocessing) in LCMV and implicitly (via the spectral smoothing in the computation of the CSD matrix and the subsequent choice of a centre frequency for beamforming) in DICS. This, of course, also means that you should not compute narrow band beamformer filters (say for higher gamma frequencies) and project unfiltered (broadband) data through your filter. What I wanted to do was to compute narrow band sources (tpsmofrq = 5 or 10, center ferquency of 80Hz), prefilter the rawdata in the appropriate range and then project and interpret them. Should be ok, shouldn't it? > > Michael > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 23.02.09 13:45:11 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] DICS, complex filter coeffcients and Virtual Electrodes > > >> Hi Michael, >> >> I'm doing this kind of things and I use LCMV beamformer (where the >> locations of the sources might come from your DICS analysis). This was >> Robert's suggestion. The reason is that DICS is only optimized for the >> particular frequency you are looking at and if you want to extract >> source data that contains other frequencies you need to look at the >> full frequency range. There are options in lcmv (cfg.lcmv.fixedori = >> 'yes') that reduces the two orthogonal sources (in MEG case) to one >> based on the direction of maximal variance. That's something similar >> to what SAM does (although I'm not sure exactly the same). >> >> Best, >> >> Vladimir >> >> >> On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral >> wrote: >> > Dear Fieldtrippers, >> > >> > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. >> > >> > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. >> > >> > Any suggestion would be appreciated, >> > Michael >> > >> > >> > ---------------------------------- >> > 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/fcdonders/fieldtrip. >> > >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Tue Feb 24 15:20:55 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 24 Feb 2009 15:20:55 +0100 Subject: reading ANT cnt files Message-ID: hi everyone, i'm trying to read some ANT cnt files. however i get following error: ??? Error using ==> read_eep_cnt at 26 could not locate mex file looking at that m-file, it consists only of the error message. in fieldtrip/fileio/private i can see some c-file called read_eep_cnt.c. do i need to compile them? is this issue in some kind related to an older inquiry (in it, it says the issue could only be solved with ANT support)? https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0608&L=FIELDTRIP&P=R4227 i am working on a Intel-Mac using Matlab R2008a. has anyone using ANT cnt's encoutered a similar problem and found a solution to the issue? any help greatly appreciated. cheers, nathan ---------------------------------- 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/fcdonders/fieldtrip. From lwn_07 at YAHOO.COM.CN Wed Feb 25 08:36:13 2009 From: lwn_07 at YAHOO.COM.CN (=?utf-8?B?5p2O5Y2r5aic?=) Date: Wed, 25 Feb 2009 15:36:13 +0800 Subject: How to set the baseline in TFRs results plot? Message-ID: Hi everyone,      I've calculated the TFRs of my MEG signals recorded in the finger tapping experiments, now I want to plot result. My problem is that I don't  know how to set the parameter 'cfg.baseline' (in tutorial, it was set cfg.baseline=[-0.5 -0.1]).  Is there anyone has ever processed MEG signals in the similar experiment?       ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Feb 25 14:08:18 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Feb 2009 14:08:18 +0100 Subject: reading ANT cnt files In-Reply-To: <0E3727C9-CB04-4BF1-AE45-D25B5A064BBB@mac.com> Message-ID: Hi Nathan, On 24 Feb 2009, at 15:20, Nathan Weisz wrote: > i'm trying to read some ANT cnt files. however i get following error: > ??? Error using ==> read_eep_cnt at 26 > could not locate mex file > > looking at that m-file, it consists only of the error message. That is the usual mechanism to detect that the mex file is missing. By default Matlab will execute the mex file (if available) and will only fall back to the m-file if the mex file is missing. > in fieldtrip/fileio/private i can see some c-file called > read_eep_cnt.c. do i need to compile them? Yes. And the source code for the mex file requires an additional library, which was released as open source software by the manufacturer. A copy of the open source ANT source code is available from ftp://ftp.fcdonders.nl/pub/fieldtrip/external I am planning to move the ANT/EEProbe mex files and associated source code to a seperate directory under fieldtrip/external/eeprobe to make more clear that it is not a fully integral part of the regular fieldtrip release > is this issue in some kind related to an older inquiry (in it, it > says the issue could only be solved with ANT support)? > https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0608&L=FIELDTRIP&P=R4227 contrary to the previous mail you are referring to, the ANT source code is now available. So you might be able to fix it without help from ANT. > i am working on a Intel-Mac using Matlab R2008a. The ANT source code is platform aware and I know that it can be compiled on a variety of operating systems and hardware (SGI, i386, dos, windows, linux, irix). However, you probably have to make some modifications to the Makefile. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 25 14:09:15 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Feb 2009 14:09:15 +0100 Subject: How to set the baseline in TFRs results plot? In-Reply-To: <451029.91734.qm@web15602.mail.cnb.yahoo.com> Message-ID: Hi 李卫娜, The baseline depends on the interval that is available prior to stimulation in which you can estimate the time-frequency resolved MEG power. If your subject is intermittently tapping, then you should choose the time between the tapping. If the subject is continuously fingertapping, then you should do the baseline correction differently by estimating the power in a section of your experiment in which the subject was resting. best regards, Robert On 25 Feb 2009, at 8:36, 李卫娜 wrote: > Hi everyone, > > I've calculated the TFRs of my MEG signals recorded in the finger > tapping experiments, now I want to plot result. My problem is that I > don't know how to set the parameter 'cfg.baseline' (in tutorial, it > was set cfg.baseline=[-0.5 -0.1]). Is there anyone has ever > processed MEG signals in the similar experiment? > > > > > 好玩贺卡等你发,邮箱贺卡全新上线! > ---------------------------------- 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/fcdonders/fieldtrip. From Roozbeh.Rezaie at UTH.TMC.EDU Wed Feb 25 21:35:39 2009 From: Roozbeh.Rezaie at UTH.TMC.EDU (Rezaie, Roozbeh) Date: Wed, 25 Feb 2009 14:35:39 -0600 Subject: 2nd Biannual ISACM Conference Message-ID: ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2009 ISACM Conference Announcement.pdf Type: application/pdf Size: 118212 bytes Desc: 2009 ISACM Conference Announcement.pdf URL: From ole.jensen at DONDERS.RU.NL Thu Feb 26 11:56:49 2009 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 26 Feb 2009 11:56:49 +0100 Subject: Toolkit course on EEG/MEG data analysis/Nijmegen In-Reply-To: Message-ID: Dear all, I would like to announce the TOOL-KIT OF COGNITIVE NEUROSCIENCE 2009: advanced data analysis and source modelling of EEG and MEG data Date: May 4-7, 2009 Organizer: Ole Jensen Location: Donders Centre for Cognitive Neuroimaging, Nijmegen http://www.ru.nl/neuroimaging/courses/toolkit_2009/ Best regards, Ole Jensen -- Ole Jensen Principal Investigator Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- 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/fcdonders/fieldtrip. From fraschini at UNICA.IT Thu Feb 26 15:38:22 2009 From: fraschini at UNICA.IT (Matteo Fraschini) Date: Thu, 26 Feb 2009 15:38:22 +0100 Subject: Problem with neuroscan eeg definetrial Message-ID: Dear all, i have a problem trying to define trials with my eeg neuroscan file. At the end of the following steps i can not see any trials on my cfg structure... cfg.datafile='my_eeg_file.eeg'; cfg.headerfile='my_eeg_file.eeg'; (where my_eeg_file.eeg is the full path to my file... 'C:\...\my_eeg_file.eeg') Now, if i type cfg.trialdef.eventtype = '?' i have: datafile: 'my_eeg_file.eeg' headerfile: 'my_eeg_file.eeg' trialdef: [1x1 struct] Typing cfg = definetrial(cfg); i have: evaluating trialfunction 'trialfun_general' the following events were found in the datafile event type: 'accept' with event values: 1 event type: 'trial' with event values: 1 2 no trials have been defined yet, see DEFINETRIAL for further help found 400 events created 0 trials So it looks good with my events. Still have to define the trials, ok. Now i use cfg.trialdef.eventtype and cfg.trialdef.eventvalue to define trials but the trl[] field on cfg structure is still empty... Can anyone give me a suggestion please? Thank you very much, Matteo ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Feb 26 21:08:35 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 26 Feb 2009 21:08:35 +0100 Subject: fieldtrip website moved (again) Message-ID: Dear FieldTrip users You may have noticed over the last few weeks that occasionally pages on this wiki appear empty. After quite some efforts this was pinpointed to a poor performance of the ruhosting webserver and the underlying NFS server. Therefore I have decided to move the fieldtrip website once more to a new location with a new address (URL). Most importantly is that it is now running on hardware that we actually control ourselves instead of depending on the university-wide hosting server. I hope that this finally resolves the problems. The new address that you can use on daily basis is http://fieldtrip.fcdonders.nl . The preferred (long-term) address to use in your publications to refer to remains http://www.ru.nl/neuroimaging/fieldtrip. All references to the old location will automatically be forwarded to the new site. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From luqiangxu at YAHOO.COM.CN Fri Feb 27 08:22:05 2009 From: luqiangxu at YAHOO.COM.CN (xu luqiang) Date: Fri, 27 Feb 2009 15:22:05 +0800 Subject: =?gb2312?Q?=BB=D8=B8=B4=A3=BA?= [FIELDTRIP] Toolkit course on EEG/MEG data analysis/Nijmegen In-Reply-To: <49A67571.7050009@donders.ru.nl> Message-ID: Dear sir, I hope to download tutorial data from your website. I try to login with username 'anonymous' and use my email address "luqiangxu at yahoo.com.cn"as password,but It does not work. Can I login with username 'anonymous' and use my email address "luqiangxu at yahoo.com.cn"as password? thanks luqiang --- 09年2月26日,周四, Ole Jensen 写道: > 发件人: Ole Jensen > 主题: [FIELDTRIP] Toolkit course on EEG/MEG data analysis/Nijmegen > 收件人: FIELDTRIP at NIC.SURFNET.NL > 日期: 2009,226,周四,6:56下午 > Dear all, > > I would like to announce the > > TOOL-KIT OF COGNITIVE NEUROSCIENCE 2009: advanced data > analysis and source modelling of EEG and MEG data > > Date: May 4-7, 2009 > Organizer: Ole Jensen > Location: Donders Centre for Cognitive Neuroimaging, > Nijmegen > > > http://www.ru.nl/neuroimaging/courses/toolkit_2009/ > > Best regards, > > Ole Jensen > > -- Ole Jensen > Principal Investigator > Donders Institute for Brain, Cognition and Behaviour Centre > for Cognitive Neuroimaging P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Office : +31 24 36 10884 > MEG lab : +31 24 36 10988 > > Fax : +31 24 36 10989 > > e-mail : ole.jensen at donders.ru.nl > URL : http://ojensen.ruhosting.nl/ > > ---------------------------------- > 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/fcdonders/fieldtrip. ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ ---------------------------------- 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/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Fri Feb 27 11:01:32 2009 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Fri, 27 Feb 2009 11:01:32 +0100 Subject: incomplete CSD Matrix Message-ID: Dear fieldtrip users, I am running sourceanalysis for different subjects. In 18 of 20 sujbects everything works out, however for 2 subjects in particular I am getting the following error message: ???Error using==>fieldtrip-20081208/private/prepare_freq_matrices at201 The cross-spectral-density matrix is not complete Error in==>sourceanalysis at 723 [Cf, Cr, Pr, Ntrials , cfg] = prepare_freq_matrices(cfg, data); Error in==>computeLead fields at 105 [pressource]= sourceanalysis(cfg,preTFdata); I checked the Cf matrix and found out that it contains 2 NaN entries. Does anyone have an idea what this could possibly be related to or what I should check my data for? I used exactly the same parameters as for all the other subjects. Best, Frederic _________________________________________________________________ http://redirect.gimas.net/?n=M0902xHMMobile Nie wieder eine Mail verpassen mit Hotmail fürs Handy! ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vgomez at IUA.UPF.EDU Fri Feb 27 14:07:19 2009 From: vgomez at IUA.UPF.EDU (Vicen) Date: Fri, 27 Feb 2009 14:07:19 +0100 Subject: Matlab warnings Message-ID: Hi, I'm starting with Fieldtrip (outside of the Donders) and every time I try to use any of the Fieldtrip functions I get a large list of warnings of the type: "Warning: Function /vol/snn/vicen/bci/fieldtrip-20090224/external/biosig/private/strncmpi.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict." Is there any sort of startup.m file that can be used to start Fieldtrip correctly so that these warnings do not appear? I'm running this in the cnXX.science.ru.nl cluster nodes. Thanks in advance, Vicenç ---------------------------------- 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/fcdonders/fieldtrip. From jdien07 at MAC.COM Fri Feb 27 16:32:35 2009 From: jdien07 at MAC.COM (Joseph Dien) Date: Fri, 27 Feb 2009 10:32:35 -0500 Subject: Matlab warnings In-Reply-To: <49A7E587.30707@iua.upf.edu> Message-ID: I just remove those biosig files. I don't think it's a good idea for Biosig to be messing with Matlab's built-in functions anyway. At least on my system, I find that the ones in the maybe-missing folder cause Matlab to become unstable. Cheers! Joe On Feb 27, 2009, at 8:07 AM, Vicen wrote: > Hi, > > I'm starting with Fieldtrip (outside of the Donders) and every time > I try to use any of the Fieldtrip functions I get a large list of > warnings of the type: > > "Warning: Function /vol/snn/vicen/bci/fieldtrip-20090224/external/ > biosig/private/strncmpi.m > has the same name as a MATLAB builtin. We suggest you rename the > function to avoid a > potential name conflict." > > Is there any sort of startup.m file that can be used to start > Fieldtrip correctly so that these warnings do not appear? I'm > running this in the cnXX.science.ru.nl cluster nodes. > Thanks in advance, > > > > Vicenç > > ---------------------------------- > 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/fcdonders/fieldtrip. -------------------------------------------------------------------------------- Joseph Dien, Ph.D. Birth Defects Center Davidson Hall, Room 314A Belknap Campus University of Louisville Louisville, KY 40292 Office: Davidson Hall 314d (Belknap) E-mail: jdien07 at mac.com Phone: 502-852-2512 Fax: 502-852-2408 http://homepage.mac.com/jdien07/ ---------------------------------- 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/fcdonders/fieldtrip. From Ingmar.Schneider at BIO.UNI-GIESSEN.DE Mon Feb 2 14:00:17 2009 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Mon, 2 Feb 2009 14:00:17 +0100 Subject: Activation vs. baseline testing Message-ID: Dear listusers, I am currently programming a script for the activation vs. baseline testing of MEG-data. As far as I can see from the fieldtrip documentation there are two functions incorporated (clusterrandanalysis and freqstatistics) that allow to compute such a test. It seems to me that both have a quite broad intersection of function. Do these functions differ in any way? Best regards, Ingmar -- Ingmar Schneider Max-Planck-Institut für Hirnforschung Deutschordenstraße 46 D-60528 Frankfurt/Main Tel.: 069/6301-83221 Fax: 069/96769-327 Mail1: schneider at mpih-frankfurt.mpg.de Mail2: ingmar.schneider at bio.uni-giessen.de ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 2 14:19:41 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 2 Feb 2009 13:19:41 +0000 Subject: Activation vs. baseline testing In-Reply-To: <20090202140017.zbjd8gyqs4k8ggg0@imap.stud.uni-giessen.de> Message-ID: Dear Ingmar, clusterrandanalysis is the original implementation of cluster-based statistical testing in FIeldtrip whereas freqstatistics is a newer and more well structured and flexible implementation. If you are just getting started, use freqstatistics. Best, Vladimir On Mon, Feb 2, 2009 at 1:00 PM, Ingmar Schneider wrote: > Dear listusers, > > I am currently programming a script for the activation vs. baseline testing > of MEG-data. As far as I can see from the fieldtrip documentation there are > two functions incorporated (clusterrandanalysis and freqstatistics) that > allow to compute such a test. It seems to me that both have a quite broad > intersection of function. > > Do these functions differ in any way? > > Best regards, > Ingmar > > -- > Ingmar Schneider > > Max-Planck-Institut für Hirnforschung > Deutschordenstraße 46 > D-60528 Frankfurt/Main > > Tel.: 069/6301-83221 > Fax: 069/96769-327 > Mail1: schneider at mpih-frankfurt.mpg.de > Mail2: ingmar.schneider at bio.uni-giessen.de > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ---------------------------------- > 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/fcdonders/fieldtrip. > > ---------------------------------- 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/fcdonders/fieldtrip. From Ingmar.Schneider at BIO.UNI-GIESSEN.DE Mon Feb 2 14:50:14 2009 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Mon, 2 Feb 2009 14:50:14 +0100 Subject: Activation vs. baseline testing In-Reply-To: Message-ID: Dear Vladimir, thanks for your quick reply. I assumed that from the documentation, but as I am not an expert on statistics and could not determine obvious functional differences I thought it best to ask. Best regards, Ingmar Quoting Vladimir Litvak : > Dear Ingmar, > > clusterrandanalysis is the original implementation of cluster-based > statistical testing in FIeldtrip whereas freqstatistics is a newer and > more well structured and flexible implementation. If you are just > getting started, use freqstatistics. > > Best, > > Vladimir > > > On Mon, Feb 2, 2009 at 1:00 PM, Ingmar Schneider > wrote: >> Dear listusers, >> >> I am currently programming a script for the activation vs. baseline testing >> of MEG-data. As far as I can see from the fieldtrip documentation there are >> two functions incorporated (clusterrandanalysis and freqstatistics) that >> allow to compute such a test. It seems to me that both have a quite broad >> intersection of function. >> >> Do these functions differ in any way? >> >> Best regards, >> Ingmar >> >> -- >> Ingmar Schneider >> >> Max-Planck-Institut für Hirnforschung >> Deutschordenstraße 46 >> D-60528 Frankfurt/Main >> >> Tel.: 069/6301-83221 >> Fax: 069/96769-327 >> Mail1: schneider at mpih-frankfurt.mpg.de >> Mail2: ingmar.schneider at bio.uni-giessen.de >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> >> > > ---------------------------------- > 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/fcdonders/fieldtrip. > -- Ingmar Schneider Max-Planck-Institut für Hirnforschung Deutschordenstraße 46 D-60528 Frankfurt/Main Tel.: 069/6301-83221 Fax: 069/96769-327 Mail1: schneider at mpih-frankfurt.mpg.de Mail2: ingmar.schneider at bio.uni-giessen.de ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- 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/fcdonders/fieldtrip. From e.maris at DONDERS.RU.NL Mon Feb 2 16:47:20 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 2 Feb 2009 16:47:20 +0100 Subject: Activation vs. baseline testing In-Reply-To: <20090202140017.zbjd8gyqs4k8ggg0@imap.stud.uni-giessen.de> Message-ID: Dear Ingmar, > I am currently programming a script for the activation vs. baseline > testing of MEG-data. As far as I can see from the fieldtrip > documentation there are two functions incorporated > (clusterrandanalysis and freqstatistics) that allow to compute such a > test. It seems to me that both have a quite broad intersection of > function. > > Do these functions differ in any way? They should provide the same output. If they don't, let me know. Good luck, Eric Maris > > Best regards, > Ingmar > > -- > Ingmar Schneider > > Max-Planck-Institut für Hirnforschung > Deutschordenstraße 46 > D-60528 Frankfurt/Main > > Tel.: 069/6301-83221 > Fax: 069/96769-327 > Mail1: schneider at mpih-frankfurt.mpg.de > Mail2: ingmar.schneider at bio.uni-giessen.de > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Feb 2 18:28:10 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 2 Feb 2009 18:28:10 +0100 Subject: Lambda Message-ID: Dear users, i'm using the function sourceanaylis, which is the meaning of the lambda parameter? my results change a lot depending on the value i use, so i would like to know in which way i should choose this value. thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue Feb 3 12:11:56 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 3 Feb 2009 12:11:56 +0100 Subject: Lambda Message-ID: Hi Marco, in a nutshell the effect of the lambda parameter is to smoothe your solution in space, it also makes it more stable in the presence of noise. You might know that the estimation of the covariance matrix for beamforming requires quite a lot of data. CTF/VSM (a MEG manufacturer) used to suggest to have your data satisfy the following relationship: 3000 < BW[Hz] * #trials *EffectLength[s] Where BW[Hz] is the bandwidth of your effect of interest in Hz, #trials is the number of trials that contain that effect, and EffectLength[s] is the length of your effect in seconds (NOT ms!). Here's an example: You have an effect between 30 and 60Hz, so the bandwidth of that effect is 30Hz. The effect is visible (say at the electrode level) for 400ms=0.4s in each trial. Now you calculate the number of trials to be: #trials > 3000 / ( BW[Hz] * EffectLength[s]) = 3000/(0.4*30)= 250. This means that you would need 250 artifact free, valid trials. Choosing a larger lambda can help to reduce the amount of data necessary, but you get a more smeared out solution. A good introduction and simulation results for various values of lambda can be found in: Neuroimage. 2008 Feb 15;39(4):1788-802. Epub 2007 Oct 10 Optimising experimental design for MEG beamformer imaging. Brookes MJ, Vrba J, Robinson SE, Stevenson CM, Peters AM, Barnes GR, Hillebrand A, Morris PG. Hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "Marco SPERDUTI" > Gesendet: 02.02.09 18:28:50 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] Lambda > Dear users, > > i'm using the function sourceanaylis, which is the meaning of the > lambda parameter? > > my results change a lot depending on the value i use, so i would like > to know in which way i should choose this value. > > thank you, > > Marco > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Tue Feb 3 12:11:59 2009 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Tue, 3 Feb 2009 11:11:59 +0000 Subject: Lambda In-Reply-To: <890983272@web.de> Message-ID: Thanks for your message. I am away until Monday 9th February. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Tue Feb 3 14:53:06 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Tue, 3 Feb 2009 14:53:06 +0100 Subject: Lambda In-Reply-To: <890983272@web.de> Message-ID: Thank you Michael, Marco Quoting Michael Wibral : > Hi Marco, > > in a nutshell the effect of the lambda parameter is to smoothe your > solution in space, it also makes it more stable in the presence of > noise. You might know that the estimation of the covariance matrix > for beamforming requires quite a lot of data. CTF/VSM (a MEG > manufacturer) used to suggest to have your data satisfy the > following relationship: > > 3000 < BW[Hz] * #trials *EffectLength[s] > > Where BW[Hz] is the bandwidth of your effect of interest in Hz, > #trials is the number of trials that contain that effect, and > EffectLength[s] is the length of your effect in seconds (NOT ms!). > Here's an example: You have an effect between 30 and 60Hz, so the > bandwidth of that effect is 30Hz. The effect is visible (say at the > electrode level) for 400ms=0.4s in each trial. Now you calculate the > number of trials to be: > #trials > 3000 / ( BW[Hz] * EffectLength[s]) = 3000/(0.4*30)= 250. > This means that you would need 250 artifact free, valid trials. > Choosing a larger lambda can help to reduce the amount of data > necessary, but you get a more smeared out solution. > > A good introduction and simulation results for various values of > lambda can be found in: > > Neuroimage. 2008 Feb 15;39(4):1788-802. Epub 2007 Oct 10 > Optimising experimental design for MEG beamformer imaging. > Brookes MJ, Vrba J, Robinson SE, Stevenson CM, Peters AM, Barnes GR, > Hillebrand A, Morris PG. > > > Hope this helps, > Michael > >> -----Ursprüngliche Nachricht----- >> Von: "Marco SPERDUTI" >> Gesendet: 02.02.09 18:28:50 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: [FIELDTRIP] Lambda > > >> Dear users, >> >> i'm using the function sourceanaylis, which is the meaning of the >> lambda parameter? >> >> my results change a lot depending on the value i use, so i would like >> to know in which way i should choose this value. >> >> thank you, >> >> Marco >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From tobias.donner at NYU.EDU Tue Feb 3 17:20:45 2009 From: tobias.donner at NYU.EDU (Tobias Donner) Date: Tue, 3 Feb 2009 11:20:45 -0500 Subject: Research Assistant Position in Cognitive Neuroscience at NYU Message-ID: Research Assistant Position in Cognitive Neuroscience Department of Neurology, School of Medicine, New York University We are seeking a full-time Research Assistant to assist with cognitive neuroscience experiments involving human intracranial EEG. Main topics of investigation are language, memory, multisensory, brain-computer interface, seizures and others. Responsibilities include, but are not limited to, recruiting and scheduling of control subjects and patients, testing and recording from intracranial patients, maintenance of equipment, databases and files, as well as data analysis and manuscript preparation. Candidates who have experience with neuroimaging data collection and analysis are especially encouraged to apply. Other neuroimaging methods employed by the lab include fMRI and MEG. The laboratory provides a unique exposure to both basic research and clinical neuroscience. The position requires interaction with patients and hospital staff and therefore excellent verbal and interpersonal skills are required. Must be well-organized and detail oriented; extensive computer experience strongly preferred, with programming highly desirable. B.A. or B.S. required, such as in neuroscience, psychology, biology, computer science or biomedical engineering. The position is ideal for exceptional candidates seeking to pursue an advanced research degree in neuroscience or a related field. Likely start date is June 2009. Please visit our web lab page for more information: http:// mmil.ucsd.edu/thomas/group Please send resume and cover letter to: Thomas Thesen, Ph.D. Assistant Professor of Neurology New York University School of Medicine thomas.thesen at med.nyu.edu ---------------------------------- 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/fcdonders/fieldtrip. From florisdelange at GMAIL.COM Wed Feb 4 12:50:50 2009 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Wed, 4 Feb 2009 12:50:50 +0100 Subject: question about lcmv beamforming Message-ID: Dear Fieldtrippers, I have a question about the beamforming procedure, which I'm carrying out in the time-domain using LCMV. The strange thing I run into is that irrespective of what data I feed the function, I get the same inverse solution (with sourceanalysis.m). I first calculate the forward model and discretize it in a grid, using these lines: [vol,cfg]=prepare_singleshell([],segmentedmriF); (..) [grid] = prepare_leadfield(cfg); Then, I run the source-analysis as follows: data = {}; for t = 1:6 % six epochs of 50 ms data{t} = mradata{2}; data{t}.avg = data{t}.avg(:,(t-1)*30+1:t*30); data{t}.time = [1:30]; cfg = []; cfg.method = 'lcmv'; cfg.projectnoise = 'yes'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; cfg.lambda = 0; %1e-29; sourcet{t} = sourceanalysis(cfg,data{t}); end I checked, and the data-avg fields from different time-windows are (substantially) different from each other; while the avg.pow-values in sourcet from different time-windows are numerically identical. I don't understand how different data on the sensor-level can lead to identical source-reconstructions. But when I look in beamformer_lcmv.m, I see this line: dipout.pow(i) = trace(filt * Cy * ctranspose(filt)); suggesting that the power at each voxel is a function only of the spatial filter and covariance matrix? Does this make sense? Any input very much appreciated! Best wishes, Floris -- Floris de Lange http://www.florisdelange.com ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 4 14:42:01 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 4 Feb 2009 14:42:01 +0100 Subject: question about lcmv beamforming In-Reply-To: <9fb563140902040350x1ff447fdp5a29229e6cd05ef@mail.gmail.com> Message-ID: Hi Floris, On 4 Feb 2009, at 12:50, Floris de Lange wrote: > I have a question about the beamforming procedure, which I'm carrying > out in the time-domain using LCMV. > The strange thing I run into is that irrespective of what data I feed > the function, I get the same inverse solution (with sourceanalysis.m). [...] > Then, I run the source-analysis as follows: > data = {}; > for t = 1:6 % six epochs of 50 ms > data{t} = mradata{2}; > data{t}.avg = data{t}.avg(:,(t-1)*30+1:t*30); > data{t}.time = [1:30]; you might want to do these few lines above using the redefinetrial function prior to the timelockanalysis. But that is not related to your question. > cfg = []; > cfg.method = 'lcmv'; > cfg.projectnoise = 'yes'; > cfg.grid = grid; > cfg.vol = vol; > cfg.keepfilter = 'yes'; > cfg.lambda = 0; %1e-29; > sourcet{t} = sourceanalysis(cfg,data{t}); > end > > I checked, and the data-avg fields from different time-windows are > (substantially) different from each other; while the avg.pow-values in > sourcet from different time-windows are numerically identical. The power in LCMV beamforming is computed based on the data covariance in your timelocked data structure. You are making subselections from the average ERF, but the data covariance is not based on those subselections. > I don't understand how different data on the sensor-level can lead to > identical source-reconstructions. But when I look in > beamformer_lcmv.m, I see this line: > dipout.pow(i) = trace(filt * Cy * ctranspose(filt)); > suggesting that the power at each voxel is a function only of the > spatial filter and covariance matrix? Does this make sense? The spatial filter is estimated from the data covariance, which in your 6 estimates is the same. The power at a certain dipole location is also estimated using this data covariance. The line of code you refer to corresponds to equation 24 in the 1997 van Veen paper. Subsequently in the beamformer_lcmv implementation, the average ERF is projected through the filter. > Any input very much appreciated! Last week I discussed similar issues with Jan-Mathijs. Sofar at the FCDC we have not really optimized the data handling for LCMV beamforming. Markus Bauer is one of the few who had a go at it, and for him it did not really work that well. Jan-Mathijs mentioned that sofar we have been working with the data covariance that was estimated based on the single trialsd, and not with th edata covariance estimated on the average (note that the order matters for the covariance computation and averaging). Right now I don't know the details of your experiment and data any more, but you might want to try data = preprocessing(cfg) avg1 = timelockanalysis(cfg, data) with keeptrials=no, covariance=no avg2 = timelockanalysis(cfg, avg1) with keeptrials=no, covariance=yes and then use avg2 which includes the covariance of the average in the sourceanalysis. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Wed Feb 4 16:55:51 2009 From: masaki.maruyama at CEA.FR (Masaki Maruyama) Date: Wed, 4 Feb 2009 16:55:51 +0100 Subject: meg-pd function "rawdata" Message-ID: Hello, The Fieldtrip function "preprocessing" cannot exactly detect timings of trials from one of our MEG dataset recorded using Neuromag 306 ch MEG system. The trials often precede by 0.1 second and sometimes delay by 0.9 second with respect to the exact time. I looked into several programs and the output of meg-pd function "rawdata" seems to be unusual. It reads the data file one second by one second from the begining of data, and the rawdata('goto', T) outputs a start time of read epoch as rawdata('goto', 100.0) = 100.0 rawdata('goto', 100.1) = 100.0 … rawdata('goto', 100.9) = 100.0 rawdata('goto', 101.0) = 101.0 These outputs are fine. However, in later period its output becomes rawdata('goto', 102.0) = 102.0 rawdata('goto', 102.1) = 102.1 rawdata('goto', 102.2) = 102.1 … rawdata('goto', 102.9) = 102.1 rawdata('goto', 103.0) = 102.1 rawdata('goto', 103.1) = 103.1 … After 102.1 second the output delays by 0.1 second, which seems to be a causal of the wrong time detection of trials. I cannot find out why it happened in the MEG recording, but I like to see averaged fields from the data. Could you please give me advices? Thank you in advance for your kind advices. Sincerely yours, Masaki Maruyama Inserm U.562 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 4 17:50:50 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 4 Feb 2009 17:50:50 +0100 Subject: meg-pd function "rawdata" In-Reply-To: Message-ID: Hi Masaki On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > After 102.1 second the output delays by 0.1 second, which seems to > be a > causal of the wrong time detection of trials. I cannot find out why > it happened > in the MEG recording, but I like to see averaged fields from the > data. Could > you please give me advices? > > Thank you in advance for your kind advices. It seems due to a (rounding-off?) bug in rawdata. The fif access mex files are causing a lot of problems, and that is why we recently decided to switch to a new implementation for reading the fif files in fieldtrip. The new implementation for fieldtrip is based on low-level functions from the MNE toolbox by Matti Hamalainen: see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php and try the fieldtrip functions read_header and read_data with an explicit specification of headerformat=neuromag_nme and dataformat=neuromag_mne respectively. That should cause the low-level readers from Matti to be used. Also read_event should be able to give you the correct trial markers. Laurence (CC) should be able to tell you more about the current status of this new implementation. best regards, Robert PS note that the MNE toolbox functions are not released together with fieldtrip, due to licensing limitations. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Feb 5 10:14:26 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 5 Feb 2009 10:14:26 +0100 Subject: Sources Message-ID: Dear users, i'm trying to localize the sources of time-frequency data. At the scalp level i have, in the gamma range, two effects: a power's increase for some sensors on the right hemisphere and a power's decrease on the left. When i run the source reconstruction i find the sources for the power increase in some areas that are compatible with the power's distribution at the scalp, but i don't find anything for the power's decrease. Is that normal? Is it a problem to reconstruct the sources for the power's decreas? Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu Feb 5 10:39:12 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 5 Feb 2009 10:39:12 +0100 Subject: Sources Message-ID: Hi Marco, I think there is no fundamental reason why you shouldn't be able to spot a power decrease in source space. What could be is that the source of the power decrease varies more over subjects (in anatomical location) than the source of the power increase - maybe you could run your analysis with a higher lambda to check this. Another physiological reason could be that the source of the power decrease actually consists of two sources that are at some distance, but highly synchronous - in which case they will cancel each other using beamforming. Then there are three silly mistakes I made previously, so I give you a list to check - not necessarily assuming you did the same mistakes: 1. Do your functional limits and your opacity limits allow to plot negative values? 2. Do you do a two-sided test in sourcestatistics ? 3. Do you possibly look at a relative (% or z-score) measure at the electrode level but at absolute (non-basline corrected) values in source space - or vice versa? This can sometimes give seemingly opposing effects, especially when you are comparing two groups of subjects that might have systematic differences in baseline power already. 'hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "Marco SPERDUTI" > Gesendet: 05.02.09 10:18:08 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] Sources > Dear users, > > i'm trying to localize the sources of time-frequency data. > At the scalp level i have, in the gamma range, two effects: a power's > increase for some sensors on the right hemisphere and a power's > decrease on the left. > When i run the source reconstruction i find the sources for the power > increase in some areas that are compatible with the power's > distribution at the scalp, but i don't find anything for the power's > decrease. > > Is that normal? Is it a problem to reconstruct the sources for the > power's decreas? > > Thank you, > > Marco > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From lhunt at FMRIB.OX.AC.UK Thu Feb 5 11:01:44 2009 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Thu, 5 Feb 2009 10:01:44 +0000 Subject: meg-pd function "rawdata" In-Reply-To: <3011DB14-128A-4001-97FF-E445A66E05D2@fcdonders.ru.nl> Message-ID: Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. From marco.rotonda at GMAIL.COM Thu Feb 5 20:09:44 2009 From: marco.rotonda at GMAIL.COM (Marco Rotonda) Date: Thu, 5 Feb 2009 20:09:44 +0100 Subject: trigger on FieldTripBuffer Message-ID: Hi there, I would like to ask you how is it possible to give back a trigger signal if I need to trigger the signal of the application module of BCI2000 if I have not to trigger something happening in the signal processing module (FTBuffer), which actually is performing other things. I'm explain better: I'm using FTBuffer as a signal processing and I plot something is happening from matlab. I'm using this as the feedback to the user. Meanwhile, as user application, I'm using the StimulusPresentation to give some audio stimulation that I whish to trigger. Reading the documentation the trigger should be give back to the amplifier via the signal processing module (http://www.bci2000.org/phpbb/viewtopic.php?t=453&highlight=trigger) which is FTBuffer... Is it possible to solve this problem? ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Fri Feb 6 12:13:13 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Fri, 6 Feb 2009 12:13:13 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Laurence and Robert, Thank you for your prompt response and the continuous revision of programs. I try to compute with the latest version. Best regards, Masaki -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt Envoyé : Thursday, February 05, 2009 11:02 AM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From T.sanders at UMCUTRECHT.NL Fri Feb 6 14:38:20 2009 From: T.sanders at UMCUTRECHT.NL (sanders, T.) Date: Fri, 6 Feb 2009 14:38:20 +0100 Subject: Import Channel locations from EEGLAB Message-ID: Hello, I was wondering if there is an easy way to convert the channel labels and locations from EEGLAB to Fieldtrip. We are using the international 10-10 system with 118 electrodes and have a EEG.chanlocs datastructure for that. Our labels are slightly different than than the default labels and channel locations known by Fieldtrip (possibly due to us using 118 electrodes) which means we cannot create a multiplot in Fieldtrip at the moment. If anyone knows a way to convert the chanlocs datastructure from EEGLAB to a layout datastructure of Fieldtrip I would greatly appreciate it. Thank you in advance. Kind Regards, Tom Sanders BCI group Rudolf Magnus Institute Department of Neurology & Neurosurgery University Medical Center Utrecht ---------------------------------- 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/fcdonders/fieldtrip. From j.gross at PSY.GLA.AC.UK Fri Feb 6 14:54:35 2009 From: j.gross at PSY.GLA.AC.UK (Joachim Gross) Date: Fri, 6 Feb 2009 13:54:35 +0000 Subject: Postdoctoral position in Glasgow Message-ID: -------------------------------------------------------------------- University of Glasgow Department of Statistics Postdoctoral research associate (ref 14880/DPO/A3) -------------------------------------------------------------------- An exciting opportunity has arisen as a result of Faculty/departmental investment to pursue a research programme in statistical methodology with specific application to cognitive neuro-imaging. Further information about the post and how to apply is available at www.gla.ac.uk/jobs/vacancies Further information about the department can be found at www.gla.ac.uk/departments/statistics and about the Centre for Cognitive Neuro-Imaging at www.ccni.gla.ac.uk Enquiries are welcomed. Please contact: Prof. Adrian Bowman Dept. of Statistics The UNiversity of Glasgow Glasgow G12 8QQ Tel: +44-141-330-4046 E-mail: adrian at stats.gla.ac.uk ---------------------------------- 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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Mon Feb 9 07:18:18 2009 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Mon, 9 Feb 2009 01:18:18 -0500 Subject: the output of the function-freqdescriptives Message-ID: Dear Users, By setting cfg.cohmethod = 'plv', there are four types of output after running freqdescriptives: powspctrm, powspctrmsem, plvpsctrm and plvspctrmsem. I was wondering which one stands for phase locking values. Many thanks in advance. Shen-Mou Hsu ---------------------------------- 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/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Mon Feb 9 08:02:47 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Mon, 9 Feb 2009 02:02:47 -0500 Subject: subject too low in ctf scanner Message-ID: When the subject is too low, the source analysis cuts off any activity below the dewar. Radial gradiometers can pick up sources below the sensor but Fieldtrip clips them. Is there an easy way to extend the grid so that source analysis can go below the sensor? ---------------------------------- 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/fcdonders/fieldtrip. From r.vandermeij at DONDERS.RU.NL Mon Feb 9 09:32:49 2009 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 9 Feb 2009 09:32:49 +0100 Subject: the output of the function-freqdescriptives In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B57021E5FC07D@iu-mssg-mbx05.ads.iu.edu> Message-ID: Hi Shen-Mou, /Plv/pspctrm contains the /p/hase /l/ocking /v/alues, /plv/pscptrm/sem/ contains the /s/tandard /e/rror of the /m/ean of those phase locking values. The variables without the 'plv' in front of them contain the regular power spectrum. Hope it helps, Best, Roemer Hsu, Shen-Mou wrote: > Dear Users, > > By setting cfg.cohmethod = 'plv', there are four types of output after running freqdescriptives: powspctrm, powspctrmsem, plvpsctrm and plvspctrmsem. I was wondering which one stands for phase locking values. Many thanks in advance. > > Shen-Mou Hsu > ---------------------------------- > 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/fcdonders/fieldtrip. > > -- Roemer van der Meij Intern (MSc-student) Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 6500 HB Nijmegen The Netherlands E-mail: roemer.vandermeij at donders.ru.nl ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From masaki.maruyama at CEA.FR Mon Feb 9 16:59:31 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Mon, 9 Feb 2009 16:59:31 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Laurence, I used the latest version of Fieldtrip, updated on 2009/02/08. However, I found the same problem again in the timing of trial definition. Defined trials often precede by 100 ms or delay 900 ms with respect to its correct time. As far as I understand "read_data.m" lines 885-905, the program assumes that the beginning of buffer always starts with an integral multiple of hdr.nSamples. However, it is not always the case, as I previously show the examples of rawdata('goto', ***). I would like to attach an example provided by Dr. Kimmo to read data at 102.9 s. I think the output of rawdata('goto',***) should be used in the program. %%%%%%Example start%%%%%%%%%%%%%% %Go to the buffer containing the sample you want and get the current time point t0 = rawdata('goto', 102.9); %Get the buffer buffer = rawdata('next'); %Find out the correct sample in the buffer ind = floor((102.9-t0)*sf+1); % Get the correct vector from the buffer B = buffer(:, ind); %%%%%%Example end%%%%%%%%%%%%%% Thank you in advance for your further consideration on this issue. With best regards, Masaki Maruyama -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt Envoyé : Thursday, February 05, 2009 11:02 AM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Hi Masaki, The MNE-based functions should be ready to use, to read raw fif data - but we've only developed them over the last week or two, so please let me know if you come across any bugs, or whether it solves the problem you encountered with rawdata. We should have a version that's able to read evoked .fif files also in the next week or two. Regards, Laurence On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > Hi Masaki > > On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> After 102.1 second the output delays by 0.1 second, which seems to >> be a >> causal of the wrong time detection of trials. I cannot find out why >> it happened >> in the MEG recording, but I like to see averaged fields from the >> data. Could >> you please give me advices? >> >> Thank you in advance for your kind advices. > > It seems due to a (rounding-off?) bug in rawdata. The fif access mex > files are causing a lot of problems, and that is why we recently > decided to switch to a new implementation for reading the fif files > in fieldtrip. > > The new implementation for fieldtrip is based on low-level functions > from the MNE toolbox by Matti Hamalainen: > see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > and try the fieldtrip functions read_header and read_data with an > explicit specification of headerformat=neuromag_nme and > dataformat=neuromag_mne respectively. That should cause the low- > level readers from Matti to be used. Also read_event should be able > to give you the correct trial markers. > > Laurence (CC) should be able to tell you more about the current > status of this new implementation. > > best regards, > Robert > > PS note that the MNE toolbox functions are not released together > with fieldtrip, due to licensing limitations. > =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.sperduti at UPMC.FR Mon Feb 9 17:34:41 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 9 Feb 2009 17:34:41 +0100 Subject: sourceplot Message-ID: Dear all, when using sourceplot whit surface method is it possible to plot only values exceding a certain threshold? for example, i have values between -1.5 and 1.5, but i would like to plot only values between -1.5 and -0.075 and between 0.075 and 1.5. Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 9 17:46:05 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 9 Feb 2009 17:46:05 +0100 Subject: sourceplot In-Reply-To: <20090209173441.zztotv4gsgkswgo4@courriel.upmc.fr> Message-ID: Dear Marco, Indeed this is possible. You can make a mask field in your data yourdata.mask = (yourdata.funparameter > 0.075 & yourdata.funparameter < -0.075) Subsequently you set cfg.maskparameter = 'mask' and you can also use the cfg.opacitylim to set the opacity to the desired values. See also the plotting tutorial on the FieldTrip webpage lowest part for more info. http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentati on:tutorial:plotting Best Ingrid Nieuwenhuis -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marco SPERDUTI Sent: Monday, February 09, 2009 5:35 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sourceplot Dear all, when using sourceplot whit surface method is it possible to plot only values exceding a certain threshold? for example, i have values between -1.5 and 1.5, but i would like to plot only values between -1.5 and -0.075 and between 0.075 and 1.5. Thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 9 17:40:33 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 9 Feb 2009 16:40:33 +0000 Subject: meg-pd function "rawdata" In-Reply-To: Message-ID: Dear Masaki, It sounds like you haven't actually used a different reader, the one that Laurence had developed. As Robert suggested you should specify cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; in your preprocessing. Then you will get an error message which tells you to download the MNE Matlab toolbox and when you have this toolbox in your path then you'll be able to use the new reader. You'll see the difference right away as the MNE toolbox prints out a lot of messages, quite different from meg_pd. If you still have the problem after all that, please let us know. Best, Vladimir On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM wrote: > Hello Laurence, > > > > I used the latest version of Fieldtrip, updated on 2009/02/08. However, I > found the same problem again in the timing of trial definition. Defined > trials often precede by 100 ms or delay 900 ms with respect to its correct > time. > > > > As far as I understand "read_data.m" lines 885-905, the program assumes that > the beginning of buffer always starts with an integral multiple of > hdr.nSamples. However, it is not always the case, as I previously show the > examples of rawdata('goto', ***). > > > > I would like to attach an example provided by Dr. Kimmo to read data at > 102.9 s. I think the output of rawdata('goto',***) should be used in the > program. > > > > %%%%%%Example start%%%%%%%%%%%%%% > > > > %Go to the buffer containing the sample you want and get the current time > point > > t0 = rawdata('goto', 102.9); > > %Get the buffer > > buffer = rawdata('next'); > > %Find out the correct sample in the buffer > > ind = floor((102.9-t0)*sf+1); > > % Get the correct vector from the buffer > > B = buffer(:, ind); > > > > %%%%%%Example end%%%%%%%%%%%%%% > > > > Thank you in advance for your further consideration on this issue. > > > > > > With best regards, > > Masaki Maruyama > > > > > > -----Message d'origine----- > De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part > de Laurence Hunt > Envoyé : Thursday, February 05, 2009 11:02 AM > À : FIELDTRIP at NIC.SURFNET.NL > Objet : Re: [FIELDTRIP] meg-pd function "rawdata" > > > > Hi Masaki, > > > > The MNE-based functions should be ready to use, to read raw fif data - > > but we've only developed them over the last week or two, so please let > > me know if you come across any bugs, or whether it solves the problem > > you encountered with rawdata. We should have a version that's able to > > read evoked .fif files also in the next week or two. > > > > Regards, > > Laurence > > > > > > On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > > > >> Hi Masaki > >> > >> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> > >>> After 102.1 second the output delays by 0.1 second, which seems to > >>> be a > >>> causal of the wrong time detection of trials. I cannot find out why > >>> it happened > >>> in the MEG recording, but I like to see averaged fields from the > >>> data. Could > >>> you please give me advices? > >>> > >>> Thank you in advance for your kind advices. > >> > >> It seems due to a (rounding-off?) bug in rawdata. The fif access mex > >> files are causing a lot of problems, and that is why we recently > >> decided to switch to a new implementation for reading the fif files > >> in fieldtrip. > >> > >> The new implementation for fieldtrip is based on low-level functions > >> from the MNE toolbox by Matti Hamalainen: > >> see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > >> and try the fieldtrip functions read_header and read_data with an > >> explicit specification of headerformat=neuromag_nme and > >> dataformat=neuromag_mne respectively. That should cause the low- > >> level readers from Matti to be used. Also read_event should be able > >> to give you the correct trial markers. > >> > >> Laurence (CC) should be able to tell you more about the current > >> status of this new implementation. > >> > >> best regards, > >> Robert > >> > >> PS note that the MNE toolbox functions are not released together > >> with fieldtrip, due to licensing limitations. > >> > > > > =========================================== > > Laurence Hunt, DPhil Student > > Centre for Functional MRI of the Brain (FMRIB), > > University of Oxford > > lhunt at fmrib.ox.ac.uk > > Phone: (+44)1865-(2)22738 > > =========================================== > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 9 17:51:40 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 9 Feb 2009 17:51:40 +0100 Subject: subject too low in ctf scanner In-Reply-To: <200902090702.n1972lkC019587@kurage.nimh.nih.gov> Message-ID: Hi Tom The default behaviour of the prepare_dipole_grid helper function for sourceanalysis in case of MEG is to make a 3D dipole grid that covers the helmet ("~30x30x30cm wide box"), subsequently detect points that are inside the head (actually inside the volume conductor), and then reduce the size of the 3D grid to a "narrow box" that tightly fits around the brain. So if the subject is seated very low compared to th edewar, then indeed the lower part of his brain might have been skipped for the 3D grid generation. You can also start with your own specification of the 3D grid, using cfg.xgrid/ygrid/zgrid. The grid is specified in individual subjects headcoordinates, i.e. in cm in the CTF case, which means that the position of the head relative to the dewar does not matter. Something like this should do the trick cfg.grid.xgrid = -12:14 % back to front cfg.grid.ygrid = -12:12 % right to left cfg.grid.zgrid = -2:14 % bottom to top if you then also specify cfg.grid.tight=yes, then you'll still get a nice tight/narrow box without too many points that are outside the head. best regards, Robert On 9 Feb 2009, at 8:02, Tom Holroyd wrote: > When the subject is too low, > the source analysis cuts off > any activity below the dewar. > Radial gradiometers can pick > up sources below the sensor > but Fieldtrip clips them. > > Is there an easy way to extend > the grid so that source analysis > can go below the sensor? > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 9 17:56:08 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 9 Feb 2009 17:56:08 +0100 Subject: Import Channel locations from EEGLAB In-Reply-To: <7865FEBD8DFE2942973AD4CD19784ECB01D7C3F4@EXV4.ds.umcutrecht.nl> Message-ID: Hi Tom, You should have an eeglab2fieldtrip function in your EEGLAB distribution. It works like this % Use as % [data] = eeglab2fieldtrip( EEG, fieldbox ) % % where the inputs are % EEG - [struct] EEGLAB structure % fieldbox - ['preprocessing'|'timelockanalysis'|'componentanalysis'|... % 'chanloc', 'chanloc_withfid'] and if you specify 'chanloc' as fieldbox, you should get a data structure that has the field "elec" in it. That is the electrode definition according to fieldtrip standards, and you can e.g. use it in prepare_layout to make a layout for plotting. best regards Robert On 6 Feb 2009, at 14:38, sanders, T. wrote: > Hello, > > I was wondering if there is an easy way to convert the channel > labels and locations from EEGLAB to Fieldtrip. We are using the > international 10-10 system with 118 electrodes and have a > EEG.chanlocs datastructure for that. Our labels are slightly > different than than the default labels and channel locations known > by Fieldtrip (possibly due to us using 118 electrodes) which means > we cannot create a multiplot in Fieldtrip at the moment. If anyone > knows a way to convert the chanlocs datastructure from EEGLAB to a > layout datastructure of Fieldtrip I would greatly appreciate it. > > Thank you in advance. > > Kind Regards, > Tom Sanders > > BCI group > Rudolf Magnus Institute > Department of Neurology & Neurosurgery > University Medical Center Utrecht > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From masaki.maruyama at CEA.FR Mon Feb 9 18:37:06 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Mon, 9 Feb 2009 18:37:06 +0100 Subject: meg-pd function "rawdata" In-Reply-To: A Message-ID: Hello Vladimir, Thank you for your prompt response. You are right. I didn't specify the cfg parameters and the path to MNE toolbox. Now I obtained a different result. Trials are still often defined 100 ms earlier than its correct timing, but no trial are defined with the delay of 900 ms. So the problem is not completely fixed yet. When you need more information, please tell me without any hesitation. With best regards, Masaki Maruyama -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Vladimir Litvak Envoyé : Monday, February 09, 2009 5:41 PM À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] meg-pd function "rawdata" Dear Masaki, It sounds like you haven't actually used a different reader, the one that Laurence had developed. As Robert suggested you should specify cfg.headerformat = 'neuromag_mne'; cfg.dataformat = 'neuromag_mne'; in your preprocessing. Then you will get an error message which tells you to download the MNE Matlab toolbox and when you have this toolbox in your path then you'll be able to use the new reader. You'll see the difference right away as the MNE toolbox prints out a lot of messages, quite different from meg_pd. If you still have the problem after all that, please let us know. Best, Vladimir On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM wrote: > Hello Laurence, > > > > I used the latest version of Fieldtrip, updated on 2009/02/08. However, I > found the same problem again in the timing of trial definition. Defined > trials often precede by 100 ms or delay 900 ms with respect to its correct > time. > > > > As far as I understand "read_data.m" lines 885-905, the program assumes that > the beginning of buffer always starts with an integral multiple of > hdr.nSamples. However, it is not always the case, as I previously show the > examples of rawdata('goto', ***). > > > > I would like to attach an example provided by Dr. Kimmo to read data at > 102.9 s. I think the output of rawdata('goto',***) should be used in the > program. > > > > %%%%%%Example start%%%%%%%%%%%%%% > > > > %Go to the buffer containing the sample you want and get the current time > point > > t0 = rawdata('goto', 102.9); > > %Get the buffer > > buffer = rawdata('next'); > > %Find out the correct sample in the buffer > > ind = floor((102.9-t0)*sf+1); > > % Get the correct vector from the buffer > > B = buffer(:, ind); > > > > %%%%%%Example end%%%%%%%%%%%%%% > > > > Thank you in advance for your further consideration on this issue. > > > > > > With best regards, > > Masaki Maruyama > > > > > > -----Message d'origine----- > De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part > de Laurence Hunt > Envoyé : Thursday, February 05, 2009 11:02 AM > À : FIELDTRIP at NIC.SURFNET.NL > Objet : Re: [FIELDTRIP] meg-pd function "rawdata" > > > > Hi Masaki, > > > > The MNE-based functions should be ready to use, to read raw fif data - > > but we've only developed them over the last week or two, so please let > > me know if you come across any bugs, or whether it solves the problem > > you encountered with rawdata. We should have a version that's able to > > read evoked .fif files also in the next week or two. > > > > Regards, > > Laurence > > > > > > On 4 Feb 2009, at 16:50, Robert Oostenveld wrote: > > > >> Hi Masaki > >> > >> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote: > >> > >>> After 102.1 second the output delays by 0.1 second, which seems to > >>> be a > >>> causal of the wrong time detection of trials. I cannot find out why > >>> it happened > >>> in the MEG recording, but I like to see averaged fields from the > >>> data. Could > >>> you please give me advices? > >>> > >>> Thank you in advance for your kind advices. > >> > >> It seems due to a (rounding-off?) bug in rawdata. The fif access mex > >> files are causing a lot of problems, and that is why we recently > >> decided to switch to a new implementation for reading the fif files > >> in fieldtrip. > >> > >> The new implementation for fieldtrip is based on low-level functions > >> from the MNE toolbox by Matti Hamalainen: > >> see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php > >> and try the fieldtrip functions read_header and read_data with an > >> explicit specification of headerformat=neuromag_nme and > >> dataformat=neuromag_mne respectively. That should cause the low- > >> level readers from Matti to be used. Also read_event should be able > >> to give you the correct trial markers. > >> > >> Laurence (CC) should be able to tell you more about the current > >> status of this new implementation. > >> > >> best regards, > >> Robert > >> > >> PS note that the MNE toolbox functions are not released together > >> with fieldtrip, due to licensing limitations. > >> > > > > =========================================== > > Laurence Hunt, DPhil Student > > Centre for Functional MRI of the Brain (FMRIB), > > University of Oxford > > lhunt at fmrib.ox.ac.uk > > Phone: (+44)1865-(2)22738 > > =========================================== > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Tue Feb 10 12:18:17 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Tue, 10 Feb 2009 12:18:17 +0100 Subject: dipolefitting output format Message-ID: I have some doubts about format of dipolefitting's output. I have wrote the scirpt which use dipolefitting. Finally I have the line: dip1 = dipolefitting(cfg, avg1); So I have dipole coordinates in "dip1" variable. I tried to visualise it with: source.posxyz = dip1.dip.pos; source.momxyz = dip1.dip.mom; source.rv = dip1.dip.rv; dipplot(source); I can also use the following instead of the previous one: dipplot(source_plot, 'coordformat', 'MNI'); Difference between dipplot(source) and dipplot(source, 'coordformat', 'MNI') is very important - it is visualised in completely different location. My question is: what coordinates does the dipolefitting use at the output? How should I properly visualise its output? Thank you all in advance! Kind regards, Szymon ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Tue Feb 10 17:35:06 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 10 Feb 2009 16:35:06 +0000 Subject: dipolefitting output format In-Reply-To: <8834c95d0902100318o1515309pa06cd9b184fd9f0f@mail.gmail.com> Message-ID: Dear Szymon, dipolefitting works in any coordinate system. So the coordinate system of the output is the same as the coordinate system of the input - your vol and sens. I'm not familiar with the dipplot function you are using. It doesn't sound like a Fieldtrip function. In Fieldtrip you can use headmodelplot to visualize your volume model and then add your dipole using plot3. Best, Vladimir On Tue, Feb 10, 2009 at 11:18 AM, Szymon Piłat wrote: > I have some doubts about format of dipolefitting's output. > > I have wrote the scirpt which use dipolefitting. Finally I have the line: > dip1 = dipolefitting(cfg, avg1); > > So I have dipole coordinates in "dip1" variable. > I tried to visualise it with: > > source.posxyz = dip1.dip.pos; > source.momxyz = dip1.dip.mom; > source.rv = dip1.dip.rv; > dipplot(source); > > I can also use the following instead of the previous one: > > dipplot(source_plot, 'coordformat', 'MNI'); > > Difference between > > dipplot(source) > and > dipplot(source, 'coordformat', 'MNI') > > is very important - it is visualised in completely different location. > > My question is: what coordinates does the dipolefitting use at the output? > How should I properly visualise its output? > > Thank you all in advance! > > Kind regards, > Szymon > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. From arno at SALK.EDU Tue Feb 10 18:39:53 2009 From: arno at SALK.EDU (arno delorme) Date: Tue, 10 Feb 2009 18:39:53 +0100 Subject: dipolefitting output format In-Reply-To: <8834c95d0902100318o1515309pa06cd9b184fd9f0f@mail.gmail.com> Message-ID: The dipplot function can plot dipoles from spherical models or dipoles in MNI coordinates. I happens that these two models are oriented with 90 degrees different (the nose points toward different directions). Also the transformation to plot on the MNI brain is different. In the spherical cases, spherical coordinates are transformed to MNI coordinates first using the sph2spm function. So if you used a MNI model to locate your dipoles, you must enter the 'coordformat', 'MNI' option. Hope this helps, Arno On 10 févr. 09, at 12:18, Szymon Piłat wrote: > I have some doubts about format of dipolefitting's output. > > I have wrote the scirpt which use dipolefitting. Finally I have the > line: > dip1 = dipolefitting(cfg, avg1); > > So I have dipole coordinates in "dip1" variable. > I tried to visualise it with: > > source.posxyz = dip1.dip.pos; > source.momxyz = dip1.dip.mom; > source.rv = dip1.dip.rv; > dipplot(source); > > I can also use the following instead of the previous one: > > dipplot(source_plot, 'coordformat', 'MNI'); > > Difference between > > dipplot(source) > and > dipplot(source, 'coordformat', 'MNI') > > is very important - it is visualised in completely different location. > > My question is: what coordinates does the dipolefitting use at the > output? > How should I properly visualise its output? > > Thank you all in advance! > > Kind regards, > Szymon > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Wed Feb 11 16:12:42 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Wed, 11 Feb 2009 16:12:42 +0100 Subject: [SPAM] Re: [FIELDTRIP] dipolefitting output format In-Reply-To: Message-ID: Thaks for your help. It was very useful. I did some research on it so I can summurize it: you can use dipolefiitting function to find source and visualise it using dipplot (from EEGLAB). The only thing you have to do is to implement assumption that head radius is 85mm (dippot assummes that). No transformation is required - localization is the same as using headmodelplot and plot3 functions (suggested by Vladimir). Note that dipplot uses 'spherical' or "MNI" coordinates. If you want to visualise dipolefitting output you need to choose 'spherical' coords. If fact it is not the spherical coordinates as we understand it in physics (radius and 2 angles: r, theta, phi) - it uses regular cartesian coordinates (x,y,z). Kind regadrs, Szymon W dniu 10 lutego 2009 18:39 użytkownik arno delorme napisał: > The dipplot function can plot dipoles from spherical models or dipoles > in MNI coordinates. I happens that these two models are oriented with > 90 degrees different (the nose points toward different directions). > Also the transformation to plot on the MNI brain is different. > > In the spherical cases, spherical coordinates are transformed to MNI > coordinates first using the sph2spm function. > > So if you used a MNI model to locate your dipoles, you must enter the > 'coordformat', 'MNI' option. > > Hope this helps, > > Arno > > > On 10 févr. 09, at 12:18, Szymon Piłat wrote: > > I have some doubts about format of dipolefitting's output. >> >> I have wrote the scirpt which use dipolefitting. Finally I have the line: >> dip1 = dipolefitting(cfg, avg1); >> >> So I have dipole coordinates in "dip1" variable. >> I tried to visualise it with: >> >> source.posxyz = dip1.dip.pos; >> source.momxyz = dip1.dip.mom; >> source.rv = dip1.dip.rv; >> dipplot(source); >> >> I can also use the following instead of the previous one: >> >> dipplot(source_plot, 'coordformat', 'MNI'); >> >> Difference between >> >> dipplot(source) >> and >> dipplot(source, 'coordformat', 'MNI') >> >> is very important - it is visualised in completely different location. >> >> My question is: what coordinates does the dipolefitting use at the output? >> How should I properly visualise its output? >> >> Thank you all in advance! >> >> Kind regards, >> Szymon >> ---------------------------------- >> >> 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. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nina.Kahlbrock at UNI-DUESSELDORF.DE Wed Feb 11 16:14:33 2009 From: Nina.Kahlbrock at UNI-DUESSELDORF.DE (Nina Kahlbrock) Date: Wed, 11 Feb 2009 16:14:33 +0100 Subject: partial artefact rejection Message-ID: Dear all, I have a question concerning partial artefact rejection. In my experiment, I have used trials of different lengths. For preprocessing, I have extended all of the trials to a certain length in order to avoid filter artefacts from cutting trials. I have then used partial artefact rejection and preprocessed the trials. In order to calculate TFRs, I would like to use the actual lengths of the trials again by cutting the trials to the former lengths. Now my questions: How exactly is partial artefact rejection done? As I see it from my data, the data points contaminated by artefacts are removed from the structure, right? The offset seems to be adjusted to the cut trials, though. How do you suggest that I get my actual trial lengths back? It seems that I cannot know what part of the remaining data still belongs to my old trial and which part belongs to the part that was only used for preprocessing but needs to be cut out. I appreciate your help! Thanks in advance, Nina ---------------------------------- 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/fcdonders/fieldtrip. From spil at OKWF.FUW.EDU.PL Wed Feb 11 16:24:13 2009 From: spil at OKWF.FUW.EDU.PL (=?ISO-8859-2?Q?Szymon_Pi=B3at?=) Date: Wed, 11 Feb 2009 16:24:13 +0100 Subject: LORETA - what file Message-ID: Hi everybody! Is LORETA implemented in FieldTrip? I would like to localize source using it. I want to find source using only 1 timepoint of EEG (19 electrodes) so I want to use low-level script. Can you tell me what file performs LORETA's algorithm? Kind regards, Szymon ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Wed Feb 11 20:24:34 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 11 Feb 2009 19:24:34 +0000 Subject: partial artefact rejection In-Reply-To: Message-ID: Dear Nina, I am not sure whether I understand your question exactly, because as far as I can judge from your concern, there is none ;o). No doubt you already had a look at the tutorial documentation: 'automatic artifact rejection' on the website. It is indeed the case that data points identified as artifact are removed from the data. As a consequence, the cell array that represents your data is changed (data.trial). Also, the field data.time changes obviously, because some parts of the data are removed. One of the following scenarios can occur: -there is no artifact in the trial -> so this particular trial survives unchanged -there is an artifact at one of the edges of the trial. As a consequence, the trial and time axis are shortened. Importantly, when the trial is shortened on the left, the offset should also change, because this value defines the offset of the first sample in this trial with respect to the user-defined timepoint 0. To ensure a correct subsequent time-locked analysis (or TFR for that sake), a trial that loses 100 milliseconds on the left should have its offset updated with 100 (if the sampling rate is a 1000 Hz). (Tonight's question is whether this should be an increase or a decrease). -there is one or more artifacts in the middle of the trial. As a consequence, the trial is cut into several pieces; correspondingly the time axes have to be adjusted, and also the offsets. This means that it could be that your original 100th trial ends up in several different new 'trials'. All this should not be a big problem, because each step in the analysis should output a structure containing the configuration used in earlier steps of the analysis. If you would want to keep track of the original trials, you should always be able to match the cfg.trl in the output of rejectartifact, with the cfg.trl obtained after definetrial. With respect to your second question: if you want to pad your trials with data for the purpose of filtering, you can specify the option cfg.padding before calling preprocessing. If you for example defined your trials to last between event-of-interest - 1 second, and event- of-interest + 1 second, and your cfg.trl is defined accordingly, you can specify cfg.padding to be for example 3 seconds. This means that on each side of the trial, 0.5 seconds of extra data is read from the raw datafile, filtering (or similar things) is applied, and the edges are cut off again, so that you end up with 2-second segments. If you want to do artifact rejection prior to the actual reading and preprocessing of your data, you have to specify cfg.padding prior to calling rejectartifact, and then the routines will look for artifacts in the padded data. This makes sense, because filtering of an artifact (such as a squid-jump) could lead to nasty effects. I hope this helps, JM On Feb 11, 2009, at 3:14 PM, Nina Kahlbrock wrote: > Dear all, > > I have a question concerning partial artefact rejection. > In my experiment, I have used trials of different lengths. For > preprocessing, I have extended all of the trials to a certain > length in > order to avoid filter artefacts from cutting trials. I have then used > partial artefact rejection and preprocessed the trials. > In order to calculate TFRs, I would like to use the actual lengths > of the > trials again by cutting the trials to the former lengths. > Now my questions: How exactly is partial artefact rejection done? > As I see > it from my data, the data points contaminated by artefacts are > removed from > the structure, right? The offset seems to be adjusted to the cut > trials, though. > How do you suggest that I get my actual trial lengths back? It > seems that I > cannot know what part of the remaining data still belongs to my old > trial > and which part belongs to the part that was only used for > preprocessing but > needs to be cut out. > > I appreciate your help! > > Thanks in advance, > > Nina > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Wed Feb 11 20:43:41 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Wed, 11 Feb 2009 20:43:41 +0100 Subject: First steps with FIELDTRIP Message-ID: Dear all, Just starting to work with FIELDTRIP, I have the typical problems of a beginner and wondered whether you could help me with these. I conducted an MEG study (CTF, Vancouver whole-head system) in an old-new recognition paradigm. 1. From the tutorial it was not clear to me what the very first step is to analyze the data, and I tried the 'read_data' command (dat = read_data ('filename.ds');). However, there is an error message Error in ==> /Applications/fieldtrip/fieldtrip-20090128/external/ctf/getCTFdata.p>getCTFdata at 28 Error in ==> read_data at 654 dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', 'double'); both for my own and your tutorial data. Do you have any idea, why the command does not work? 2. Could you maybe provide me with a skript 'from the very beginning" to avoid this kind of problems? I do not know either how the header information can be integrated (presumably with "read_header"), and how to go on to the next step of preprocessing. Thank you very much for your help. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Feb 11 21:37:34 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 11 Feb 2009 21:37:34 +0100 Subject: First steps with FIELDTRIP In-Reply-To: <20090211204341.18415ppb691zaq99@webmail.uni-tuebingen.de> Message-ID: dear nicola, i'm not sure what tutorial you are refering too. take a look here: http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial read_data already is a low-level function that you should not have to deal with as enduser. the first step is to tell fieldtrip when your relevant events occured (definetrial) and then to apply some preprocessing options (preprocessing.m). from there on it all depends on what you want to find out and actually the nice examples in the tutorial should get you going (i.e. sending you scripts wouldn't help you more). in the intro there is a useful overview of the major functions and how they relate. Good luck & don't give up! nathan On 11.02.2009, at 20:43, Nicola Neumann wrote: > Dear all, > > Just starting to work with FIELDTRIP, I have the typical problems of > a beginner and wondered whether you could help me with these. I > conducted an MEG study (CTF, Vancouver whole-head system) in an old- > new recognition paradigm. > > 1. From the tutorial it was not clear to me what the very first step > is to analyze the data, and I tried the 'read_data' command (dat = > read_data ('filename.ds');). However, there is an error message > Error in ==> /Applications/fieldtrip/fieldtrip-20090128/external/ctf/ > getCTFdata.p>getCTFdata at 28 > Error in ==> read_data at 654 > dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', > 'double'); > > both for my own and your tutorial data. Do you have any idea, why > the command does not work? > > 2. Could you maybe provide me with a skript 'from the very > beginning" to avoid this kind of problems? I do not know either how > the header information can be integrated (presumably with > "read_header"), and how to go on to the next step of preprocessing. > > Thank you very much for your help. > Nicola > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Feb 12 09:29:22 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Feb 2009 09:29:22 +0100 Subject: LORETA - what file In-Reply-To: <8834c95d0902110724h36a14069jfc30376c00e3473e@mail.gmail.com> Message-ID: On 11 Feb 2009, at 16:24, Szymon Piłat wrote: > Hi everybody! > > Is LORETA implemented in FieldTrip? I would like to localize source > using it. > I want to find source using only 1 timepoint of EEG (19 electrodes) > so I want to use low-level script. Can you tell me what file > performs LORETA's algorithm? Hi Szymon Note that there are various LORETA algoritms, which are distinguished by a prefix (e.g. sLORETA, eLORETA). The original one with Laplacian- weighted regularization is plain LORETA without a prefix. But Fieldtrip does not include an implementation of any LORETA version. An implementation of LORETA for EEG is available from Roberto Pascual- Marqui at http://www.uzh.ch/keyinst/loreta.htm. Fieldtrip does have a helper function to read the resulting files from thaht software, it is called loreta2fieldtrip. It can be used for post-processing the source reconstructions in fieldtrip, e.g. for statistics. I think that it has not been used for a long time, so I am not 100% confident that loreta2fieldtrip will work out of the box, but you could have a look at it. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Thu Feb 12 09:31:28 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 12 Feb 2009 09:31:28 +0100 Subject: LORETA - what file In-Reply-To: <9E44A0C1-718C-4ED6-A8A8-8F34524082E5@fcdonders.ru.nl> Message-ID: hi, if you're looking for a matlab implementation you could also take a look at srang dalal's nutmeg-toolbox: http://nutmeg.berkeley.edu/index.php?title=Main_Page don't know if it works out with eeg though ... best, nathan On 12.02.2009, at 09:29, Robert Oostenveld wrote: > On 11 Feb 2009, at 16:24, Szymon Piłat wrote: >> Hi everybody! >> >> Is LORETA implemented in FieldTrip? I would like to localize source >> using it. >> I want to find source using only 1 timepoint of EEG (19 electrodes) >> so I want to use low-level script. Can you tell me what file >> performs LORETA's algorithm? > > Hi Szymon > > Note that there are various LORETA algoritms, which are > distinguished by a prefix (e.g. sLORETA, eLORETA). The original one > with Laplacian-weighted regularization is plain LORETA without a > prefix. But Fieldtrip does not include an implementation of any > LORETA version. > > An implementation of LORETA for EEG is available from Roberto > Pascual-Marqui at http://www.uzh.ch/keyinst/loreta.htm. Fieldtrip > does have a helper function to read the resulting files from thaht > software, it is called loreta2fieldtrip. It can be used for post- > processing the source reconstructions in fieldtrip, e.g. for > statistics. I think that it has not been used for a long time, so I > am not 100% confident that loreta2fieldtrip will work out of the > box, but you could have a look at it. > > best regards, > Robert---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From A.Stancak at LIVERPOOL.AC.UK Thu Feb 12 15:49:27 2009 From: A.Stancak at LIVERPOOL.AC.UK (Stancak, Andrej) Date: Thu, 12 Feb 2009 14:49:27 -0000 Subject: ECG artifacts in MEG Message-ID: Dear colleagues, I would like to clean MEG data from ECG artifacts. There is a routine artefact_ECG.m enabling to detect the QRS complex in an ECG trace. The question is whether there is (in FieldTrip or SPM8b) a method similar to the one implemented in BESA which takes the template (basically an averaged QRS plus interval encompassing the P and the T wave) and subtract it from each MEG (or EEG) trace. Compared to ICA, this method works much faster although it definitely may alter certain topographical features of MEG. Best regards Andrej Andrej Stancak, PhD. Professor for normal physiology Senior lecturer in psychology School of Psychology Eleanor Rathbone Building Bedford Street South L69 7ZA Liverpool United Kingdom Phone: 0044 0151 7946951 E-mail: a.stancak at liverpool.ac.uk (primary)         stancak at lf3.cuni.cz (secondary) Office hours: Mo 10-12, Wed 10-12 ---------------------------------- 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/fcdonders/fieldtrip. From ghocepie at ULB.AC.BE Thu Feb 12 17:12:00 2009 From: ghocepie at ULB.AC.BE (Gatien Hocepied) Date: Thu, 12 Feb 2009 17:12:00 +0100 Subject: Problems with fieldtrip toolbox Message-ID: Dear all, I recently used your toolbox. In order to find the amplitude of several dipoles, I ran different functions of the toolbox. However, even the results seem to be correct for test signals, when I used these functions for my 25-ELEC EEG signals (time window : 10 sec, Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, the results are not the same from one experiment to the other (obviously the initial positions are random) I used regional non-linear technique. Would you have some clues for me ? Anyway, thanks very much for this useful toolbox. Best regards, Gatien Hocepied ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Thu Feb 12 17:20:03 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 12 Feb 2009 16:20:03 +0000 Subject: ECG artifacts in MEG In-Reply-To: <45FEBCBE11DAC142A421BF00CBC7349D861D3F@EVSSTAFF2.livad.liv.ac.uk> Message-ID: Dear Andrej, There is no Matlab function I know of that corrects the sensor data like in BESA. In SPM8b there is a possibility to discard artefact sub-space during 3D source reconstruction. This is done using the 'Define spatial confounds' option in MEEGtools toolbox. In principle if you come up with a montage matrix that projects out your artefact you can use the montage functionality of SPM to correct your data. This would be somewhat more distortive than in BESA though and at the moment I'm not sure whether source analysis of such data would work correctly in SPM and FT. Best, Vladimir On Thu, Feb 12, 2009 at 2:49 PM, Stancak, Andrej wrote: > Dear colleagues, > > I would like to clean MEG data from ECG artifacts. There is a routine > artefact_ECG.m enabling to detect the QRS complex in an ECG trace. The question > is whether there is (in FieldTrip or SPM8b) a method similar to the one > implemented in BESA which takes the template (basically an averaged QRS plus > interval encompassing the P and the T wave) and subtract it from each MEG (or > EEG) trace. Compared to ICA, this method works much faster although it > definitely may alter certain topographical features of MEG. > > Best regards > Andrej > > Andrej Stancak, PhD. > Professor for normal physiology > Senior lecturer in psychology > > School of Psychology > Eleanor Rathbone Building > Bedford Street South > L69 7ZA > Liverpool > United Kingdom > > Phone: 0044 0151 7946951 > E-mail: a.stancak at liverpool.ac.uk (primary) > stancak at lf3.cuni.cz (secondary) > > Office hours: Mo 10-12, Wed 10-12 > > ---------------------------------- > 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/fcdonders/fieldtrip. > > ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Feb 12 18:02:05 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Feb 2009 18:02:05 +0100 Subject: ECG artifacts in MEG In-Reply-To: <45FEBCBE11DAC142A421BF00CBC7349D861D3F@EVSSTAFF2.livad.liv.ac.uk> Message-ID: Dear Andrej We initially (i.e. relatively early in fieldtrip development and in developing our MEG analysis skills) have attempted to remove the ECG artifact by QRS detection, averaging and then subtracting the template from the original data at the location of the QRS peaks. That is what you seem to describe, and that is where the function you're refering to originates from. However, in our opinion at that time it was not satisfactory. There is considerable variance in the shape (spatial and temporal) of the ECG artifact as it appears in the MEG channels, which means that a resudue of the artifact remains. An alternative strategy that we have subsequently used is described here http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:use_independent_component_analysis_ica_to_remove_ecg_artifacts best regards, Robert On 12 Feb 2009, at 15:49, Stancak, Andrej wrote: > Dear colleagues, > > I would like to clean MEG data from ECG artifacts. There is a routine > artefact_ECG.m enabling to detect the QRS complex in an ECG trace. > The question > is whether there is (in FieldTrip or SPM8b) a method similar to the > one > implemented in BESA which takes the template (basically an averaged > QRS plus > interval encompassing the P and the T wave) and subtract it from > each MEG (or > EEG) trace. Compared to ICA, this method works much faster although it > definitely may alter certain topographical features of MEG. > > Best regards > Andrej > > Andrej Stancak, PhD. > Professor for normal physiology > Senior lecturer in psychology > > School of Psychology > Eleanor Rathbone Building > Bedford Street South > L69 7ZA > Liverpool > United Kingdom > > Phone: 0044 0151 7946951 > E-mail: a.stancak at liverpool.ac.uk (primary) > stancak at lf3.cuni.cz (secondary) > > Office hours: Mo 10-12, Wed 10-12 > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Fri Feb 13 21:40:26 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Fri, 13 Feb 2009 21:40:26 +0100 Subject: ClassFile information for selecting trials Message-ID: Dear all, For trial selection I am trying to figure out how I can enter information of the ClassFile.cls of the CTF dataset. I have CLASSIDs for different kind of trials, but it seems to me that the examples in the tutorial only refer to different triggers that are stored in another part of the dataset (?). Has anyone ever used ClassFile information and maybe has a skript for that? Thanks. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From wanglinsisi at GMAIL.COM Mon Feb 16 11:30:27 2009 From: wanglinsisi at GMAIL.COM (=?GB2312?B?wdXN9Q==?=) Date: Mon, 16 Feb 2009 11:30:27 +0100 Subject: common filter in source analysis Message-ID: Dear all, I'm trying to use beamforming to calculate the sources of beta activities to the tutorial's data. I got very different results by using common filter to pre and post (according to the event) conditions comparing with the un-common filtered method. Do you have any idea why this happens? Thank you very much! Best, Lin ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 16 12:07:22 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 16 Feb 2009 12:07:22 +0100 Subject: common filter in source analysis In-Reply-To: Message-ID: Dear Lin, It could have multiple causes. Under the assumption that the location of the sources is not different in pre and post, only the power, the common filters can lead to better results, because you use more data to construct the filters. Especially when you have a strong beta decrease in post compared to pre (almost no power in post, much power in pre) using the data in pre in the filters, can help to get better localization in post. It all depends to a large degree on your data. To decide which result you can trust, you could compare the results on source level, with the sensor level. I hope this helps, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of ?? Sent: Monday, February 16, 2009 11:30 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] common filter in source analysis Dear all, I'm trying to use beamforming to calculate the sources of beta activities to the tutorial's data. I got very different results by using common filter to pre and post (according to the event) conditions comparing with the un-common filtered method. Do you have any idea why this happens? Thank you very much! Best, Lin ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:13:06 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:13:06 +0100 Subject: Problems with fieldtrip toolbox In-Reply-To: <006401c98d2c$a2de87e0$e89b97a0$@ac.be> Message-ID: On 12 Feb 2009, at 17:12, Gatien Hocepied wrote: > Dear all, > > I recently used your toolbox. In order to find the amplitude of > several dipoles, I ran different functions of the toolbox. However, > even the results seem to be correct for test signals, when I used > these functions for my 25-ELEC EEG signals (time window : 10 sec, > Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, > the results are not the same from one experiment to the other > (obviously the initial positions are random)… I used regional non- > linear technique. Would you have some clues for me ? Dear Gatien The strength of the fitted dipoles depends strongly on the position. So if you see different dipole strength/moment, then you should check whether the positions are the same. The position that is found after dipole fitting, and especially for multi-dipole models, can depend on the initial starting positions. I.e., the dipoles can end up in a local minimum of the error landscape, instead of the global minimum. To improve the robustness of the dipole fitting approach, you should start the nonlinear search with an initial location for your dipoles that is as close as possible to the optimal location. So if you have some prior knowledge about where your dipoles might be, then you should use that. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:33:04 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:33:04 +0100 Subject: ClassFile information for selecting trials In-Reply-To: <20090213214026.19425hqqo016exfe@webmail.uni-tuebingen.de> Message-ID: On 13 Feb 2009, at 21:40, Nicola Neumann wrote: > Dear all, > > For trial selection I am trying to figure out how I can enter > information of the ClassFile.cls of the CTF dataset. I have CLASSIDs > for different kind of trials, but it seems to me that the examples > in the tutorial only refer to different triggers that are stored in > another part of the dataset (?). Has anyone ever used ClassFile > information and maybe has a skript for that? Hi Nicola At the Donders Centre we used the CTF class (*.cls) files for epoched data. That was about 5 years ago, since after some experience with the ClassFile and MarkerFile, we standardized on continuous MEG recordings in combination with triggers, and not to use the CTF DataEditor and other utilities at all. However, FieldTrip still should support class files. E.g. the Subject01 example tutorial file from the fcdonders ftp server is an old one and was recorded trial-based and it contains some ClassFile and MarkerFile entries. You can see that in matlab/Fieldtrip by the following: >> event = read_event('Subject01.ds') event = 1343x1 struct array with fields: type sample value offset duration >> unique({event.type}) ans = 'FC' 'FIC' 'IC' 'STIM' 'Tr15' 'Tr21' 'Trial' 'backpanel trigger' 'classification' 'frontpanel trigger' 'trial' The "FIC" event is one that is derived from the class file (*). It happens 87 times. >> find(strcmp({event.type}, 'FIC')) ans = Columns 1 through 17 24 44 55 65 96 101 106 116 ... Columns 86 through 87 1313 1333 In the tutorial documentation we are using the trigger code to find the segments corresponding with the FIC (fully incongruent) stimulus. (*) Actually, when I was just looking at the ClassFile and MarkerFile in an editor, the "FIC" turned out to be in the MarkerFile and not in the ClassFile. The ClassFile contains the class "BAD", i.e. manually detected artifacts. The BAD events can be found like this >> find(strcmp({event.type}, 'classification')) ans = 46 92 422 536 611 632 763 804 939 1070 1280 1309 >> event(46) ans = type: 'classification' sample: 8101 value: 'BAD' offset: -300 duration: 900 So if you use read_event on your dataset, you should be able to get all the info that you need. Subsequently you can make your own trial function. See http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:making_your_own_trialfun_for_conditional_trial_definition for more details on that. Hope this helps, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Feb 16 13:34:51 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 16 Feb 2009 13:34:51 +0100 Subject: maintenance on wiki Message-ID: Dear fieldtrip users, We are restructuring the FieldTrip wiki website and for this purpose the wiki will have to be temporarily read-only. You still can access it, but you cannot edit the pages. Within a few days, the wiki will again be available for everyone to contribute to, and hopefully with a structure that will make finding and contributing documentation easier. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From pacodiaz at UB.EDU Mon Feb 16 15:58:57 2009 From: pacodiaz at UB.EDU (Paco Diaz) Date: Mon, 16 Feb 2009 15:58:57 +0100 Subject: Question on Freqanalysis_tfr Message-ID: Dear fieldtrip users, While reading carefully what the function freqanalysis_tfr do, I have found something that seems very extrange to me. I think that the general procedure for the wavelet transformation is clear but I can't get why do you multiply by 2, and divide by the sampling rate, the absolute value of the convolution. I have still used the function with very good results, but I would like to understand that step in order to sleep well. Here is a piece of the code: for k=1:size(dat,1) for j=1:length(cfg.foi) cTmp = conv(dat(k,:),M{j}); cTmp = (2*abs(cTmp)/data.fsample).^2; cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2)); cTmp = cTmp(:,1:cfg.downsample:end); if strcmp(cfg.keeptrials, 'yes') freq.powspctrm(i,k,j,:) = cTmp'; else freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + cTmp'; % compute the running sum end end end Thank you very much in advance, Paco. ---------------------------------- 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Mon Feb 16 21:25:51 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 16 Feb 2009 20:25:51 +0000 Subject: Question on Freqanalysis_tfr In-Reply-To: Message-ID: Dear Paco, This looks like a bug to me. One way of normalizing fft'ed data, is to obtain a so-called spectral density, i.e. the amount of power per frequency bin. Because you have data.fsample/2 (=Nyquist frequency) frequency bins, this normalization would be: 2*(abs(cTmp).^2)/data.fsample. In the code it seems abs(cTmp)^2 is normalized with the square root of 2./data.fsample. Thanks for finding this; I will fix it and the fixed version will be available in the downloadable toolbox as of tomorrow. However, probably a good reason why this has gone unnoticed that long, is that freqanalysis_tfr is a very old piece of code (and very slow), and the exact same functionality should be covered by freqanalysis_wltconvol (but this guy is much faster). Even better, freqanalysis_mtmconvol operates in a very similar way (and you can even get it to mimick a classical waveletanalysis, given the proper settings), but here you have much more flexibility in defining your time-frequency resolution by playing with 'multitapers'. To give you a look in the kitchen: freqanalysis_tfr operates by applying a convolution in the time domain, between the time domain data and the wavelet. Convolution in the time domain is equivalent to multiplication in the frequency domain. Freqanalysis_mtmconvol/ wltconvol operate by performing this multiplication in the frequency domain, rather than the slow convolution. Yours, Jan-Mathijs On Feb 16, 2009, at 2:58 PM, Paco Diaz wrote: > Dear fieldtrip users, > > While reading carefully what the function freqanalysis_tfr do, I > have > found something that seems very extrange to me. I think that the > general > procedure for the wavelet transformation is clear but I can't get > why do you > multiply by 2, and divide by the sampling rate, the absolute value > of the > convolution. > I have still used the function with very good results, but I > would like to > understand that step in order to sleep well. > > Here is a piece of the code: > > for k=1:size(dat,1) > for j=1:length(cfg.foi) > cTmp = conv(dat(k,:),M{j}); > cTmp = (2*abs(cTmp)/data.fsample).^2; > cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M > {j})/2)); > cTmp = cTmp(:,1:cfg.downsample:end); > if strcmp(cfg.keeptrials, 'yes') > freq.powspctrm(i,k,j,:) = cTmp'; > else > freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + > cTmp'; % > compute the running sum > end > end > end > > > Thank you very much in advance, Paco. > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From pacodiaz at UB.EDU Tue Feb 17 09:01:46 2009 From: pacodiaz at UB.EDU (=?ISO-8859-1?Q?Paco_D=EDaz?=) Date: Tue, 17 Feb 2009 09:01:46 +0100 Subject: Question on Freqanalysis_tfr In-Reply-To: <2AE2B73E-4CBC-4F97-A647-BDD22EC81D6D@psy.gla.ac.uk> Message-ID: Thank you Jan, it's great to have your questions answered so quickly. jan-mathijs schoffelen escribió: > Dear Paco, > > This looks like a bug to me. > One way of normalizing fft'ed data, is to obtain a so-called spectral > density, i.e. the amount of power per frequency bin. Because you have > data.fsample/2 (=Nyquist frequency) frequency bins, this normalization > would be: > > 2*(abs(cTmp).^2)/data.fsample. > > In the code it seems abs(cTmp)^2 is normalized with the square root of > 2./data.fsample. > > Thanks for finding this; I will fix it and the fixed version will be > available in the downloadable toolbox as of tomorrow. However, > probably a good reason why this has gone unnoticed that long, is that > freqanalysis_tfr is a very old piece of code (and very slow), and the > exact same functionality should be covered by freqanalysis_wltconvol > (but this guy is much faster). Even better, freqanalysis_mtmconvol > operates in a very similar way (and you can even get it to mimick a > classical waveletanalysis, given the proper settings), but here you > have much more flexibility in defining your time-frequency resolution > by playing with 'multitapers'. > To give you a look in the kitchen: freqanalysis_tfr operates by > applying a convolution in the time domain, between the time domain > data and the wavelet. Convolution in the time domain is equivalent to > multiplication in the frequency domain. > Freqanalysis_mtmconvol/wltconvol operate by performing this > multiplication in the frequency domain, rather than the slow convolution. > > Yours, > > Jan-Mathijs > > On Feb 16, 2009, at 2:58 PM, Paco Diaz wrote: > >> Dear fieldtrip users, >> >> While reading carefully what the function freqanalysis_tfr do, I have >> found something that seems very extrange to me. I think that the general >> procedure for the wavelet transformation is clear but I can't get why >> do you >> multiply by 2, and divide by the sampling rate, the absolute value of >> the >> convolution. >> I have still used the function with very good results, but I would >> like to >> understand that step in order to sleep well. >> >> Here is a piece of the code: >> >> for k=1:size(dat,1) >> for j=1:length(cfg.foi) >> cTmp = conv(dat(k,:),M{j}); >> cTmp = (2*abs(cTmp)/data.fsample).^2; >> cTmp = >> cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2)); >> cTmp = cTmp(:,1:cfg.downsample:end); >> if strcmp(cfg.keeptrials, 'yes') >> freq.powspctrm(i,k,j,:) = cTmp'; >> else >> freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + >> cTmp'; % >> compute the running sum >> end >> end >> end >> >> >> Thank you very much in advance, Paco. >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. > > ---------------------------------- > 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/fcdonders/fieldtrip. > -- --------------------------------------------------------- Francisco Javier Díaz Santaella Department of Psychiatry and Clinical Psychobiology University of Barcelona P. Vall d'Hebron 171 * 08035 Barcelona * Spain Telf.: +34 93 3125035 * Cell Phone: +34 678 89 47 57 email: pacodiaz at ub.edu http://www.ub.edu/brainlab --------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue Feb 17 11:16:00 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 17 Feb 2009 11:16:00 +0100 Subject: RAM use of freqstatistics Message-ID: Dear Listusers, I have recently started to use freqstatistics with the cfg.correctm = 'cluster' option again and I am a bit puzzled by the amount of RAM it uses - but maybe that's normal. I just want to make sure I am not overlooking some stupid mistake. Here is the code (it uses ~20GB per 1000 randomization draws, never got it to run through 5000+ iterations): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PathName='/data/home1/wibral/Projects/HysteresisMEG/'; FileType='.mat'; AnalysisStr='TF_MTM_win125ms_fsm16p0Hz_Rel_'; PreprocStr='_0_cond_Preproc4LCMV_denoised_fmin0.5Hz_fmax200Hz_'; % contains the subject and date part of filename Design={ 'AEF29_HysteresisMEG_20080428'; 'AKN13_HysteresisMEG_20080901'; 'AZN28_HysteresisMEG_20080811'; 'BAP07_HysteresisMEG_20090204'; 'BRA29_HysteresisMEG_20080829'; 'CHN03_HysteresisMEG_20080818'; 'EKD25_HysteresisMEG_20080815'; 'HZA25_HysteresisMEG_20080725'; 'IWA05_HysteresisMEG_20080606'; 'MBA11_HysteresisMEG_20080728'; 'MTA07_HysteresisMEG_20090128'; 'RRA18_HysteresisMEG_20080825'; 'SKA29_HysteresisMEG_20090211'; 'TSS07_HysteresisMEG_20080822'; }; for i=1:length(Design) fullname1=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr1,FileType); load(fullname1); % a variable named TFdata or TFdataRel exists after this step data1{i}=TFdataRel; % clear TFdata; clear TFdataRel; fullname2=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr2,FileType); load(fullname2); %a variable named TFdata or TFdataRel exists after this step data2{i}=TFdataRel; % clear TFdata; clear TFdataRel; end; cfg=[]; cfg.keepindividual='yes'; TFGA1 = freqgrandaverage(cfg,data1{:}); TFGA1.grad=data1{1}.grad; %get some gradiometer information for plotting TFGA2 = freqgrandaverage(cfg,data2{:}); TFGA2.grad=data2{1}.grad; %get some gradiometer information for plotting % do freqstatistics cfg4stat=[]; cfg4stat.clusteralpha = 0.05; % control admission to a cluster cfg4stat.alpha = 0.05; % control the false alarm rate of the permutation test cfg4stat.avgovertime = 'no'; cfg4stat.avgoverfreq = 'no'; cfg4stat.avgoverchan = 'no'; cfg4stat.statistic = 'depsamplesT'; % test statistic to evaluate the effect at the sample level cfg4stat.numrandomization = (2^12); % cfg4stat.correctm = 'cluster'; cfg4stat.method = 'montecarlo'; cfg4stat.dimord = 'chan_freq_time'; cfg4stat.dim = 'chan_freq_time'; nSubjects = length(Design); a = [1:nSubjects]; b = ones(1,nSubjects); cfg4stat.design = [a a; b (2*b)]; cfg4stat.uvar = 1; % "subject" is unit of observation cfg4stat.ivar = 2; % row of the design matrix that contains the independent variable FreqStatResult = freqstatistics(cfg4stat,TFGA1,TFGA2) ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Feb 17 20:40:11 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 17 Feb 2009 20:40:11 +0100 Subject: RAM use of freqstatistics In-Reply-To: <902003749@web.de> Message-ID: Dear Michael, As far as I can see you did not make any stupid mistakes. I think the reason that freqstatistics uses so much RAM is because you are looking for clusters over time, frequency and channels. Therefore you get a matrix with size Nchan*Nfreq*Ntime for each randomization. With a fine time and frequency resolution, this can become a lot of bites! If you already have a priory hypothesis on the frequency band of interest, or the time of interest, you could consider averaging over freq or time. If you don't want to do this, you could maybe choose a coarser time and/or frequency resolution. I hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Tuesday, February 17, 2009 11:16 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] RAM use of freqstatistics Dear Listusers, I have recently started to use freqstatistics with the cfg.correctm = 'cluster' option again and I am a bit puzzled by the amount of RAM it uses - but maybe that's normal. I just want to make sure I am not overlooking some stupid mistake. Here is the code (it uses ~20GB per 1000 randomization draws, never got it to run through 5000+ iterations): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PathName='/data/home1/wibral/Projects/HysteresisMEG/'; FileType='.mat'; AnalysisStr='TF_MTM_win125ms_fsm16p0Hz_Rel_'; PreprocStr='_0_cond_Preproc4LCMV_denoised_fmin0.5Hz_fmax200Hz_'; % contains the subject and date part of filename Design={ 'AEF29_HysteresisMEG_20080428'; 'AKN13_HysteresisMEG_20080901'; 'AZN28_HysteresisMEG_20080811'; 'BAP07_HysteresisMEG_20090204'; 'BRA29_HysteresisMEG_20080829'; 'CHN03_HysteresisMEG_20080818'; 'EKD25_HysteresisMEG_20080815'; 'HZA25_HysteresisMEG_20080725'; 'IWA05_HysteresisMEG_20080606'; 'MBA11_HysteresisMEG_20080728'; 'MTA07_HysteresisMEG_20090128'; 'RRA18_HysteresisMEG_20080825'; 'SKA29_HysteresisMEG_20090211'; 'TSS07_HysteresisMEG_20080822'; }; for i=1:length(Design) fullname1=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr1,FileType); load(fullname1); % a variable named TFdata or TFdataRel exists after this step data1{i}=TFdataRel; % clear TFdata; clear TFdataRel; fullname2=strcat(PathName,AnalysisStr,Design{i},PreprocStr, condNr2,FileType); load(fullname2); %a variable named TFdata or TFdataRel exists after this step data2{i}=TFdataRel; % clear TFdata; clear TFdataRel; end; cfg=[]; cfg.keepindividual='yes'; TFGA1 = freqgrandaverage(cfg,data1{:}); TFGA1.grad=data1{1}.grad; %get some gradiometer information for plotting TFGA2 = freqgrandaverage(cfg,data2{:}); TFGA2.grad=data2{1}.grad; %get some gradiometer information for plotting % do freqstatistics cfg4stat=[]; cfg4stat.clusteralpha = 0.05; % control admission to a cluster cfg4stat.alpha = 0.05; % control the false alarm rate of the permutation test cfg4stat.avgovertime = 'no'; cfg4stat.avgoverfreq = 'no'; cfg4stat.avgoverchan = 'no'; cfg4stat.statistic = 'depsamplesT'; % test statistic to evaluate the effect at the sample level cfg4stat.numrandomization = (2^12); % cfg4stat.correctm = 'cluster'; cfg4stat.method = 'montecarlo'; cfg4stat.dimord = 'chan_freq_time'; cfg4stat.dim = 'chan_freq_time'; nSubjects = length(Design); a = [1:nSubjects]; b = ones(1,nSubjects); cfg4stat.design = [a a; b (2*b)]; cfg4stat.uvar = 1; % "subject" is unit of observation cfg4stat.ivar = 2; % row of the design matrix that contains the independent variable FreqStatResult = freqstatistics(cfg4stat,TFGA1,TFGA2) ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 18 09:10:46 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 18 Feb 2009 09:10:46 +0100 Subject: ClassFile information for selecting trials 2 In-Reply-To: <20090217211726.80634qbesey29nx2@webmail.uni-tuebingen.de> Message-ID: Dear Nicola, Please describe in detail what you are doing to get up to this point where you seem to have a problem. It would help most if you would include your trial function into the email and descibe the steps, which I would assume to be cfg = [] cfg.dataset = 'Subject01.ds' cfg.trialfun = 'your_trial_function' % your trial function would call the read_event function and make a "trl" matrix cfg = definetrial(cfg) data = preprocessing(cfg) Is this indeed what you are doing? best regards, Robert On 17 Feb 2009, at 21:17, Nicola Neumann wrote: > > Dear Robert, > > Thanks for the detailed reply! However, I get error messages even > with your "Subject01" data. The program cannot read the data at > > dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', > 'double'); > dimord = 'samples_chans_trials'; > > Do you know why this happens? > > Thanks again. > nicola > ---------------------------------- 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/fcdonders/fieldtrip. From nicola.neumann at UNI-TUEBINGEN.DE Fri Feb 20 10:44:58 2009 From: nicola.neumann at UNI-TUEBINGEN.DE (Nicola Neumann) Date: Fri, 20 Feb 2009 10:44:58 +0100 Subject: Definetrial Message-ID: Dear all, Still trying to define trials, I am stuck at the following point: cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 2; cfg = definetrial(cfg); readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) ??? Attempt to reference field of non-structure array. Error in ==> trialfun_general at 126 for i=find(strcmp(cfg.trialdef.eventtype, {event.type})) Error in ==> definetrial at 205 [trl, event] = feval(cfg.trialfun, cfg); Since the skript is from the tutorial and seems to work at everybody else's, it must be some stupid kind of mistake. But which? Thanks for your help. Nicola ---------------------------------- 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/fcdonders/fieldtrip. From ghocepie at ULB.AC.BE Fri Feb 20 11:18:14 2009 From: ghocepie at ULB.AC.BE (Gatien Hocepied) Date: Fri, 20 Feb 2009 11:18:14 +0100 Subject: Problems with fieldtrip toolbox In-Reply-To: <11E973AC-714A-4BFF-A8E9-F570B35E0F9B@fcdonders.ru.nl> Message-ID: Dear all, Robert, thank you for the advice. I will turn to an heuristic approach for my work. I would have another question. The vector dip.mom given by the fitting function is the dipole moment. He permits to know the time-varying orientation of the dipole and I suppose the amplitude of this vector. By using that, I would like to know how I could have the time-varying current amplitude of the source ? Best regards, Gatien Hocepied -----Message d'origine----- De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Robert Oostenveld Envoyé : lundi 16 février 2009 13:13 À : FIELDTRIP at NIC.SURFNET.NL Objet : Re: [FIELDTRIP] Problems with fieldtrip toolbox On 12 Feb 2009, at 17:12, Gatien Hocepied wrote: > Dear all, > > I recently used your toolbox. In order to find the amplitude of > several dipoles, I ran different functions of the toolbox. However, > even the results seem to be correct for test signals, when I used > these functions for my 25-ELEC EEG signals (time window : 10 sec, > Fs : 250 Hz à 10000 samples), sometimes, even for only 2 dipoles, > the results are not the same from one experiment to the other > (obviously the initial positions are random) I used regional non- > linear technique. Would you have some clues for me ? Dear Gatien The strength of the fitted dipoles depends strongly on the position. So if you see different dipole strength/moment, then you should check whether the positions are the same. The position that is found after dipole fitting, and especially for multi-dipole models, can depend on the initial starting positions. I.e., the dipoles can end up in a local minimum of the error landscape, instead of the global minimum. To improve the robustness of the dipole fitting approach, you should start the nonlinear search with an initial location for your dipoles that is as close as possible to the optimal location. So if you have some prior knowledge about where your dipoles might be, then you should use that. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Feb 20 17:18:32 2009 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 20 Feb 2009 17:18:32 +0100 Subject: sources' coordinates Message-ID: Dear all, I reconstructed the sources of my time-frequency data. Now i would like to have the coordinates of my sources. Is there an easy way to have the coordinates of sources exceeding a given value? Is it possible to only have the coordinates of the cluster's center? thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 20 17:35:00 2009 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 20 Feb 2009 17:35:00 +0100 Subject: sources' coordinates In-Reply-To: <20090220171832.5mudhtjlcs80sc0w@courriel.upmc.fr> Message-ID: Dear Marco, You can use the interactive mode in sourceplot (method = 'ortho', interactive = 'yes') and than click on the cluster's center (or use location = 'max' and then the cursor will automatically be set on the voxel with the maximum value). Then the coordinates are printed on the screen. Or you can make a logical mask with only the voxels that are exceeding a certain value, and look at the .pos of those voxels. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marco SPERDUTI Sent: Friday, February 20, 2009 5:19 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sources' coordinates Dear all, I reconstructed the sources of my time-frequency data. Now i would like to have the coordinates of my sources. Is there an easy way to have the coordinates of sources exceeding a given value? Is it possible to only have the coordinates of the cluster's center? thank you, Marco ---------------------------------- 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Mon Feb 23 12:45:08 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 23 Feb 2009 12:45:08 +0100 Subject: DICS, complex filter coeffcients and Virtual Electrodes Message-ID: Dear Fieldtrippers, I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. Any suggestion would be appreciated, Michael ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Mon Feb 23 13:16:21 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 23 Feb 2009 12:16:21 +0000 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: <906478771@web.de> Message-ID: Dear Michael, On Feb 23, 2009, at 11:45 AM, Michael Wibral wrote: > Dear Fieldtrippers, > > I was wondering about the correct way to get SAM-like virtual > electrodes using DICS. I naively tried to compute some virtual > electrodes using the DICS filter coeffcients on the raw > timecourses, but that obviously doesn't work because DICS filter > coefficients are complex (at least in Fieldtrip 20081208 ?). Yes, by default the filter-coefficients are complex-valued, when using cfg.method = 'dics'. There's an option for sourceanalysis, cfg.realfilter which can be set to 'yes'. When cfg.realfilter = 'yes'. The filter-coefficients are computed from the real part of the cross-spectral density matrix only. The rationale behind this would be that 'true' sources only live in the real part of the csd-matrix in the first place, because the forward mapping from source to signal is instantaneous (hence also of course the real-valued leadfields). On the other hand, including extra information in the computation of your filters (i.e. allowing them to be complex, thus using also the imaginary part), probably influences the suppressive properties of the filter. This would mean that noise sources in your data (which are not necessarily at zero phase-lag) may be more effectively suppressed. So I am not sure which is 'the correct' way here. However, if you want to use DICS-based filters to project your sensor data, I would use the option cfg.realfilter = 'yes', to obtain more 'meaningful' voxel-level time courses (but not that these time- courses are only optimised for the frequency band on which the filters had been computed). > Next thing I thought about was to FFT the single trial, filter it > and then inverse FFT it, because the DICS filters are supposed to > work in the frequency domain. But that shouldn't work either, > because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) > = filter(trial), because all operation are linear. This is true (so indeed that exercise is meaningless), but the subsequent estimate of power (i.e. squaring the fourier coefficients) is not linear. (power from the filtered data: abs(filter(FFT (trial))).^2 will be obviously different from filter(abs(FFT (trial)).^2) ). In general, if you want to approximate SAM, to me it would make more sense to use a time-domain beamformer in the first place, because DICS filters are optimised for a specific frequency bin in the first place. In other words, inverse-fft'ing the filtered sensor-fourier coefficients (across all frequencies) does not seem to make too much sense to me. This would boil down to bandpass-filtering your sensor data, calling timelockanalysis with cfg.covariance = 'yes' and cfg.covariancewindow = [something]. Then sourceanalysis with cfg.method = 'lcmv', after which you can project your bp-filtered data through the filters. > Next thing I am puzzled about is that the Filters (A) times the > leadfield matrix (L) should be the identity matrix: AL=1 (see the > Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip > -, then we would also have a complex leadfield, which seems odd to me. Not necessarily: the leadfield is always real-valued. If you interpret the product A*L just as a weighted sum of the complex numbers in A (weighted by L), the values in L can be such that the real part of the sum ends up to be 1, and the imaginary part ends up to be 0. (For your and my peace of mind you could try this by running sourceanalysis with cfg.keepfilter = 'yes' and cfg.realfilter = 'no' and cfg.keepleadfield = 'yes' and looking at a random filter*leadfield). Yours, Jan-Mathijs ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 23 13:33:50 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 23 Feb 2009 12:33:50 +0000 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: <906478771@web.de> Message-ID: Hi Michael, I'm doing this kind of things and I use LCMV beamformer (where the locations of the sources might come from your DICS analysis). This was Robert's suggestion. The reason is that DICS is only optimized for the particular frequency you are looking at and if you want to extract source data that contains other frequencies you need to look at the full frequency range. There are options in lcmv (cfg.lcmv.fixedori = 'yes') that reduces the two orthogonal sources (in MEG case) to one based on the direction of maximal variance. That's something similar to what SAM does (although I'm not sure exactly the same). Best, Vladimir On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral wrote: > Dear Fieldtrippers, > > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. > > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. > > Any suggestion would be appreciated, > Michael > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Mon Feb 23 14:40:20 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 23 Feb 2009 14:40:20 +0100 Subject: DICS, complex filter coeffcients and V irtual Electrodes Message-ID: Dear Jan-Mathijs, dear Vladimir, thanks for your quick replies. I indeed overlooked the cfg.realfilter option. Things seem to work fine now. I also have some comments on the optimization of DICS for a certain frequency: I think that's just the same in LCMV/SAM, where you also specify the band and time you're looking at and where you shouldn't project unfiltered raw data that contain other bands than the ones used for the computation of the filters. In my opinion you choose the frequency limits explicitly (via preprocessing) in LCMV and implicitly (via the spectral smoothing in the computation of the CSD matrix and the subsequent choice of a centre frequency for beamforming) in DICS. This, of course, also means that you should not compute narrow band beamformer filters (say for higher gamma frequencies) and project unfiltered (broadband) data through your filter. What I wanted to do was to compute narrow band sources (tpsmofrq = 5 or 10, center ferquency of 80Hz), prefilter the rawdata in the appropriate range and then project and interpret them. Should be ok, shouldn't it? Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 23.02.09 13:45:11 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] DICS, complex filter coeffcients and Virtual Electrodes > Hi Michael, > > I'm doing this kind of things and I use LCMV beamformer (where the > locations of the sources might come from your DICS analysis). This was > Robert's suggestion. The reason is that DICS is only optimized for the > particular frequency you are looking at and if you want to extract > source data that contains other frequencies you need to look at the > full frequency range. There are options in lcmv (cfg.lcmv.fixedori = > 'yes') that reduces the two orthogonal sources (in MEG case) to one > based on the direction of maximal variance. That's something similar > to what SAM does (although I'm not sure exactly the same). > > Best, > > Vladimir > > > On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral > wrote: > > Dear Fieldtrippers, > > > > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. > > > > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. > > > > Any suggestion would be appreciated, > > Michael > > > > > > ---------------------------------- > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Mon Feb 23 15:14:25 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 23 Feb 2009 15:14:25 +0100 Subject: DICS, complex filter coeffcients and Virtual Electrodes In-Reply-To: Message-ID: Dear FT-colleagues, > Yes, by default the filter-coefficients are complex-valued, when > using cfg.method = 'dics'. There's an option for sourceanalysis, > cfg.realfilter which can be set to 'yes'. When cfg.realfilter = > 'yes'. The filter-coefficients are computed from the real part of the > cross-spectral density matrix only. The rationale behind this would > be that 'true' sources only live in the real part of the csd-matrix > in the first place, because the forward mapping from source to signal > is instantaneous (hence also of course the real-valued leadfields). > On the other hand, including extra information in the computation of > your filters (i.e. allowing them to be complex, thus using also the > imaginary part), probably influences the suppressive properties of > the filter. This would mean that noise sources in your data (which > are not necessarily at zero phase-lag) may be more effectively > suppressed. So I am not sure which is 'the correct' way here. > However, if you want to use DICS-based filters to project your sensor > data, I would use the option cfg.realfilter = 'yes', to obtain more > 'meaningful' voxel-level time courses (but not that these time- > courses are only optimised for the frequency band on which the > filters had been computed). If you believe that the sensor signal is an instantaneous mapping of a source signal, then complex filter weights do not make sense. You can incorporate this constraint (Imag(filter)=0) in the calculation of your filter weights from the complex CSD matrix and the real-valued leadfields. After some linear algebra, you obtain that the solution to this constrained least-squares minimization is equal to usual solution (see, van Veen et al, IEEE-TBME; Gross et all, PNAS) but applied to Real(CSD) instead of the complex-valued CSD matrix. Kind regards, Eric Maris > > > Next thing I thought about was to FFT the single trial, filter it > > and then inverse FFT it, because the DICS filters are supposed to > > work in the frequency domain. But that shouldn't work either, > > because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) > > = filter(trial), because all operation are linear. > > This is true (so indeed that exercise is meaningless), but the > subsequent estimate of power (i.e. squaring the fourier coefficients) > is not linear. (power from the filtered data: abs(filter(FFT > (trial))).^2 will be obviously different from filter(abs(FFT > (trial)).^2) ). > > In general, if you want to approximate SAM, to me it would make more > sense to use a time-domain beamformer in the first place, because > DICS filters are optimised for a specific frequency bin in the first > place. In other words, inverse-fft'ing the filtered sensor-fourier > coefficients (across all frequencies) does not seem to make too much > sense to me. This would boil down to bandpass-filtering your sensor > data, calling timelockanalysis with cfg.covariance = 'yes' and > cfg.covariancewindow = [something]. Then sourceanalysis with > cfg.method = 'lcmv', after which you can project your bp-filtered > data through the filters. > > > > Next thing I am puzzled about is that the Filters (A) times the > > leadfield matrix (L) should be the identity matrix: AL=1 (see the > > Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip > > -, then we would also have a complex leadfield, which seems odd to me. > > Not necessarily: the leadfield is always real-valued. If you > interpret the product A*L just as a weighted sum of the complex > numbers in A (weighted by L), the values in L can be such that the > real part of the sum ends up to be 1, and the imaginary part ends up > to be 0. (For your and my peace of mind you could try this by running > sourceanalysis with cfg.keepfilter = 'yes' and cfg.realfilter = 'no' > and cfg.keepleadfield = 'yes' and looking at a random filter*leadfield). > > Yours, > > Jan-Mathijs > > ---------------------------------- > 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/fcdonders/fieldtrip. ---------------------------------- 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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Feb 23 18:47:21 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 23 Feb 2009 17:47:21 +0000 Subject: DICS, complex filter coeffcients and V irtual Electrodes In-Reply-To: <906564488@web.de> Message-ID: I'm not sure whether averaging in the frequency domain and using it to compute the filters is the same as filtering in the time domain and using LCMV on the filtered data. Think about running DICS on a very broad range from 5 to 95 Hz. Would it mean something then? For a narrow enough range it probably gets quite close but what is 'narrow enough'? Probably depends on the data. Vladimir On Mon, Feb 23, 2009 at 1:40 PM, Michael Wibral wrote: > Dear Jan-Mathijs, dear Vladimir, > > thanks for your quick replies. I indeed overlooked the cfg.realfilter option. Things seem to work fine now. > > I also have some comments on the optimization of DICS for a certain frequency: I think that's just the same in LCMV/SAM, where you also specify the band and time you're looking at and where you shouldn't project unfiltered raw data that contain other bands than the ones used for the computation of the filters. In my opinion you choose the frequency limits explicitly (via preprocessing) in LCMV and implicitly (via the spectral smoothing in the computation of the CSD matrix and the subsequent choice of a centre frequency for beamforming) in DICS. This, of course, also means that you should not compute narrow band beamformer filters (say for higher gamma frequencies) and project unfiltered (broadband) data through your filter. What I wanted to do was to compute narrow band sources (tpsmofrq = 5 or 10, center ferquency of 80Hz), prefilter the rawdata in the appropriate range and then project and interpret them. Should be ok, shouldn't it? > > Michael > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 23.02.09 13:45:11 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] DICS, complex filter coeffcients and Virtual Electrodes > > >> Hi Michael, >> >> I'm doing this kind of things and I use LCMV beamformer (where the >> locations of the sources might come from your DICS analysis). This was >> Robert's suggestion. The reason is that DICS is only optimized for the >> particular frequency you are looking at and if you want to extract >> source data that contains other frequencies you need to look at the >> full frequency range. There are options in lcmv (cfg.lcmv.fixedori = >> 'yes') that reduces the two orthogonal sources (in MEG case) to one >> based on the direction of maximal variance. That's something similar >> to what SAM does (although I'm not sure exactly the same). >> >> Best, >> >> Vladimir >> >> >> On Mon, Feb 23, 2009 at 11:45 AM, Michael Wibral >> wrote: >> > Dear Fieldtrippers, >> > >> > I was wondering about the correct way to get SAM-like virtual electrodes using DICS. I naively tried to compute some virtual electrodes using the DICS filter coeffcients on the raw timecourses, but that obviously doesn't work because DICS filter coefficients are complex (at least in Fieldtrip 20081208 ?). Next thing I thought about was to FFT the single trial, filter it and then inverse FFT it, because the DICS filters are supposed to work in the frequency domain. But that shouldn't work either, because we have iFFT(filter(FFT(trial))) = iFFT(FFT(filter(trial))) = filter(trial), because all operation are linear. >> > >> > Next thing I am puzzled about is that the Filters (A) times the leadfield matrix (L) should be the identity matrix: AL=1 (see the Gross, 2001, PNAS paper). If A is complex - as it is in Fieldtrip -, then we would also have a complex leadfield, which seems odd to me. >> > >> > Any suggestion would be appreciated, >> > Michael >> > >> > >> > ---------------------------------- >> > 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/fcdonders/fieldtrip. >> > >> >> ---------------------------------- >> 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/fcdonders/fieldtrip. >> > > > > ---------------------------------- > 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/fcdonders/fieldtrip. > ---------------------------------- 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Tue Feb 24 15:20:55 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 24 Feb 2009 15:20:55 +0100 Subject: reading ANT cnt files Message-ID: hi everyone, i'm trying to read some ANT cnt files. however i get following error: ??? Error using ==> read_eep_cnt at 26 could not locate mex file looking at that m-file, it consists only of the error message. in fieldtrip/fileio/private i can see some c-file called read_eep_cnt.c. do i need to compile them? is this issue in some kind related to an older inquiry (in it, it says the issue could only be solved with ANT support)? https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0608&L=FIELDTRIP&P=R4227 i am working on a Intel-Mac using Matlab R2008a. has anyone using ANT cnt's encoutered a similar problem and found a solution to the issue? any help greatly appreciated. cheers, nathan ---------------------------------- 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/fcdonders/fieldtrip. From lwn_07 at YAHOO.COM.CN Wed Feb 25 08:36:13 2009 From: lwn_07 at YAHOO.COM.CN (=?utf-8?B?5p2O5Y2r5aic?=) Date: Wed, 25 Feb 2009 15:36:13 +0800 Subject: How to set the baseline in TFRs results plot? Message-ID: Hi everyone,      I've calculated the TFRs of my MEG signals recorded in the finger tapping experiments, now I want to plot result. My problem is that I don't  know how to set the parameter 'cfg.baseline' (in tutorial, it was set cfg.baseline=[-0.5 -0.1]).  Is there anyone has ever processed MEG signals in the similar experiment?       ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Feb 25 14:08:18 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Feb 2009 14:08:18 +0100 Subject: reading ANT cnt files In-Reply-To: <0E3727C9-CB04-4BF1-AE45-D25B5A064BBB@mac.com> Message-ID: Hi Nathan, On 24 Feb 2009, at 15:20, Nathan Weisz wrote: > i'm trying to read some ANT cnt files. however i get following error: > ??? Error using ==> read_eep_cnt at 26 > could not locate mex file > > looking at that m-file, it consists only of the error message. That is the usual mechanism to detect that the mex file is missing. By default Matlab will execute the mex file (if available) and will only fall back to the m-file if the mex file is missing. > in fieldtrip/fileio/private i can see some c-file called > read_eep_cnt.c. do i need to compile them? Yes. And the source code for the mex file requires an additional library, which was released as open source software by the manufacturer. A copy of the open source ANT source code is available from ftp://ftp.fcdonders.nl/pub/fieldtrip/external I am planning to move the ANT/EEProbe mex files and associated source code to a seperate directory under fieldtrip/external/eeprobe to make more clear that it is not a fully integral part of the regular fieldtrip release > is this issue in some kind related to an older inquiry (in it, it > says the issue could only be solved with ANT support)? > https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0608&L=FIELDTRIP&P=R4227 contrary to the previous mail you are referring to, the ANT source code is now available. So you might be able to fix it without help from ANT. > i am working on a Intel-Mac using Matlab R2008a. The ANT source code is platform aware and I know that it can be compiled on a variety of operating systems and hardware (SGI, i386, dos, windows, linux, irix). However, you probably have to make some modifications to the Makefile. best regards, Robert ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 25 14:09:15 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Feb 2009 14:09:15 +0100 Subject: How to set the baseline in TFRs results plot? In-Reply-To: <451029.91734.qm@web15602.mail.cnb.yahoo.com> Message-ID: Hi 李卫娜, The baseline depends on the interval that is available prior to stimulation in which you can estimate the time-frequency resolved MEG power. If your subject is intermittently tapping, then you should choose the time between the tapping. If the subject is continuously fingertapping, then you should do the baseline correction differently by estimating the power in a section of your experiment in which the subject was resting. best regards, Robert On 25 Feb 2009, at 8:36, 李卫娜 wrote: > Hi everyone, > > I've calculated the TFRs of my MEG signals recorded in the finger > tapping experiments, now I want to plot result. My problem is that I > don't know how to set the parameter 'cfg.baseline' (in tutorial, it > was set cfg.baseline=[-0.5 -0.1]). Is there anyone has ever > processed MEG signals in the similar experiment? > > > > > 好玩贺卡等你发,邮箱贺卡全新上线! > ---------------------------------- 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/fcdonders/fieldtrip. From Roozbeh.Rezaie at UTH.TMC.EDU Wed Feb 25 21:35:39 2009 From: Roozbeh.Rezaie at UTH.TMC.EDU (Rezaie, Roozbeh) Date: Wed, 25 Feb 2009 14:35:39 -0600 Subject: 2nd Biannual ISACM Conference Message-ID: ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2009 ISACM Conference Announcement.pdf Type: application/pdf Size: 118212 bytes Desc: 2009 ISACM Conference Announcement.pdf URL: From ole.jensen at DONDERS.RU.NL Thu Feb 26 11:56:49 2009 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 26 Feb 2009 11:56:49 +0100 Subject: Toolkit course on EEG/MEG data analysis/Nijmegen In-Reply-To: Message-ID: Dear all, I would like to announce the TOOL-KIT OF COGNITIVE NEUROSCIENCE 2009: advanced data analysis and source modelling of EEG and MEG data Date: May 4-7, 2009 Organizer: Ole Jensen Location: Donders Centre for Cognitive Neuroimaging, Nijmegen http://www.ru.nl/neuroimaging/courses/toolkit_2009/ Best regards, Ole Jensen -- Ole Jensen Principal Investigator Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- 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/fcdonders/fieldtrip. From fraschini at UNICA.IT Thu Feb 26 15:38:22 2009 From: fraschini at UNICA.IT (Matteo Fraschini) Date: Thu, 26 Feb 2009 15:38:22 +0100 Subject: Problem with neuroscan eeg definetrial Message-ID: Dear all, i have a problem trying to define trials with my eeg neuroscan file. At the end of the following steps i can not see any trials on my cfg structure... cfg.datafile='my_eeg_file.eeg'; cfg.headerfile='my_eeg_file.eeg'; (where my_eeg_file.eeg is the full path to my file... 'C:\...\my_eeg_file.eeg') Now, if i type cfg.trialdef.eventtype = '?' i have: datafile: 'my_eeg_file.eeg' headerfile: 'my_eeg_file.eeg' trialdef: [1x1 struct] Typing cfg = definetrial(cfg); i have: evaluating trialfunction 'trialfun_general' the following events were found in the datafile event type: 'accept' with event values: 1 event type: 'trial' with event values: 1 2 no trials have been defined yet, see DEFINETRIAL for further help found 400 events created 0 trials So it looks good with my events. Still have to define the trials, ok. Now i use cfg.trialdef.eventtype and cfg.trialdef.eventvalue to define trials but the trl[] field on cfg structure is still empty... Can anyone give me a suggestion please? Thank you very much, Matteo ---------------------------------- 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Feb 26 21:08:35 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 26 Feb 2009 21:08:35 +0100 Subject: fieldtrip website moved (again) Message-ID: Dear FieldTrip users You may have noticed over the last few weeks that occasionally pages on this wiki appear empty. After quite some efforts this was pinpointed to a poor performance of the ruhosting webserver and the underlying NFS server. Therefore I have decided to move the fieldtrip website once more to a new location with a new address (URL). Most importantly is that it is now running on hardware that we actually control ourselves instead of depending on the university-wide hosting server. I hope that this finally resolves the problems. The new address that you can use on daily basis is http://fieldtrip.fcdonders.nl . The preferred (long-term) address to use in your publications to refer to remains http://www.ru.nl/neuroimaging/fieldtrip. All references to the old location will automatically be forwarded to the new site. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher 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 ----------------------------------------------------------- ---------------------------------- 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/fcdonders/fieldtrip. From luqiangxu at YAHOO.COM.CN Fri Feb 27 08:22:05 2009 From: luqiangxu at YAHOO.COM.CN (xu luqiang) Date: Fri, 27 Feb 2009 15:22:05 +0800 Subject: =?gb2312?Q?=BB=D8=B8=B4=A3=BA?= [FIELDTRIP] Toolkit course on EEG/MEG data analysis/Nijmegen In-Reply-To: <49A67571.7050009@donders.ru.nl> Message-ID: Dear sir, I hope to download tutorial data from your website. I try to login with username 'anonymous' and use my email address "luqiangxu at yahoo.com.cn"as password,but It does not work. Can I login with username 'anonymous' and use my email address "luqiangxu at yahoo.com.cn"as password? thanks luqiang --- 09年2月26日,周四, Ole Jensen 写道: > 发件人: Ole Jensen > 主题: [FIELDTRIP] Toolkit course on EEG/MEG data analysis/Nijmegen > 收件人: FIELDTRIP at NIC.SURFNET.NL > 日期: 2009,226,周四,6:56下午 > Dear all, > > I would like to announce the > > TOOL-KIT OF COGNITIVE NEUROSCIENCE 2009: advanced data > analysis and source modelling of EEG and MEG data > > Date: May 4-7, 2009 > Organizer: Ole Jensen > Location: Donders Centre for Cognitive Neuroimaging, > Nijmegen > > > http://www.ru.nl/neuroimaging/courses/toolkit_2009/ > > Best regards, > > Ole Jensen > > -- Ole Jensen > Principal Investigator > Donders Institute for Brain, Cognition and Behaviour Centre > for Cognitive Neuroimaging P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Office : +31 24 36 10884 > MEG lab : +31 24 36 10988 > > Fax : +31 24 36 10989 > > e-mail : ole.jensen at donders.ru.nl > URL : http://ojensen.ruhosting.nl/ > > ---------------------------------- > 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/fcdonders/fieldtrip. ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ ---------------------------------- 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/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Fri Feb 27 11:01:32 2009 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Fri, 27 Feb 2009 11:01:32 +0100 Subject: incomplete CSD Matrix Message-ID: Dear fieldtrip users, I am running sourceanalysis for different subjects. In 18 of 20 sujbects everything works out, however for 2 subjects in particular I am getting the following error message: ???Error using==>fieldtrip-20081208/private/prepare_freq_matrices at201 The cross-spectral-density matrix is not complete Error in==>sourceanalysis at 723 [Cf, Cr, Pr, Ntrials , cfg] = prepare_freq_matrices(cfg, data); Error in==>computeLead fields at 105 [pressource]= sourceanalysis(cfg,preTFdata); I checked the Cf matrix and found out that it contains 2 NaN entries. Does anyone have an idea what this could possibly be related to or what I should check my data for? I used exactly the same parameters as for all the other subjects. Best, Frederic _________________________________________________________________ http://redirect.gimas.net/?n=M0902xHMMobile Nie wieder eine Mail verpassen mit Hotmail fürs Handy! ---------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vgomez at IUA.UPF.EDU Fri Feb 27 14:07:19 2009 From: vgomez at IUA.UPF.EDU (Vicen) Date: Fri, 27 Feb 2009 14:07:19 +0100 Subject: Matlab warnings Message-ID: Hi, I'm starting with Fieldtrip (outside of the Donders) and every time I try to use any of the Fieldtrip functions I get a large list of warnings of the type: "Warning: Function /vol/snn/vicen/bci/fieldtrip-20090224/external/biosig/private/strncmpi.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict." Is there any sort of startup.m file that can be used to start Fieldtrip correctly so that these warnings do not appear? I'm running this in the cnXX.science.ru.nl cluster nodes. Thanks in advance, Vicenç ---------------------------------- 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/fcdonders/fieldtrip. From jdien07 at MAC.COM Fri Feb 27 16:32:35 2009 From: jdien07 at MAC.COM (Joseph Dien) Date: Fri, 27 Feb 2009 10:32:35 -0500 Subject: Matlab warnings In-Reply-To: <49A7E587.30707@iua.upf.edu> Message-ID: I just remove those biosig files. I don't think it's a good idea for Biosig to be messing with Matlab's built-in functions anyway. At least on my system, I find that the ones in the maybe-missing folder cause Matlab to become unstable. Cheers! Joe On Feb 27, 2009, at 8:07 AM, Vicen wrote: > Hi, > > I'm starting with Fieldtrip (outside of the Donders) and every time > I try to use any of the Fieldtrip functions I get a large list of > warnings of the type: > > "Warning: Function /vol/snn/vicen/bci/fieldtrip-20090224/external/ > biosig/private/strncmpi.m > has the same name as a MATLAB builtin. We suggest you rename the > function to avoid a > potential name conflict." > > Is there any sort of startup.m file that can be used to start > Fieldtrip correctly so that these warnings do not appear? I'm > running this in the cnXX.science.ru.nl cluster nodes. > Thanks in advance, > > > > Vicenç > > ---------------------------------- > 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/fcdonders/fieldtrip. -------------------------------------------------------------------------------- Joseph Dien, Ph.D. Birth Defects Center Davidson Hall, Room 314A Belknap Campus University of Louisville Louisville, KY 40292 Office: Davidson Hall 314d (Belknap) E-mail: jdien07 at mac.com Phone: 502-852-2512 Fax: 502-852-2408 http://homepage.mac.com/jdien07/ ---------------------------------- 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/fcdonders/fieldtrip.