From mconvertino at ufl.edu Fri Jul 1 01:09:58 2011 From: mconvertino at ufl.edu (Matteo Convertino) Date: Thu, 30 Jun 2011 19:09:58 -0400 Subject: [FieldTrip] where to download fieldtrip? Message-ID: Hello, I did not receive the email from which it is possible to download fieldtrip... , any idea ? where can i download it ? I checked the spam email and it`s not there thanks a lot Matteo Matteo Convertino mconvertino at ufl.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 1 10:31:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 1 Jul 2011 10:31:10 +0200 Subject: [FieldTrip] functionality change in ft_freqanalysis Message-ID: <27F0E6B4-4D83-487A-B434-64C65A2EE902@donders.ru.nl> Dear all, I made a slight change to the default behaviour of ft_freqanalysis. A good practice prior to doing spectral analysis is to remove the mean (and more often: the linear trend) from the time domain data, because if this is not done, it can lead to unexpected (at least unexpected to some) side effects. Some more documentation about this can be found at: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange_part_ii Anyway, we decided to let FieldTrip by default remove the first order linear trend from the time domain data, prior to doing the spectral analysis, thus avoiding unwanted side effects of the frequency transformation. This is now implemented in ft_freqanalysis when using the functions from the specest module (if you don't know what this 'specest' module means: don't worry, this is the default behaviour and you will be using it). You can overrule this trend removal by specifying the option cfg.polyremoval in ft_freqanalysis to be -1 (default = 1). You can also input different values to remove higher order polynomial trends (any value>1) or to just remove the mean value (cfg.polyremoval=0); Note that if you use a fresh copy of FieldTrip (the change will be available in tonight's release version) that the behaviour is slightly changed with respect to before only if you didn't explicitly detrend your data prior to spectral analysis. Happy fft'ing. Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From suforraxi at gmail.com Fri Jul 1 11:49:36 2011 From: suforraxi at gmail.com (Matteo Demuru) Date: Fri, 1 Jul 2011 11:49:36 +0200 Subject: [FieldTrip] WPLI statistic, permutation like test?? In-Reply-To: <786760757.45247.1309361729100.JavaMail.fmail@mwmweb077> References: <786760757.45247.1309361729100.JavaMail.fmail@mwmweb077> Message-ID: Thanks a lot On Wed, Jun 29, 2011 at 5:35 PM, Michael Wibral wrote: > Hi matteo, > > sorry for my sloppy description, > > of course you would only shuffle trials on one channel, not both. > > Michael > > > > ------------------------------ > *Von:* "Matteo Demuru" > *Gesendet:* Jun 29, 2011 10:01:15 AM > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* Re: [FieldTrip] WPLI statistic, permutation like test?? > > > Hi Micheal, > > It seems to me that if you shuffle the trials and then compute the WPLI, > the result is the same as if you do not shuffle. > > For example I have tried compute the WPLI on my trials and then switch > trial{1} with trial{2} and the obtained WPLI is the same. > > Matteo > > On Tue, Jun 28, 2011 at 8:34 PM, Michael Wibral wrote: > >> Hi Matteo, >> >> I am not an expert on the WPLI measures, but to me it seems that in doing >> >> >> "2) Randomly permute the ch2 time series" >> >> you're destroying a lot of ch2's properties (ie.g. it's spectrum will get >> a lot of high ferquencies this way) and this will typically lead to false >> positives. This is why permutation tests for connectivity measures typically >> shuffle trials (i.e. permute data in a very controlled way, keeping the >> intrinsic structure of the data). >> >> Michael >> >> >> ------------------------------ >> *Von:* "Matteo Demuru" >> *Gesendet:* Jun 28, 2011 2:46:28 PM >> *An:* fieldtrip at donders.ru.nl >> *Betreff:* [FieldTrip] WPLI statistic, permutation like test?? >> >> >> >> Hi, >> >> I have a couple of questions about using the WPLI index to assess the >> phase on my MEG data. >> >> The experiment consists of recordings during a mental calculation task: I >> have 30 sec in which each subject performed continuously an arithmetic >> operation. >> >> It seems to me that WPLI index required more than one trial in order to be >> computed. Am I right? (Is this necessary in order to reduce volume >> conduction problems?) >> I could divide my 30 sec in 5 sec-trials to create my trials, but I was >> wandering if this could be a misuse of the WPLI, i.e. WPLI is not >> appropriate for my experiment. >> >> I am also interested in assessing the significance of WPLI index, I would >> like to gauge the significance per se of my WPLI values. >> The idea is to calculate the WPLI distribution under the null hypothesis >> (not phase coupling) for each pair of channels in this way: >> >> Example to assess the significance of WPLI value for ch1 vs ch2 >> >> 1) Calculate the WPLI for ch1 and ch2, this would be the observed WPLI >> (WPLI_observed) >> >> 2) Randomly permute the ch2 time series >> >> 3) Calculate the WPLI for ch1 and ch2 (WPLI_i) >> >> 4) Repeat step 2 and 3 (for instance 100 times) in order to create the >> WPLI_i distribution >> >> 5) Calculate the proportion ( # (WPLI_i > WPLI_observed) / # (WPLI_i ) ) >> of WPLI_i which are greater than the WPLI_observed, if this proportion >> is < 0.05 I could say that the WPLI_observed represents a significant >> degree of phase, otherwise not. >> >> Does it make sense or is it not the right approach? >> >> Let suppose this is a correct approach, I have two other questions: >> >> First, usually when I compute the WPLI value between two channels I obtain >> a number of WPLI values according to the cross-spectrum times (one WPLI for >> each sliding window), in the steps above I am assuming to compute the >> average WPLI_observed and the average WPLI_i for each step. Does this >> raise any problems? >> >> Second, is it a problem using the same random permutations employed to >> obtain ch1-ch2 (WPLI_i distribution) to calculate also the ch1-ch3 (WPLI >> _i distribution). This is just an implementatiion question. I would like >> to know if I could shuffle the time series of other channels in one step >> (i.e. for ch1 something like data.trial{other_than_ch1,perm}), and finally >> extract just the column relative to ch1 from WPLI matrix. >> >> thanks >> >> Matteo >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From minsa at fastmail.co.uk Fri Jul 1 12:25:43 2011 From: minsa at fastmail.co.uk (minsa at fastmail.co.uk) Date: Fri, 01 Jul 2011 12:25:43 +0200 Subject: [FieldTrip] time-frequency analysis Message-ID: <1309515943.6917.1469280533@webmail.messagingengine.com> Hello, I'm new to field trip and I have two short questions regarding time-frequency analysis: I'm using field trip for averaging time frequency plots of 11 subjects obtained by BESA 5.3. For every subject I have two conditions, and I want to calculate (using statistical clustering) the difference bettween the two conditions. Are the single time-frequency plots normalized before clustering? After performing the average over subjects, I get a matlab-window titled 'TFC-selectplots'. The window is subdivided into 3 sections (Plots of original data, Grand average plots and Results of statistical tests). I find in the last section 'show clustering with prob. below alpha, plotted over' where I mark 'Diff. Between grand average' and 'No mask'. I get a window with the clustered difference between the two conditions. Now my question: The color-bar show symmetric values (from blue to red) 0.1, 0, 0.1, 0.2. What do these numbers correspond to? statistical probabilities? can you please help me with these two questions? I would be so thankful! Best regards, Iris From Margit.Schoenherr at uk-erlangen.de Fri Jul 1 12:33:00 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Fri, 1 Jul 2011 12:33:00 +0200 Subject: [FieldTrip] electrode positions of 4D data Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Hello, we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls hdr.grad = bti2grad(orig); which only returns the grad structure, whereas for Neuromag data at line 1056 [hdr.grad, elec] = mne2grad(orig); has 2 outputs. There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? Thank you, Margit From E.vandenBroeke at chir.umcn.nl Fri Jul 1 13:56:02 2011 From: E.vandenBroeke at chir.umcn.nl (E.vandenBroeke at chir.umcn.nl) Date: Fri, 1 Jul 2011 13:56:02 +0200 Subject: [FieldTrip] order of preprocessing steps in ERP analysis Message-ID: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> Dear fieldtrippers, I would like to know if someone could answer my question. In the analysis of ERPs I use some preprocessing steps to improve the signal-to-noise ratio; down-sampling (from 2000 to 500 Hz) and filtering (between 1-30 Hz). What should I do first; down-sampling or filtering, or doesn't it make any difference? Thanks, Best, Emanuel van den Broeke Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrysa.lithari at gmail.com Fri Jul 1 14:32:14 2011 From: chrysa.lithari at gmail.com (Chrysa Lithari) Date: Fri, 1 Jul 2011 14:32:14 +0200 Subject: [FieldTrip] neuromag BESA compatibility Message-ID: Hi to all, I have a question. I have used BESA to do the artifact rejection on my meg data, but I want to pass to Fieltrip. Does anybody know if while opening the .fif file, the rejected channels and trials will be rejected also by Fieldtrip or not? In other words, do I have to do the artifact rejection again in Fieldtrip? Thanks a lot for your time and response, -- Lithari Chrysa - PhD candidate Medical Informatics, Aristotle University of Thessaloniki, Greece - M.Sc. NeuroInformatics, Unversity of Patras, Greece - B.Sc. Computer Science, Aristotle University of Thessaloniki, Greece -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Fri Jul 1 17:12:50 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Fri, 1 Jul 2011 18:12:50 +0300 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: Dear Margit with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlabtool. I assume the electrodes were digitized. yuval 2011/7/1 Schönherr, Margit > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading > combined MEG and EEG data sets, there is no elec data structure which would > contain information about the electrode positions,labels... At line 161, the > ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line > 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode > positions, is there? I am using fieldtrip-20110603. Is anyone currently > working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 1 18:15:22 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 1 Jul 2011 18:15:22 +0200 Subject: [FieldTrip] order of preprocessing steps in ERP analysis In-Reply-To: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> References: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> Message-ID: Dear Emanuel, It should not make a difference. Best, Eelke 2011/7/1 : > Dear fieldtrippers, > > I would like to know if someone could answer my question. > > In the analysis of ERPs I use some preprocessing steps to improve the > signal-to-noise ratio; down-sampling (from 2000 to 500 Hz) and filtering > (between 1-30 Hz). > > What should I do first; down-sampling or filtering, or doesn’t it make any > difference? > > Thanks, > > Best, > > Emanuel van den Broeke > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From mconvertino at ufl.edu Fri Jul 1 20:14:19 2011 From: mconvertino at ufl.edu (Matteo Convertino) Date: Fri, 1 Jul 2011 14:14:19 -0400 Subject: [FieldTrip] EEG-fMRI-MRI coupled dataset In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: Is there anyone aware of any dataset freely available of EEG+fMRI (or/and MRI) of epileptic patients ? Thanks a lot Matteo C. ___ Matteo Convertino, PhD Research Associate Agricultural and Biological Engineering Dept. College of Agriculture and Life Sciences - Institute of Food and Agricultural Sciences - Water Institute Affiliated Faculty and Quantitative Spatial Ecology, Evolution, and Environment (QSE^3) NSF-IGERT program Prof. Rafael Munoz-Carpena & Greg Kiker Research groups Frazier Rogers Hall, Museum Road, office 218, PO box 110570, 32611-0570 University of Florida, Gainesville USA Research Scientist USACE ERDC, Risk Modeling and Decision Science Area I. Linkov group Boston, MA web: http://plaza.ufl.edu/mconvertino/ http://carpena.ifas.ufl.edu/people/MatteoConvertino.shtml Office phone: +1 352-392-1864 ext. 218 / Fax: +1 352-392-4092 (USA) Mobile phone : +1 347-761-4511 (USA) Skype ID: convertino.matteo PhD 2009, University of Padova advisors: Prof. Andrea Rinaldo and Prof. Amos Maritan (Physics Dept. UniPd) co-advisor: Prof. Ignacio Rodriguez-Iturbe (Princeton University) IMAGE Dept. & International Center for Hydrology "Dino Tonini" Graduate School in Civil and Environmental Engineering Sciences Via Loredan 20, I-35131 Padova University of Padova, Italy ___ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hedderik at van-rijn.org Sat Jul 2 14:01:33 2011 From: hedderik at van-rijn.org (Hedderik van Rijn) Date: Sat, 2 Jul 2011 14:01:33 +0200 Subject: [FieldTrip] labels not updated in ft_scalpcurrentdensity using Hjorth's method Message-ID: <8D1C3271-7D6C-49CA-B713-08AE50E95FA1@van-rijn.org> Dear Fieldtrippers, for a replication study, I'm applying Hjorth's SCD method on just FCz with a given set of neighbors. After running the following code: cfg = []; elec = ft_read_sens('electrodes-Tobias.set'); cfg.elec = elec; ngh = {struct('label','FCz','neighblabel',{{'FC3','FC4','CPZ','AFz'}})}; cfg.method = 'hjorth'; cfg.neighbours = ngh; cfg.trials = 'all'; data_hjorth = ft_scalpcurrentdensity(cfg,data); The labels of the resulting dataset still refer to the original electrodes: >> length(data_hjorth.label) ans = [32] But the resulting data only contains FCz information (as expected): >> size(data_hjorth.trial{1}) ans = 1 2500 I was wondering if this is intentional, or whether the label field should only contain the electrode(s) for which the current density was calculated. If the latter is the case, line 229 of ft_scalpcurrentdensity, which reads: scd.label = data.label; should be replaced with: if strcmp(cfg.method, 'hjorth') scd.label = labelnew; else scd.label = data.label; end - Hedderik. From tjordanov at besa.de Mon Jul 4 08:43:15 2011 From: tjordanov at besa.de (tjordanov at besa.de) Date: Mon, 4 Jul 2011 08:43:15 +0200 Subject: [FieldTrip] neuromag BESA compatibility In-Reply-To: References: Message-ID: <001201cc3a15$a8a48420$f9ed8c60$@besa.de> Hi Lithari, There are two possibilities to export artifact corrected data to FieldTrip. If you have BESA 5.3 then you can use the Matlab interface and send the Data directly to Matlab with the "Send to Matlab" command. If you have BESA 5.2 or earlier then you can export the corrected data as an ascii file (vectorized or multiplex) and then use the besa2fieldtrip readers, which are available in FieldTrip or on the BESA webpage. Best regards, Todor ---------------------------------------------------------------------------- -------- Todor Iordanov Research & Development BESA GmbH Freihamer Strasse 18 82166 Graefelfing/Germany Phone: +49 89 8980 9968 HRB Munich 109956 CEOs: Dr. Michael Scherg, Theodor Scherg, Dr. Tobias Scherg ---------------------------------------------------------------------------- -------- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Chrysa Lithari Sent: Freitag, 1. Juli 2011 14:32 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] neuromag BESA compatibility Hi to all, I have a question. I have used BESA to do the artifact rejection on my meg data, but I want to pass to Fieltrip. Does anybody know if while opening the .fif file, the rejected channels and trials will be rejected also by Fieldtrip or not? In other words, do I have to do the artifact rejection again in Fieldtrip? Thanks a lot for your time and response, -- Lithari Chrysa - PhD candidate Medical Informatics, Aristotle University of Thessaloniki, Greece - M.Sc. NeuroInformatics, Unversity of Patras, Greece - B.Sc. Computer Science, Aristotle University of Thessaloniki, Greece -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jul 4 11:32:09 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 04 Jul 2011 11:32:09 +0200 Subject: [FieldTrip] EEG-fMRI-MRI coupled dataset In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: <4E118899.7040500@donders.ru.nl> Dear Matteo, there might be some dataset available at the SPM webpage. I did not check it, maybe there are also EEG-fMRI sets. Best, Jörn On 7/1/2011 8:14 PM, Matteo Convertino wrote: > Is there anyone aware of any dataset freely available of EEG+fMRI > (or/and MRI) of epileptic patients ? > > Thanks a lot > > Matteo C. > > > > > ___ > Matteo Convertino, PhD > > Research Associate > Agricultural and Biological Engineering Dept. College of Agriculture > and Life Sciences - Institute of Food and Agricultural Sciences > - Water Institute Affiliated Faculty and Quantitative Spatial Ecology, > Evolution, and Environment (QSE^3) NSF-IGERT program > Prof. Rafael Munoz-Carpena & Greg Kiker Research groups > Frazier Rogers Hall, Museum Road, office 218, PO box 110570, 32611-0570 > University of Florida, Gainesville > USA > > Research Scientist USACE ERDC, Risk Modeling and Decision Science Area > I. Linkov group > Boston, MA > > web: http://plaza.ufl.edu/mconvertino/ > http://carpena.ifas.ufl.edu/people/MatteoConvertino.shtml > Office phone: +1 352-392-1864 ext. 218 / Fax: +1 352-392-4092 (USA) > Mobile phone : +1 347-761-4511 (USA) > Skype ID: convertino.matteo > > PhD 2009, University of Padova > advisors: Prof. Andrea Rinaldo and Prof. Amos Maritan (Physics Dept. > UniPd) > co-advisor: Prof. Ignacio Rodriguez-Iturbe (Princeton University) > IMAGE Dept. & International Center for Hydrology "Dino Tonini" > Graduate School in Civil and Environmental Engineering Sciences > Via Loredan 20, I-35131 Padova > University of Padova, Italy > ___ > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ion.ucl.ac.uk Mon Jul 4 12:11:41 2011 From: v.litvak at ion.ucl.ac.uk (Vladimir Litvak) Date: Mon, 4 Jul 2011 11:11:41 +0100 Subject: [FieldTrip] FW: Can't read smr to ft In-Reply-To: <46E06B3F28AD344DBE53103DE027DC9D059FA8EE@exmailer2.umhnet.es> References: <46E06B3F28AD344DBE53103DE027DC9D059FA8EE@exmailer2.umhnet.es> Message-ID: Dear Graciela, You can export your data from Spike 6 to Matlab and then read the resulting mat file into Fieldtrip using ft_preprocessing. It will be automatically recognized. You should use setting as in the attached screenshot (you can choose a different sampling rate). Best, Vladimir On Sun, Jul 3, 2011 at 5:07 PM, Navarro Mora, Graciela wrote: > > > Dears, > > > > I am Graciela Navarro, from the Institute of Neuroscience in Alicante. I am > contacting you because I found on field trip discussion some of your mails > referring a problem when reading .smr format data.  I would like to know how > you dealt with the problem as I am having the same one. My original data are > generated with multichannel systems (.mcd), and I have no problem to import > the into spike2 6.03. However I cannot use ft_read_data with the .smr files > I get with spike2. > > > > I was also reading the answers of Vladimir, but my problem after doing what > he proposes is persisting. Please do you have any suggestion to me? > > > > The error is the following: > > > >>> hdr=ft_read_data('1000eeg.smr') > > Loading file 1000eeg.smr using NeuroShare library v1.7 ... > > NEV file could not be loaded! > > ??? Error using ==> read_ced_son at 107 > > File read error occurred in function 1000eeg.smr with entity 0, index 0 > > > > Error in ==> ft_read_header at 303 > >     orig = read_ced_son(filename,'readevents','no','readdata','no'); > > > > Error in ==> ft_read_data at 121 > >   hdr = ft_read_header(filename, 'headerformat', headerformat); > > > > Thanks a lot in advance, > > Greetings > > > > Graciela > > > > Graciela Navarro Mora, Ph.D. > > > > "Cellular & Molecular Mechanisms of Brain Wiring" > > Instituto de Neurociencias > > CSIC & Universidad Miguel Hernández > > Av. Ramón y Cajal, s/n > > 03550 San Juan de Alicante > > Alicante, Spain > > > > Phone: (34) 965 91 9592 > > g.navarro at umh.es > > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 13086 bytes Desc: not available URL: From Margit.Schoenherr at uk-erlangen.de Mon Jul 4 13:37:16 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 4 Jul 2011 13:37:16 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Hello Yuval, thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. Margit ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] Gesendet: Freitag, 1. Juli 2011 17:12 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] electrode positions of 4D data Dear Margit with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. yuval 2011/7/1 Schönherr, Margit > Hello, we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls hdr.grad = bti2grad(orig); which only returns the grad structure, whereas for Neuromag data at line 1056 [hdr.grad, elec] = mne2grad(orig); has 2 outputs. There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? Thank you, Margit _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From venug001 at crimson.ua.edu Mon Jul 4 13:56:19 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Mon, 4 Jul 2011 03:56:19 -0800 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Message-ID: Greetings, the location file for 4D is in the form of an .xyz file. This is not the same as a head shape file--though both use the x, y, and z, and are conceptually related. The head shape file is unique to inviduals, when the location file will tell you the exact position, in Cartesian space, and orientation of the electrodes. Many researchers on the this list, and on others have locations files for a 248 channel 4D system. Though they are standard, even those can vary very slightly from machine to machine and day to day. If you export your data from the MSI system it will put out three files, one of which is an .xyz file, which is your location file. If you have EEGLAB or Fieldtrip you should look for the.xyz file. All the best. 2011/7/4 Schönherr, Margit > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG > data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot > distinguish the electrode positions in the list of 3000 head shape > digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im > Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of > the electrodes was not in the data structure but also the EEG data. this is > when specifying channel = 'EEG'; giving it the channel labels solved it- > {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if > worse comes to worst you can try reading the EEG location with msi >> > matlab tool. I assume the electrodes > were digitized. > yuval > > 2011/7/1 Schönherr, Margit Margit.Schoenherr at uk-erlangen.de>> > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading > combined MEG and EEG data sets, there is no elec data structure which would > contain information about the electrode positions,labels... At line 161, the > ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line > 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode > positions, is there? I am using fieldtrip-20110603. Is anyone currently > working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html< > http://faculty.biu.ac.il/%7Egoldsa/index.html > > > > "Many were increasingly of the opinion that they'd all made a big mistake > in coming down from the trees in the first place. And some said that even > the trees had been a bad move, and that no one should ever have left the > oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 4 14:08:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 4 Jul 2011 14:08:29 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Message-ID: <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> Hi Margit, There should be information with respect to the electrode locations (if digitized indeed) in the header-information. I don't know about the digitized electrode positions, because at the time that I wrote the code dealing with 4d-data we did not simultaneously collect EEG and MEG data, so there is no way for me to check. Could you check whether your data.hdr contains the following field: data.hdr.orig.user_block_data? This should be a cell-array, and in my headers typically the 11th cell contains the info about the digitized electrodes (in my case only information about the 5 coils and landmarks is present). It's called 'b_eeg_elec_locs' (check hdr.orig.user_block_data{x}.hdr.type). The hdr.orig.user_block_data{x}.pnt contains the coordinates of the points. How many are there in your header? If this number > 11 then chances are that these are the electrode positions. We could of course then easily extend the code in order to spit these out in a more convenient format. Best wishes, Jan-Mathijs On Jul 4, 2011, at 1:37 PM, Schönherr, Margit wrote: > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. > yuval > > 2011/7/1 Schönherr, Margit > > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From Margit.Schoenherr at uk-erlangen.de Mon Jul 4 16:42:59 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 4 Jul 2011 16:42:59 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de>, <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD9@XMAIL1.medads.uk-erlangen.de> Hello Jan-Mathijs, thanks a lot, I have 14 user_blocks and I found the points and labels in hdr.orig.user_block_data{1,12}. Best, Margit ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Gesendet: Montag, 4. Juli 2011 14:08 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] electrode positions of 4D data Hi Margit, There should be information with respect to the electrode locations (if digitized indeed) in the header-information. I don't know about the digitized electrode positions, because at the time that I wrote the code dealing with 4d-data we did not simultaneously collect EEG and MEG data, so there is no way for me to check. Could you check whether your data.hdr contains the following field: data.hdr.orig.user_block_data? This should be a cell-array, and in my headers typically the 11th cell contains the info about the digitized electrodes (in my case only information about the 5 coils and landmarks is present). It's called 'b_eeg_elec_locs' (check hdr.orig.user_block_data{x}.hdr.type). The hdr.orig.user_block_data{x}.pnt contains the coordinates of the points. How many are there in your header? If this number > 11 then chances are that these are the electrode positions. We could of course then easily extend the code in order to spit these out in a more convenient format. Best wishes, Jan-Mathijs On Jul 4, 2011, at 1:37 PM, Schönherr, Margit wrote: > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. > yuval > > 2011/7/1 Schönherr, Margit > > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From inbalots at gmail.com Tue Jul 5 12:40:18 2011 From: inbalots at gmail.com (Inbal Lots) Date: Tue, 5 Jul 2011 13:40:18 +0300 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? Message-ID: Hello I am using ft_multiplotER to display the 'butterfly' of the MEG data after it was decimated and averaged. I would like to do several things: 1) to have the axes legends and values on the figure I get (I get only a plot with not text at all on the axes) 2) to add a title (*not* by doing it with matlab title('XXX')) 3) to be able to select a component (i.e. a relevant time piece ) and to see it's field on the head layout (i.e.cfg.layout='4D248.lay';) The code I am using, after decimation and averaging , is: cfg=[]; cfg.interactive='yes'; cfg.showlabels='yes'; cfg.fontsize=14; % cfg.layout='4D248.lay'; cfg.layout ='butterfly'; ft_multiplotER(cfg,AvrDATA); Is it possible? Thank you very much for your help Inbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ww.peng0923 at gmail.com Tue Jul 5 16:33:34 2011 From: ww.peng0923 at gmail.com (PWW) Date: Tue, 5 Jul 2011 22:33:34 +0800 Subject: [FieldTrip] source analysis and simulation Message-ID: Dear all, I am a new comer for using fieldtrip toolbox. I am a Mphil student of The University of Hong Kong, and my research is about source analysis for EEG oscillation. At the moment, I confront some problems in simulation when using fieldtrip to do source analysis. Firstly, I have tried the matlab codes on the website of http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan. When I change the dipole position, such as [3 8 8], the reconstructed source is also located at [0 0 4]. I have confirmed the simulation data, which is right and varied accroding to the dipole position. However, for the source analysis result, it doesn't change, and stills locates at the position of [0 0 4]. It seems that the problems lies at the function of ft_sourceanalysis ft_sourceanalysis. I am quite confused and hope to get a clear explaination. And thanks very much. Secondly, I have alligned my electrode file to the standard BEM head model. Then I undertook source analysis for timelocked EEG activities for simulation according to the following codes: clear all clc load headmodel.mat cfg = []; cfg.vol = vol; cfg.elec = elec; cfg.dip.pos = [0 -20 100]; % the dipole is located at about Cz channel cfg.dip.mom = [0 0 1]'; % the dipole points along the x-axis cfg.relnoise = 0; cfg.ntrials = 20; data = ft_dipolesimulation(cfg); % compute the data covariance matrix, which will capture the activity of % the simulated dipole cfg = []; cfg.covariance = 'yes'; timelock = ft_timelockanalysis(cfg, data); % do the beamformer source reconstuction on a 10 mm grid cfg = []; cfg.vol = vol; cfg.elec=elec; cfg.grid.resolution = 10; cfg.method = 'lcmv'; source = ft_sourceanalysis(cfg, timelock); cfg = []; cfg.downsample = 2; sourcePostInt = ft_sourceinterpolate(cfg, source , mri); cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.opacitymap = 'rampup'; figure ft_sourceplot(cfg, sourcePostInt); However, it still doesn't work, and the source is located at wrong position. I have no idear and worked on it for several days. So I am writing to your to ask for help, my headmodel file in the *.mat type can be downloaded in http://www.sendspace.com/file/lars5j . Thanks again for all your help. Best regards, Weiwei Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgroppe at cogsci.ucsd.edu Wed Jul 6 00:27:01 2011 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Tue, 5 Jul 2011 18:27:01 -0400 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? In-Reply-To: References: Message-ID: Hi Inbal, The Mass Univariate ERP Toolbox (http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox) has an interactive butterfly plot GUI (see the attached figure for an example). However it expects your data to be formatted according to EEGLAB's conventions (not FieldTrip's). So if you can export your data to EEGLAB it might do what you want. cheers, -David On Tue, Jul 5, 2011 at 6:40 AM, Inbal Lots wrote: > Hello > > I am using ft_multiplotER to display the 'butterfly' of the MEG data after > it was decimated and averaged. > I would like to do several things: > 1) to have the axes legends and values on the figure I get (I get only a > plot with not text at all on the axes) > 2) to add a title (not by doing it with matlab title('XXX')) > 3) to be able to select a component (i.e. a relevant  time piece ) and to > see it's field on the head layout (i.e.cfg.layout='4D248.lay';) > > The code I am using, after  decimation and averaging , is: > > cfg=[]; > cfg.interactive='yes'; > cfg.showlabels='yes'; > cfg.fontsize=14; > % cfg.layout='4D248.lay'; > cfg.layout ='butterfly'; > ft_multiplotER(cfg,AvrDATA); > > Is it possible? > > Thank you very much for your help > > Inbal > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- David Groppe, Ph.D. Postdoctoral Researcher Kutaslab Dept. of Cognitive Science University of California, San Diego http://www.cogsci.ucsd.edu/~dgroppe/ -------------- next part -------------- A non-text attachment was scrubbed... Name: Gui_erp_tmax_xo.jpg Type: image/jpeg Size: 605722 bytes Desc: not available URL: From sylvana.schister at utah.edu Wed Jul 6 19:37:00 2011 From: sylvana.schister at utah.edu (Sylvana) Date: Wed, 06 Jul 2011 11:37:00 -0600 Subject: [FieldTrip] ICA problem Message-ID: <1309973820.23419.9.camel@weston-desktop> Hi all, I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of ft_componentanalysis. I get the following error message: ??? Error using ==> surf at 74 X, Y, Z, and C cannot be complex. Error in ==> ft_plot_topo at 184 h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', 'none', 'FaceColor', shading); Error in ==> ft_topoplotER at 753 ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... Error in ==> ft_topoplotIC at 116 ft_topoplotER(cfg, varargin{:}); The complex variable is 'Zi', which is taken from 'comp'. I can modify the function to take the real part of the variable (or the absolute value), but I am not sure if this would be the correct thing to do. In case this is a bug, I thought I should report it. Any comments? Thanks for your help, Sylvana Schister Univ. of Utah Dept. of Bioengineering From stephen.whitmarsh at gmail.com Wed Jul 6 20:09:42 2011 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 6 Jul 2011 20:09:42 +0200 Subject: [FieldTrip] ICA problem In-Reply-To: <1309973820.23419.9.camel@weston-desktop> References: <1309973820.23419.9.camel@weston-desktop> Message-ID: Dear Sylvana, >From the top op my head: When running the ICA, try only computing it for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run on reference sensors in case of MEG. I have hunch that might help out. Cheers, Stephen On 6 July 2011 19:37, Sylvana wrote: > Hi all, > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > ft_componentanalysis. > > I get the following error message: > > > ??? Error using ==> surf at 74 > X, Y, Z, and C cannot be complex. > > Error in ==> ft_plot_topo at 184 >  h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > 'none', 'FaceColor', shading); > > Error in ==> ft_topoplotER at 753 > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > Error in ==> ft_topoplotIC at 116 >    ft_topoplotER(cfg, varargin{:}); > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > the function to take the real part of the variable (or the absolute > value), but I am not sure if this would be the correct thing to do. In > case this is a bug, I thought I should report it. Any comments? > > Thanks for your help, > > Sylvana Schister > Univ. of Utah > Dept. of Bioengineering > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From sherrykhan78 at gmail.com Thu Jul 7 02:44:16 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Wed, 6 Jul 2011 20:44:16 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> Message-ID: Hi Sylvana, Is the data SSS (maxfilter), I normally have this problem when data is SSS, try doing ICA with PCA (set at 64 components). Sheraz Khan Martinos Center Boston, USA On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Sylvana, > > >From the top op my head: When running the ICA, try only computing it > for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run > on reference sensors in case of MEG. > I have hunch that might help out. > > Cheers, > Stephen > > > On 6 July 2011 19:37, Sylvana wrote: > > Hi all, > > > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > > ft_componentanalysis. > > > > I get the following error message: > > > > > > ??? Error using ==> surf at 74 > > X, Y, Z, and C cannot be complex. > > > > Error in ==> ft_plot_topo at 184 > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > > 'none', 'FaceColor', shading); > > > > Error in ==> ft_topoplotER at 753 > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > Error in ==> ft_topoplotIC at 116 > > ft_topoplotER(cfg, varargin{:}); > > > > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > > the function to take the real part of the variable (or the absolute > > value), but I am not sure if this would be the correct thing to do. In > > case this is a bug, I thought I should report it. Any comments? > > > > Thanks for your help, > > > > Sylvana Schister > > Univ. of Utah > > Dept. of Bioengineering > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Thu Jul 7 03:27:46 2011 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 06 Jul 2011 21:27:46 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> Message-ID: <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> I've had this same problem with EEGlab's runICA implementation when the rank of the data was less than the number of variables (i.e., it's an ill-conditioned matrix, which is to say it has multicolinearity). Including the reference channel can do this (since it's just zeroes). Using PCA to reduce the data to a subspace can help as well since the rank will now equal the number of variables (namely the number of factor scores will equal the number of retained factors). Before you go the PCA route, it's worth trying to figure out why the data is ill-conditioned. There is likely to be something wrong with one of your channels. Maybe two of them are shorted together or something along those lines. Or if you used mean mastoid reference and included both mastoids, that can do it too (since they will be exactly inversely correlated, one of them is statistically redundant, reducing the rank by one). My EP Toolkit artifact correction routine (http://sourceforge.net/projects/erppcatoolkit/) takes all these sorts of things into account when performing eyeblink correction. Cheers! Joe On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > Hi Sylvana, > > Is the data SSS (maxfilter), I normally have this problem when data is SSS, try doing ICA with PCA (set at 64 components). > > Sheraz Khan > Martinos Center > Boston, USA > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh wrote: > Dear Sylvana, > > >From the top op my head: When running the ICA, try only computing it > for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run > on reference sensors in case of MEG. > I have hunch that might help out. > > Cheers, > Stephen > > > On 6 July 2011 19:37, Sylvana wrote: > > Hi all, > > > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > > ft_componentanalysis. > > > > I get the following error message: > > > > > > ??? Error using ==> surf at 74 > > X, Y, Z, and C cannot be complex. > > > > Error in ==> ft_plot_topo at 184 > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > > 'none', 'FaceColor', shading); > > > > Error in ==> ft_topoplotER at 753 > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > Error in ==> ft_topoplotIC at 116 > > ft_topoplotER(cfg, varargin{:}); > > > > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > > the function to take the real part of the variable (or the absolute > > value), but I am not sure if this would be the correct thing to do. In > > case this is a bug, I thought I should report it. Any comments? > > > > Thanks for your help, > > > > Sylvana Schister > > Univ. of Utah > > Dept. of Bioengineering > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://homepage.mac.com/jdien07/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Thu Jul 7 06:18:09 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Thu, 7 Jul 2011 00:18:09 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> Message-ID: Hi Joseph, Most likely cause of ill-conditioned in neuromag data is maxfilter (signal space separation) which reduces the dimensionality from 306 (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar expansion of order 8). Also neuromag is consist of two different type of sensors (Planar Gradiometer and magnetometer) having different sensitivities, so either ica needs to run separately on them or combined by making them equal through normalization. Sheraz Khan Martinos Center Boston, USA On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > I've had this same problem with EEGlab's runICA implementation when the > rank of the data was less than the number of variables (i.e., it's an > ill-conditioned matrix, which is to say it has multicolinearity). Including > the reference channel can do this (since it's just zeroes). Using PCA to > reduce the data to a subspace can help as well since the rank will now equal > the number of variables (namely the number of factor scores will equal the > number of retained factors). Before you go the PCA route, it's worth trying > to figure out why the data is ill-conditioned. There is likely to be > something wrong with one of your channels. Maybe two of them are shorted > together or something along those lines. Or if you used mean mastoid > reference and included both mastoids, that can do it too (since they will be > exactly inversely correlated, one of them is statistically redundant, > reducing the rank by one). My EP Toolkit artifact correction routine ( > http://sourceforge.net/projects/erppcatoolkit/) takes all these sorts of > things into account when performing eyeblink correction. > > Cheers! > > Joe > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > Hi Sylvana, > > Is the data SSS (maxfilter), I normally have this problem when data is SSS, > try doing ICA with PCA (set at 64 components). > > Sheraz Khan > Martinos Center > Boston, USA > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Dear Sylvana, >> >> >From the top op my head: When running the ICA, try only computing it >> for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run >> on reference sensors in case of MEG. >> I have hunch that might help out. >> >> Cheers, >> Stephen >> >> >> On 6 July 2011 19:37, Sylvana wrote: >> > Hi all, >> > >> > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. >> > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of >> > ft_componentanalysis. >> > >> > I get the following error message: >> > >> > >> > ??? Error using ==> surf at 74 >> > X, Y, Z, and C cannot be complex. >> > >> > Error in ==> ft_plot_topo at 184 >> > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', >> > 'none', 'FaceColor', shading); >> > >> > Error in ==> ft_topoplotER at 753 >> > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... >> > >> > Error in ==> ft_topoplotIC at 116 >> > ft_topoplotER(cfg, varargin{:}); >> > >> > >> > The complex variable is 'Zi', which is taken from 'comp'. I can modify >> > the function to take the real part of the variable (or the absolute >> > value), but I am not sure if this would be the correct thing to do. In >> > case this is a bug, I thought I should report it. Any comments? >> > >> > Thanks for your help, >> > >> > Sylvana Schister >> > Univ. of Utah >> > Dept. of Bioengineering >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jul 7 18:07:13 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jul 2011 18:07:13 +0200 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? In-Reply-To: References: Message-ID: <5D55B77E-C3A9-4924-A9CC-78B26602B8D4@donders.ru.nl> Dear Inbal, You may want to check the cfg.interactive='yes' option in ft_multiplotER, which allows you to make a selection of channels and time for creating a topoplot. Just switch it on and click/drag with your mouse in the figure. It does not solve all your questions, but it does do "3". best Robert On 5 Jul 2011, at 12:40, Inbal Lots wrote: > Hello > > I am using ft_multiplotER to display the 'butterfly' of the MEG data > after it was decimated and averaged. > I would like to do several things: > 1) to have the axes legends and values on the figure I get (I get > only a plot with not text at all on the axes) > 2) to add a title (not by doing it with matlab title('XXX')) > 3) to be able to select a component (i.e. a relevant time piece ) > and to see it's field on the head layout (i.e.cfg.layout='4D248.lay';) > > The code I am using, after decimation and averaging , is: > > cfg=[]; > cfg.interactive='yes'; > cfg.showlabels='yes'; > cfg.fontsize=14; > % cfg.layout='4D248.lay'; > cfg.layout ='butterfly'; > ft_multiplotER(cfg,AvrDATA); > > Is it possible? > > Thank you very much for your help > > Inbal > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sylvana.schister at utah.edu Thu Jul 7 18:07:48 2011 From: sylvana.schister at utah.edu (Sylvana) Date: Thu, 07 Jul 2011 10:07:48 -0600 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> Message-ID: <1310054868.25490.10.camel@weston-desktop> Hi all, Thank you so much for your quick reply. This is all very helpful. I am using tsss filtered data. After thinking it through all day, I understood that I have a dimensionality problem. Anyway, thanks again! Cheers, Sylvana On Wed, 2011-07-06 at 22:18 -0600, Sheraz Khan wrote: > Hi Joseph, > > Most likely cause of ill-conditioned in neuromag data is maxfilter > (signal space separation) which reduces the dimensionality from 306 > (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar > expansion of order 8). Also neuromag is consist of two different type > of sensors (Planar Gradiometer and magnetometer) having different > sensitivities, so either ica needs to run separately on them or > combined by making them equal through normalization. > > Sheraz Khan > Martinos Center > Boston, USA > > > > On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > I've had this same problem with EEGlab's runICA implementation > when the rank of the data was less than the number of > variables (i.e., it's an ill-conditioned matrix, which is to > say it has multicolinearity). Including the reference channel > can do this (since it's just zeroes). Using PCA to reduce the > data to a subspace can help as well since the rank will now > equal the number of variables (namely the number of factor > scores will equal the number of retained factors). Before you > go the PCA route, it's worth trying to figure out why the data > is ill-conditioned. There is likely to be something wrong > with one of your channels. Maybe two of them are shorted > together or something along those lines. Or if you used mean > mastoid reference and included both mastoids, that can do it > too (since they will be exactly inversely correlated, one of > them is statistically redundant, reducing the rank by one). > My EP Toolkit artifact correction routine > (http://sourceforge.net/projects/erppcatoolkit/) takes all > these sorts of things into account when performing eyeblink > correction. > > > Cheers! > > > Joe > > > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > > Hi Sylvana, > > > > Is the data SSS (maxfilter), I normally have this problem > > when data is SSS, try doing ICA with PCA (set at 64 > > components). > > > > Sheraz Khan > > Martinos Center > > Boston, USA > > > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh > > wrote: > > Dear Sylvana, > > > > >From the top op my head: When running the ICA, try > > only computing it > > for the MEG or EEG channels. (cfg.channel = 'MEG';), > > so it doesn't run > > on reference sensors in case of MEG. > > I have hunch that might help out. > > > > Cheers, > > Stephen > > > > > > > > On 6 July 2011 19:37, Sylvana > > wrote: > > > Hi all, > > > > > > I am trying to use ICA to clean EOG and ECG > > artifacts of neuromag data. > > > I am running ft_topoplotIC(cfg, comp), where > > 'comp' is the output of > > > ft_componentanalysis. > > > > > > I get the following error message: > > > > > > > > > ??? Error using ==> surf at 74 > > > X, Y, Z, and C cannot be complex. > > > > > > Error in ==> ft_plot_topo at 184 > > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), > > Zi, 'EdgeColor', > > > 'none', 'FaceColor', shading); > > > > > > Error in ==> ft_topoplotER at 753 > > > > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > > > Error in ==> ft_topoplotIC at 116 > > > ft_topoplotER(cfg, varargin{:}); > > > > > > > > > The complex variable is 'Zi', which is taken from > > 'comp'. I can modify > > > the function to take the real part of the variable > > (or the absolute > > > value), but I am not sure if this would be the > > correct thing to do. In > > > case this is a bug, I thought I should report it. > > Any comments? > > > > > > Thanks for your help, > > > > > > Sylvana Schister > > > Univ. of Utah > > > Dept. of Bioengineering > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -------------------------------------------------------------------------------- > > > Joseph Dien, > Senior Research Scientist > University of Maryland > > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From sherrykhan78 at gmail.com Thu Jul 7 18:32:57 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Thu, 7 Jul 2011 12:32:57 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: <1310054868.25490.10.camel@weston-desktop> References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> <1310054868.25490.10.camel@weston-desktop> Message-ID: Hi, tsss is more tricky, if uses default 4 sec window then you different dimensionality every 4 sec. Sheraz On Thu, Jul 7, 2011 at 12:07 PM, Sylvana wrote: > Hi all, > > Thank you so much for your quick reply. This is all very helpful. I am > using tsss filtered data. After thinking it through all day, I > understood that I have a dimensionality problem. > > Anyway, thanks again! > Cheers, > Sylvana > > On Wed, 2011-07-06 at 22:18 -0600, Sheraz Khan wrote: > > Hi Joseph, > > > > Most likely cause of ill-conditioned in neuromag data is maxfilter > > (signal space separation) which reduces the dimensionality from 306 > > (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar > > expansion of order 8). Also neuromag is consist of two different type > > of sensors (Planar Gradiometer and magnetometer) having different > > sensitivities, so either ica needs to run separately on them or > > combined by making them equal through normalization. > > > > Sheraz Khan > > Martinos Center > > Boston, USA > > > > > > > > On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > > I've had this same problem with EEGlab's runICA implementation > > when the rank of the data was less than the number of > > variables (i.e., it's an ill-conditioned matrix, which is to > > say it has multicolinearity). Including the reference channel > > can do this (since it's just zeroes). Using PCA to reduce the > > data to a subspace can help as well since the rank will now > > equal the number of variables (namely the number of factor > > scores will equal the number of retained factors). Before you > > go the PCA route, it's worth trying to figure out why the data > > is ill-conditioned. There is likely to be something wrong > > with one of your channels. Maybe two of them are shorted > > together or something along those lines. Or if you used mean > > mastoid reference and included both mastoids, that can do it > > too (since they will be exactly inversely correlated, one of > > them is statistically redundant, reducing the rank by one). > > My EP Toolkit artifact correction routine > > (http://sourceforge.net/projects/erppcatoolkit/) takes all > > these sorts of things into account when performing eyeblink > > correction. > > > > > > Cheers! > > > > > > Joe > > > > > > > > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > > > > Hi Sylvana, > > > > > > Is the data SSS (maxfilter), I normally have this problem > > > when data is SSS, try doing ICA with PCA (set at 64 > > > components). > > > > > > Sheraz Khan > > > Martinos Center > > > Boston, USA > > > > > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh > > > wrote: > > > Dear Sylvana, > > > > > > >From the top op my head: When running the ICA, try > > > only computing it > > > for the MEG or EEG channels. (cfg.channel = 'MEG';), > > > so it doesn't run > > > on reference sensors in case of MEG. > > > I have hunch that might help out. > > > > > > Cheers, > > > Stephen > > > > > > > > > > > > On 6 July 2011 19:37, Sylvana > > > wrote: > > > > Hi all, > > > > > > > > I am trying to use ICA to clean EOG and ECG > > > artifacts of neuromag data. > > > > I am running ft_topoplotIC(cfg, comp), where > > > 'comp' is the output of > > > > ft_componentanalysis. > > > > > > > > I get the following error message: > > > > > > > > > > > > ??? Error using ==> surf at 74 > > > > X, Y, Z, and C cannot be complex. > > > > > > > > Error in ==> ft_plot_topo at 184 > > > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), > > > Zi, 'EdgeColor', > > > > 'none', 'FaceColor', shading); > > > > > > > > Error in ==> ft_topoplotER at 753 > > > > > > > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > > > > > Error in ==> ft_topoplotIC at 116 > > > > ft_topoplotER(cfg, varargin{:}); > > > > > > > > > > > > The complex variable is 'Zi', which is taken from > > > 'comp'. I can modify > > > > the function to take the real part of the variable > > > (or the absolute > > > > value), but I am not sure if this would be the > > > correct thing to do. In > > > > case this is a bug, I thought I should report it. > > > Any comments? > > > > > > > > Thanks for your help, > > > > > > > > Sylvana Schister > > > > Univ. of Utah > > > > Dept. of Bioengineering > > > > > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > -------------------------------------------------------------------------------- > > > > > > Joseph Dien, > > Senior Research Scientist > > University of Maryland > > > > > > E-mail: jdien07 at mac.com > > Phone: 301-226-8848 > > Fax: 301-226-8811 > > http://homepage.mac.com/jdien07/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Thu Jul 7 21:22:42 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 14:22:42 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim On Thu, Jun 30, 2011 at 4:04 AM, odelia nakar wrote: > Hi Jim, > > Try : > cfg.neighbourdist = 0.03; > I found it good for my data. (When you run the function the channels that > repaired your data is displayed in the command window). > > Good luck! > Odelia. > > > ------------------------------ > Date: Thu, 30 Jun 2011 01:05:08 -0500 > From: megjim1 at gmail.com > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] channelrepair issue > > > Dear all, > > We have 4D's WH3600 MEG system (248 channels) and we found the > ----------------- > cfg = []; > cfg.dataset = > 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue = 320; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1 > ; cfg = ft_definetrial(cfg); > cfg.blc = > 'yes'; cfg.blcwindow = [-1 0]; > cfg.channel = {'MEG'}; > raw_DATA = ft_preprocessing(cfg); > raw_DATA.grad = ft_convert_units(raw_DATA.grad, 'cm') > > cfg = []; > cfg.badchannel = {'A234'}; > [raw_DATA] = ft_channelrepair(cfg, raw_DATA) > the input is raw data with 248 channels and 201 trials > repairing channel A234 > using neighbour A121 > using neighbour A143 > using neighbour A154 > using neighbour A173 > using neighbour A224 > using neighbour A8 > using neighbour A91 > repairing bad channels for trial 1 > repairing bad channels for trial 2 > repairing bad channels for trial 3 > ... > ------------------------------------ > > But channels like A121 and A143 are far away from the bad channel A234. How > can they be used as neighbours (i.e. within 4cm, the default value for > cfg.neighbourdist) for this bad channel? > > Any suggestions? > > Thanks a lot. > > Jim > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Thu Jul 7 21:26:26 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 14:26:26 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: > Hi Odelia, > > Yes, I downloaded the latest version of Fieldtrip and tried your suggestion > "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away > channels like A121 to do the channel-repair for A234 (these two channels are > 24.1172cm apart!). Here is the detail: > > --------------------------- > cfg = []; > cfg.dataset = 'e,rfhp0.1Hz'; > cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue = 320; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1; > cfg = ft_definetrial(cfg); > cfg.blc = 'yes'; % do > baseline correction with the complete trial > > cfg.blcwindow = [-1 0]; > cfg.channel = {'MEG'}; > raw_DATA = ft_preprocessing(cfg); > > > cfg = []; > cfg.badchannel = {'A234'}; > cfg.neighbourdist = 0.03; > > [raw_DATA] = ft_channelrepair(cfg, raw_DATA) > > --------------------------------------------------------------------- > > And here is the outcome: ----------------------------- > > the input is raw data with 248 channels and 201 trials > repairing channel A234 > using neighbour A121 > using neighbour A143 > using neighbour A173 > using neighbour A8 > > repairing bad channels for trial 1 > repairing bad channels for trial 2 > repairing bad channels for trial 3 > repairing bad channels for trial 4 > repairing bad channels for trial 5 > repairing bad channels for trial 6 > repairing bad channels for trial 7 > repairing bad channels for trial 8 > repairing bad channels for trial 9 > repairing bad channels for trial 10 > .... > > ------------------------- > > Thank you. > > Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Jul 7 23:30:06 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 7 Jul 2011 15:30:06 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Fri Jul 8 01:38:46 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 18:38:46 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > Jim, > > All I can do is confirm that this issue exists for our 4D data as well, > although we don't use the ft_channelrepair function. The same 4 quite > distant channels (one had been deleted in the dataset I had handy) were > chosen for repair when I ran this on one of our datasets (also a 248 channel > 4D system). I agree the choice doesn't make any sense given the 3 cm > distance you define. A quick look at the critical calculation in > ft_channelrepair, line 109 distance = ... is correct given the inputs. So I > wonder if the issue is with the actual channel indices used rather than the > calculation, but I don't have time to track that down. All I can say is that > for the distance you specify, channels A235, A216, A199, A215 would be much > closer to A234 than those that are selected via the channel repair function. > Channel A8 is in fact nearly 21 cm away from channel A234 in the array, > based on examination of the data read in from Eugene Kronberg's pdf4D matlab > object code, which I think was originally the basis for the FieldTrip 4D > reader function. > > Best, > > Don Rojas > > > On Jul 7, 2011, at 1:26 PM, Jim Li wrote: > > Dear Fieldtrip developer, > > Can anybody help me with this channel-repair issue I've been having? I can > provide the raw data if you need. I really want to solve the problem, you > know. > > Thanks a lot, > > Jim > > On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: > >> Hi Odelia, >> >> Yes, I downloaded the latest version of Fieldtrip and tried your >> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >> far-away channels like A121 to do the channel-repair for A234 (these two >> channels are 24.1172cm apart!). Here is the detail: >> >> --------------------------- >> cfg = []; >> cfg.dataset = 'e,rfhp0.1Hz'; >> cfg.trialdef.eventtype = 'TRIGGER'; >> cfg.trialdef.eventvalue = 320; >> cfg.trialdef.prestim = 1; >> cfg.trialdef.poststim = 1; >> cfg = ft_definetrial(cfg); >> cfg.blc = 'yes'; % do >> baseline correction with the complete trial >> >> cfg.blcwindow = [-1 0]; >> cfg.channel = {'MEG'}; >> raw_DATA = ft_preprocessing(cfg); >> >> >> cfg = []; >> cfg.badchannel = {'A234'}; >> cfg.neighbourdist = 0.03; >> >> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >> >> --------------------------------------------------------------------- >> >> And here is the outcome: ----------------------------- >> >> the input is raw data with 248 channels and 201 trials >> repairing channel A234 >> using neighbour A121 >> using neighbour A143 >> using neighbour A173 >> using neighbour A8 >> >> repairing bad channels for trial 1 >> repairing bad channels for trial 2 >> repairing bad channels for trial 3 >> repairing bad channels for trial 4 >> repairing bad channels for trial 5 >> repairing bad channels for trial 6 >> repairing bad channels for trial 7 >> repairing bad channels for trial 8 >> repairing bad channels for trial 9 >> repairing bad channels for trial 10 >> .... >> >> ------------------------- >> >> Thank you. >> >> Jim >> > _______________________________________________ > > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luoj at mail.nih.gov Fri Jul 8 02:01:23 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 7 Jul 2011 20:01:23 -0400 Subject: [FieldTrip] difficulty in reading 4D e,rfhp1.0Hz,COH file Message-ID: Hi, Can fieldtrip read this 4D file: e,rfhp1.0Hz,COH in any way? Thanks! Jessie From batrod at gmail.com Fri Jul 8 02:16:18 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Thu, 7 Jul 2011 19:16:18 -0500 Subject: [FieldTrip] ft_freqstatistics error with a newer version. Message-ID: Dear Fieldtrippers, i had a reshape error after downloading a recent version of fieldtrip (20110630) using freq_statistics: ??? Error using ==> reshape Size vector must have at least two elements. Error in ==> ft_freqstatistics at 230 dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data Error in ==> alpha_correl_behav at 97 [stat] = ft_freqstatistics(cfg, Power2{1,:}, Power4{1,:}, Power6{1,:}); With this newer version i also noticed new messages, but it may not be linked: "selection powspctrm along dimension 3 selection powspctrmsem along dimension 3 averaging powspctrm over time averaging powspctrmsem over time [...] " Thanks for any advice, Rodolphe -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 8 03:00:57 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Thu, 7 Jul 2011 19:00:57 -0600 Subject: [FieldTrip] difficulty in reading 4D e,rfhp1.0Hz,COH file In-Reply-To: References: Message-ID: A COH file is simply a regular epoch mode 4D file acquired either at the beginning (COH) or end (COH1) of a run. The coils are energized, so these are used to calculate the head position and headframe coordinate system. cfg.dataset = 'e,rfhp1.0Hz,COH'; coh_data = ft_preprocessing(cfg); should read the file. On Jul 7, 2011, at 6:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Can fieldtrip read this 4D file: e,rfhp1.0Hz,COH in any way? > Thanks! > > Jessie > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 From Don.Rojas at ucdenver.edu Fri Jul 8 03:36:53 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Thu, 7 Jul 2011 19:36:53 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at gmx.de Fri Jul 8 08:59:19 2011 From: paul_c at gmx.de (Paul Czienskowski) Date: Fri, 08 Jul 2011 08:59:19 +0200 Subject: [FieldTrip] Symmetric dipole localization Message-ID: <4E16AAC7.2060203@gmx.de> Dear all, I'm just trying to fit symmetric dipoles and have a question about this: I wondered, if it was sufficient to define the grid only on the one half of the region. Will the grid points be mirrored by the ft_dipolefitting routine? Best regards, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 From jan.schoffelen at donders.ru.nl Fri Jul 8 09:05:06 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 09:05:06 +0200 Subject: [FieldTrip] ft_freqstatistics error with a newer version. In-Reply-To: References: Message-ID: <7E620B2E-057C-4F4A-A344-5AAED57C1737@donders.ru.nl> Dear Rodolphe, I suspect you are using a single time-frequency bin in your statistics? Then it sounds like a singleton dimension issue to me. Could you generate some testdata and file a bug through the bugzilla website, uploading this testdata, as well as the code you used to generate the error? Thanks, Jan-Mathijs On Jul 8, 2011, at 2:16 AM, Rodolphe Nenert wrote: > Dear Fieldtrippers, > > i had a reshape error after downloading a recent version of fieldtrip (20110630) using freq_statistics: > > ??? Error using ==> reshape > Size vector must have at least two elements. > > Error in ==> ft_freqstatistics at 230 > dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data > > Error in ==> alpha_correl_behav at 97 > [stat] = ft_freqstatistics(cfg, Power2{1,:}, Power4{1,:}, Power6{1,:}); > > > With this newer version i also noticed new messages, but it may not be linked: > "selection powspctrm along dimension 3 > selection powspctrmsem along dimension 3 > averaging powspctrm over time > averaging powspctrmsem over time > [...] > " > > Thanks for any advice, > > Rodolphe > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From jan.schoffelen at donders.ru.nl Fri Jul 8 09:11:54 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 09:11:54 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Message-ID: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > >> Thank you very much for confirming the problem, Don, I appreciate it, :) >> >> Jim >> >> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >>> Dear Fieldtrip developer, >>> >>> Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. >>> >>> Thanks a lot, >>> >>> Jim >>> >>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> _______________________________________________ >>> >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 8 10:20:10 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jul 2011 10:20:10 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Message-ID: <4E16BDBA.2020209@donders.ru.nl> Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the > 4D reading code at the time, we had the 248-channel magnetometer > system in mind. It could be that there are some flaws related to the > handling of gradiometers. This should not only lead to (erratic) > issues at the level of channelrepair, but may also cause mayhem when > doing planar gradient transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal > with gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. > through DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > >> Jim et al. >> >> In thinking about this further, it seems to me that it is the >> indexing that is incorrect. The problem I think is specific to >> gradiometer systems, which have two (or more) locations per channel. >> The function appears to assume that the sensor index based on the >> sens.label field (only 1 per channel) will correspond 1 to 1 with the >> sens.grad field (2 locations per channel), which is not correct. So, >> my guess is that for first-order gradiometer systems, the correct >> index for the sensor location is 2x the index in the sens.label field. >> >> So, in an example I have handy at home, the label index for channel >> A234 is 107. Since I think Fieldtrip stores gradiometer locations (by >> default) as: >> >> Chn 1 lower coil x, y z >> Chn 1 upper coil x, y z >> Chn 2 lower coil x, y z >> Chn 2 upper coil x, y z >> . >> . >> . >> Chn N >> >> I think the correct position info for channel A234 would be found in >> sens.grad(214,:), not sens.grad(107,:), which is what the >> ft_channelrepair function chooses. So I think this is a bug in the >> function specific to gradiometer systems. >> >> Best, >> >> Don >> >> On Jul 7, 2011, at 5:38 PM, Jim Li wrote: >> >>> Thank you very much for confirming the problem, Don, I appreciate it, :) >>> Jim >>> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don >> > wrote: >>> >>> Jim, >>> >>> All I can do is confirm that this issue exists for our 4D data >>> as well, although we don't use the ft_channelrepair function. >>> The same 4 quite distant channels (one had been deleted in the >>> dataset I had handy) were chosen for repair when I ran this on >>> one of our datasets (also a 248 channel 4D system). I agree the >>> choice doesn't make any sense given the 3 cm distance you >>> define. A quick look at the critical calculation in >>> ft_channelrepair, line 109 distance = ... is correct given the >>> inputs. So I wonder if the issue is with the actual channel >>> indices used rather than the calculation, but I don't have time >>> to track that down. All I can say is that for the distance you >>> specify, channels A235, A216, A199, A215 would be much closer to >>> A234 than those that are selected via the channel repair >>> function. Channel A8 is in fact nearly 21 cm away from channel >>> A234 in the array, based on examination of the data read in from >>> Eugene Kronberg's pdf4D matlab object code, which I think was >>> originally the basis for the FieldTrip 4D reader function. >>> >>> Best, >>> >>> Don Rojas >>> >>> >>> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >>> >>>> Dear Fieldtrip developer, >>>> Can anybody help me with this channel-repair issue I've been >>>> having? I can provide the raw data if you need. I really want >>>> to solve the problem, you know. >>>> Thanks a lot, >>>> Jim >>>> >>>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li >>> > wrote: >>>> >>>> Hi Odelia, >>>> Yes, I downloaded the latest version of Fieldtrip and tried >>>> your suggestion "cfg.neighbourdist = 0.03", but it still >>>> weirdly uses the far-away channels like A121 to do the >>>> channel-repair for A234 (these two channels are 24.1172cm >>>> apart!). Here is the detail: >>>> --------------------------- >>>> cfg = []; >>>> cfg.dataset = 'e,rfhp0.1Hz'; >>>> cfg.trialdef.eventtype = 'TRIGGER'; >>>> cfg.trialdef.eventvalue = 320; >>>> cfg.trialdef.prestim = 1; >>>> cfg.trialdef.poststim = 1; >>>> cfg = ft_definetrial(cfg); >>>> cfg.blc = >>>> 'yes'; % do baseline >>>> correction with the complete trial >>>> >>>> cfg.blcwindow = [-1 0]; >>>> cfg.channel = {'MEG'}; >>>> raw_DATA = ft_preprocessing(cfg); >>>> cfg = []; >>>> cfg.badchannel = {'A234'}; >>>> cfg.neighbourdist = 0.03; >>>> >>>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>>> --------------------------------------------------------------------- >>>> And here is the outcome: ----------------------------- >>>> >>>> the input is raw data with 248 channels and 201 trials >>>> repairing channel A234 >>>> using neighbour A121 >>>> using neighbour A143 >>>> using neighbour A173 >>>> using neighbour A8 >>>> >>>> repairing bad channels for trial 1 >>>> repairing bad channels for trial 2 >>>> repairing bad channels for trial 3 >>>> repairing bad channels for trial 4 >>>> repairing bad channels for trial 5 >>>> repairing bad channels for trial 6 >>>> repairing bad channels for trial 7 >>>> repairing bad channels for trial 8 >>>> repairing bad channels for trial 9 >>>> repairing bad channels for trial 10 >>>> .... >>>> ------------------------- >>>> Thank you. >>>> Jim >>>> >>>> _______________________________________________ >>>> >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> ----------------------- >>> Don Rojas, Ph.D. >>> Associate Professor of Psychiatry >>> U. of Colorado Denver Anschutz Medical Campus >>> Director, UCD Magnetoencephalography Lab >>> 13001 E. 17th Pl F546 >>> Aurora, CO 80045 >>> 303-724-4994 >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Fri Jul 8 15:00:27 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Fri, 8 Jul 2011 15:00:27 +0200 Subject: [FieldTrip] artifact rejection issue - Poles Message-ID: Deat all, I am trying to run the tutorial scripts on a dataset I have. The sampling rate here is 6000 Hz. I cannot perform the artifact rejection. Here is the error. ??? Error using ==> filter_with_correction at 42 Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter. Error in ==> ft_preproc_bandpassfilter at 80 filt = filter_with_correction(B,A,dat,dir); Error in ==> preproc at 281 if strcmp(cfg.bpfilter, 'yes'), dat = ft_preproc_bandpassfilter(dat, fsample, cfg.bpfreq, cfg.bpfiltord, cfg.bpfilttype, cfg.bpfiltdir); end I have tried to change the cutoff, but the error is still present. Has someone ever experienced this error? Many thanks, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Fri Jul 8 15:28:47 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Fri, 8 Jul 2011 15:28:47 +0200 (CEST) Subject: [FieldTrip] ft_channelrepair with eeg data Message-ID: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> Hi Fieldtrip-warriors, I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- ### channels_to_repair={'FT9', 'CPz'}; cfg=[]; cfg.neighbourdist = 4; cfg.badchannel=channels_to_repair; data=ft_channelrepair(cfg, data); ### Running this produces the following error msg: ### ??? Error using ==> ft_checkconfig at 157 The field cfg.neighbours is required Error in ==> ft_channelrepair at 58 cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); ### It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? I also see the following in the help file for ft_channelrepair:- ### Since a nearest neighbour average is used, the input should contain a gradiometer or electrode definition, i.e. data.grad or data.elec. ### What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? I'm using a standard 10-10 64-electrode layout. Best, -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From stephen.whitmarsh at gmail.com Fri Jul 8 15:44:44 2011 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 8 Jul 2011 15:44:44 +0200 Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> References: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: He Tom, Wow, look what was made this morning by Jorn at basecamp: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors Cheers, Stephen (Pte(T)) On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: > > Hi Fieldtrip-warriors, > > I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- > > ### > >   channels_to_repair={'FT9', 'CPz'}; > >   cfg=[]; >   cfg.neighbourdist = 4; >   cfg.badchannel=channels_to_repair; > >   data=ft_channelrepair(cfg, data); > > ### > > Running this produces the following error msg: > > ### > >   ??? Error using ==> ft_checkconfig at 157 >   The field cfg.neighbours is required > > >   Error in ==> ft_channelrepair at 58 >   cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); > > ### > > It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? > > I also see the following in the help file for ft_channelrepair:- > > ### > >     Since a nearest neighbour average is used, the input should contain >     a gradiometer or electrode definition, i.e. data.grad or data.elec. > > ### > > What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? > > I'm using a standard 10-10 64-electrode layout. > > Best, > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From t.marshall at fcdonders.ru.nl Fri Jul 8 16:17:12 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Fri, 8 Jul 2011 16:17:12 +0200 (CEST) Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: Message-ID: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> Thanks Stephen. ft_neighbourselection looks like it might be what I need. So now I tried this:- ### channels_to_repair={'FT9', 'CPz'}; layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay'); cfg=[]; cfg.layout=layout_file; cfg.badchannel=channels_to_repair; cfg.neighbours = ft_neighbourselection(cfg, data); data=ft_channelrepair(cfg, data); ### But what that gave me was:- ### ??? Reference to non-existent field 'elec'. Error in ==> ft_channelrepair at 92 sens = data.elec; ### This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me? Best, Tom ----- Original Message ----- From: "Stephen Whitmarsh" To: "Email discussion list for the FieldTrip project" Sent: Friday, 8 July, 2011 3:44:44 PM Subject: Re: [FieldTrip] ft_channelrepair with eeg data He Tom, Wow, look what was made this morning by Jorn at basecamp: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors Cheers, Stephen (Pte(T)) On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: > > Hi Fieldtrip-warriors, > > I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- > > ### > >   channels_to_repair={'FT9', 'CPz'}; > >   cfg=[]; >   cfg.neighbourdist = 4; >   cfg.badchannel=channels_to_repair; > >   data=ft_channelrepair(cfg, data); > > ### > > Running this produces the following error msg: > > ### > >   ??? Error using ==> ft_checkconfig at 157 >   The field cfg.neighbours is required > > >   Error in ==> ft_channelrepair at 58 >   cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); > > ### > > It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? > > I also see the following in the help file for ft_channelrepair:- > > ### > >     Since a nearest neighbour average is used, the input should contain >     a gradiometer or electrode definition, i.e. data.grad or data.elec. > > ### > > What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? > > I'm using a standard 10-10 64-electrode layout. > > Best, > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From jm.horschig at donders.ru.nl Fri Jul 8 19:15:10 2011 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Fri, 08 Jul 2011 19:15:10 +0200 Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> References: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <4E173B1E.1070909@donders.ru.nl> Hey Tom, apart from the fact that we indeed decided to change ft_channelrepair to require cfg.neighbours to be user specified (I committed that change just a few hours before your message), you do need data.elec information. data.elec should contain sensor information like position for your data. As an extremely dirty workaround, you could use the the EEG layout templates as following (I did that for testing ft_channelrepair): cfg.layout = 'EEG1010.lay'; data.elec = ft_prepare_layout(cfg); data.elec.pnt = lay.pos; I do not whether there is a more appropriate way available ;) Best, Jörn On 7/8/2011 4:17 PM, Marshall, T.R. (Tom) wrote: > Thanks Stephen. ft_neighbourselection looks like it might be what I need. > > So now I tried this:- > > ### > > channels_to_repair={'FT9', 'CPz'}; > layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay'); > > cfg=[]; > cfg.layout=layout_file; > cfg.badchannel=channels_to_repair; > > cfg.neighbours = ft_neighbourselection(cfg, data); > > data=ft_channelrepair(cfg, data); > > ### > > But what that gave me was:- > > ### > > ??? Reference to non-existent field 'elec'. > > Error in ==> ft_channelrepair at 92 > sens = data.elec; > > ### > > This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me? > > Best, > Tom > > ----- Original Message ----- > From: "Stephen Whitmarsh" > To: "Email discussion list for the FieldTrip project" > Sent: Friday, 8 July, 2011 3:44:44 PM > Subject: Re: [FieldTrip] ft_channelrepair with eeg data > > He Tom, > > Wow, look what was made this morning by Jorn at basecamp: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors > > Cheers, > > Stephen (Pte(T)) > > > > On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: >> Hi Fieldtrip-warriors, >> >> I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- >> >> ### >> >> channels_to_repair={'FT9', 'CPz'}; >> >> cfg=[]; >> cfg.neighbourdist = 4; >> cfg.badchannel=channels_to_repair; >> >> data=ft_channelrepair(cfg, data); >> >> ### >> >> Running this produces the following error msg: >> >> ### >> >> ??? Error using ==> ft_checkconfig at 157 >> The field cfg.neighbours is required >> >> >> Error in ==> ft_channelrepair at 58 >> cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); >> >> ### >> >> It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? >> >> I also see the following in the help file for ft_channelrepair:- >> >> ### >> >> Since a nearest neighbour average is used, the input should contain >> a gradiometer or electrode definition, i.e. data.grad or data.elec. >> >> ### >> >> What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? >> >> I'm using a standard 10-10 64-electrode layout. >> >> Best, >> >> -- >> Tom Marshall, MSc. >> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging >> tel: +31(0)243668487 >> email: t.marshall at fcdonders.ru.nl >> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands >> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From megjim1 at gmail.com Fri Jul 8 19:20:46 2011 From: megjim1 at gmail.com (Jim Li) Date: Fri, 8 Jul 2011 12:20:46 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E16BDBA.2020209@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: Dear Don, jan-mathijs and Jörn, Thank you very much for tackling this problem specific for axial gradiometer systems like ours. I tried the following codes and got the 3D sensor plot. The neighbours look fine to me. For example, for channel A234 the 3 nearest neighbours are A235, A216 and A215 as expected. This is very different from the 3-cm-neighbours selected by ft_channelrepair when A234 is the bad channel, which includes A143, A173, A8, A121. --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); ft_neighbourplot(cfg, raw_DATA) ------------------------------------------------------ and the output for the last commnad looks like this: --------------------------- Using the gradiometer configuration from the dataset. undoing the SupineTip balancing there are on average 7.9 neighbours per channel Using the gradiometer configuration from the dataset. undoing the SupineTip balancing ------------------------ Thank you very much and looking forward to the new revision. Jim On Fri, Jul 8, 2011 at 3:20 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > ** > Dear Jim, Don and others, > > First of all, what Don suggested sounds indeed like the cause, if I > remember things correctly (with my limited experience). > > Anyhow, could one of you check ft_neighbourplot with the dataset and the > neighbourselection of choice? This allows you to see what neighbours are > selected for which sensors and where they lie in space. If this looks fine, > than the problem lies indeed in how sensor position is deduced from the data > structure. > > Best, > Jörn > > > > On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the 4D > reading code at the time, we had the 248-channel magnetometer system in > mind. It could be that there are some flaws related to the handling of > gradiometers. This should not only lead to (erratic) issues at the level of > channelrepair, but may also cause mayhem when doing planar gradient > transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal with > gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. through > DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that > is incorrect. The problem I think is specific to gradiometer systems, which > have two (or more) locations per channel. The function appears to assume > that the sensor index based on the sens.label field (only 1 per channel) > will correspond 1 to 1 with the sens.grad field (2 locations per channel), > which is not correct. So, my guess is that for first-order gradiometer > systems, the correct index for the sensor location is 2x the index in the > sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is > 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in > sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair > function chooses. So I think this is a bug in the function specific to > gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > > Thank you very much for confirming the problem, Don, I appreciate it, :) > > Jim > > On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, >> although we don't use the ft_channelrepair function. The same 4 quite >> distant channels (one had been deleted in the dataset I had handy) were >> chosen for repair when I ran this on one of our datasets (also a 248 channel >> 4D system). I agree the choice doesn't make any sense given the 3 cm >> distance you define. A quick look at the critical calculation in >> ft_channelrepair, line 109 distance = ... is correct given the inputs. So I >> wonder if the issue is with the actual channel indices used rather than the >> calculation, but I don't have time to track that down. All I can say is that >> for the distance you specify, channels A235, A216, A199, A215 would be much >> closer to A234 than those that are selected via the channel repair function. >> Channel A8 is in fact nearly 21 cm away from channel A234 in the array, >> based on examination of the data read in from Eugene Kronberg's pdf4D matlab >> object code, which I think was originally the basis for the FieldTrip 4D >> reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >> Dear Fieldtrip developer, >> >> Can anybody help me with this channel-repair issue I've been having? I can >> provide the raw data if you need. I really want to solve the problem, you >> know. >> >> Thanks a lot, >> >> Jim >> >> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >> >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your >>> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >>> far-away channels like A121 to do the channel-repair for A234 (these two >>> channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do >>> baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 8 19:24:54 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jul 2011 19:24:54 +0200 Subject: [FieldTrip] Functionality change - neighbourselection will be obliged by the user Message-ID: <4E173D66.1080204@donders.ru.nl> Dear FieldTrip community, Up until now, many users and functions relied on a predefined way to define proximal or neighbouring sensor, namely using a distance measurement. We changed the functionality of ft_neighbourselection and related functions, which will be explained in the following. *1 - The user is obliged to define and verify channel neighbours* Driven by some thoughts and current discussion going on in the FieldTrip mailinglist, we decided to change neighbourselection. Within the next days, all functions which require information about proximal or neighbouring sensors will be required to have a cfg.neighbour field that you as the user have to specify explicitly. This may be obvious for some functions, such as cluster statistics on channel level, but not so much for other functions such as planar gradient computation or channelrepair. In order to ease the way of getting into the whole neighbourselection issue, we wrote 3 FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template Please note that you can use ft_neighbourplot to see the current neighbourselection and verify whether this seems like a good choice. Although we try to come up with extremely smart ways to compute neighbours of your data, selection of neighbours can still be highly subjective. Therefore, we also decided to do the following: *2 - Neighbours can be defined using different methods* Since the near beginning of FieldTrip, neighbours were selected based on a 'distance' approach, meaning that nearby sensors were defined as neighbours. This has shown to be valid for some systems given a predefined distance (neighbdist) of 4cm, whereas other systems needed a different neighbdist. In order to reduce subjectivity and arbitrariness of the maximal distance of a sensor to be called 'neighbour', we implemented a 'triangulation' approach. For more information, see the corresponding FAQ above. However, since systems around the world should be similar in terms of sensor position, we decided to implement a 'template'-based approach, which loads a predefined neighbour-template from file. It is up to you to decide what approach you are most comfortable with. The standard behaviour of ft_neighbourselection still is the old 'distance' approach. *3 - Call for neighbour templates * Now, dear community, you may become active and share your neighbour-templates. Here at the Donders, we are primarily working with the CTF275 system and have thus quite some expertise and experience. For this system, you can already find a template in the newer FieldTrip versions. We will continue improving the neighbourdefinition of this template and try to be as objective as possible. Furthermore, we will start creating templates for other systems as well and try to optimize these. However, when it comes to other systems, also including EEG systems, you might be more experienced. Therefore, we would like to ask whether you want to share your expertise and send the neighbourstructure that you are using on your system to us (== me). I will then try to incorporate your subjective selection with ours, probably after some discussion. If you are willing to support us in that respect, please do *not* send a mail to the mailing-list but to my personal mail address, as I will be organizing the templates: jm.horschig at donders.ru.nl Thanks in advance for your cooperation. Best regards on behalf of the developer team, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 8 21:06:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 21:06:10 +0200 Subject: [FieldTrip] slight change in default behaviour ft_componentanalysis (method = 'runica'/'binica') Message-ID: Dear all, I implemented a slight change in the default behaviour of ft_componentanalysis when using runica or binica as method. In general componentanalysis unmixes the sensor level data, and provides a spatial mixing matrix (comp.topo), as well as the time course of the components (in comp.trial). By construction (if you did comp=ft_componentanalysis(cfg,data)) data.trial{x} = comp.topo*comp.trial{x}; The change in behaviour pertains to the relative scaling of the mixing matrix and the component time-courses. Before, default behaviour caused the magnitude of the values in the mixing matrix to be of the same order of magnitude as the values in the original time courses (data.trial). For reasons I will not go into, this could cause numerical problems at some later stage of some analysis pipeline. Also, when using other methods in ft_componentanalysis (such as pca), the magnitude of the values in the component time courses approximately matched the magnitude of the values in the original time courses. For consistency and to avoid potential problems at later stages of analysis, I changed the default behaviour of ft_componentanalysis (with method runica or binica) such that the scaling is contained in the component time courses, rather than in the mixing matrix. Note that this only changes the output of the function up to a scaling of the mixing matrix and the time courses of the components. If you don't want this behaviour, or if you want to keep the behaviour consistent to the old times, you need to specify cfg.normalisesphere = 'no'. Have a good weekend, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 8 21:17:27 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Fri, 8 Jul 2011 13:17:27 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E16BDBA.2020209@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: Jörn, Jim et al. There is indeed a general problem, most likely with channel indexing, in gradiometer systems. I think the data are read correctly with the low level functions, but functions like ft_channelrepair, ft_neighbourselection and ft_neighbourplot are not accounting for the locations correctly. I have attached a picture that I think illustrates this issue reasonably well. The following code was used t[cid:593D3C1E-767D-4B26-B831-AF6BB4FFA711 at ucdenver.pvt]o generate this plot: % read in data cfg = []; cfg.dataset = 'e,rfhp1.0Hz,COH'; coh = ft_preprocessing(cfg); % get neighbors and plot cfg = []; cfg.neighbourdist = .03; cfg.neighbours = ft_neighbourselection(cfg,coh); cfg.layout = '4D248.lay'; ft_neighbourplot(cfg,coh); You can see that the channel selected is labeled A216, which is incorrect - it should be A248. It's three neighbors are also incorrect (A208, A118 and A134 should probably be A195, A228 and A247). I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing today, so perhaps it will be the same problem and the fix can be propagated to these other functions. Don On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighbors.jpg Type: image/jpg Size: 49281 bytes Desc: neighbors.jpg URL: From Don.Rojas at ucdenver.edu Sat Jul 9 00:57:44 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Fri, 8 Jul 2011 16:57:44 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> As a short follow up on this, the behavior of ft_neighbourplot is suspect only when supplying a cfg.neighbours field and plotting the result using the 2d layout file (as in the example I gave below), so this issue may not be the same as for the channel repair function. Using no layout file, the 3D plotted locations and labels appear to be correct. I can verify that the lower level functions called by ft_neighbourplot such as channelposition.m are returning the correct position and label info, but haven't had time to track the 2d plotting result down further. The neighbours returned by ft_neighbourselection also appear to be okay given a specified input distance. On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: Jörn, Jim et al. There is indeed a general problem, most likely with channel indexing, in gradiometer systems. I think the data are read correctly with the low level functions, but functions like ft_channelrepair, ft_neighbourselection and ft_neighbourplot are not accounting for the locations correctly. I have attached a picture that I think illustrates this issue reasonably well. The following code was used to generate this plot: % read in data cfg = []; cfg.dataset = 'e,rfhp1.0Hz,COH'; coh = ft_preprocessing(cfg); % get neighbors and plot cfg = []; cfg.neighbourdist = .03; cfg.neighbours = ft_neighbourselection(cfg,coh); cfg.layout = '4D248.lay'; ft_neighbourplot(cfg,coh); You can see that the channel selected is labeled A216, which is incorrect - it should be A248. It's three neighbors are also incorrect (A208, A118 and A134 should probably be A195, A228 and A247). I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing today, so perhaps it will be the same problem and the fix can be propagated to these other functions. Don On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Sat Jul 9 03:33:18 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Sat, 09 Jul 2011 03:33:18 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> Message-ID: <4E17AFDE.2090701@donders.ru.nl> Hi, SInce the new updates (which should be available in the new FT download version, see also the corresponding mail on the mailing list), I would suggest to use a user-defined neighbourstructure, verify this and then call channelrepair. E.g. try 'triangulation' as a method - it might result in a better neighbourhood representation. Also, currently neighbourselection is using config settings first before searching the data structure for sensor position information. So if you define cfg.layout, it will definitely use the layout (so, 2D coordinates) instead of 3D coordinates defined in your data. This might be suboptimal as well. Sorry for all the inconveniences. We will try to check why the problem you got causes an issue and hopefully find a more generic way to solve this. Jim, if not already done, it would be great if you followed Jan-Mathijs' suggestion to provide further information such as example data so that we can reproduce your problem and try to solve it. Don, thanks for helping out ;) Best, Jörn On 7/9/2011 12:57 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > As a short follow up on this, the behavior of ft_neighbourplot is > suspect only when supplying a cfg.neighbours field and plotting the > result using the 2d layout file (as in the example I gave below), so > this issue may not be the same as for the channel repair function. > Using no layout file, the 3D plotted locations and labels appear to be > correct. I can verify that the lower level functions called by > ft_neighbourplot such as channelposition.m are returning the correct > position and label info, but haven't had time to track the 2d plotting > result down further. The neighbours returned by ft_neighbourselection > also appear to be okay given a specified input distance. > > On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: > >> Jörn, Jim et al. >> >> There is indeed a general problem, most likely with channel indexing, >> in gradiometer systems. I think the data are read correctly with the >> low level functions, but functions like ft_channelrepair, >> ft_neighbourselection and ft_neighbourplot are not accounting for the >> locations correctly. I have attached a picture that I think >> illustrates this issue reasonably well. The following code was used >> to generate this plot: >> >> % read in data >> cfg = []; >> cfg.dataset = 'e,rfhp1.0Hz,COH'; >> coh = ft_preprocessing(cfg); >> >> % get neighbors and plot >> cfg = []; >> cfg.neighbourdist = .03; >> cfg.neighbours = ft_neighbourselection(cfg,coh); >> cfg.layout = '4D248.lay'; >> ft_neighbourplot(cfg,coh); >> >> You can see that the channel selected is labeled A216, which is >> incorrect - it should be A248. It's three neighbors are also >> incorrect (A208, A118 and A134 should probably be A195, A228 and A247). >> >> I'm guessing this is the same indexing issue for gradiometers. >> Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing >> today, so perhaps it will be the same problem and the fix can be >> propagated to these other functions. >> >> Don >> >> On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: >> >>> Dear Jim, Don and others, >>> >>> First of all, what Don suggested sounds indeed like the cause, if I >>> remember things correctly (with my limited experience). >>> >>> Anyhow, could one of you check ft_neighbourplot with the dataset and >>> the neighbourselection of choice? This allows you to see what >>> neighbours are selected for which sensors and where they lie in >>> space. If this looks fine, than the problem lies indeed in how >>> sensor position is deduced from the data structure. >>> >>> Best, >>> Jörn >>> >>> >>> On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: >>>> Dear Don, >>>> >>>> This sounds like a very likely cause of the problem. When we wrote >>>> the 4D reading code at the time, we had the 248-channel >>>> magnetometer system in mind. It could be that there are some flaws >>>> related to the handling of gradiometers. This should not only lead >>>> to (erratic) issues at the level of channelrepair, but may also >>>> cause mayhem when doing planar gradient transformation, or source >>>> reconstruction. >>>> Would you happen to >>>> 1) feel like tackling this one with me, and improve FieldTrip to >>>> deal with gradiometer systems correctly? >>>> >>>> or >>>> >>>> 2) have a small gradiometer dataset which you can send to me (e.g. >>>> through DropBox), so that I can look into it? >>>> >>>> We can further discuss this off the discussion list. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> >>>> On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: >>>> >>>>> Jim et al. >>>>> >>>>> In thinking about this further, it seems to me that it is the >>>>> indexing that is incorrect. The problem I think is specific to >>>>> gradiometer systems, which have two (or more) locations per >>>>> channel. The function appears to assume that the sensor index >>>>> based on the sens.label field (only 1 per channel) will correspond >>>>> 1 to 1 with the sens.grad field (2 locations per channel), which >>>>> is not correct. So, my guess is that for first-order gradiometer >>>>> systems, the correct index for the sensor location is 2x the index >>>>> in the sens.label field. >>>>> >>>>> So, in an example I have handy at home, the label index for >>>>> channel A234 is 107. Since I think Fieldtrip stores gradiometer >>>>> locations (by default) as: >>>>> >>>>> Chn 1 lower coil x, y z >>>>> Chn 1 upper coil x, y z >>>>> Chn 2 lower coil x, y z >>>>> Chn 2 upper coil x, y z >>>>> . >>>>> . >>>>> . >>>>> Chn N >>>>> >>>>> I think the correct position info for channel A234 would be found >>>>> in sens.grad(214,:), not sens.grad(107,:), which is what the >>>>> ft_channelrepair function chooses. So I think this is a bug in the >>>>> function specific to gradiometer systems. >>>>> >>>>> Best, >>>>> >>>>> Don >>>>> >>>>> On Jul 7, 2011, at 5:38 PM, Jim Li wrote: >>>>> >>>>>> Thank you very much for confirming the problem, Don, I appreciate >>>>>> it, :) >>>>>> Jim >>>>>> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don >>>>>> > wrote: >>>>>> >>>>>> Jim, >>>>>> >>>>>> All I can do is confirm that this issue exists for our 4D >>>>>> data as well, although we don't use the ft_channelrepair >>>>>> function. The same 4 quite distant channels (one had been >>>>>> deleted in the dataset I had handy) were chosen for repair >>>>>> when I ran this on one of our datasets (also a 248 channel 4D >>>>>> system). I agree the choice doesn't make any sense given the >>>>>> 3 cm distance you define. A quick look at the critical >>>>>> calculation in ft_channelrepair, line 109 distance = ... is >>>>>> correct given the inputs. So I wonder if the issue is with >>>>>> the actual channel indices used rather than the calculation, >>>>>> but I don't have time to track that down. All I can say is >>>>>> that for the distance you specify, channels A235, A216, A199, >>>>>> A215 would be much closer to A234 than those that are >>>>>> selected via the channel repair function. Channel A8 is in >>>>>> fact nearly 21 cm away from channel A234 in the array, based >>>>>> on examination of the data read in from Eugene Kronberg's >>>>>> pdf4D matlab object code, which I think was originally the >>>>>> basis for the FieldTrip 4D reader function. >>>>>> >>>>>> Best, >>>>>> >>>>>> Don Rojas >>>>>> >>>>>> >>>>>> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >>>>>> >>>>>>> Dear Fieldtrip developer, >>>>>>> Can anybody help me with this channel-repair issue I've been >>>>>>> having? I can provide the raw data if you need. I really >>>>>>> want to solve the problem, you know. >>>>>>> Thanks a lot, >>>>>>> Jim >>>>>>> >>>>>>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li >>>>>> > wrote: >>>>>>> >>>>>>> Hi Odelia, >>>>>>> Yes, I downloaded the latest version of Fieldtrip and >>>>>>> tried your suggestion "cfg.neighbourdist = 0.03", but >>>>>>> it still weirdly uses the far-away channels like A121 to >>>>>>> do the channel-repair for A234 (these two channels are >>>>>>> 24.1172cm apart!). Here is the detail: >>>>>>> --------------------------- >>>>>>> cfg = []; >>>>>>> cfg.dataset = 'e,rfhp0.1Hz'; >>>>>>> cfg.trialdef.eventtype = 'TRIGGER'; >>>>>>> cfg.trialdef.eventvalue = 320; >>>>>>> cfg.trialdef.prestim = 1; >>>>>>> cfg.trialdef.poststim = 1; >>>>>>> cfg = ft_definetrial(cfg); >>>>>>> cfg.blc = >>>>>>> 'yes'; % do baseline >>>>>>> correction with the complete trial >>>>>>> >>>>>>> cfg.blcwindow = [-1 0]; >>>>>>> cfg.channel = {'MEG'}; >>>>>>> raw_DATA = ft_preprocessing(cfg); >>>>>>> cfg = []; >>>>>>> cfg.badchannel = {'A234'}; >>>>>>> cfg.neighbourdist = 0.03; >>>>>>> >>>>>>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>>>>>> --------------------------------------------------------------------- >>>>>>> And here is the outcome: ----------------------------- >>>>>>> >>>>>>> the input is raw data with 248 channels and 201 trials >>>>>>> repairing channel A234 >>>>>>> using neighbour A121 >>>>>>> using neighbour A143 >>>>>>> using neighbour A173 >>>>>>> using neighbour A8 >>>>>>> >>>>>>> repairing bad channels for trial 1 >>>>>>> repairing bad channels for trial 2 >>>>>>> repairing bad channels for trial 3 >>>>>>> repairing bad channels for trial 4 >>>>>>> repairing bad channels for trial 5 >>>>>>> repairing bad channels for trial 6 >>>>>>> repairing bad channels for trial 7 >>>>>>> repairing bad channels for trial 8 >>>>>>> repairing bad channels for trial 9 >>>>>>> repairing bad channels for trial 10 >>>>>>> .... >>>>>>> ------------------------- >>>>>>> Thank you. >>>>>>> Jim >>>>>>> >>>>>>> _______________________________________________ >>>>>>> >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> ----------------------- >>>>>> Don Rojas, Ph.D. >>>>>> Associate Professor of Psychiatry >>>>>> U. of Colorado Denver Anschutz Medical Campus >>>>>> Director, UCD Magnetoencephalography Lab >>>>>> 13001 E. 17th Pl F546 >>>>>> Aurora, CO 80045 >>>>>> 303-724-4994 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> ----------------------- >>>>> Don Rojas, Ph.D. >>>>> Associate Professor of Psychiatry >>>>> U. of Colorado Denver Anschutz Medical Campus >>>>> Director, UCD Magnetoencephalography Lab >>>>> 13001 E. 17th Pl F546 >>>>> Aurora, CO 80045 >>>>> 303-724-4994 >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> Dr. J.M. (Jan-Mathijs) Schoffelen >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: 0031-24-3614793 >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail:jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web:http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Sun Jul 10 19:49:49 2011 From: megjim1 at gmail.com (Jim Li) Date: Sun, 10 Jul 2011 12:49:49 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E17AFDE.2090701@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> <4E17AFDE.2090701@donders.ru.nl> Message-ID: Hello Jörn, I sent an email to you guys a moment ago. Please let me know if you get that email or not. Thanks. Jim On Fri, Jul 8, 2011 at 8:33 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > ** > Hi, > > SInce the new updates (which should be available in the new FT download > version, see also the corresponding mail on the mailing list), I would > suggest to use a user-defined neighbourstructure, verify this and then call > channelrepair. E.g. try 'triangulation' as a method - it might result in a > better neighbourhood representation. > Also, currently neighbourselection is using config settings first before > searching the data structure for sensor position information. So if you > define cfg.layout, it will definitely use the layout (so, 2D coordinates) > instead of 3D coordinates defined in your data. This might be suboptimal as > well. > > Sorry for all the inconveniences. We will try to check why the problem you > got causes an issue and hopefully find a more generic way to solve this. > Jim, if not already done, it would be great if you followed Jan-Mathijs' > suggestion to provide further information such as example data so that we > can reproduce your problem and try to solve it. > Don, thanks for helping out ;) > > Best, > Jörn > > > > On 7/9/2011 12:57 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > As a short follow up on this, the behavior of ft_neighbourplot is suspect > only when supplying a cfg.neighbours field and plotting the result using the > 2d layout file (as in the example I gave below), so this issue may not be > the same as for the channel repair function. Using no layout file, the 3D > plotted locations and labels appear to be correct. I can verify that the > lower level functions called by ft_neighbourplot such as channelposition.m > are returning the correct position and label info, but haven't had time to > track the 2d plotting result down further. The neighbours returned by > ft_neighbourselection also appear to be okay given a specified input > distance. > > On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jörn, Jim et al. > > There is indeed a general problem, most likely with channel indexing, in > gradiometer systems. I think the data are read correctly with the low level > functions, but functions like ft_channelrepair, ft_neighbourselection and > ft_neighbourplot are not accounting for the locations correctly. I have > attached a picture that I think illustrates this issue reasonably well. The > following code was used to generate this plot: > > % read in data > cfg = []; > cfg.dataset = 'e,rfhp1.0Hz,COH'; > coh = ft_preprocessing(cfg); > > % get neighbors and plot > cfg = []; > cfg.neighbourdist = .03; > cfg.neighbours = ft_neighbourselection(cfg,coh); > cfg.layout = '4D248.lay'; > ft_neighbourplot(cfg,coh); > > You can see that the channel selected is labeled A216, which is incorrect - > it should be A248. It's three neighbors are also incorrect (A208, A118 and > A134 should probably be A195, A228 and A247). > > I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs > mentioned a fixed version of ft_channelrepair appearing today, so perhaps it > will be the same problem and the fix can be propagated to these other > functions. > > Don > > On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: > > Dear Jim, Don and others, > > First of all, what Don suggested sounds indeed like the cause, if I > remember things correctly (with my limited experience). > > Anyhow, could one of you check ft_neighbourplot with the dataset and the > neighbourselection of choice? This allows you to see what neighbours are > selected for which sensors and where they lie in space. If this looks fine, > than the problem lies indeed in how sensor position is deduced from the data > structure. > > Best, > Jörn > > > On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the 4D > reading code at the time, we had the 248-channel magnetometer system in > mind. It could be that there are some flaws related to the handling of > gradiometers. This should not only lead to (erratic) issues at the level of > channelrepair, but may also cause mayhem when doing planar gradient > transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal with > gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. through > DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that > is incorrect. The problem I think is specific to gradiometer systems, which > have two (or more) locations per channel. The function appears to assume > that the sensor index based on the sens.label field (only 1 per channel) > will correspond 1 to 1 with the sens.grad field (2 locations per channel), > which is not correct. So, my guess is that for first-order gradiometer > systems, the correct index for the sensor location is 2x the index in the > sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is > 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in > sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair > function chooses. So I think this is a bug in the function specific to > gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > > Thank you very much for confirming the problem, Don, I appreciate it, :) > > Jim > > On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, >> although we don't use the ft_channelrepair function. The same 4 quite >> distant channels (one had been deleted in the dataset I had handy) were >> chosen for repair when I ran this on one of our datasets (also a 248 channel >> 4D system). I agree the choice doesn't make any sense given the 3 cm >> distance you define. A quick look at the critical calculation in >> ft_channelrepair, line 109 distance = ... is correct given the inputs. So I >> wonder if the issue is with the actual channel indices used rather than the >> calculation, but I don't have time to track that down. All I can say is that >> for the distance you specify, channels A235, A216, A199, A215 would be much >> closer to A234 than those that are selected via the channel repair function. >> Channel A8 is in fact nearly 21 cm away from channel A234 in the array, >> based on examination of the data read in from Eugene Kronberg's pdf4D matlab >> object code, which I think was originally the basis for the FieldTrip 4D >> reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >> Dear Fieldtrip developer, >> >> Can anybody help me with this channel-repair issue I've been having? I can >> provide the raw data if you need. I really want to solve the problem, you >> know. >> >> Thanks a lot, >> >> Jim >> >> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >> >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your >>> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >>> far-away channels like A121 to do the channel-repair for A234 (these two >>> channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do >>> baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 11 15:25:00 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 11 Jul 2011 08:25:00 -0500 Subject: [FieldTrip] Group level source statistics for individual condition Message-ID: Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From leeleewebb at gmail.com Tue Jul 12 09:50:05 2011 From: leeleewebb at gmail.com (Leandra Webb) Date: Tue, 12 Jul 2011 09:50:05 +0200 Subject: [FieldTrip] Error opening socket Message-ID: Hi all I am trying to use FieldTrip in order to do Matlab processing on BCI2000 data and have tried to use the code at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_bufferin order to read data. However, whenever I run this code I get the error Error using ==> buffer ERROR: failed to create socket (1) I saw that a few people have had similar problems but it doesn't seem that this has been solved yet? Leandra -------------- next part -------------- An HTML attachment was scrubbed... URL: From leeleewebb at gmail.com Tue Jul 12 10:53:19 2011 From: leeleewebb at gmail.com (Leandra Webb) Date: Tue, 12 Jul 2011 10:53:19 +0200 Subject: [FieldTrip] Error opening socket Message-ID: My previous question can be ignored - I managed to figure this out. I wasn't running FieldTripBuffer.exe which was the problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 12:38:53 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 10:38:53 +0000 Subject: [FieldTrip] Undefined variable? Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 13 14:17:57 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 13 Jul 2011 14:17:57 +0200 Subject: [FieldTrip] Undefined variable? In-Reply-To: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> Message-ID: <4E1D8CF5.5040206@donders.ru.nl> Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: > > Hi, > > I haven't got much experience with Fieldtrip, or with Matlab, > > so I apologise if this is a stupid question. > > I've downloaded the latest version, and now my code crashes. > > It ran without problems before. > > The offending line is in ft_senslabel.m : > > if size(find(meg_zaxis+1==i),2) > > But 'meg_zaxis' doesn't seem to be defined anywhere. > > I've searched all code, but can only find 14 instances of > > precisely this line, in ft_senslabel.m and planarchannelset.m > > Am I missing something? > > Maarten > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 14:47:03 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 14:47:03 +0200 Subject: [FieldTrip] source power units changed? Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 14:57:23 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 14:57:23 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> sorry I meant bigger not smaller ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de Gesendet: Mittwoch, 13. Juli 2011 14:47 An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] source power units changed? Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 14:58:52 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 12:58:52 +0000 Subject: [FieldTrip] Undefined variable? In-Reply-To: <4E1D8CF5.5040206@donders.ru.nl> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> Hi Jörn, Here's the error message: ??? Undefined function or variable 'meg_zaxis'. Error in ==> fileio/private/ft_senslabel at 2845 if size(find(meg_zaxis+1==i),2) Error in ==> fileio/private/ft_senstype at 241 elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), sens.label)) > 0.8) Error in ==> ft_chantype at 70 if ft_senstype(input, 'neuromag') Error in ==> ft_read_event at 1048 analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); Thanks, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 13:18 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jul 13 15:12:35 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 13 Jul 2011 15:12:35 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> Message-ID: <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> Hi Jan, There has been a change related to the scaling of the leadfields when using the singleshell as a volume conductor model. This has been incorporated somewhere in the beginning of 2011, and was communicated to the list. There should be a message related to this in the archive. Best, Jan-M On Jul 13, 2011, at 2:57 PM, wrote: > sorry I meant bigger not smaller > > Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de > Gesendet: Mittwoch, 13. Juli 2011 14:47 > An: fieldtrip at donders.ru.nl > Betreff: [FieldTrip] source power units changed? > > Hi, > > I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. > > Best, > jan > > Jan Hirschmann > MSc. Neuroscience > Insititute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Duesseldorf > Universitaetsstr. 1 > 40225 Duesseldorf > Tel: 0049 - (0)211 - 81 - 18415 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 15:41:37 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 15:41:37 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD><72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFEDC4@Mail2-UKD.VMED.UKD> ah okay, I think I vaguely remember now that you say it. thanks for reminding. best, jan ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen Gesendet: Mittwoch, 13. Juli 2011 15:13 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] source power units changed? Hi Jan, There has been a change related to the scaling of the leadfields when using the singleshell as a volume conductor model. This has been incorporated somewhere in the beginning of 2011, and was communicated to the list. There should be a message related to this in the archive. Best, Jan-M On Jul 13, 2011, at 2:57 PM, wrote: sorry I meant bigger not smaller ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de Gesendet: Mittwoch, 13. Juli 2011 14:47 An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] source power units changed? Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 13 15:48:56 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 13 Jul 2011 15:48:56 +0200 Subject: [FieldTrip] Undefined variable? In-Reply-To: <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> Message-ID: <4E1DA248.6000705@donders.ru.nl> Hi Maarten, I just checked the ftp-version from July 6, and there meg_zaxis can indeed be found. Did you download fieldtrip-20110706? If you download fieldtrip-20110713, this error should not be there anymore, because all the labels are hard-coded now! Best, Jörn On 7/13/2011 2:58 PM, Maarten van-Casteren wrote: > > Hi Jörn, > > Here's the error message: > > ??? Undefined function or variable 'meg_zaxis'. > > Error in ==> fileio/private/ft_senslabel at 2845 > > if size(find(meg_zaxis+1==i),2) > > Error in ==> fileio/private/ft_senstype at 241 > > elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), > sens.label)) > 0.8) > > Error in ==> ft_chantype at 70 > > if ft_senstype(input, 'neuromag') > > Error in ==> ft_read_event at 1048 > > analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); > > Thanks, > > Maarten > > *From:*fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] *On Behalf Of *"Jörn M. Horschig" > *Sent:* 13 July 2011 13:18 > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] Undefined variable? > > Hi Maarten, > > I searched my whole FT directory and could not find a single line > containing meg_zaxis. I also manually checked planachannelset.m and > ft_senslabel.m and couldn't find the corresponding if-statement. Could > you copy the error message(s) from Matlab and send them over? > > Best, > Jörn > > On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: > > Hi, > > I haven't got much experience with Fieldtrip, or with Matlab, > > so I apologise if this is a stupid question. > > I've downloaded the latest version, and now my code crashes. > > It ran without problems before. > > The offending line is in ft_senslabel.m : > > if size(find(meg_zaxis+1==i),2) > > But 'meg_zaxis' doesn't seem to be defined anywhere. > > I've searched all code, but can only find 14 instances of > > precisely this line, in ft_senslabel.m and planarchannelset.m > > Am I missing something? > > Maarten > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 16:42:48 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 14:42:48 +0000 Subject: [FieldTrip] Undefined variable? In-Reply-To: <4E1DA248.6000705@donders.ru.nl> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> <4E1DA248.6000705@donders.ru.nl> Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EBD0@WSR21.mrc-cbsu.local> Hi Jörn Excellent, that took care of it. Everything back to normal now. Thanks very much, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 14:49 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I just checked the ftp-version from July 6, and there meg_zaxis can indeed be found. Did you download fieldtrip-20110706? If you download fieldtrip-20110713, this error should not be there anymore, because all the labels are hard-coded now! Best, Jörn On 7/13/2011 2:58 PM, Maarten van-Casteren wrote: Hi Jörn, Here's the error message: ??? Undefined function or variable 'meg_zaxis'. Error in ==> fileio/private/ft_senslabel at 2845 if size(find(meg_zaxis+1==i),2) Error in ==> fileio/private/ft_senstype at 241 elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), sens.label)) > 0.8) Error in ==> ft_chantype at 70 if ft_senstype(input, 'neuromag') Error in ==> ft_read_event at 1048 analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); Thanks, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 13:18 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 14 15:49:31 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 14 Jul 2011 15:49:31 +0200 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser Message-ID: <4E1EF3EB.4080203@donders.ru.nl> Dear Community, During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: cfg.viewmode = 'component'; cfg.layout = 'XXX.lay'; ft_databrowser(cfg, data); In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. With best regards, on behalf of the FT team, Jörn PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From Antony.Passaro at uth.tmc.edu Fri Jul 15 19:04:57 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Fri, 15 Jul 2011 12:04:57 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 15 21:04:36 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 15 Jul 2011 13:04:36 -0600 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 14:55:08 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 07:55:08 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Dear Don, Thank you for replying to my issue regarding group statistics. I apologize for not elaborating on what I did at the subject level...for each subject I compared the source estimation (dics beamformer) of the pre-stimulus to the post-stimulus using sourcestatistics for each of the two conditions. I then compared the two conditions directly across all subjects for a group level comparison using sourcestatistics again. I would like to also look at the statistically significant activation associated with each condition compared to baseline across the entire group. The solution that I came up with involves appending all trials for all subjects together into one large pseudo-subject and performing the sourcestatistics. I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 18 15:10:00 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 18 Jul 2011 15:10:00 +0200 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don > Sent: Friday, July 15, 2011 2:05 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Dear Tony, > > You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. > > Best, > > Don > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: > > > Hi everyone, > > I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. > > Any help would be much appreciated. > > Thanks, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D > Sent: Monday, July 11, 2011 8:25 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Group level source statistics for individual condition > > Hi all, > > I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? > > Thank you for your help, > -Tony > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 15:49:02 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 08:49:02 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Message-ID: Hi Jan-Mathijs, I understand the 2-step approach and I typically compute the t-statistic per subject of baseline vs activation for both conditions before performing the second-level statistic comparing conditions, but I run into problems when I want to perform the second-level statistic of baseline vs activation. I'm not sure how that is computed. I apologize for not clarifying earlier, but I typically use sourceinterpolate prior to performing the volumenormalise function and yet I still receive an error from sourcestatistics if I try to send it the output of the volumenormalise function. Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject's native space prior to normalization. If I follow the steps outlined in that link then wouldn't I be performing the source estimation using a normalized grid based on the subject's mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:10 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 18 15:59:20 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 18 Jul 2011 15:59:20 +0200 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Message-ID: <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> Hi Tony, > > Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject’s native space prior to normalization. If I follow the steps outlined in that link then wouldn’t I be performing the source estimation using a normalized grid based on the subject’s mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? The idea is to still use subject specific information (i.e. the anatomical information per subject to build a volume conduction model of the head). Yet, for the definition of the single subject dipole grids, we will use a set of subject specific coordinates, which (after spatial normalisation) would yield the same coordinates for all subjects, thus bypassing the need to interpolate the functional data onto a high spatial resolution 3D grid. The trick is to 'unwarp' a set of canonical source coordinates into the subject specific head space. In the second level step, ft_sourcestatistics can be tricked into accepting multiple subject data (each with unique source positions, as per their individual anatomy), if the source.pos per subject would be replaced with the set of canonical positions (which would be obtained after the spatial normalization). Best, Jan-Mathijs > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen > Sent: Monday, July 18, 2011 8:10 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Hi Tony, > > We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. > Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. > > Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. > > Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid > > Best, Jan-Mathijs > > > I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don > Sent: Friday, July 15, 2011 2:05 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Dear Tony, > > You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. > > Best, > > Don > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: > > > > Hi everyone, > > I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. > > Any help would be much appreciated. > > Thanks, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D > Sent: Monday, July 11, 2011 8:25 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Group level source statistics for individual condition > > Hi all, > > I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? > > Thank you for your help, > -Tony > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 16:28:38 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 09:28:38 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> Message-ID: Hi Jan-Mathijs, I see, this makes much more sense to me. So the anatomical information is preserved in the conduction model while the dipole grids are normalized, that makes sense. I'll give it a try and see what I get. As for generating the second-level (group) statistics comparing baseline to activation, what would you recommend assuming I would like to submit t-statistics from individual subjects (comparing baseline to activation)? Thank you so much for your help, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:59 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject's native space prior to normalization. If I follow the steps outlined in that link then wouldn't I be performing the source estimation using a normalized grid based on the subject's mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? The idea is to still use subject specific information (i.e. the anatomical information per subject to build a volume conduction model of the head). Yet, for the definition of the single subject dipole grids, we will use a set of subject specific coordinates, which (after spatial normalisation) would yield the same coordinates for all subjects, thus bypassing the need to interpolate the functional data onto a high spatial resolution 3D grid. The trick is to 'unwarp' a set of canonical source coordinates into the subject specific head space. In the second level step, ft_sourcestatistics can be tricked into accepting multiple subject data (each with unique source positions, as per their individual anatomy), if the source.pos per subject would be replaced with the set of canonical positions (which would be obtained after the spatial normalization). Best, Jan-Mathijs Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:10 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lieneke.janssen at student.ru.nl Mon Jul 18 17:28:48 2011 From: lieneke.janssen at student.ru.nl (Janssen, L.K. (Lieneke)) Date: Mon, 18 Jul 2011 17:28:48 +0200 (CEST) Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <1541462293.860888.1311002455687.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> Hello again dear fieldtrippers, Last week I wanted to run my coherence script again, but unfortunately it didn't work with me anymore. I hadn't changed anything in either the input or settings, so it's a mystery to me. In addition, I have two other questions related to ft_connectivityanalysis. 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. Did something change here? This brings me to point 2. 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! Thanks in advance :). Best, Lieneke From ekanal at cmu.edu Mon Jul 18 18:00:02 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Mon, 18 Jul 2011 12:00:02 -0400 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser In-Reply-To: <4E1EF3EB.4080203@donders.ru.nl> References: <4E1EF3EB.4080203@donders.ru.nl> Message-ID: It looks like there's some added functionality in the databrowser; I can select visually select subcomponents of signals in time using the mouse, and the background changes color. Have there been any changes to how the function works? Is there documentation on the wiki about the usage of the new component browser? Thanks - Elli On Jul 14, 2011, at 9:49 AM, Jörn M. Horschig wrote: > Dear Community, > > During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. > > Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: > cfg.viewmode = 'component'; > cfg.layout = 'XXX.lay'; > ft_databrowser(cfg, data); > > In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. > > With best regards, on behalf of the FT team, > Jörn > > PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Tue Jul 19 08:50:21 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 19 Jul 2011 08:50:21 +0200 Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> References: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <63A0E490-B5C3-483D-B2EC-68B19A2550D7@donders.ru.nl> Hi Lieneke, Sorry that your scripts broke. I will look into it. > 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. > > -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. > -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. > > Did something change here? This brings me to point 2. Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. > The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. > 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes'). > I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! > > Thanks in advance :). > > Best, > Lieneke Best, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 19 09:01:34 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 19 Jul 2011 09:01:34 +0200 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser In-Reply-To: References: <4E1EF3EB.4080203@donders.ru.nl> Message-ID: <4E252BCE.8000405@donders.ru.nl> Hi Elli, The functionality you talk about has always been in the databrowser. As far as I know it was initially added to check for and mark sleep spindles, but I use it for marking artifacts. The only thing which is kinda new is that this also works for components now (this does not mean for markin components, but when using the databrowser as a componentbrowser). Also, you can run artifact detection methods beforehands, and add the corresponding artfctdef to the config. The databrowser will then mark found artifacts in a different color per type of artifact (which is defined by the subfield of 'artfctdef'). On the wiki, the only documentation so far is the link I sent in the original mail. But, I see that it might be a wise idea to have a tutorial about using the databrowser (because there is more you can do with it). I'll let you know. Best, Jörn On 7/18/2011 6:00 PM, Kanal Eliezer wrote: > It looks like there's some added functionality in the databrowser; I can select visually select subcomponents of signals in time using the mouse, and the background changes color. Have there been any changes to how the function works? Is there documentation on the wiki about the usage of the new component browser? Thanks - > > Elli > > > On Jul 14, 2011, at 9:49 AM, Jörn M. Horschig wrote: > >> Dear Community, >> >> During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. >> >> Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: >> cfg.viewmode = 'component'; >> cfg.layout = 'XXX.lay'; >> ft_databrowser(cfg, data); >> >> In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. >> >> With best regards, on behalf of the FT team, >> Jörn >> >> PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From luoj at mail.nih.gov Tue Jul 19 23:08:00 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Tue, 19 Jul 2011 17:08:00 -0400 Subject: [FieldTrip] weight table for 4D data Message-ID: Hi, Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? Many thanks! Jessie From eamadei at gatech.edu Wed Jul 20 00:05:22 2011 From: eamadei at gatech.edu (Elizabeth Amadei) Date: Tue, 19 Jul 2011 18:05:22 -0400 (EDT) Subject: [FieldTrip] Question about corticomuscular coherence tutorial Message-ID: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Hi all, I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: ??? Error using ==> ft_selectdata at 535 selection of or averaging across channels in the presence of both label and labelcmb is not possible Error in ==> ft_connectivityanalysis at 157 data = ft_selectdata(data, 'channel', unique(selchan)); Has anyone come across this error before and know how to resolve it? Thank you for your help. From jan.schoffelen at donders.ru.nl Wed Jul 20 08:17:18 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 08:17:18 +0200 Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> References: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Message-ID: <088E1715-8A24-489D-9381-C12AFF1731D0@donders.ru.nl> Hi, We noticed this behavior in another context. It is a bug. We we look into it and fix it. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 08:29:51 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 08:29:51 +0200 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: Message-ID: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> Hi Jessie, Please have a look here: http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header Best wishes, Jan-Mathijs On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? > > Many thanks! > > Jessie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 11:16:38 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 11:16:38 +0200 Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> References: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Message-ID: <58F07078-301D-4418-9259-6A79D9CDE327@donders.ru.nl> Hi Elizabeth, I fixed the bug you refer to. The code should be available on the ftp-server and on google-code tonight. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 11:18:09 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 11:18:09 +0200 Subject: [FieldTrip] ft_connectivityanalysis References: <63A0E490-B5C3-483D-B2EC-68B19A2550D7@donders.ru.nl> Message-ID: Hi Lieneke, I fixed point 1. The code should be available tonight on the ftp-server and on google code. Best, Jan-Mathijs Begin forwarded message: > From: jan-mathijs schoffelen > Date: July 19, 2011 8:50:21 AM GMT+02:00 > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] ft_connectivityanalysis > > Hi Lieneke, > > Sorry that your scripts broke. I will look into it. > >> 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. >> >> -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. >> -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. >> >> Did something change here? This brings me to point 2. > > > Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: > > http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > >> 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. >> The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? > > Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. > >> 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). > > Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes'). > >> I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! >> >> Thanks in advance :). >> >> Best, >> Lieneke > > Best, > > Jan-Mathijs > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Wed Jul 20 11:22:26 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Wed, 20 Jul 2011 12:22:26 +0300 Subject: [FieldTrip] weight table for 4D data In-Reply-To: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> Message-ID: Hi with 4D software you can write in a terminal print_table . I use : print_table -posted -WP both > wts.txt this prints both analog and digital as one set of weights yuval On 20 July 2011 09:29, jan-mathijs schoffelen wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > > > Hi, > > > > Does anyone know where the weight table for 4D datasets (from 248 channel > 4D machine) is stored and how to extract it from the dataset? > > > > Many thanks! > > > > Jessie > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lieneke.janssen at student.ru.nl Wed Jul 20 13:03:57 2011 From: lieneke.janssen at student.ru.nl (Janssen, L.K. (Lieneke)) Date: Wed, 20 Jul 2011 13:03:57 +0200 (CEST) Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <1233124647.873768.1311159476345.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <474296708.873799.1311159837753.JavaMail.root@monoceros.zimbra.ru.nl> Hey Jan-Mathijs, Great, thanks a lot. I was trying your other suggestion, but then I got ill... will keep trying though :). The 2nd point: "What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb." --> I was just trying some things with these functions so I did give it the cohspctrm from freqanalysis (with powandcsd output) as input. Then I got exactly the same error as with ft_connectivityanalysis: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. ...coming from ft_selectchannels. What I find weird though is that for ft_descriptives this error only appears when I choose a selection of channels, not if it takes all channels. For ft_connectivityanalysis the error appears in both cases: when I give it a selection of channel pairs as well as when it should do all channels. I might have done something wrong or not very careful here though, because I was trying lots of things last week when I encountered the problem. I can't look back unfortunately to what I've done exactly. I wanted to figure out my previous uncarefulness yesterday but didn't get to that. The same goes for point 3.. I should try again. But what I did last week: I put in cfg.jackknife = 'yes' + had data with kept trials, but I didn't get a jackknife output there. From the code it seemed either not to actually calculate this measure or not to put it in the output... Best, Lieneke From luoj at mail.nih.gov Wed Jul 20 15:01:15 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Wed, 20 Jul 2011 09:01:15 -0400 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, Message-ID: Thank you Jan-Mathijs and Yuval for replying! Unfortunately I don't have the 4D software. Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? Many thanks, Jessie ________________________________________ From: Yuval Harpaz [yuvharpaz at gmail.com] Sent: Wednesday, July 20, 2011 5:22 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] weight table for 4D data Hi with 4D software you can write in a terminal print_table . I use : print_table -posted -WP both > wts.txt this prints both analog and digital as one set of weights yuval On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: Hi Jessie, Please have a look here: http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header Best wishes, Jan-Mathijs On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? > > Many thanks! > > Jessie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From jan.schoffelen at donders.ru.nl Wed Jul 20 16:06:00 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 16:06:00 +0200 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, Message-ID: <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> Hi Jessie, I did not suggest to use the 4D software. I pointed to some documentation which probably was not clear enough. You can look at the hdr.grad.tra matrix (after reading in the header using fieldtrip, and specifying the raw data file, so no .m4d or .xyz nonsense here). if you do: figure;imagesc(hdr.grad.tra), you'll see a matrix which essentially has the colourful bits at the far right side of it. These correspond to the weights. If you have a gradiometer system, this probably corresponds to hdr.grad.tra(1:248,597:end), for a magnetometer system it will be hdr.grad.tra(1:248,249:end). The lower right part of the tra matrix hdr.grad.tra(249:end, 249 (or 597):end) allows you to decode which reference coils contribute to which reference channel. Best, Jan-Mathijs On Jul 20, 2011, at 3:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thank you Jan-Mathijs and Yuval for replying! > > Unfortunately I don't have the 4D software. > Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? > > Many thanks, > Jessie > ________________________________________ > From: Yuval Harpaz [yuvharpaz at gmail.com] > Sent: Wednesday, July 20, 2011 5:22 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] weight table for 4D data > > Hi > with 4D software you can write in a terminal print_table . I use : > print_table -posted -WP both > wts.txt > this prints both analog and digital as one set of weights > yuval > On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >> Hi, >> >> Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? >> >> Many thanks! >> >> Jessie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From luoj at mail.nih.gov Wed Jul 20 16:34:49 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Wed, 20 Jul 2011 10:34:49 -0400 Subject: [FieldTrip] weight table for 4D data In-Reply-To: <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, , <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> Message-ID: Hi Jan-mathijs, Thanks so much for your quick reply! I'll test your instructions out. Jessie ________________________________________ From: jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Wednesday, July 20, 2011 10:06 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] weight table for 4D data Hi Jessie, I did not suggest to use the 4D software. I pointed to some documentation which probably was not clear enough. You can look at the hdr.grad.tra matrix (after reading in the header using fieldtrip, and specifying the raw data file, so no .m4d or .xyz nonsense here). if you do: figure;imagesc(hdr.grad.tra), you'll see a matrix which essentially has the colourful bits at the far right side of it. These correspond to the weights. If you have a gradiometer system, this probably corresponds to hdr.grad.tra(1:248,597:end), for a magnetometer system it will be hdr.grad.tra(1:248,249:end). The lower right part of the tra matrix hdr.grad.tra(249:end, 249 (or 597):end) allows you to decode which reference coils contribute to which reference channel. Best, Jan-Mathijs On Jul 20, 2011, at 3:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thank you Jan-Mathijs and Yuval for replying! > > Unfortunately I don't have the 4D software. > Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? > > Many thanks, > Jessie > ________________________________________ > From: Yuval Harpaz [yuvharpaz at gmail.com] > Sent: Wednesday, July 20, 2011 5:22 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] weight table for 4D data > > Hi > with 4D software you can write in a terminal print_table . I use : > print_table -posted -WP both > wts.txt > this prints both analog and digital as one set of weights > yuval > On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >> Hi, >> >> Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? >> >> Many thanks! >> >> Jessie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eamadei at gatech.edu Wed Jul 20 17:04:11 2011 From: eamadei at gatech.edu (Elizabeth Amadei) Date: Wed, 20 Jul 2011 11:04:11 -0400 (EDT) Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <58F07078-301D-4418-9259-6A79D9CDE327@donders.ru.nl> Message-ID: <1445090092.153234.1311174251813.JavaMail.root@mail8.gatech.edu> Hi Jan-Mathijs, Thank you for your quick response! I look forward to trying out the new code. Best, Elizabeth ----- Original Message ----- From: "jan-mathijs schoffelen" To: "Email discussion list for the FieldTrip project" Sent: Wednesday, July 20, 2011 5:16:38 AM Subject: Re: [FieldTrip] Question about corticomuscular coherence tutorial Hi Elizabeth, I fixed the bug you refer to. The code should be available on the ftp-server and on google-code tonight. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Antony.Passaro at uth.tmc.edu Wed Jul 20 18:36:33 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Wed, 20 Jul 2011 11:36:33 -0500 Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment Message-ID: Hi all, After installing the latest version of Fieldtrip, I tried to make a template grid using identical code from the example from the Fieldtrip website and once I run the ft_volumesegment function, Matlab quickly crashes. I am running Matlab version 7.8 on a 64-bit linux computer. The system error says it detected a floating point exception and that the error was detected while a MEX-file was running. Has anyone else come across this issue? Thank you, -Tony From Antony.Passaro at uth.tmc.edu Wed Jul 20 23:00:45 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Wed, 20 Jul 2011 16:00:45 -0500 Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment In-Reply-To: References: Message-ID: I apologize for not consulting the Fieldtrip website sooner. A search for "mex" turned up both an FAQ (unfortunately did not resolve the issue) and a development about MEX files where I found the following command which resolved the issue: ft_compile_mex(true) -Tony -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Wednesday, July 20, 2011 11:37 AM To: Email discussion list for the FieldTrip project Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment Hi all, After installing the latest version of Fieldtrip, I tried to make a template grid using identical code from the example from the Fieldtrip website and once I run the ft_volumesegment function, Matlab quickly crashes. I am running Matlab version 7.8 on a 64-bit linux computer. The system error says it detected a floating point exception and that the error was detected while a MEX-file was running. Has anyone else come across this issue? Thank you, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Tim.Bardouille at nrc-cnrc.gc.ca Thu Jul 21 15:08:10 2011 From: Tim.Bardouille at nrc-cnrc.gc.ca (Bardouille, Tim) Date: Thu, 21 Jul 2011 09:08:10 -0400 Subject: [FieldTrip] Postdoc/Research Associate position in Halifax, NS, Canada Message-ID: Hello all, Please see the attached ad for a post-doctoral fellowship at the Laboratory for Clinical MEG in Halifax, Nova Scotia, Canada. Ours is a clinical research lab operated by the National Research Council - Institute for Biodiagnostics and embedded in Atlantic Canada's largest health centre. We look forward to hearing from interested candidates. Best regards, Tim Bardouille. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Halifax_postDoc_position.pdf Type: application/pdf Size: 158148 bytes Desc: Halifax_postDoc_position.pdf URL: From luoj at mail.nih.gov Thu Jul 21 15:48:47 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 21 Jul 2011 09:48:47 -0400 Subject: [FieldTrip] LCMV and SAM Message-ID: Hi, Regarding source modelling, I noticed there are options of LCMV and SAM in fieldtrip. Would anyone provide details on the differences between the two? Thanks, Jessie From yuvharpaz at gmail.com Thu Jul 21 21:14:16 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Thu, 21 Jul 2011 22:14:16 +0300 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: Message-ID: Dear Jessie As far as I know only LCMV is applicable in current versions of fieldtrip. The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated. SAM can be run with executable files based on C source, written by Dr. Robinson. not via matlab or fieldtrip. yuval On 21 July 2011 16:48, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > Regarding source modelling, I noticed there are options of LCMV and SAM in > fieldtrip. Would anyone provide details on the differences between the two? > > Thanks, > Jessie > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From luoj at mail.nih.gov Thu Jul 21 21:56:46 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 21 Jul 2011 15:56:46 -0400 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: , Message-ID: Hi Yuval, Thank you for replying! ----------------------- The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated ------------------------ I've like to learn more about this and pros and cons of them if possible. Jessie ________________________________________ From: Yuval Harpaz [yuvharpaz at gmail.com] Sent: Thursday, July 21, 2011 3:14 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] LCMV and SAM Dear Jessie As far as I know only LCMV is applicable in current versions of fieldtrip. The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated. SAM can be run with executable files based on C source, written by Dr. Robinson. not via matlab or fieldtrip. yuval On 21 July 2011 16:48, Luo, Jessie (NIH/NIMH) [V] > wrote: Hi, Regarding source modelling, I noticed there are options of LCMV and SAM in fieldtrip. Would anyone provide details on the differences between the two? Thanks, Jessie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From mjutras at emory.edu Thu Jul 21 22:00:42 2011 From: mjutras at emory.edu (Jutras, Mike) Date: Thu, 21 Jul 2011 20:00:42 +0000 Subject: [FieldTrip] ft_freqstatistics error Message-ID: Hello, I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: % data variable 1 cnd1_1 = label: {'AD01'} freq: [1x15 double] time: [1x126 double] dimord: 'subj_chan_freq_time' powspctrm: [4-D double] cfg: [1x1 struct] >> size(cnd1_1.powspctrm) ans = 114 1 15 126 % data variable 2 cnd2_1 = label: {'AD01'} freq: [1x15 double] time: [1x126 double] dimord: 'subj_chan_freq_time' powspctrm: [4-D double] cfg: [1x1 struct] >> size(cnd2_1.powspctrm) ans = 114 1 15 126 % code for permutation test cfg cfg = []; cfg.channel = 'AD01'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'no'; cfg.avgovertime = 'no'; cfg.latency = 'all'; cfg.frequency = 'all'; %cfg.frequency = 'all'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; dum = ones(1, size(cnd1_1.powspctrm,1)); cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.alpha = 0.05; cfg.tail = 0; cfg.ivar = 1; cfg.uvar = 2; cfg.feedback = 'text'; cfg.clusterstatistic = 'maxsum'; cfg.clusterthreshold = 'parametric'; %cfg.clusterthreshold = 'nonparametric_common'; cfg.clusteralpha = 0.05; % clustercritval original value: 1.96 cfg.clustercritval = 1.96; cfg.clustertail = 0; cfg.neighbours{1}.label = 'AD01'; cfg.neighbours{1}.neighblabel = {}; >> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); computing statistic over the frequency range [2.058 29.950] computing statistic over the time range [-1.000 0.250] selection powspctrm along dimension 2 selection powspctrm along dimension 3 selection powspctrm along dimension 4 selection powspctrm along dimension 2 selection powspctrm along dimension 3 selection powspctrm along dimension 4 ??? Error using ==> ft_freqstatistics at 248 the number of observations in the design does not match the number of observations in the data Thanks for any advice, Michael -- Michael Jutras, Ph.D. Postdoctoral fellow Emory University, Yerkes National Primate Research Center 404-712-9435 ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). From jm.horschig at donders.ru.nl Thu Jul 21 22:33:20 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 21 Jul 2011 22:33:20 +0200 Subject: [FieldTrip] ft_freqstatistics error In-Reply-To: References: Message-ID: <4E288D10.3060500@donders.ru.nl> Hi Mike, I think that the problem is caused by the multidimensionality of your freq-data. If you want to cover a whole frequency range, you cannot use 15 different bins but have to work with multitapers instead and utilize how they smooth the frequencies, e.g. if you are interested in gamma-band activity between 60 and 120Hz, you use 90Hz (cfg.foi) and 30Hz smoothing (cfg.tapsmofrq). I think this is also explained in one of the tutorials on the FT wiki, so you might want to have a look there. Best, Jörn On 7/21/2011 10:00 PM, Jutras, Mike wrote: > Hello, > > I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: > > % data variable 1 > cnd1_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd1_1.powspctrm) > ans = > 114 1 15 126 > > % data variable 2 > cnd2_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd2_1.powspctrm) > ans = > 114 1 15 126 > > % code for permutation test cfg > cfg = []; > cfg.channel = 'AD01'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgovertime = 'no'; > > cfg.latency = 'all'; > cfg.frequency = 'all'; > %cfg.frequency = 'all'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > > dum = ones(1, size(cnd1_1.powspctrm,1)); > cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.ivar = 1; > cfg.uvar = 2; > cfg.feedback = 'text'; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'parametric'; > %cfg.clusterthreshold = 'nonparametric_common'; > cfg.clusteralpha = 0.05; > % clustercritval original value: 1.96 > cfg.clustercritval = 1.96; > cfg.clustertail = 0; > cfg.neighbours{1}.label = 'AD01'; > cfg.neighbours{1}.neighblabel = {}; > > >>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); > computing statistic over the frequency range [2.058 29.950] > computing statistic over the time range [-1.000 0.250] > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > ??? Error using ==> ft_freqstatistics at 248 > the number of observations in the design does not match the number of observations in the data > > Thanks for any advice, > Michael > -- > Michael Jutras, Ph.D. > Postdoctoral fellow > Emory University, Yerkes National Primate Research Center > 404-712-9435 > > > > > ________________________________ > > This e-mail message (including any attachments) is for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution > or copying of this message (including any attachments) is strictly > prohibited. > > If you have received this message in error, please contact > the sender by reply e-mail message and destroy all copies of the > original message (including attachments). > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mjutras at emory.edu Thu Jul 21 23:04:01 2011 From: mjutras at emory.edu (Jutras, Mike) Date: Thu, 21 Jul 2011 21:04:01 +0000 Subject: [FieldTrip] ft_freqstatistics error In-Reply-To: <4E288D10.3060500@donders.ru.nl> References: <4E288D10.3060500@donders.ru.nl> Message-ID: Jörn, I found the problem (which your answer led me to): the frequency bins did not match up between the two data structures, but after fixing them so they matched, the function ran without error. I had spaced the frequency bins far enough apart to account for the smoothing due to the multitapering, but I wanted to run the permutation test with multiple bin centers as I had done previously with an older version of freqstatistics. Thanks for your help! -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: Thursday, July 21, 2011 4:33 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_freqstatistics error Hi Mike, I think that the problem is caused by the multidimensionality of your freq-data. If you want to cover a whole frequency range, you cannot use 15 different bins but have to work with multitapers instead and utilize how they smooth the frequencies, e.g. if you are interested in gamma-band activity between 60 and 120Hz, you use 90Hz (cfg.foi) and 30Hz smoothing (cfg.tapsmofrq). I think this is also explained in one of the tutorials on the FT wiki, so you might want to have a look there. Best, Jörn On 7/21/2011 10:00 PM, Jutras, Mike wrote: > Hello, > > I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: > > % data variable 1 > cnd1_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd1_1.powspctrm) > ans = > 114 1 15 126 > > % data variable 2 > cnd2_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd2_1.powspctrm) > ans = > 114 1 15 126 > > % code for permutation test cfg > cfg = []; > cfg.channel = 'AD01'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgovertime = 'no'; > > cfg.latency = 'all'; > cfg.frequency = 'all'; > %cfg.frequency = 'all'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > > dum = ones(1, size(cnd1_1.powspctrm,1)); > cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.ivar = 1; > cfg.uvar = 2; > cfg.feedback = 'text'; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'parametric'; > %cfg.clusterthreshold = 'nonparametric_common'; > cfg.clusteralpha = 0.05; > % clustercritval original value: 1.96 > cfg.clustercritval = 1.96; > cfg.clustertail = 0; > cfg.neighbours{1}.label = 'AD01'; > cfg.neighbours{1}.neighblabel = {}; > > >>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); > computing statistic over the frequency range [2.058 29.950] > computing statistic over the time range [-1.000 0.250] > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > ??? Error using ==> ft_freqstatistics at 248 > the number of observations in the design does not match the number of observations in the data > > Thanks for any advice, > Michael > -- > Michael Jutras, Ph.D. > Postdoctoral fellow > Emory University, Yerkes National Primate Research Center > 404-712-9435 > > > > > ________________________________ > > This e-mail message (including any attachments) is for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution > or copying of this message (including any attachments) is strictly > prohibited. > > If you have received this message in error, please contact > the sender by reply e-mail message and destroy all copies of the > original message (including attachments). > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jedmeltzer at yahoo.com Thu Jul 21 23:21:21 2011 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Thu, 21 Jul 2011 14:21:21 -0700 (PDT) Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: Message-ID: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> Without getting into software implementation questions (basically fieldtrip has LCMV, and CTF software has SAM) I think the main difference is that LCMV is a "vector" beamformer.  At any given location, it estimates a virtual signal in all three spatial dimensions (or only two if you constrain it to tangential sources, which makes sense for MEG but not for EEG). So you have three virtual signals at each point, and how you combine them is up to you - take the biggest one, or the magnitude of the whole vector, or any other combination.  I'm not sure what the default for power mapping is in fieldtrip (I have mainly used SAM for beamforming so far, but I use fieldtrip for other purposes). SAM has an extra step involved where it "optimizes" a dipole orientation at each location to maximize the signal, so you only get one signal at each location.  In this sense it's nonlinear.  The calculation is more complex due to the optimization, but the result is simpler to deal with.  This is called a "scalar" beamformer.  For pros and cons, you might look up papers on vector vs. scalar beamformers in general.  Here's one recent one that I saw that compared them and has further references: Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of hippocampal activity using beamformers with MEG: a detailed investigation using simulations and empirical data." Hum Brain Mapp 32(5): 812-827. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Fri Jul 22 08:26:04 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 22 Jul 2011 08:26:04 +0200 Subject: [FieldTrip] LCMV and SAM In-Reply-To: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> References: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> Message-ID: Hi all, As of June 6, 2011 'beamformer_sam' was put back into the Fieldtrip toolbox (after it had gone missing for some time), although, a warning that it has been awhile since the code was tested. I think there are other differences than just the orientation selection (between the original-CTF SAM and LCMV in FT), although that is a large part of it. Note the 'fixedori' option in both FT functions (beamformer_sam and beamformer_lcmv). If set to 'yes' in beamformer_lcmv, it will give a scalar output (similar, maybe equivalent, to fixedori='robert' output in beamformer_sam), both which use SVD to find the orientation. (Default for 'fixedori' in beamformer_lcmv is 'no' so will give a vector output by default). The default option for 'fixedori' in beamformer_sam is 'spinning' which is the method described by Jed, and I think is what matches the CTF implementation. Cheers, Johanna On 21 July 2011 23:21, Jed Meltzer wrote: > Without getting into software implementation questions (basically fieldtrip > has LCMV, and CTF software has SAM) I think the main difference is that LCMV > is a "vector" beamformer. At any given location, it estimates a virtual > signal in all three spatial dimensions (or only two if you constrain it to > tangential sources, which makes sense for MEG but not for EEG). So you have > three virtual signals at each point, and how you combine them is up to you - > take the biggest one, or the magnitude of the whole vector, or any other > combination. I'm not sure what the default for power mapping is in > fieldtrip (I have mainly used SAM for beamforming so far, but I use > fieldtrip for other purposes). > > SAM has an extra step involved where it "optimizes" a dipole orientation at > each location to maximize the signal, so you only get one signal at each > location. In this sense it's nonlinear. The calculation is more complex > due to the optimization, but the result is simpler to deal with. This is > called a "scalar" beamformer. For pros and cons, you might look up papers > on vector vs. scalar beamformers in general. Here's one recent one that I > saw that compared them and has further references: > > Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of > hippocampal activity using beamformers with MEG: a detailed investigation > using simulations and empirical data." Hum Brain Mapp *32*(5): 812-827. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cas243 at georgetown.edu Sat Jul 23 02:12:26 2011 From: cas243 at georgetown.edu (Clara A. Scholl) Date: Fri, 22 Jul 2011 20:12:26 -0400 Subject: [FieldTrip] Extracting a timecourse from cluster of channels Message-ID: Hi, I am using fieldtrip's cluster-based permutation test to identify a significant channel-time cluster showing an effect. Now I would like to extract a timecourse averaged over these channels (for the purpose of comparing different conditions, not used to generate the cluster), but I'm not sure if it makes sense to do so because the channels belonging to the cluster change over time -- would the timecourse have contributions from different channels at different time points? Do I need to limit my cluster to fixed channels across time? (And if so, how do I do that?) Thanks! Clara From luoj at mail.nih.gov Sat Jul 23 18:34:01 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Sat, 23 Jul 2011 12:34:01 -0400 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com>, Message-ID: Thanks Jed and Johanna for your input. Jessie ________________________________________ From: Johanna Zumer [johanna.zumer at donders.ru.nl] Sent: Friday, July 22, 2011 2:26 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] LCMV and SAM Hi all, As of June 6, 2011 'beamformer_sam' was put back into the Fieldtrip toolbox (after it had gone missing for some time), although, a warning that it has been awhile since the code was tested. I think there are other differences than just the orientation selection (between the original-CTF SAM and LCMV in FT), although that is a large part of it. Note the 'fixedori' option in both FT functions (beamformer_sam and beamformer_lcmv). If set to 'yes' in beamformer_lcmv, it will give a scalar output (similar, maybe equivalent, to fixedori='robert' output in beamformer_sam), both which use SVD to find the orientation. (Default for 'fixedori' in beamformer_lcmv is 'no' so will give a vector output by default). The default option for 'fixedori' in beamformer_sam is 'spinning' which is the method described by Jed, and I think is what matches the CTF implementation. Cheers, Johanna On 21 July 2011 23:21, Jed Meltzer > wrote: Without getting into software implementation questions (basically fieldtrip has LCMV, and CTF software has SAM) I think the main difference is that LCMV is a "vector" beamformer. At any given location, it estimates a virtual signal in all three spatial dimensions (or only two if you constrain it to tangential sources, which makes sense for MEG but not for EEG). So you have three virtual signals at each point, and how you combine them is up to you - take the biggest one, or the magnitude of the whole vector, or any other combination. I'm not sure what the default for power mapping is in fieldtrip (I have mainly used SAM for beamforming so far, but I use fieldtrip for other purposes). SAM has an extra step involved where it "optimizes" a dipole orientation at each location to maximize the signal, so you only get one signal at each location. In this sense it's nonlinear. The calculation is more complex due to the optimization, but the result is simpler to deal with. This is called a "scalar" beamformer. For pros and cons, you might look up papers on vector vs. scalar beamformers in general. Here's one recent one that I saw that compared them and has further references: Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of hippocampal activity using beamformers with MEG: a detailed investigation using simulations and empirical data." Hum Brain Mapp 32(5): 812-827. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Panagiotis.Tsiatsis at Tuebingen.MPG.de Mon Jul 25 21:31:03 2011 From: Panagiotis.Tsiatsis at Tuebingen.MPG.de (Panagiotis Tsiatsis) Date: Mon, 25 Jul 2011 21:31:03 +0200 Subject: [FieldTrip] Any tips for unsupervised (sic) ICA ECG / EOG component rejection? Message-ID: <4E2DC477.1050705@Tuebingen.MPG.de> Dear all, I am using ICA with fieldtrip and eeglab in order to remove ECG components from my CTF MEG data. I have a separate EKG channel just like in the wonderful fieldtrip tutorial as well as vertical and horizontal EOG channels. The question is a rather practical one: Some times I have to reanalyze my data (different filtering, trial duration settings etc.) and because I have something like 30 subject with 10 sessions of ~7mins each, it is kind of time consuming to redo the ICA component rejection manually each time. *Of course eventually this has to be done by inspecting the components*, but I was just wondering whether I could use some kind of automatized criterion until I reach this level where I can say that I do not need to apply ICA again and therefore I will do the rejection manually. So please excuse my audacity to talk about automation in a procedure which is traditionally considered "supervised". A. Concerning ICA ECG artifact removal, I have the following questions: So, I will just describe you a couple of ideas for heuristics and a few concerns so that maybe you could tell me how (in)sane they sound to you, as I have little experience with ICA. 1. One criterion could be to use the average absolute value of coherence of each component when compared to the ECG channels (as calculated in the fieldtrip ECG removal tutorial) within a certain and predefined range of frequncies. In my case I used the range of [2-40]Hz. Then I convert all the "scores" to z-values and set a threshold of 3-4 to identify components that are highly coherent with the ECG . Of course, this z -value threshold (and all the z-scores) depends on all components so I am not sure whether it is a criterion that can be fully justified. 2. Similarly to (1), another criterion could be the absolute value of the correlation in time of the ECG channel to all the other components. Maybe here the frequency range should be restricted as well. Again, the absolute correlation values would be transformed to z-scores and the artifactual components would be selecting based on a z-value threshold. I am just not sure whether correlation has to offer something complementary to coherence in this case. 3. A third criterion would be the combination of 1 and 2 - calculate z-values for coherence and correlation and then reject the intersection of the components marked as artifactuals from both 1 and 2. This might be a bit conservative, especially because the correlation criterion does not seem as robust as the coherence criterion. [Of course the rejected components would have to be evaluated a-posteriori in any case.] On another note, my biggest concern at the time, stemming from the incomplete understanding of ICA and the use of an automated procedure, is the following: Let's say that in the decomposition, the ECGconsists of 2 (or 3 sometimes) components. The question is whether removing one component of the ECG only (the most prominent one) can actually do more harm that good since (and please correct me if I am wrong because I am not very confident here) the components that when appropriately combined according to the the mixing matrix would result in the ECG artifact might contain parts that "cancel out" when combined together. Therefore, if not all the "real" components that would constitute the ECG artifact are removed, there might be "artificial" deflections that are removed along with the most prominent component, which would alter the data and induce again artifacts. I know that the way that I am phrasing this is not really clear and I might have misunderstood the mechanics of ICA so please feel free to correct me. B. Concerning ICA EOG artifact removal, I wanted to ask you whether there is any way to apply similar techniques as the ones that you apply for ICA ECG removal to EOG components (i.e. the coherence criterion)? I tried to apply the coherence criterion by using the ft_artifact_eog function to detect the eyeblinks, followed by alignment of the detected EOG artifacts in the EOG channel (after extending them so that they have the same length) and their averaging in order to calculate the coherence of this "average" EOG blink to each of the ICA components. It seemed to kind of work for the few datasets that I tried but it was not as robust as the ECG method - one of the reasons for this might be the variability of the blink types (ie. vertical blinks of different speed/duration and "depth", the existence of horizontal eye movements and the non-orthogonality of horizontal and vertical EOG traces etc.) Any intuitions again on this would be really useful. My final question would be whether you think that it could be possible to improve things in terms of unsupervised artifact rejection via ICA? Maybe having some spatial templates that resemble common artifacts with robust topology and comparing the topologies of the ICA components to these templates in terms of spatial correlation would be feasible? Apologies for raising so many issues in just one (rather long) e-mail, I am looking forward to hearing from you about your experience on the above issues. Thank you in advance! Kind Regards, Panagiotis -- Panagiotis S. Tsiatsis Max Planck Institute for Biogical Cybernetics Cognitive NeuroImaging Group Tuebingen, Germany From sherrykhan78 at gmail.com Tue Jul 26 20:25:40 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 26 Jul 2011 14:25:40 -0400 Subject: [FieldTrip] Postdoctoral Fellowship: Multimodal Neuroimaging -MGH/Harvard Medical School Message-ID: Postdoctoral Fellowship: Multimodal Neuroimaging -MGH/Harvard Medical School Job Description A postdoctoral position is available with the TRANSCEND Research Program ( www.transcendresearch.org) at the Martinos Center for Biomedical Imaging in Charlestown, MA (www.martinos.org) which is affiliated with the Massachusetts General Hospital, Harvard Medical School and MIT. We are seeking a candidate with a strong basis in magnetic resonance imaging. Emphasis will be on MRI (DTI, spectroscopy, morphometry, ASL as well as resting state fMRI), and on co-registering MEG with MRI. This position will involve analysis of existing multimodal imaging data and collection of new data. The emphasis of the postdoctoral fellowship will be analysis of existing datasets with secondary activity in piloting data for new studies. It will involve working closely with a multidisciplinary team and with children, and will also involve some research oriented analysis of data collected for clinical purposes. After initial phase-in, ample opportunity will also be provided to the candidate to self-explore and lead research. Datasets to be analyzed include: MRI (including DTI and 1H-spectroscopy) and MEG data on 6-12 and teenage matched autism spectrum and control subjects with phenotyping data MRI data ( (morphometry, DTI, spectroscopy) plus laboratory and phenotyping data) on 70 children with autism plus epilepsy and/or mitochondrial dysfunction, along with one or more overnight EEGs on each patient data from children ages 2-10 with and without autism. Overall objectives: To perform multimodal analyses of research and clinical research data, to develop new approaches for performing these analyses, and to design pipelines for data analysis. To write papers and grants which will be high priorities all along the way and will be actively supported by senior faculty. To take advantage of the world class faculty and facilities of the Martinos Center for Biomedical Imaging to perform the above activities to their maximal potential. The program’s emphasis is on pathophysiologically grounded brain research and application of advanced imaging acquisition and analysis techniques to neurological and sensory aspects of autism spectrum disorders. Requirements: Candidates must have PhD in neuroscience, physics, biomedical engineering, electrical engineering, computer science or other related fields. Prior experience in MRI analysis is required. Experience with EEG will be an added advantage. Salary will be consistent with Massachusetts General Hospital, Harvard Medical School policies for Postdoctoral trainees and will range between $45,000 to $55,000 depending upon qualifications and experience. Compensation also includes full staff benefits, including health insurance, and vacation time. Contact: Interested applicants may send a CV and statement of interest addressing background and specific pertinence of the candidate’s interest to Dr. MarthaR. Herbert at mherbert1 at partners.org and cc transcend at partners.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Wed Jul 27 22:39:46 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Wed, 27 Jul 2011 16:39:46 -0400 Subject: [FieldTrip] Power analysis of resting state data Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> Hi Fieldtrip users- I am interested in calculating the Power of different frequency bands at each channel or in groups of channels during resting state. Since I don't have trials per se, and actually no triggers with which to define a period of time for analysis, I did not call ft_definetrial. Rather, I used ft_preprocessing with the information I usually put into ft_definetrial, including: cfg.dataset = 'dataset'; cfg.channel = {'MEG'}; cfg.continuous = 'yes'; cfg.detrend = 'yes'; cfg.dftfilter = 'yes'; cfg.dftfreq = [60 120 180]; cfg.method = 'channel'; Data = ft_preprocessing(cfg) The command window then indicates that it is processing each of the 275 channels. However, the output says: Data = hdr: [1x1 struct] label: {'MZP01'} time: {[1x21600 double]} trial: {[1x21600 double]} fsample: 1200 sampleinfo: [1 21600] grad: [1x1 struct] cfg: [1x1 struct] Calling ft_freqanalysis after that does a nice job of giving me the Power of frequency bands specified for one channel, which I assume is MZP01. Is there a way for me to do this and generate a matrix with such a calculation for each channel (eg 275x20)? Is there a way to specify groups of channels in a customized way, without relying on their names (I don't just want all Occipital, all Parietal, etc)? Thanks in advance for your help. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jul 28 08:06:50 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 28 Jul 2011 08:06:50 +0200 Subject: [FieldTrip] Power analysis of resting state data In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> Message-ID: Hi Beth, This sounds like a bug to me. There definitely should be more than one channel in your data structure, if the original dataset has 275. Could you check what happens when you call ft_preprocessing with no filter options etc., so just the following: cfg = []; cfg.dataset = 'dataset'; data = ft_preprocessing(cfg); Also, could you check whether the code you provided (so including the filter options again) does return anything if you leave out the 'cfg.continuous' option? Best, Eelke 2011/7/27 Belluscio, Beth (NIH/NINDS) [E] : > Hi Fieldtrip users- > >   I am interested in calculating the Power of different frequency bands at > each channel or in groups of channels during resting state. > > > >  Since I don’t have trials per se, and actually no triggers with which to > define a period of time for analysis, I did not call ft_definetrial. > Rather, I used ft_preprocessing with the information I usually put into > ft_definetrial, including: > >                 cfg.dataset = ‘dataset’; > >                 cfg.channel = {‘MEG’}; > >                 cfg.continuous = ‘yes’; > >                 cfg.detrend = ‘yes’; > >                 cfg.dftfilter = ‘yes’; > >                 cfg.dftfreq = [60 120 180]; > >                cfg.method = ‘channel’; > >                 Data = ft_preprocessing(cfg) > > The command window then indicates that it is processing each of the 275 > channels. > > However, the output says: > >                 Data = > >                                 hdr: [1x1 struct] > >                                 label: {‘MZP01’} > >                                 time: {[1x21600 double]} > >                                 trial: {[1x21600 double]} > >                                 fsample: 1200 > >                                 sampleinfo: [1 21600] > >                                 grad: [1x1 struct] > >                                 cfg: [1x1 struct] > > > > Calling ft_freqanalysis after that does a nice job of giving me the Power of > frequency bands specified for one channel, which I assume is MZP01. > > > > Is there a way for me to do this and generate a matrix with such a > calculation for each channel (eg 275x20)? > > Is there a way to specify groups of channels in a customized way, without > relying on their names (I don’t just want all Occipital, all Parietal, etc)? > > > > Thanks in advance for your help. > > Beth. > > > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From anna.lambrechts at gmail.com Thu Jul 28 11:32:29 2011 From: anna.lambrechts at gmail.com (Anna Lambrechts) Date: Thu, 28 Jul 2011 11:32:29 +0200 Subject: [FieldTrip] Group comparison statistics - ERF study Message-ID: Hi, I am trying to run a group comparison analysis on event-related fields data in a 2 (groups) x 2 (conditions) x 2 (response types) design. Is this possible at all with any fieldtrip script? As far as I know implemented statistics look at within-groups comparison. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Sat Jul 30 15:31:11 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Sat, 30 Jul 2011 15:31:11 +0200 Subject: [FieldTrip] Extracting a timecourse from cluster of channels In-Reply-To: References: Message-ID: <038801cc4ebc$f27edbc0$d77c9340$@maris@donders.ru.nl> Dear Clara, > I am using fieldtrip's cluster-based permutation test to identify a > significant channel-time cluster showing an effect. Now I would like > to extract a timecourse averaged over these channels (for the purpose > of comparing different conditions, not used to generate the cluster), > but I'm not sure if it makes sense to do so because the channels > belonging to the cluster change over time -- would the timecourse have > contributions from different channels at different time points? Do I > need to limit my cluster to fixed channels across time? (And if so, > how do I do that?) Yes, you should fix channels across time. The most important point in selecting the channels is finding evidence for the fact that the channels reflects a single source only. This is not a statistical issue, and therefore there is not a p-value that can guide you in this choice. If you have collected MEG data, the best evidence is a dipolar topography of your effect. Best, Eric Maris > > Thanks! > Clara > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at donders.ru.nl Sat Jul 30 20:45:12 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Sat, 30 Jul 2011 20:45:12 +0200 Subject: [FieldTrip] Group comparison statistics - ERF study In-Reply-To: References: Message-ID: <03a601cc4ee8$d152b760$73f82620$@maris@donders.ru.nl> Hi Anna, You can compare the two groups with respect to any linear combination that can be formed using the observations in the 2 (conditions) x 2 (response types) within-UO design. For testing interaction effects, these linear combinations are the usual contrasts. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Anna Lambrechts Sent: donderdag 28 juli 2011 11:32 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group comparison statistics - ERF study Hi, I am trying to run a group comparison analysis on event-related fields data in a 2 (groups) x 2 (conditions) x 2 (response types) design. Is this possible at all with any fieldtrip script? As far as I know implemented statistics look at within-groups comparison. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at gmx.de Sun Jul 31 13:33:15 2011 From: paul_c at gmx.de (Paul Czienskowski) Date: Sun, 31 Jul 2011 13:33:15 +0200 Subject: [FieldTrip] Auditory N1 Localization Message-ID: <4E353D7B.4000009@gmx.de> Dear all, I am trying to localize auditory evoked N1 peaks with the ft_dipolefitting function and BEM models. Occasionally the fit performed quite well, in particular with the individual models, but sometimes it did not. I have found about a quarter of the fits with the individual models being quite insensible and about the half of the fits with an standard model. Insensible means either pairs of symmetric dipoles at virtually the same place or dipoles way too far away from the expected positions. I have executed the fit with a grid defined by the grey matter from the SPM segmentations, restricted to one half of the interesting area - for I am fitting symmetric dipoles. And I used the subsequent non-linear search. I would appreciate if someone had some idea on how I might increase the yield of the fitting. Best regards and thanks in advance, Paul Czienskowski -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 From mconvertino at ufl.edu Fri Jul 1 01:09:58 2011 From: mconvertino at ufl.edu (Matteo Convertino) Date: Thu, 30 Jun 2011 19:09:58 -0400 Subject: [FieldTrip] where to download fieldtrip? Message-ID: Hello, I did not receive the email from which it is possible to download fieldtrip... , any idea ? where can i download it ? I checked the spam email and it`s not there thanks a lot Matteo Matteo Convertino mconvertino at ufl.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 1 10:31:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 1 Jul 2011 10:31:10 +0200 Subject: [FieldTrip] functionality change in ft_freqanalysis Message-ID: <27F0E6B4-4D83-487A-B434-64C65A2EE902@donders.ru.nl> Dear all, I made a slight change to the default behaviour of ft_freqanalysis. A good practice prior to doing spectral analysis is to remove the mean (and more often: the linear trend) from the time domain data, because if this is not done, it can lead to unexpected (at least unexpected to some) side effects. Some more documentation about this can be found at: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange_part_ii Anyway, we decided to let FieldTrip by default remove the first order linear trend from the time domain data, prior to doing the spectral analysis, thus avoiding unwanted side effects of the frequency transformation. This is now implemented in ft_freqanalysis when using the functions from the specest module (if you don't know what this 'specest' module means: don't worry, this is the default behaviour and you will be using it). You can overrule this trend removal by specifying the option cfg.polyremoval in ft_freqanalysis to be -1 (default = 1). You can also input different values to remove higher order polynomial trends (any value>1) or to just remove the mean value (cfg.polyremoval=0); Note that if you use a fresh copy of FieldTrip (the change will be available in tonight's release version) that the behaviour is slightly changed with respect to before only if you didn't explicitly detrend your data prior to spectral analysis. Happy fft'ing. Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From suforraxi at gmail.com Fri Jul 1 11:49:36 2011 From: suforraxi at gmail.com (Matteo Demuru) Date: Fri, 1 Jul 2011 11:49:36 +0200 Subject: [FieldTrip] WPLI statistic, permutation like test?? In-Reply-To: <786760757.45247.1309361729100.JavaMail.fmail@mwmweb077> References: <786760757.45247.1309361729100.JavaMail.fmail@mwmweb077> Message-ID: Thanks a lot On Wed, Jun 29, 2011 at 5:35 PM, Michael Wibral wrote: > Hi matteo, > > sorry for my sloppy description, > > of course you would only shuffle trials on one channel, not both. > > Michael > > > > ------------------------------ > *Von:* "Matteo Demuru" > *Gesendet:* Jun 29, 2011 10:01:15 AM > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* Re: [FieldTrip] WPLI statistic, permutation like test?? > > > Hi Micheal, > > It seems to me that if you shuffle the trials and then compute the WPLI, > the result is the same as if you do not shuffle. > > For example I have tried compute the WPLI on my trials and then switch > trial{1} with trial{2} and the obtained WPLI is the same. > > Matteo > > On Tue, Jun 28, 2011 at 8:34 PM, Michael Wibral wrote: > >> Hi Matteo, >> >> I am not an expert on the WPLI measures, but to me it seems that in doing >> >> >> "2) Randomly permute the ch2 time series" >> >> you're destroying a lot of ch2's properties (ie.g. it's spectrum will get >> a lot of high ferquencies this way) and this will typically lead to false >> positives. This is why permutation tests for connectivity measures typically >> shuffle trials (i.e. permute data in a very controlled way, keeping the >> intrinsic structure of the data). >> >> Michael >> >> >> ------------------------------ >> *Von:* "Matteo Demuru" >> *Gesendet:* Jun 28, 2011 2:46:28 PM >> *An:* fieldtrip at donders.ru.nl >> *Betreff:* [FieldTrip] WPLI statistic, permutation like test?? >> >> >> >> Hi, >> >> I have a couple of questions about using the WPLI index to assess the >> phase on my MEG data. >> >> The experiment consists of recordings during a mental calculation task: I >> have 30 sec in which each subject performed continuously an arithmetic >> operation. >> >> It seems to me that WPLI index required more than one trial in order to be >> computed. Am I right? (Is this necessary in order to reduce volume >> conduction problems?) >> I could divide my 30 sec in 5 sec-trials to create my trials, but I was >> wandering if this could be a misuse of the WPLI, i.e. WPLI is not >> appropriate for my experiment. >> >> I am also interested in assessing the significance of WPLI index, I would >> like to gauge the significance per se of my WPLI values. >> The idea is to calculate the WPLI distribution under the null hypothesis >> (not phase coupling) for each pair of channels in this way: >> >> Example to assess the significance of WPLI value for ch1 vs ch2 >> >> 1) Calculate the WPLI for ch1 and ch2, this would be the observed WPLI >> (WPLI_observed) >> >> 2) Randomly permute the ch2 time series >> >> 3) Calculate the WPLI for ch1 and ch2 (WPLI_i) >> >> 4) Repeat step 2 and 3 (for instance 100 times) in order to create the >> WPLI_i distribution >> >> 5) Calculate the proportion ( # (WPLI_i > WPLI_observed) / # (WPLI_i ) ) >> of WPLI_i which are greater than the WPLI_observed, if this proportion >> is < 0.05 I could say that the WPLI_observed represents a significant >> degree of phase, otherwise not. >> >> Does it make sense or is it not the right approach? >> >> Let suppose this is a correct approach, I have two other questions: >> >> First, usually when I compute the WPLI value between two channels I obtain >> a number of WPLI values according to the cross-spectrum times (one WPLI for >> each sliding window), in the steps above I am assuming to compute the >> average WPLI_observed and the average WPLI_i for each step. Does this >> raise any problems? >> >> Second, is it a problem using the same random permutations employed to >> obtain ch1-ch2 (WPLI_i distribution) to calculate also the ch1-ch3 (WPLI >> _i distribution). This is just an implementatiion question. I would like >> to know if I could shuffle the time series of other channels in one step >> (i.e. for ch1 something like data.trial{other_than_ch1,perm}), and finally >> extract just the column relative to ch1 from WPLI matrix. >> >> thanks >> >> Matteo >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From minsa at fastmail.co.uk Fri Jul 1 12:25:43 2011 From: minsa at fastmail.co.uk (minsa at fastmail.co.uk) Date: Fri, 01 Jul 2011 12:25:43 +0200 Subject: [FieldTrip] time-frequency analysis Message-ID: <1309515943.6917.1469280533@webmail.messagingengine.com> Hello, I'm new to field trip and I have two short questions regarding time-frequency analysis: I'm using field trip for averaging time frequency plots of 11 subjects obtained by BESA 5.3. For every subject I have two conditions, and I want to calculate (using statistical clustering) the difference bettween the two conditions. Are the single time-frequency plots normalized before clustering? After performing the average over subjects, I get a matlab-window titled 'TFC-selectplots'. The window is subdivided into 3 sections (Plots of original data, Grand average plots and Results of statistical tests). I find in the last section 'show clustering with prob. below alpha, plotted over' where I mark 'Diff. Between grand average' and 'No mask'. I get a window with the clustered difference between the two conditions. Now my question: The color-bar show symmetric values (from blue to red) 0.1, 0, 0.1, 0.2. What do these numbers correspond to? statistical probabilities? can you please help me with these two questions? I would be so thankful! Best regards, Iris From Margit.Schoenherr at uk-erlangen.de Fri Jul 1 12:33:00 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Fri, 1 Jul 2011 12:33:00 +0200 Subject: [FieldTrip] electrode positions of 4D data Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Hello, we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls hdr.grad = bti2grad(orig); which only returns the grad structure, whereas for Neuromag data at line 1056 [hdr.grad, elec] = mne2grad(orig); has 2 outputs. There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? Thank you, Margit From E.vandenBroeke at chir.umcn.nl Fri Jul 1 13:56:02 2011 From: E.vandenBroeke at chir.umcn.nl (E.vandenBroeke at chir.umcn.nl) Date: Fri, 1 Jul 2011 13:56:02 +0200 Subject: [FieldTrip] order of preprocessing steps in ERP analysis Message-ID: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> Dear fieldtrippers, I would like to know if someone could answer my question. In the analysis of ERPs I use some preprocessing steps to improve the signal-to-noise ratio; down-sampling (from 2000 to 500 Hz) and filtering (between 1-30 Hz). What should I do first; down-sampling or filtering, or doesn't it make any difference? Thanks, Best, Emanuel van den Broeke Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrysa.lithari at gmail.com Fri Jul 1 14:32:14 2011 From: chrysa.lithari at gmail.com (Chrysa Lithari) Date: Fri, 1 Jul 2011 14:32:14 +0200 Subject: [FieldTrip] neuromag BESA compatibility Message-ID: Hi to all, I have a question. I have used BESA to do the artifact rejection on my meg data, but I want to pass to Fieltrip. Does anybody know if while opening the .fif file, the rejected channels and trials will be rejected also by Fieldtrip or not? In other words, do I have to do the artifact rejection again in Fieldtrip? Thanks a lot for your time and response, -- Lithari Chrysa - PhD candidate Medical Informatics, Aristotle University of Thessaloniki, Greece - M.Sc. NeuroInformatics, Unversity of Patras, Greece - B.Sc. Computer Science, Aristotle University of Thessaloniki, Greece -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Fri Jul 1 17:12:50 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Fri, 1 Jul 2011 18:12:50 +0300 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: Dear Margit with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlabtool. I assume the electrodes were digitized. yuval 2011/7/1 Schönherr, Margit > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading > combined MEG and EEG data sets, there is no elec data structure which would > contain information about the electrode positions,labels... At line 161, the > ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line > 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode > positions, is there? I am using fieldtrip-20110603. Is anyone currently > working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 1 18:15:22 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 1 Jul 2011 18:15:22 +0200 Subject: [FieldTrip] order of preprocessing steps in ERP analysis In-Reply-To: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> References: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> Message-ID: Dear Emanuel, It should not make a difference. Best, Eelke 2011/7/1 : > Dear fieldtrippers, > > I would like to know if someone could answer my question. > > In the analysis of ERPs I use some preprocessing steps to improve the > signal-to-noise ratio; down-sampling (from 2000 to 500 Hz) and filtering > (between 1-30 Hz). > > What should I do first; down-sampling or filtering, or doesn’t it make any > difference? > > Thanks, > > Best, > > Emanuel van den Broeke > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From mconvertino at ufl.edu Fri Jul 1 20:14:19 2011 From: mconvertino at ufl.edu (Matteo Convertino) Date: Fri, 1 Jul 2011 14:14:19 -0400 Subject: [FieldTrip] EEG-fMRI-MRI coupled dataset In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: Is there anyone aware of any dataset freely available of EEG+fMRI (or/and MRI) of epileptic patients ? Thanks a lot Matteo C. ___ Matteo Convertino, PhD Research Associate Agricultural and Biological Engineering Dept. College of Agriculture and Life Sciences - Institute of Food and Agricultural Sciences - Water Institute Affiliated Faculty and Quantitative Spatial Ecology, Evolution, and Environment (QSE^3) NSF-IGERT program Prof. Rafael Munoz-Carpena & Greg Kiker Research groups Frazier Rogers Hall, Museum Road, office 218, PO box 110570, 32611-0570 University of Florida, Gainesville USA Research Scientist USACE ERDC, Risk Modeling and Decision Science Area I. Linkov group Boston, MA web: http://plaza.ufl.edu/mconvertino/ http://carpena.ifas.ufl.edu/people/MatteoConvertino.shtml Office phone: +1 352-392-1864 ext. 218 / Fax: +1 352-392-4092 (USA) Mobile phone : +1 347-761-4511 (USA) Skype ID: convertino.matteo PhD 2009, University of Padova advisors: Prof. Andrea Rinaldo and Prof. Amos Maritan (Physics Dept. UniPd) co-advisor: Prof. Ignacio Rodriguez-Iturbe (Princeton University) IMAGE Dept. & International Center for Hydrology "Dino Tonini" Graduate School in Civil and Environmental Engineering Sciences Via Loredan 20, I-35131 Padova University of Padova, Italy ___ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hedderik at van-rijn.org Sat Jul 2 14:01:33 2011 From: hedderik at van-rijn.org (Hedderik van Rijn) Date: Sat, 2 Jul 2011 14:01:33 +0200 Subject: [FieldTrip] labels not updated in ft_scalpcurrentdensity using Hjorth's method Message-ID: <8D1C3271-7D6C-49CA-B713-08AE50E95FA1@van-rijn.org> Dear Fieldtrippers, for a replication study, I'm applying Hjorth's SCD method on just FCz with a given set of neighbors. After running the following code: cfg = []; elec = ft_read_sens('electrodes-Tobias.set'); cfg.elec = elec; ngh = {struct('label','FCz','neighblabel',{{'FC3','FC4','CPZ','AFz'}})}; cfg.method = 'hjorth'; cfg.neighbours = ngh; cfg.trials = 'all'; data_hjorth = ft_scalpcurrentdensity(cfg,data); The labels of the resulting dataset still refer to the original electrodes: >> length(data_hjorth.label) ans = [32] But the resulting data only contains FCz information (as expected): >> size(data_hjorth.trial{1}) ans = 1 2500 I was wondering if this is intentional, or whether the label field should only contain the electrode(s) for which the current density was calculated. If the latter is the case, line 229 of ft_scalpcurrentdensity, which reads: scd.label = data.label; should be replaced with: if strcmp(cfg.method, 'hjorth') scd.label = labelnew; else scd.label = data.label; end - Hedderik. From tjordanov at besa.de Mon Jul 4 08:43:15 2011 From: tjordanov at besa.de (tjordanov at besa.de) Date: Mon, 4 Jul 2011 08:43:15 +0200 Subject: [FieldTrip] neuromag BESA compatibility In-Reply-To: References: Message-ID: <001201cc3a15$a8a48420$f9ed8c60$@besa.de> Hi Lithari, There are two possibilities to export artifact corrected data to FieldTrip. If you have BESA 5.3 then you can use the Matlab interface and send the Data directly to Matlab with the "Send to Matlab" command. If you have BESA 5.2 or earlier then you can export the corrected data as an ascii file (vectorized or multiplex) and then use the besa2fieldtrip readers, which are available in FieldTrip or on the BESA webpage. Best regards, Todor ---------------------------------------------------------------------------- -------- Todor Iordanov Research & Development BESA GmbH Freihamer Strasse 18 82166 Graefelfing/Germany Phone: +49 89 8980 9968 HRB Munich 109956 CEOs: Dr. Michael Scherg, Theodor Scherg, Dr. Tobias Scherg ---------------------------------------------------------------------------- -------- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Chrysa Lithari Sent: Freitag, 1. Juli 2011 14:32 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] neuromag BESA compatibility Hi to all, I have a question. I have used BESA to do the artifact rejection on my meg data, but I want to pass to Fieltrip. Does anybody know if while opening the .fif file, the rejected channels and trials will be rejected also by Fieldtrip or not? In other words, do I have to do the artifact rejection again in Fieldtrip? Thanks a lot for your time and response, -- Lithari Chrysa - PhD candidate Medical Informatics, Aristotle University of Thessaloniki, Greece - M.Sc. NeuroInformatics, Unversity of Patras, Greece - B.Sc. Computer Science, Aristotle University of Thessaloniki, Greece -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jul 4 11:32:09 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 04 Jul 2011 11:32:09 +0200 Subject: [FieldTrip] EEG-fMRI-MRI coupled dataset In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: <4E118899.7040500@donders.ru.nl> Dear Matteo, there might be some dataset available at the SPM webpage. I did not check it, maybe there are also EEG-fMRI sets. Best, Jörn On 7/1/2011 8:14 PM, Matteo Convertino wrote: > Is there anyone aware of any dataset freely available of EEG+fMRI > (or/and MRI) of epileptic patients ? > > Thanks a lot > > Matteo C. > > > > > ___ > Matteo Convertino, PhD > > Research Associate > Agricultural and Biological Engineering Dept. College of Agriculture > and Life Sciences - Institute of Food and Agricultural Sciences > - Water Institute Affiliated Faculty and Quantitative Spatial Ecology, > Evolution, and Environment (QSE^3) NSF-IGERT program > Prof. Rafael Munoz-Carpena & Greg Kiker Research groups > Frazier Rogers Hall, Museum Road, office 218, PO box 110570, 32611-0570 > University of Florida, Gainesville > USA > > Research Scientist USACE ERDC, Risk Modeling and Decision Science Area > I. Linkov group > Boston, MA > > web: http://plaza.ufl.edu/mconvertino/ > http://carpena.ifas.ufl.edu/people/MatteoConvertino.shtml > Office phone: +1 352-392-1864 ext. 218 / Fax: +1 352-392-4092 (USA) > Mobile phone : +1 347-761-4511 (USA) > Skype ID: convertino.matteo > > PhD 2009, University of Padova > advisors: Prof. Andrea Rinaldo and Prof. Amos Maritan (Physics Dept. > UniPd) > co-advisor: Prof. Ignacio Rodriguez-Iturbe (Princeton University) > IMAGE Dept. & International Center for Hydrology "Dino Tonini" > Graduate School in Civil and Environmental Engineering Sciences > Via Loredan 20, I-35131 Padova > University of Padova, Italy > ___ > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ion.ucl.ac.uk Mon Jul 4 12:11:41 2011 From: v.litvak at ion.ucl.ac.uk (Vladimir Litvak) Date: Mon, 4 Jul 2011 11:11:41 +0100 Subject: [FieldTrip] FW: Can't read smr to ft In-Reply-To: <46E06B3F28AD344DBE53103DE027DC9D059FA8EE@exmailer2.umhnet.es> References: <46E06B3F28AD344DBE53103DE027DC9D059FA8EE@exmailer2.umhnet.es> Message-ID: Dear Graciela, You can export your data from Spike 6 to Matlab and then read the resulting mat file into Fieldtrip using ft_preprocessing. It will be automatically recognized. You should use setting as in the attached screenshot (you can choose a different sampling rate). Best, Vladimir On Sun, Jul 3, 2011 at 5:07 PM, Navarro Mora, Graciela wrote: > > > Dears, > > > > I am Graciela Navarro, from the Institute of Neuroscience in Alicante. I am > contacting you because I found on field trip discussion some of your mails > referring a problem when reading .smr format data.  I would like to know how > you dealt with the problem as I am having the same one. My original data are > generated with multichannel systems (.mcd), and I have no problem to import > the into spike2 6.03. However I cannot use ft_read_data with the .smr files > I get with spike2. > > > > I was also reading the answers of Vladimir, but my problem after doing what > he proposes is persisting. Please do you have any suggestion to me? > > > > The error is the following: > > > >>> hdr=ft_read_data('1000eeg.smr') > > Loading file 1000eeg.smr using NeuroShare library v1.7 ... > > NEV file could not be loaded! > > ??? Error using ==> read_ced_son at 107 > > File read error occurred in function 1000eeg.smr with entity 0, index 0 > > > > Error in ==> ft_read_header at 303 > >     orig = read_ced_son(filename,'readevents','no','readdata','no'); > > > > Error in ==> ft_read_data at 121 > >   hdr = ft_read_header(filename, 'headerformat', headerformat); > > > > Thanks a lot in advance, > > Greetings > > > > Graciela > > > > Graciela Navarro Mora, Ph.D. > > > > "Cellular & Molecular Mechanisms of Brain Wiring" > > Instituto de Neurociencias > > CSIC & Universidad Miguel Hernández > > Av. Ramón y Cajal, s/n > > 03550 San Juan de Alicante > > Alicante, Spain > > > > Phone: (34) 965 91 9592 > > g.navarro at umh.es > > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 13086 bytes Desc: not available URL: From Margit.Schoenherr at uk-erlangen.de Mon Jul 4 13:37:16 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 4 Jul 2011 13:37:16 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Hello Yuval, thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. Margit ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] Gesendet: Freitag, 1. Juli 2011 17:12 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] electrode positions of 4D data Dear Margit with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. yuval 2011/7/1 Schönherr, Margit > Hello, we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls hdr.grad = bti2grad(orig); which only returns the grad structure, whereas for Neuromag data at line 1056 [hdr.grad, elec] = mne2grad(orig); has 2 outputs. There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? Thank you, Margit _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From venug001 at crimson.ua.edu Mon Jul 4 13:56:19 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Mon, 4 Jul 2011 03:56:19 -0800 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Message-ID: Greetings, the location file for 4D is in the form of an .xyz file. This is not the same as a head shape file--though both use the x, y, and z, and are conceptually related. The head shape file is unique to inviduals, when the location file will tell you the exact position, in Cartesian space, and orientation of the electrodes. Many researchers on the this list, and on others have locations files for a 248 channel 4D system. Though they are standard, even those can vary very slightly from machine to machine and day to day. If you export your data from the MSI system it will put out three files, one of which is an .xyz file, which is your location file. If you have EEGLAB or Fieldtrip you should look for the.xyz file. All the best. 2011/7/4 Schönherr, Margit > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG > data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot > distinguish the electrode positions in the list of 3000 head shape > digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im > Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of > the electrodes was not in the data structure but also the EEG data. this is > when specifying channel = 'EEG'; giving it the channel labels solved it- > {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if > worse comes to worst you can try reading the EEG location with msi >> > matlab tool. I assume the electrodes > were digitized. > yuval > > 2011/7/1 Schönherr, Margit Margit.Schoenherr at uk-erlangen.de>> > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading > combined MEG and EEG data sets, there is no elec data structure which would > contain information about the electrode positions,labels... At line 161, the > ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line > 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode > positions, is there? I am using fieldtrip-20110603. Is anyone currently > working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html< > http://faculty.biu.ac.il/%7Egoldsa/index.html > > > > "Many were increasingly of the opinion that they'd all made a big mistake > in coming down from the trees in the first place. And some said that even > the trees had been a bad move, and that no one should ever have left the > oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 4 14:08:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 4 Jul 2011 14:08:29 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Message-ID: <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> Hi Margit, There should be information with respect to the electrode locations (if digitized indeed) in the header-information. I don't know about the digitized electrode positions, because at the time that I wrote the code dealing with 4d-data we did not simultaneously collect EEG and MEG data, so there is no way for me to check. Could you check whether your data.hdr contains the following field: data.hdr.orig.user_block_data? This should be a cell-array, and in my headers typically the 11th cell contains the info about the digitized electrodes (in my case only information about the 5 coils and landmarks is present). It's called 'b_eeg_elec_locs' (check hdr.orig.user_block_data{x}.hdr.type). The hdr.orig.user_block_data{x}.pnt contains the coordinates of the points. How many are there in your header? If this number > 11 then chances are that these are the electrode positions. We could of course then easily extend the code in order to spit these out in a more convenient format. Best wishes, Jan-Mathijs On Jul 4, 2011, at 1:37 PM, Schönherr, Margit wrote: > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. > yuval > > 2011/7/1 Schönherr, Margit > > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From Margit.Schoenherr at uk-erlangen.de Mon Jul 4 16:42:59 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 4 Jul 2011 16:42:59 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de>, <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD9@XMAIL1.medads.uk-erlangen.de> Hello Jan-Mathijs, thanks a lot, I have 14 user_blocks and I found the points and labels in hdr.orig.user_block_data{1,12}. Best, Margit ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Gesendet: Montag, 4. Juli 2011 14:08 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] electrode positions of 4D data Hi Margit, There should be information with respect to the electrode locations (if digitized indeed) in the header-information. I don't know about the digitized electrode positions, because at the time that I wrote the code dealing with 4d-data we did not simultaneously collect EEG and MEG data, so there is no way for me to check. Could you check whether your data.hdr contains the following field: data.hdr.orig.user_block_data? This should be a cell-array, and in my headers typically the 11th cell contains the info about the digitized electrodes (in my case only information about the 5 coils and landmarks is present). It's called 'b_eeg_elec_locs' (check hdr.orig.user_block_data{x}.hdr.type). The hdr.orig.user_block_data{x}.pnt contains the coordinates of the points. How many are there in your header? If this number > 11 then chances are that these are the electrode positions. We could of course then easily extend the code in order to spit these out in a more convenient format. Best wishes, Jan-Mathijs On Jul 4, 2011, at 1:37 PM, Schönherr, Margit wrote: > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. > yuval > > 2011/7/1 Schönherr, Margit > > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From inbalots at gmail.com Tue Jul 5 12:40:18 2011 From: inbalots at gmail.com (Inbal Lots) Date: Tue, 5 Jul 2011 13:40:18 +0300 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? Message-ID: Hello I am using ft_multiplotER to display the 'butterfly' of the MEG data after it was decimated and averaged. I would like to do several things: 1) to have the axes legends and values on the figure I get (I get only a plot with not text at all on the axes) 2) to add a title (*not* by doing it with matlab title('XXX')) 3) to be able to select a component (i.e. a relevant time piece ) and to see it's field on the head layout (i.e.cfg.layout='4D248.lay';) The code I am using, after decimation and averaging , is: cfg=[]; cfg.interactive='yes'; cfg.showlabels='yes'; cfg.fontsize=14; % cfg.layout='4D248.lay'; cfg.layout ='butterfly'; ft_multiplotER(cfg,AvrDATA); Is it possible? Thank you very much for your help Inbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ww.peng0923 at gmail.com Tue Jul 5 16:33:34 2011 From: ww.peng0923 at gmail.com (PWW) Date: Tue, 5 Jul 2011 22:33:34 +0800 Subject: [FieldTrip] source analysis and simulation Message-ID: Dear all, I am a new comer for using fieldtrip toolbox. I am a Mphil student of The University of Hong Kong, and my research is about source analysis for EEG oscillation. At the moment, I confront some problems in simulation when using fieldtrip to do source analysis. Firstly, I have tried the matlab codes on the website of http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan. When I change the dipole position, such as [3 8 8], the reconstructed source is also located at [0 0 4]. I have confirmed the simulation data, which is right and varied accroding to the dipole position. However, for the source analysis result, it doesn't change, and stills locates at the position of [0 0 4]. It seems that the problems lies at the function of ft_sourceanalysis ft_sourceanalysis. I am quite confused and hope to get a clear explaination. And thanks very much. Secondly, I have alligned my electrode file to the standard BEM head model. Then I undertook source analysis for timelocked EEG activities for simulation according to the following codes: clear all clc load headmodel.mat cfg = []; cfg.vol = vol; cfg.elec = elec; cfg.dip.pos = [0 -20 100]; % the dipole is located at about Cz channel cfg.dip.mom = [0 0 1]'; % the dipole points along the x-axis cfg.relnoise = 0; cfg.ntrials = 20; data = ft_dipolesimulation(cfg); % compute the data covariance matrix, which will capture the activity of % the simulated dipole cfg = []; cfg.covariance = 'yes'; timelock = ft_timelockanalysis(cfg, data); % do the beamformer source reconstuction on a 10 mm grid cfg = []; cfg.vol = vol; cfg.elec=elec; cfg.grid.resolution = 10; cfg.method = 'lcmv'; source = ft_sourceanalysis(cfg, timelock); cfg = []; cfg.downsample = 2; sourcePostInt = ft_sourceinterpolate(cfg, source , mri); cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.opacitymap = 'rampup'; figure ft_sourceplot(cfg, sourcePostInt); However, it still doesn't work, and the source is located at wrong position. I have no idear and worked on it for several days. So I am writing to your to ask for help, my headmodel file in the *.mat type can be downloaded in http://www.sendspace.com/file/lars5j . Thanks again for all your help. Best regards, Weiwei Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgroppe at cogsci.ucsd.edu Wed Jul 6 00:27:01 2011 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Tue, 5 Jul 2011 18:27:01 -0400 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? In-Reply-To: References: Message-ID: Hi Inbal, The Mass Univariate ERP Toolbox (http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox) has an interactive butterfly plot GUI (see the attached figure for an example). However it expects your data to be formatted according to EEGLAB's conventions (not FieldTrip's). So if you can export your data to EEGLAB it might do what you want. cheers, -David On Tue, Jul 5, 2011 at 6:40 AM, Inbal Lots wrote: > Hello > > I am using ft_multiplotER to display the 'butterfly' of the MEG data after > it was decimated and averaged. > I would like to do several things: > 1) to have the axes legends and values on the figure I get (I get only a > plot with not text at all on the axes) > 2) to add a title (not by doing it with matlab title('XXX')) > 3) to be able to select a component (i.e. a relevant  time piece ) and to > see it's field on the head layout (i.e.cfg.layout='4D248.lay';) > > The code I am using, after  decimation and averaging , is: > > cfg=[]; > cfg.interactive='yes'; > cfg.showlabels='yes'; > cfg.fontsize=14; > % cfg.layout='4D248.lay'; > cfg.layout ='butterfly'; > ft_multiplotER(cfg,AvrDATA); > > Is it possible? > > Thank you very much for your help > > Inbal > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- David Groppe, Ph.D. Postdoctoral Researcher Kutaslab Dept. of Cognitive Science University of California, San Diego http://www.cogsci.ucsd.edu/~dgroppe/ -------------- next part -------------- A non-text attachment was scrubbed... Name: Gui_erp_tmax_xo.jpg Type: image/jpeg Size: 605722 bytes Desc: not available URL: From sylvana.schister at utah.edu Wed Jul 6 19:37:00 2011 From: sylvana.schister at utah.edu (Sylvana) Date: Wed, 06 Jul 2011 11:37:00 -0600 Subject: [FieldTrip] ICA problem Message-ID: <1309973820.23419.9.camel@weston-desktop> Hi all, I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of ft_componentanalysis. I get the following error message: ??? Error using ==> surf at 74 X, Y, Z, and C cannot be complex. Error in ==> ft_plot_topo at 184 h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', 'none', 'FaceColor', shading); Error in ==> ft_topoplotER at 753 ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... Error in ==> ft_topoplotIC at 116 ft_topoplotER(cfg, varargin{:}); The complex variable is 'Zi', which is taken from 'comp'. I can modify the function to take the real part of the variable (or the absolute value), but I am not sure if this would be the correct thing to do. In case this is a bug, I thought I should report it. Any comments? Thanks for your help, Sylvana Schister Univ. of Utah Dept. of Bioengineering From stephen.whitmarsh at gmail.com Wed Jul 6 20:09:42 2011 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 6 Jul 2011 20:09:42 +0200 Subject: [FieldTrip] ICA problem In-Reply-To: <1309973820.23419.9.camel@weston-desktop> References: <1309973820.23419.9.camel@weston-desktop> Message-ID: Dear Sylvana, >From the top op my head: When running the ICA, try only computing it for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run on reference sensors in case of MEG. I have hunch that might help out. Cheers, Stephen On 6 July 2011 19:37, Sylvana wrote: > Hi all, > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > ft_componentanalysis. > > I get the following error message: > > > ??? Error using ==> surf at 74 > X, Y, Z, and C cannot be complex. > > Error in ==> ft_plot_topo at 184 >  h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > 'none', 'FaceColor', shading); > > Error in ==> ft_topoplotER at 753 > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > Error in ==> ft_topoplotIC at 116 >    ft_topoplotER(cfg, varargin{:}); > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > the function to take the real part of the variable (or the absolute > value), but I am not sure if this would be the correct thing to do. In > case this is a bug, I thought I should report it. Any comments? > > Thanks for your help, > > Sylvana Schister > Univ. of Utah > Dept. of Bioengineering > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From sherrykhan78 at gmail.com Thu Jul 7 02:44:16 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Wed, 6 Jul 2011 20:44:16 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> Message-ID: Hi Sylvana, Is the data SSS (maxfilter), I normally have this problem when data is SSS, try doing ICA with PCA (set at 64 components). Sheraz Khan Martinos Center Boston, USA On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Sylvana, > > >From the top op my head: When running the ICA, try only computing it > for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run > on reference sensors in case of MEG. > I have hunch that might help out. > > Cheers, > Stephen > > > On 6 July 2011 19:37, Sylvana wrote: > > Hi all, > > > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > > ft_componentanalysis. > > > > I get the following error message: > > > > > > ??? Error using ==> surf at 74 > > X, Y, Z, and C cannot be complex. > > > > Error in ==> ft_plot_topo at 184 > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > > 'none', 'FaceColor', shading); > > > > Error in ==> ft_topoplotER at 753 > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > Error in ==> ft_topoplotIC at 116 > > ft_topoplotER(cfg, varargin{:}); > > > > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > > the function to take the real part of the variable (or the absolute > > value), but I am not sure if this would be the correct thing to do. In > > case this is a bug, I thought I should report it. Any comments? > > > > Thanks for your help, > > > > Sylvana Schister > > Univ. of Utah > > Dept. of Bioengineering > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Thu Jul 7 03:27:46 2011 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 06 Jul 2011 21:27:46 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> Message-ID: <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> I've had this same problem with EEGlab's runICA implementation when the rank of the data was less than the number of variables (i.e., it's an ill-conditioned matrix, which is to say it has multicolinearity). Including the reference channel can do this (since it's just zeroes). Using PCA to reduce the data to a subspace can help as well since the rank will now equal the number of variables (namely the number of factor scores will equal the number of retained factors). Before you go the PCA route, it's worth trying to figure out why the data is ill-conditioned. There is likely to be something wrong with one of your channels. Maybe two of them are shorted together or something along those lines. Or if you used mean mastoid reference and included both mastoids, that can do it too (since they will be exactly inversely correlated, one of them is statistically redundant, reducing the rank by one). My EP Toolkit artifact correction routine (http://sourceforge.net/projects/erppcatoolkit/) takes all these sorts of things into account when performing eyeblink correction. Cheers! Joe On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > Hi Sylvana, > > Is the data SSS (maxfilter), I normally have this problem when data is SSS, try doing ICA with PCA (set at 64 components). > > Sheraz Khan > Martinos Center > Boston, USA > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh wrote: > Dear Sylvana, > > >From the top op my head: When running the ICA, try only computing it > for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run > on reference sensors in case of MEG. > I have hunch that might help out. > > Cheers, > Stephen > > > On 6 July 2011 19:37, Sylvana wrote: > > Hi all, > > > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > > ft_componentanalysis. > > > > I get the following error message: > > > > > > ??? Error using ==> surf at 74 > > X, Y, Z, and C cannot be complex. > > > > Error in ==> ft_plot_topo at 184 > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > > 'none', 'FaceColor', shading); > > > > Error in ==> ft_topoplotER at 753 > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > Error in ==> ft_topoplotIC at 116 > > ft_topoplotER(cfg, varargin{:}); > > > > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > > the function to take the real part of the variable (or the absolute > > value), but I am not sure if this would be the correct thing to do. In > > case this is a bug, I thought I should report it. Any comments? > > > > Thanks for your help, > > > > Sylvana Schister > > Univ. of Utah > > Dept. of Bioengineering > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://homepage.mac.com/jdien07/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Thu Jul 7 06:18:09 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Thu, 7 Jul 2011 00:18:09 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> Message-ID: Hi Joseph, Most likely cause of ill-conditioned in neuromag data is maxfilter (signal space separation) which reduces the dimensionality from 306 (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar expansion of order 8). Also neuromag is consist of two different type of sensors (Planar Gradiometer and magnetometer) having different sensitivities, so either ica needs to run separately on them or combined by making them equal through normalization. Sheraz Khan Martinos Center Boston, USA On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > I've had this same problem with EEGlab's runICA implementation when the > rank of the data was less than the number of variables (i.e., it's an > ill-conditioned matrix, which is to say it has multicolinearity). Including > the reference channel can do this (since it's just zeroes). Using PCA to > reduce the data to a subspace can help as well since the rank will now equal > the number of variables (namely the number of factor scores will equal the > number of retained factors). Before you go the PCA route, it's worth trying > to figure out why the data is ill-conditioned. There is likely to be > something wrong with one of your channels. Maybe two of them are shorted > together or something along those lines. Or if you used mean mastoid > reference and included both mastoids, that can do it too (since they will be > exactly inversely correlated, one of them is statistically redundant, > reducing the rank by one). My EP Toolkit artifact correction routine ( > http://sourceforge.net/projects/erppcatoolkit/) takes all these sorts of > things into account when performing eyeblink correction. > > Cheers! > > Joe > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > Hi Sylvana, > > Is the data SSS (maxfilter), I normally have this problem when data is SSS, > try doing ICA with PCA (set at 64 components). > > Sheraz Khan > Martinos Center > Boston, USA > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Dear Sylvana, >> >> >From the top op my head: When running the ICA, try only computing it >> for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run >> on reference sensors in case of MEG. >> I have hunch that might help out. >> >> Cheers, >> Stephen >> >> >> On 6 July 2011 19:37, Sylvana wrote: >> > Hi all, >> > >> > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. >> > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of >> > ft_componentanalysis. >> > >> > I get the following error message: >> > >> > >> > ??? Error using ==> surf at 74 >> > X, Y, Z, and C cannot be complex. >> > >> > Error in ==> ft_plot_topo at 184 >> > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', >> > 'none', 'FaceColor', shading); >> > >> > Error in ==> ft_topoplotER at 753 >> > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... >> > >> > Error in ==> ft_topoplotIC at 116 >> > ft_topoplotER(cfg, varargin{:}); >> > >> > >> > The complex variable is 'Zi', which is taken from 'comp'. I can modify >> > the function to take the real part of the variable (or the absolute >> > value), but I am not sure if this would be the correct thing to do. In >> > case this is a bug, I thought I should report it. Any comments? >> > >> > Thanks for your help, >> > >> > Sylvana Schister >> > Univ. of Utah >> > Dept. of Bioengineering >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jul 7 18:07:13 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jul 2011 18:07:13 +0200 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? In-Reply-To: References: Message-ID: <5D55B77E-C3A9-4924-A9CC-78B26602B8D4@donders.ru.nl> Dear Inbal, You may want to check the cfg.interactive='yes' option in ft_multiplotER, which allows you to make a selection of channels and time for creating a topoplot. Just switch it on and click/drag with your mouse in the figure. It does not solve all your questions, but it does do "3". best Robert On 5 Jul 2011, at 12:40, Inbal Lots wrote: > Hello > > I am using ft_multiplotER to display the 'butterfly' of the MEG data > after it was decimated and averaged. > I would like to do several things: > 1) to have the axes legends and values on the figure I get (I get > only a plot with not text at all on the axes) > 2) to add a title (not by doing it with matlab title('XXX')) > 3) to be able to select a component (i.e. a relevant time piece ) > and to see it's field on the head layout (i.e.cfg.layout='4D248.lay';) > > The code I am using, after decimation and averaging , is: > > cfg=[]; > cfg.interactive='yes'; > cfg.showlabels='yes'; > cfg.fontsize=14; > % cfg.layout='4D248.lay'; > cfg.layout ='butterfly'; > ft_multiplotER(cfg,AvrDATA); > > Is it possible? > > Thank you very much for your help > > Inbal > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sylvana.schister at utah.edu Thu Jul 7 18:07:48 2011 From: sylvana.schister at utah.edu (Sylvana) Date: Thu, 07 Jul 2011 10:07:48 -0600 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> Message-ID: <1310054868.25490.10.camel@weston-desktop> Hi all, Thank you so much for your quick reply. This is all very helpful. I am using tsss filtered data. After thinking it through all day, I understood that I have a dimensionality problem. Anyway, thanks again! Cheers, Sylvana On Wed, 2011-07-06 at 22:18 -0600, Sheraz Khan wrote: > Hi Joseph, > > Most likely cause of ill-conditioned in neuromag data is maxfilter > (signal space separation) which reduces the dimensionality from 306 > (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar > expansion of order 8). Also neuromag is consist of two different type > of sensors (Planar Gradiometer and magnetometer) having different > sensitivities, so either ica needs to run separately on them or > combined by making them equal through normalization. > > Sheraz Khan > Martinos Center > Boston, USA > > > > On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > I've had this same problem with EEGlab's runICA implementation > when the rank of the data was less than the number of > variables (i.e., it's an ill-conditioned matrix, which is to > say it has multicolinearity). Including the reference channel > can do this (since it's just zeroes). Using PCA to reduce the > data to a subspace can help as well since the rank will now > equal the number of variables (namely the number of factor > scores will equal the number of retained factors). Before you > go the PCA route, it's worth trying to figure out why the data > is ill-conditioned. There is likely to be something wrong > with one of your channels. Maybe two of them are shorted > together or something along those lines. Or if you used mean > mastoid reference and included both mastoids, that can do it > too (since they will be exactly inversely correlated, one of > them is statistically redundant, reducing the rank by one). > My EP Toolkit artifact correction routine > (http://sourceforge.net/projects/erppcatoolkit/) takes all > these sorts of things into account when performing eyeblink > correction. > > > Cheers! > > > Joe > > > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > > Hi Sylvana, > > > > Is the data SSS (maxfilter), I normally have this problem > > when data is SSS, try doing ICA with PCA (set at 64 > > components). > > > > Sheraz Khan > > Martinos Center > > Boston, USA > > > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh > > wrote: > > Dear Sylvana, > > > > >From the top op my head: When running the ICA, try > > only computing it > > for the MEG or EEG channels. (cfg.channel = 'MEG';), > > so it doesn't run > > on reference sensors in case of MEG. > > I have hunch that might help out. > > > > Cheers, > > Stephen > > > > > > > > On 6 July 2011 19:37, Sylvana > > wrote: > > > Hi all, > > > > > > I am trying to use ICA to clean EOG and ECG > > artifacts of neuromag data. > > > I am running ft_topoplotIC(cfg, comp), where > > 'comp' is the output of > > > ft_componentanalysis. > > > > > > I get the following error message: > > > > > > > > > ??? Error using ==> surf at 74 > > > X, Y, Z, and C cannot be complex. > > > > > > Error in ==> ft_plot_topo at 184 > > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), > > Zi, 'EdgeColor', > > > 'none', 'FaceColor', shading); > > > > > > Error in ==> ft_topoplotER at 753 > > > > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > > > Error in ==> ft_topoplotIC at 116 > > > ft_topoplotER(cfg, varargin{:}); > > > > > > > > > The complex variable is 'Zi', which is taken from > > 'comp'. I can modify > > > the function to take the real part of the variable > > (or the absolute > > > value), but I am not sure if this would be the > > correct thing to do. In > > > case this is a bug, I thought I should report it. > > Any comments? > > > > > > Thanks for your help, > > > > > > Sylvana Schister > > > Univ. of Utah > > > Dept. of Bioengineering > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -------------------------------------------------------------------------------- > > > Joseph Dien, > Senior Research Scientist > University of Maryland > > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From sherrykhan78 at gmail.com Thu Jul 7 18:32:57 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Thu, 7 Jul 2011 12:32:57 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: <1310054868.25490.10.camel@weston-desktop> References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> <1310054868.25490.10.camel@weston-desktop> Message-ID: Hi, tsss is more tricky, if uses default 4 sec window then you different dimensionality every 4 sec. Sheraz On Thu, Jul 7, 2011 at 12:07 PM, Sylvana wrote: > Hi all, > > Thank you so much for your quick reply. This is all very helpful. I am > using tsss filtered data. After thinking it through all day, I > understood that I have a dimensionality problem. > > Anyway, thanks again! > Cheers, > Sylvana > > On Wed, 2011-07-06 at 22:18 -0600, Sheraz Khan wrote: > > Hi Joseph, > > > > Most likely cause of ill-conditioned in neuromag data is maxfilter > > (signal space separation) which reduces the dimensionality from 306 > > (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar > > expansion of order 8). Also neuromag is consist of two different type > > of sensors (Planar Gradiometer and magnetometer) having different > > sensitivities, so either ica needs to run separately on them or > > combined by making them equal through normalization. > > > > Sheraz Khan > > Martinos Center > > Boston, USA > > > > > > > > On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > > I've had this same problem with EEGlab's runICA implementation > > when the rank of the data was less than the number of > > variables (i.e., it's an ill-conditioned matrix, which is to > > say it has multicolinearity). Including the reference channel > > can do this (since it's just zeroes). Using PCA to reduce the > > data to a subspace can help as well since the rank will now > > equal the number of variables (namely the number of factor > > scores will equal the number of retained factors). Before you > > go the PCA route, it's worth trying to figure out why the data > > is ill-conditioned. There is likely to be something wrong > > with one of your channels. Maybe two of them are shorted > > together or something along those lines. Or if you used mean > > mastoid reference and included both mastoids, that can do it > > too (since they will be exactly inversely correlated, one of > > them is statistically redundant, reducing the rank by one). > > My EP Toolkit artifact correction routine > > (http://sourceforge.net/projects/erppcatoolkit/) takes all > > these sorts of things into account when performing eyeblink > > correction. > > > > > > Cheers! > > > > > > Joe > > > > > > > > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > > > > Hi Sylvana, > > > > > > Is the data SSS (maxfilter), I normally have this problem > > > when data is SSS, try doing ICA with PCA (set at 64 > > > components). > > > > > > Sheraz Khan > > > Martinos Center > > > Boston, USA > > > > > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh > > > wrote: > > > Dear Sylvana, > > > > > > >From the top op my head: When running the ICA, try > > > only computing it > > > for the MEG or EEG channels. (cfg.channel = 'MEG';), > > > so it doesn't run > > > on reference sensors in case of MEG. > > > I have hunch that might help out. > > > > > > Cheers, > > > Stephen > > > > > > > > > > > > On 6 July 2011 19:37, Sylvana > > > wrote: > > > > Hi all, > > > > > > > > I am trying to use ICA to clean EOG and ECG > > > artifacts of neuromag data. > > > > I am running ft_topoplotIC(cfg, comp), where > > > 'comp' is the output of > > > > ft_componentanalysis. > > > > > > > > I get the following error message: > > > > > > > > > > > > ??? Error using ==> surf at 74 > > > > X, Y, Z, and C cannot be complex. > > > > > > > > Error in ==> ft_plot_topo at 184 > > > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), > > > Zi, 'EdgeColor', > > > > 'none', 'FaceColor', shading); > > > > > > > > Error in ==> ft_topoplotER at 753 > > > > > > > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > > > > > Error in ==> ft_topoplotIC at 116 > > > > ft_topoplotER(cfg, varargin{:}); > > > > > > > > > > > > The complex variable is 'Zi', which is taken from > > > 'comp'. I can modify > > > > the function to take the real part of the variable > > > (or the absolute > > > > value), but I am not sure if this would be the > > > correct thing to do. In > > > > case this is a bug, I thought I should report it. > > > Any comments? > > > > > > > > Thanks for your help, > > > > > > > > Sylvana Schister > > > > Univ. of Utah > > > > Dept. of Bioengineering > > > > > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > -------------------------------------------------------------------------------- > > > > > > Joseph Dien, > > Senior Research Scientist > > University of Maryland > > > > > > E-mail: jdien07 at mac.com > > Phone: 301-226-8848 > > Fax: 301-226-8811 > > http://homepage.mac.com/jdien07/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Thu Jul 7 21:22:42 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 14:22:42 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim On Thu, Jun 30, 2011 at 4:04 AM, odelia nakar wrote: > Hi Jim, > > Try : > cfg.neighbourdist = 0.03; > I found it good for my data. (When you run the function the channels that > repaired your data is displayed in the command window). > > Good luck! > Odelia. > > > ------------------------------ > Date: Thu, 30 Jun 2011 01:05:08 -0500 > From: megjim1 at gmail.com > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] channelrepair issue > > > Dear all, > > We have 4D's WH3600 MEG system (248 channels) and we found the > ----------------- > cfg = []; > cfg.dataset = > 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue = 320; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1 > ; cfg = ft_definetrial(cfg); > cfg.blc = > 'yes'; cfg.blcwindow = [-1 0]; > cfg.channel = {'MEG'}; > raw_DATA = ft_preprocessing(cfg); > raw_DATA.grad = ft_convert_units(raw_DATA.grad, 'cm') > > cfg = []; > cfg.badchannel = {'A234'}; > [raw_DATA] = ft_channelrepair(cfg, raw_DATA) > the input is raw data with 248 channels and 201 trials > repairing channel A234 > using neighbour A121 > using neighbour A143 > using neighbour A154 > using neighbour A173 > using neighbour A224 > using neighbour A8 > using neighbour A91 > repairing bad channels for trial 1 > repairing bad channels for trial 2 > repairing bad channels for trial 3 > ... > ------------------------------------ > > But channels like A121 and A143 are far away from the bad channel A234. How > can they be used as neighbours (i.e. within 4cm, the default value for > cfg.neighbourdist) for this bad channel? > > Any suggestions? > > Thanks a lot. > > Jim > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Thu Jul 7 21:26:26 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 14:26:26 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: > Hi Odelia, > > Yes, I downloaded the latest version of Fieldtrip and tried your suggestion > "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away > channels like A121 to do the channel-repair for A234 (these two channels are > 24.1172cm apart!). Here is the detail: > > --------------------------- > cfg = []; > cfg.dataset = 'e,rfhp0.1Hz'; > cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue = 320; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1; > cfg = ft_definetrial(cfg); > cfg.blc = 'yes'; % do > baseline correction with the complete trial > > cfg.blcwindow = [-1 0]; > cfg.channel = {'MEG'}; > raw_DATA = ft_preprocessing(cfg); > > > cfg = []; > cfg.badchannel = {'A234'}; > cfg.neighbourdist = 0.03; > > [raw_DATA] = ft_channelrepair(cfg, raw_DATA) > > --------------------------------------------------------------------- > > And here is the outcome: ----------------------------- > > the input is raw data with 248 channels and 201 trials > repairing channel A234 > using neighbour A121 > using neighbour A143 > using neighbour A173 > using neighbour A8 > > repairing bad channels for trial 1 > repairing bad channels for trial 2 > repairing bad channels for trial 3 > repairing bad channels for trial 4 > repairing bad channels for trial 5 > repairing bad channels for trial 6 > repairing bad channels for trial 7 > repairing bad channels for trial 8 > repairing bad channels for trial 9 > repairing bad channels for trial 10 > .... > > ------------------------- > > Thank you. > > Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Jul 7 23:30:06 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 7 Jul 2011 15:30:06 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Fri Jul 8 01:38:46 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 18:38:46 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > Jim, > > All I can do is confirm that this issue exists for our 4D data as well, > although we don't use the ft_channelrepair function. The same 4 quite > distant channels (one had been deleted in the dataset I had handy) were > chosen for repair when I ran this on one of our datasets (also a 248 channel > 4D system). I agree the choice doesn't make any sense given the 3 cm > distance you define. A quick look at the critical calculation in > ft_channelrepair, line 109 distance = ... is correct given the inputs. So I > wonder if the issue is with the actual channel indices used rather than the > calculation, but I don't have time to track that down. All I can say is that > for the distance you specify, channels A235, A216, A199, A215 would be much > closer to A234 than those that are selected via the channel repair function. > Channel A8 is in fact nearly 21 cm away from channel A234 in the array, > based on examination of the data read in from Eugene Kronberg's pdf4D matlab > object code, which I think was originally the basis for the FieldTrip 4D > reader function. > > Best, > > Don Rojas > > > On Jul 7, 2011, at 1:26 PM, Jim Li wrote: > > Dear Fieldtrip developer, > > Can anybody help me with this channel-repair issue I've been having? I can > provide the raw data if you need. I really want to solve the problem, you > know. > > Thanks a lot, > > Jim > > On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: > >> Hi Odelia, >> >> Yes, I downloaded the latest version of Fieldtrip and tried your >> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >> far-away channels like A121 to do the channel-repair for A234 (these two >> channels are 24.1172cm apart!). Here is the detail: >> >> --------------------------- >> cfg = []; >> cfg.dataset = 'e,rfhp0.1Hz'; >> cfg.trialdef.eventtype = 'TRIGGER'; >> cfg.trialdef.eventvalue = 320; >> cfg.trialdef.prestim = 1; >> cfg.trialdef.poststim = 1; >> cfg = ft_definetrial(cfg); >> cfg.blc = 'yes'; % do >> baseline correction with the complete trial >> >> cfg.blcwindow = [-1 0]; >> cfg.channel = {'MEG'}; >> raw_DATA = ft_preprocessing(cfg); >> >> >> cfg = []; >> cfg.badchannel = {'A234'}; >> cfg.neighbourdist = 0.03; >> >> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >> >> --------------------------------------------------------------------- >> >> And here is the outcome: ----------------------------- >> >> the input is raw data with 248 channels and 201 trials >> repairing channel A234 >> using neighbour A121 >> using neighbour A143 >> using neighbour A173 >> using neighbour A8 >> >> repairing bad channels for trial 1 >> repairing bad channels for trial 2 >> repairing bad channels for trial 3 >> repairing bad channels for trial 4 >> repairing bad channels for trial 5 >> repairing bad channels for trial 6 >> repairing bad channels for trial 7 >> repairing bad channels for trial 8 >> repairing bad channels for trial 9 >> repairing bad channels for trial 10 >> .... >> >> ------------------------- >> >> Thank you. >> >> Jim >> > _______________________________________________ > > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luoj at mail.nih.gov Fri Jul 8 02:01:23 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 7 Jul 2011 20:01:23 -0400 Subject: [FieldTrip] difficulty in reading 4D e,rfhp1.0Hz,COH file Message-ID: Hi, Can fieldtrip read this 4D file: e,rfhp1.0Hz,COH in any way? Thanks! Jessie From batrod at gmail.com Fri Jul 8 02:16:18 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Thu, 7 Jul 2011 19:16:18 -0500 Subject: [FieldTrip] ft_freqstatistics error with a newer version. Message-ID: Dear Fieldtrippers, i had a reshape error after downloading a recent version of fieldtrip (20110630) using freq_statistics: ??? Error using ==> reshape Size vector must have at least two elements. Error in ==> ft_freqstatistics at 230 dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data Error in ==> alpha_correl_behav at 97 [stat] = ft_freqstatistics(cfg, Power2{1,:}, Power4{1,:}, Power6{1,:}); With this newer version i also noticed new messages, but it may not be linked: "selection powspctrm along dimension 3 selection powspctrmsem along dimension 3 averaging powspctrm over time averaging powspctrmsem over time [...] " Thanks for any advice, Rodolphe -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 8 03:00:57 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Thu, 7 Jul 2011 19:00:57 -0600 Subject: [FieldTrip] difficulty in reading 4D e,rfhp1.0Hz,COH file In-Reply-To: References: Message-ID: A COH file is simply a regular epoch mode 4D file acquired either at the beginning (COH) or end (COH1) of a run. The coils are energized, so these are used to calculate the head position and headframe coordinate system. cfg.dataset = 'e,rfhp1.0Hz,COH'; coh_data = ft_preprocessing(cfg); should read the file. On Jul 7, 2011, at 6:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Can fieldtrip read this 4D file: e,rfhp1.0Hz,COH in any way? > Thanks! > > Jessie > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 From Don.Rojas at ucdenver.edu Fri Jul 8 03:36:53 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Thu, 7 Jul 2011 19:36:53 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at gmx.de Fri Jul 8 08:59:19 2011 From: paul_c at gmx.de (Paul Czienskowski) Date: Fri, 08 Jul 2011 08:59:19 +0200 Subject: [FieldTrip] Symmetric dipole localization Message-ID: <4E16AAC7.2060203@gmx.de> Dear all, I'm just trying to fit symmetric dipoles and have a question about this: I wondered, if it was sufficient to define the grid only on the one half of the region. Will the grid points be mirrored by the ft_dipolefitting routine? Best regards, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 From jan.schoffelen at donders.ru.nl Fri Jul 8 09:05:06 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 09:05:06 +0200 Subject: [FieldTrip] ft_freqstatistics error with a newer version. In-Reply-To: References: Message-ID: <7E620B2E-057C-4F4A-A344-5AAED57C1737@donders.ru.nl> Dear Rodolphe, I suspect you are using a single time-frequency bin in your statistics? Then it sounds like a singleton dimension issue to me. Could you generate some testdata and file a bug through the bugzilla website, uploading this testdata, as well as the code you used to generate the error? Thanks, Jan-Mathijs On Jul 8, 2011, at 2:16 AM, Rodolphe Nenert wrote: > Dear Fieldtrippers, > > i had a reshape error after downloading a recent version of fieldtrip (20110630) using freq_statistics: > > ??? Error using ==> reshape > Size vector must have at least two elements. > > Error in ==> ft_freqstatistics at 230 > dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data > > Error in ==> alpha_correl_behav at 97 > [stat] = ft_freqstatistics(cfg, Power2{1,:}, Power4{1,:}, Power6{1,:}); > > > With this newer version i also noticed new messages, but it may not be linked: > "selection powspctrm along dimension 3 > selection powspctrmsem along dimension 3 > averaging powspctrm over time > averaging powspctrmsem over time > [...] > " > > Thanks for any advice, > > Rodolphe > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From jan.schoffelen at donders.ru.nl Fri Jul 8 09:11:54 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 09:11:54 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Message-ID: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > >> Thank you very much for confirming the problem, Don, I appreciate it, :) >> >> Jim >> >> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >>> Dear Fieldtrip developer, >>> >>> Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. >>> >>> Thanks a lot, >>> >>> Jim >>> >>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> _______________________________________________ >>> >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 8 10:20:10 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jul 2011 10:20:10 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Message-ID: <4E16BDBA.2020209@donders.ru.nl> Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the > 4D reading code at the time, we had the 248-channel magnetometer > system in mind. It could be that there are some flaws related to the > handling of gradiometers. This should not only lead to (erratic) > issues at the level of channelrepair, but may also cause mayhem when > doing planar gradient transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal > with gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. > through DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > >> Jim et al. >> >> In thinking about this further, it seems to me that it is the >> indexing that is incorrect. The problem I think is specific to >> gradiometer systems, which have two (or more) locations per channel. >> The function appears to assume that the sensor index based on the >> sens.label field (only 1 per channel) will correspond 1 to 1 with the >> sens.grad field (2 locations per channel), which is not correct. So, >> my guess is that for first-order gradiometer systems, the correct >> index for the sensor location is 2x the index in the sens.label field. >> >> So, in an example I have handy at home, the label index for channel >> A234 is 107. Since I think Fieldtrip stores gradiometer locations (by >> default) as: >> >> Chn 1 lower coil x, y z >> Chn 1 upper coil x, y z >> Chn 2 lower coil x, y z >> Chn 2 upper coil x, y z >> . >> . >> . >> Chn N >> >> I think the correct position info for channel A234 would be found in >> sens.grad(214,:), not sens.grad(107,:), which is what the >> ft_channelrepair function chooses. So I think this is a bug in the >> function specific to gradiometer systems. >> >> Best, >> >> Don >> >> On Jul 7, 2011, at 5:38 PM, Jim Li wrote: >> >>> Thank you very much for confirming the problem, Don, I appreciate it, :) >>> Jim >>> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don >> > wrote: >>> >>> Jim, >>> >>> All I can do is confirm that this issue exists for our 4D data >>> as well, although we don't use the ft_channelrepair function. >>> The same 4 quite distant channels (one had been deleted in the >>> dataset I had handy) were chosen for repair when I ran this on >>> one of our datasets (also a 248 channel 4D system). I agree the >>> choice doesn't make any sense given the 3 cm distance you >>> define. A quick look at the critical calculation in >>> ft_channelrepair, line 109 distance = ... is correct given the >>> inputs. So I wonder if the issue is with the actual channel >>> indices used rather than the calculation, but I don't have time >>> to track that down. All I can say is that for the distance you >>> specify, channels A235, A216, A199, A215 would be much closer to >>> A234 than those that are selected via the channel repair >>> function. Channel A8 is in fact nearly 21 cm away from channel >>> A234 in the array, based on examination of the data read in from >>> Eugene Kronberg's pdf4D matlab object code, which I think was >>> originally the basis for the FieldTrip 4D reader function. >>> >>> Best, >>> >>> Don Rojas >>> >>> >>> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >>> >>>> Dear Fieldtrip developer, >>>> Can anybody help me with this channel-repair issue I've been >>>> having? I can provide the raw data if you need. I really want >>>> to solve the problem, you know. >>>> Thanks a lot, >>>> Jim >>>> >>>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li >>> > wrote: >>>> >>>> Hi Odelia, >>>> Yes, I downloaded the latest version of Fieldtrip and tried >>>> your suggestion "cfg.neighbourdist = 0.03", but it still >>>> weirdly uses the far-away channels like A121 to do the >>>> channel-repair for A234 (these two channels are 24.1172cm >>>> apart!). Here is the detail: >>>> --------------------------- >>>> cfg = []; >>>> cfg.dataset = 'e,rfhp0.1Hz'; >>>> cfg.trialdef.eventtype = 'TRIGGER'; >>>> cfg.trialdef.eventvalue = 320; >>>> cfg.trialdef.prestim = 1; >>>> cfg.trialdef.poststim = 1; >>>> cfg = ft_definetrial(cfg); >>>> cfg.blc = >>>> 'yes'; % do baseline >>>> correction with the complete trial >>>> >>>> cfg.blcwindow = [-1 0]; >>>> cfg.channel = {'MEG'}; >>>> raw_DATA = ft_preprocessing(cfg); >>>> cfg = []; >>>> cfg.badchannel = {'A234'}; >>>> cfg.neighbourdist = 0.03; >>>> >>>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>>> --------------------------------------------------------------------- >>>> And here is the outcome: ----------------------------- >>>> >>>> the input is raw data with 248 channels and 201 trials >>>> repairing channel A234 >>>> using neighbour A121 >>>> using neighbour A143 >>>> using neighbour A173 >>>> using neighbour A8 >>>> >>>> repairing bad channels for trial 1 >>>> repairing bad channels for trial 2 >>>> repairing bad channels for trial 3 >>>> repairing bad channels for trial 4 >>>> repairing bad channels for trial 5 >>>> repairing bad channels for trial 6 >>>> repairing bad channels for trial 7 >>>> repairing bad channels for trial 8 >>>> repairing bad channels for trial 9 >>>> repairing bad channels for trial 10 >>>> .... >>>> ------------------------- >>>> Thank you. >>>> Jim >>>> >>>> _______________________________________________ >>>> >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> ----------------------- >>> Don Rojas, Ph.D. >>> Associate Professor of Psychiatry >>> U. of Colorado Denver Anschutz Medical Campus >>> Director, UCD Magnetoencephalography Lab >>> 13001 E. 17th Pl F546 >>> Aurora, CO 80045 >>> 303-724-4994 >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Fri Jul 8 15:00:27 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Fri, 8 Jul 2011 15:00:27 +0200 Subject: [FieldTrip] artifact rejection issue - Poles Message-ID: Deat all, I am trying to run the tutorial scripts on a dataset I have. The sampling rate here is 6000 Hz. I cannot perform the artifact rejection. Here is the error. ??? Error using ==> filter_with_correction at 42 Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter. Error in ==> ft_preproc_bandpassfilter at 80 filt = filter_with_correction(B,A,dat,dir); Error in ==> preproc at 281 if strcmp(cfg.bpfilter, 'yes'), dat = ft_preproc_bandpassfilter(dat, fsample, cfg.bpfreq, cfg.bpfiltord, cfg.bpfilttype, cfg.bpfiltdir); end I have tried to change the cutoff, but the error is still present. Has someone ever experienced this error? Many thanks, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Fri Jul 8 15:28:47 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Fri, 8 Jul 2011 15:28:47 +0200 (CEST) Subject: [FieldTrip] ft_channelrepair with eeg data Message-ID: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> Hi Fieldtrip-warriors, I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- ### channels_to_repair={'FT9', 'CPz'}; cfg=[]; cfg.neighbourdist = 4; cfg.badchannel=channels_to_repair; data=ft_channelrepair(cfg, data); ### Running this produces the following error msg: ### ??? Error using ==> ft_checkconfig at 157 The field cfg.neighbours is required Error in ==> ft_channelrepair at 58 cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); ### It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? I also see the following in the help file for ft_channelrepair:- ### Since a nearest neighbour average is used, the input should contain a gradiometer or electrode definition, i.e. data.grad or data.elec. ### What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? I'm using a standard 10-10 64-electrode layout. Best, -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From stephen.whitmarsh at gmail.com Fri Jul 8 15:44:44 2011 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 8 Jul 2011 15:44:44 +0200 Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> References: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: He Tom, Wow, look what was made this morning by Jorn at basecamp: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors Cheers, Stephen (Pte(T)) On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: > > Hi Fieldtrip-warriors, > > I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- > > ### > >   channels_to_repair={'FT9', 'CPz'}; > >   cfg=[]; >   cfg.neighbourdist = 4; >   cfg.badchannel=channels_to_repair; > >   data=ft_channelrepair(cfg, data); > > ### > > Running this produces the following error msg: > > ### > >   ??? Error using ==> ft_checkconfig at 157 >   The field cfg.neighbours is required > > >   Error in ==> ft_channelrepair at 58 >   cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); > > ### > > It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? > > I also see the following in the help file for ft_channelrepair:- > > ### > >     Since a nearest neighbour average is used, the input should contain >     a gradiometer or electrode definition, i.e. data.grad or data.elec. > > ### > > What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? > > I'm using a standard 10-10 64-electrode layout. > > Best, > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From t.marshall at fcdonders.ru.nl Fri Jul 8 16:17:12 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Fri, 8 Jul 2011 16:17:12 +0200 (CEST) Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: Message-ID: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> Thanks Stephen. ft_neighbourselection looks like it might be what I need. So now I tried this:- ### channels_to_repair={'FT9', 'CPz'}; layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay'); cfg=[]; cfg.layout=layout_file; cfg.badchannel=channels_to_repair; cfg.neighbours = ft_neighbourselection(cfg, data); data=ft_channelrepair(cfg, data); ### But what that gave me was:- ### ??? Reference to non-existent field 'elec'. Error in ==> ft_channelrepair at 92 sens = data.elec; ### This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me? Best, Tom ----- Original Message ----- From: "Stephen Whitmarsh" To: "Email discussion list for the FieldTrip project" Sent: Friday, 8 July, 2011 3:44:44 PM Subject: Re: [FieldTrip] ft_channelrepair with eeg data He Tom, Wow, look what was made this morning by Jorn at basecamp: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors Cheers, Stephen (Pte(T)) On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: > > Hi Fieldtrip-warriors, > > I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- > > ### > >   channels_to_repair={'FT9', 'CPz'}; > >   cfg=[]; >   cfg.neighbourdist = 4; >   cfg.badchannel=channels_to_repair; > >   data=ft_channelrepair(cfg, data); > > ### > > Running this produces the following error msg: > > ### > >   ??? Error using ==> ft_checkconfig at 157 >   The field cfg.neighbours is required > > >   Error in ==> ft_channelrepair at 58 >   cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); > > ### > > It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? > > I also see the following in the help file for ft_channelrepair:- > > ### > >     Since a nearest neighbour average is used, the input should contain >     a gradiometer or electrode definition, i.e. data.grad or data.elec. > > ### > > What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? > > I'm using a standard 10-10 64-electrode layout. > > Best, > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From jm.horschig at donders.ru.nl Fri Jul 8 19:15:10 2011 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Fri, 08 Jul 2011 19:15:10 +0200 Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> References: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <4E173B1E.1070909@donders.ru.nl> Hey Tom, apart from the fact that we indeed decided to change ft_channelrepair to require cfg.neighbours to be user specified (I committed that change just a few hours before your message), you do need data.elec information. data.elec should contain sensor information like position for your data. As an extremely dirty workaround, you could use the the EEG layout templates as following (I did that for testing ft_channelrepair): cfg.layout = 'EEG1010.lay'; data.elec = ft_prepare_layout(cfg); data.elec.pnt = lay.pos; I do not whether there is a more appropriate way available ;) Best, Jörn On 7/8/2011 4:17 PM, Marshall, T.R. (Tom) wrote: > Thanks Stephen. ft_neighbourselection looks like it might be what I need. > > So now I tried this:- > > ### > > channels_to_repair={'FT9', 'CPz'}; > layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay'); > > cfg=[]; > cfg.layout=layout_file; > cfg.badchannel=channels_to_repair; > > cfg.neighbours = ft_neighbourselection(cfg, data); > > data=ft_channelrepair(cfg, data); > > ### > > But what that gave me was:- > > ### > > ??? Reference to non-existent field 'elec'. > > Error in ==> ft_channelrepair at 92 > sens = data.elec; > > ### > > This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me? > > Best, > Tom > > ----- Original Message ----- > From: "Stephen Whitmarsh" > To: "Email discussion list for the FieldTrip project" > Sent: Friday, 8 July, 2011 3:44:44 PM > Subject: Re: [FieldTrip] ft_channelrepair with eeg data > > He Tom, > > Wow, look what was made this morning by Jorn at basecamp: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors > > Cheers, > > Stephen (Pte(T)) > > > > On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: >> Hi Fieldtrip-warriors, >> >> I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- >> >> ### >> >> channels_to_repair={'FT9', 'CPz'}; >> >> cfg=[]; >> cfg.neighbourdist = 4; >> cfg.badchannel=channels_to_repair; >> >> data=ft_channelrepair(cfg, data); >> >> ### >> >> Running this produces the following error msg: >> >> ### >> >> ??? Error using ==> ft_checkconfig at 157 >> The field cfg.neighbours is required >> >> >> Error in ==> ft_channelrepair at 58 >> cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); >> >> ### >> >> It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? >> >> I also see the following in the help file for ft_channelrepair:- >> >> ### >> >> Since a nearest neighbour average is used, the input should contain >> a gradiometer or electrode definition, i.e. data.grad or data.elec. >> >> ### >> >> What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? >> >> I'm using a standard 10-10 64-electrode layout. >> >> Best, >> >> -- >> Tom Marshall, MSc. >> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging >> tel: +31(0)243668487 >> email: t.marshall at fcdonders.ru.nl >> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands >> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From megjim1 at gmail.com Fri Jul 8 19:20:46 2011 From: megjim1 at gmail.com (Jim Li) Date: Fri, 8 Jul 2011 12:20:46 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E16BDBA.2020209@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: Dear Don, jan-mathijs and Jörn, Thank you very much for tackling this problem specific for axial gradiometer systems like ours. I tried the following codes and got the 3D sensor plot. The neighbours look fine to me. For example, for channel A234 the 3 nearest neighbours are A235, A216 and A215 as expected. This is very different from the 3-cm-neighbours selected by ft_channelrepair when A234 is the bad channel, which includes A143, A173, A8, A121. --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); ft_neighbourplot(cfg, raw_DATA) ------------------------------------------------------ and the output for the last commnad looks like this: --------------------------- Using the gradiometer configuration from the dataset. undoing the SupineTip balancing there are on average 7.9 neighbours per channel Using the gradiometer configuration from the dataset. undoing the SupineTip balancing ------------------------ Thank you very much and looking forward to the new revision. Jim On Fri, Jul 8, 2011 at 3:20 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > ** > Dear Jim, Don and others, > > First of all, what Don suggested sounds indeed like the cause, if I > remember things correctly (with my limited experience). > > Anyhow, could one of you check ft_neighbourplot with the dataset and the > neighbourselection of choice? This allows you to see what neighbours are > selected for which sensors and where they lie in space. If this looks fine, > than the problem lies indeed in how sensor position is deduced from the data > structure. > > Best, > Jörn > > > > On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the 4D > reading code at the time, we had the 248-channel magnetometer system in > mind. It could be that there are some flaws related to the handling of > gradiometers. This should not only lead to (erratic) issues at the level of > channelrepair, but may also cause mayhem when doing planar gradient > transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal with > gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. through > DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that > is incorrect. The problem I think is specific to gradiometer systems, which > have two (or more) locations per channel. The function appears to assume > that the sensor index based on the sens.label field (only 1 per channel) > will correspond 1 to 1 with the sens.grad field (2 locations per channel), > which is not correct. So, my guess is that for first-order gradiometer > systems, the correct index for the sensor location is 2x the index in the > sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is > 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in > sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair > function chooses. So I think this is a bug in the function specific to > gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > > Thank you very much for confirming the problem, Don, I appreciate it, :) > > Jim > > On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, >> although we don't use the ft_channelrepair function. The same 4 quite >> distant channels (one had been deleted in the dataset I had handy) were >> chosen for repair when I ran this on one of our datasets (also a 248 channel >> 4D system). I agree the choice doesn't make any sense given the 3 cm >> distance you define. A quick look at the critical calculation in >> ft_channelrepair, line 109 distance = ... is correct given the inputs. So I >> wonder if the issue is with the actual channel indices used rather than the >> calculation, but I don't have time to track that down. All I can say is that >> for the distance you specify, channels A235, A216, A199, A215 would be much >> closer to A234 than those that are selected via the channel repair function. >> Channel A8 is in fact nearly 21 cm away from channel A234 in the array, >> based on examination of the data read in from Eugene Kronberg's pdf4D matlab >> object code, which I think was originally the basis for the FieldTrip 4D >> reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >> Dear Fieldtrip developer, >> >> Can anybody help me with this channel-repair issue I've been having? I can >> provide the raw data if you need. I really want to solve the problem, you >> know. >> >> Thanks a lot, >> >> Jim >> >> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >> >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your >>> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >>> far-away channels like A121 to do the channel-repair for A234 (these two >>> channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do >>> baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 8 19:24:54 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jul 2011 19:24:54 +0200 Subject: [FieldTrip] Functionality change - neighbourselection will be obliged by the user Message-ID: <4E173D66.1080204@donders.ru.nl> Dear FieldTrip community, Up until now, many users and functions relied on a predefined way to define proximal or neighbouring sensor, namely using a distance measurement. We changed the functionality of ft_neighbourselection and related functions, which will be explained in the following. *1 - The user is obliged to define and verify channel neighbours* Driven by some thoughts and current discussion going on in the FieldTrip mailinglist, we decided to change neighbourselection. Within the next days, all functions which require information about proximal or neighbouring sensors will be required to have a cfg.neighbour field that you as the user have to specify explicitly. This may be obvious for some functions, such as cluster statistics on channel level, but not so much for other functions such as planar gradient computation or channelrepair. In order to ease the way of getting into the whole neighbourselection issue, we wrote 3 FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template Please note that you can use ft_neighbourplot to see the current neighbourselection and verify whether this seems like a good choice. Although we try to come up with extremely smart ways to compute neighbours of your data, selection of neighbours can still be highly subjective. Therefore, we also decided to do the following: *2 - Neighbours can be defined using different methods* Since the near beginning of FieldTrip, neighbours were selected based on a 'distance' approach, meaning that nearby sensors were defined as neighbours. This has shown to be valid for some systems given a predefined distance (neighbdist) of 4cm, whereas other systems needed a different neighbdist. In order to reduce subjectivity and arbitrariness of the maximal distance of a sensor to be called 'neighbour', we implemented a 'triangulation' approach. For more information, see the corresponding FAQ above. However, since systems around the world should be similar in terms of sensor position, we decided to implement a 'template'-based approach, which loads a predefined neighbour-template from file. It is up to you to decide what approach you are most comfortable with. The standard behaviour of ft_neighbourselection still is the old 'distance' approach. *3 - Call for neighbour templates * Now, dear community, you may become active and share your neighbour-templates. Here at the Donders, we are primarily working with the CTF275 system and have thus quite some expertise and experience. For this system, you can already find a template in the newer FieldTrip versions. We will continue improving the neighbourdefinition of this template and try to be as objective as possible. Furthermore, we will start creating templates for other systems as well and try to optimize these. However, when it comes to other systems, also including EEG systems, you might be more experienced. Therefore, we would like to ask whether you want to share your expertise and send the neighbourstructure that you are using on your system to us (== me). I will then try to incorporate your subjective selection with ours, probably after some discussion. If you are willing to support us in that respect, please do *not* send a mail to the mailing-list but to my personal mail address, as I will be organizing the templates: jm.horschig at donders.ru.nl Thanks in advance for your cooperation. Best regards on behalf of the developer team, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 8 21:06:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 21:06:10 +0200 Subject: [FieldTrip] slight change in default behaviour ft_componentanalysis (method = 'runica'/'binica') Message-ID: Dear all, I implemented a slight change in the default behaviour of ft_componentanalysis when using runica or binica as method. In general componentanalysis unmixes the sensor level data, and provides a spatial mixing matrix (comp.topo), as well as the time course of the components (in comp.trial). By construction (if you did comp=ft_componentanalysis(cfg,data)) data.trial{x} = comp.topo*comp.trial{x}; The change in behaviour pertains to the relative scaling of the mixing matrix and the component time-courses. Before, default behaviour caused the magnitude of the values in the mixing matrix to be of the same order of magnitude as the values in the original time courses (data.trial). For reasons I will not go into, this could cause numerical problems at some later stage of some analysis pipeline. Also, when using other methods in ft_componentanalysis (such as pca), the magnitude of the values in the component time courses approximately matched the magnitude of the values in the original time courses. For consistency and to avoid potential problems at later stages of analysis, I changed the default behaviour of ft_componentanalysis (with method runica or binica) such that the scaling is contained in the component time courses, rather than in the mixing matrix. Note that this only changes the output of the function up to a scaling of the mixing matrix and the time courses of the components. If you don't want this behaviour, or if you want to keep the behaviour consistent to the old times, you need to specify cfg.normalisesphere = 'no'. Have a good weekend, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 8 21:17:27 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Fri, 8 Jul 2011 13:17:27 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E16BDBA.2020209@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: Jörn, Jim et al. There is indeed a general problem, most likely with channel indexing, in gradiometer systems. I think the data are read correctly with the low level functions, but functions like ft_channelrepair, ft_neighbourselection and ft_neighbourplot are not accounting for the locations correctly. I have attached a picture that I think illustrates this issue reasonably well. The following code was used t[cid:593D3C1E-767D-4B26-B831-AF6BB4FFA711 at ucdenver.pvt]o generate this plot: % read in data cfg = []; cfg.dataset = 'e,rfhp1.0Hz,COH'; coh = ft_preprocessing(cfg); % get neighbors and plot cfg = []; cfg.neighbourdist = .03; cfg.neighbours = ft_neighbourselection(cfg,coh); cfg.layout = '4D248.lay'; ft_neighbourplot(cfg,coh); You can see that the channel selected is labeled A216, which is incorrect - it should be A248. It's three neighbors are also incorrect (A208, A118 and A134 should probably be A195, A228 and A247). I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing today, so perhaps it will be the same problem and the fix can be propagated to these other functions. Don On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighbors.jpg Type: image/jpg Size: 49281 bytes Desc: neighbors.jpg URL: From Don.Rojas at ucdenver.edu Sat Jul 9 00:57:44 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Fri, 8 Jul 2011 16:57:44 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> As a short follow up on this, the behavior of ft_neighbourplot is suspect only when supplying a cfg.neighbours field and plotting the result using the 2d layout file (as in the example I gave below), so this issue may not be the same as for the channel repair function. Using no layout file, the 3D plotted locations and labels appear to be correct. I can verify that the lower level functions called by ft_neighbourplot such as channelposition.m are returning the correct position and label info, but haven't had time to track the 2d plotting result down further. The neighbours returned by ft_neighbourselection also appear to be okay given a specified input distance. On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: Jörn, Jim et al. There is indeed a general problem, most likely with channel indexing, in gradiometer systems. I think the data are read correctly with the low level functions, but functions like ft_channelrepair, ft_neighbourselection and ft_neighbourplot are not accounting for the locations correctly. I have attached a picture that I think illustrates this issue reasonably well. The following code was used to generate this plot: % read in data cfg = []; cfg.dataset = 'e,rfhp1.0Hz,COH'; coh = ft_preprocessing(cfg); % get neighbors and plot cfg = []; cfg.neighbourdist = .03; cfg.neighbours = ft_neighbourselection(cfg,coh); cfg.layout = '4D248.lay'; ft_neighbourplot(cfg,coh); You can see that the channel selected is labeled A216, which is incorrect - it should be A248. It's three neighbors are also incorrect (A208, A118 and A134 should probably be A195, A228 and A247). I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing today, so perhaps it will be the same problem and the fix can be propagated to these other functions. Don On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Sat Jul 9 03:33:18 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Sat, 09 Jul 2011 03:33:18 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> Message-ID: <4E17AFDE.2090701@donders.ru.nl> Hi, SInce the new updates (which should be available in the new FT download version, see also the corresponding mail on the mailing list), I would suggest to use a user-defined neighbourstructure, verify this and then call channelrepair. E.g. try 'triangulation' as a method - it might result in a better neighbourhood representation. Also, currently neighbourselection is using config settings first before searching the data structure for sensor position information. So if you define cfg.layout, it will definitely use the layout (so, 2D coordinates) instead of 3D coordinates defined in your data. This might be suboptimal as well. Sorry for all the inconveniences. We will try to check why the problem you got causes an issue and hopefully find a more generic way to solve this. Jim, if not already done, it would be great if you followed Jan-Mathijs' suggestion to provide further information such as example data so that we can reproduce your problem and try to solve it. Don, thanks for helping out ;) Best, Jörn On 7/9/2011 12:57 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > As a short follow up on this, the behavior of ft_neighbourplot is > suspect only when supplying a cfg.neighbours field and plotting the > result using the 2d layout file (as in the example I gave below), so > this issue may not be the same as for the channel repair function. > Using no layout file, the 3D plotted locations and labels appear to be > correct. I can verify that the lower level functions called by > ft_neighbourplot such as channelposition.m are returning the correct > position and label info, but haven't had time to track the 2d plotting > result down further. The neighbours returned by ft_neighbourselection > also appear to be okay given a specified input distance. > > On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: > >> Jörn, Jim et al. >> >> There is indeed a general problem, most likely with channel indexing, >> in gradiometer systems. I think the data are read correctly with the >> low level functions, but functions like ft_channelrepair, >> ft_neighbourselection and ft_neighbourplot are not accounting for the >> locations correctly. I have attached a picture that I think >> illustrates this issue reasonably well. The following code was used >> to generate this plot: >> >> % read in data >> cfg = []; >> cfg.dataset = 'e,rfhp1.0Hz,COH'; >> coh = ft_preprocessing(cfg); >> >> % get neighbors and plot >> cfg = []; >> cfg.neighbourdist = .03; >> cfg.neighbours = ft_neighbourselection(cfg,coh); >> cfg.layout = '4D248.lay'; >> ft_neighbourplot(cfg,coh); >> >> You can see that the channel selected is labeled A216, which is >> incorrect - it should be A248. It's three neighbors are also >> incorrect (A208, A118 and A134 should probably be A195, A228 and A247). >> >> I'm guessing this is the same indexing issue for gradiometers. >> Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing >> today, so perhaps it will be the same problem and the fix can be >> propagated to these other functions. >> >> Don >> >> On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: >> >>> Dear Jim, Don and others, >>> >>> First of all, what Don suggested sounds indeed like the cause, if I >>> remember things correctly (with my limited experience). >>> >>> Anyhow, could one of you check ft_neighbourplot with the dataset and >>> the neighbourselection of choice? This allows you to see what >>> neighbours are selected for which sensors and where they lie in >>> space. If this looks fine, than the problem lies indeed in how >>> sensor position is deduced from the data structure. >>> >>> Best, >>> Jörn >>> >>> >>> On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: >>>> Dear Don, >>>> >>>> This sounds like a very likely cause of the problem. When we wrote >>>> the 4D reading code at the time, we had the 248-channel >>>> magnetometer system in mind. It could be that there are some flaws >>>> related to the handling of gradiometers. This should not only lead >>>> to (erratic) issues at the level of channelrepair, but may also >>>> cause mayhem when doing planar gradient transformation, or source >>>> reconstruction. >>>> Would you happen to >>>> 1) feel like tackling this one with me, and improve FieldTrip to >>>> deal with gradiometer systems correctly? >>>> >>>> or >>>> >>>> 2) have a small gradiometer dataset which you can send to me (e.g. >>>> through DropBox), so that I can look into it? >>>> >>>> We can further discuss this off the discussion list. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> >>>> On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: >>>> >>>>> Jim et al. >>>>> >>>>> In thinking about this further, it seems to me that it is the >>>>> indexing that is incorrect. The problem I think is specific to >>>>> gradiometer systems, which have two (or more) locations per >>>>> channel. The function appears to assume that the sensor index >>>>> based on the sens.label field (only 1 per channel) will correspond >>>>> 1 to 1 with the sens.grad field (2 locations per channel), which >>>>> is not correct. So, my guess is that for first-order gradiometer >>>>> systems, the correct index for the sensor location is 2x the index >>>>> in the sens.label field. >>>>> >>>>> So, in an example I have handy at home, the label index for >>>>> channel A234 is 107. Since I think Fieldtrip stores gradiometer >>>>> locations (by default) as: >>>>> >>>>> Chn 1 lower coil x, y z >>>>> Chn 1 upper coil x, y z >>>>> Chn 2 lower coil x, y z >>>>> Chn 2 upper coil x, y z >>>>> . >>>>> . >>>>> . >>>>> Chn N >>>>> >>>>> I think the correct position info for channel A234 would be found >>>>> in sens.grad(214,:), not sens.grad(107,:), which is what the >>>>> ft_channelrepair function chooses. So I think this is a bug in the >>>>> function specific to gradiometer systems. >>>>> >>>>> Best, >>>>> >>>>> Don >>>>> >>>>> On Jul 7, 2011, at 5:38 PM, Jim Li wrote: >>>>> >>>>>> Thank you very much for confirming the problem, Don, I appreciate >>>>>> it, :) >>>>>> Jim >>>>>> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don >>>>>> > wrote: >>>>>> >>>>>> Jim, >>>>>> >>>>>> All I can do is confirm that this issue exists for our 4D >>>>>> data as well, although we don't use the ft_channelrepair >>>>>> function. The same 4 quite distant channels (one had been >>>>>> deleted in the dataset I had handy) were chosen for repair >>>>>> when I ran this on one of our datasets (also a 248 channel 4D >>>>>> system). I agree the choice doesn't make any sense given the >>>>>> 3 cm distance you define. A quick look at the critical >>>>>> calculation in ft_channelrepair, line 109 distance = ... is >>>>>> correct given the inputs. So I wonder if the issue is with >>>>>> the actual channel indices used rather than the calculation, >>>>>> but I don't have time to track that down. All I can say is >>>>>> that for the distance you specify, channels A235, A216, A199, >>>>>> A215 would be much closer to A234 than those that are >>>>>> selected via the channel repair function. Channel A8 is in >>>>>> fact nearly 21 cm away from channel A234 in the array, based >>>>>> on examination of the data read in from Eugene Kronberg's >>>>>> pdf4D matlab object code, which I think was originally the >>>>>> basis for the FieldTrip 4D reader function. >>>>>> >>>>>> Best, >>>>>> >>>>>> Don Rojas >>>>>> >>>>>> >>>>>> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >>>>>> >>>>>>> Dear Fieldtrip developer, >>>>>>> Can anybody help me with this channel-repair issue I've been >>>>>>> having? I can provide the raw data if you need. I really >>>>>>> want to solve the problem, you know. >>>>>>> Thanks a lot, >>>>>>> Jim >>>>>>> >>>>>>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li >>>>>> > wrote: >>>>>>> >>>>>>> Hi Odelia, >>>>>>> Yes, I downloaded the latest version of Fieldtrip and >>>>>>> tried your suggestion "cfg.neighbourdist = 0.03", but >>>>>>> it still weirdly uses the far-away channels like A121 to >>>>>>> do the channel-repair for A234 (these two channels are >>>>>>> 24.1172cm apart!). Here is the detail: >>>>>>> --------------------------- >>>>>>> cfg = []; >>>>>>> cfg.dataset = 'e,rfhp0.1Hz'; >>>>>>> cfg.trialdef.eventtype = 'TRIGGER'; >>>>>>> cfg.trialdef.eventvalue = 320; >>>>>>> cfg.trialdef.prestim = 1; >>>>>>> cfg.trialdef.poststim = 1; >>>>>>> cfg = ft_definetrial(cfg); >>>>>>> cfg.blc = >>>>>>> 'yes'; % do baseline >>>>>>> correction with the complete trial >>>>>>> >>>>>>> cfg.blcwindow = [-1 0]; >>>>>>> cfg.channel = {'MEG'}; >>>>>>> raw_DATA = ft_preprocessing(cfg); >>>>>>> cfg = []; >>>>>>> cfg.badchannel = {'A234'}; >>>>>>> cfg.neighbourdist = 0.03; >>>>>>> >>>>>>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>>>>>> --------------------------------------------------------------------- >>>>>>> And here is the outcome: ----------------------------- >>>>>>> >>>>>>> the input is raw data with 248 channels and 201 trials >>>>>>> repairing channel A234 >>>>>>> using neighbour A121 >>>>>>> using neighbour A143 >>>>>>> using neighbour A173 >>>>>>> using neighbour A8 >>>>>>> >>>>>>> repairing bad channels for trial 1 >>>>>>> repairing bad channels for trial 2 >>>>>>> repairing bad channels for trial 3 >>>>>>> repairing bad channels for trial 4 >>>>>>> repairing bad channels for trial 5 >>>>>>> repairing bad channels for trial 6 >>>>>>> repairing bad channels for trial 7 >>>>>>> repairing bad channels for trial 8 >>>>>>> repairing bad channels for trial 9 >>>>>>> repairing bad channels for trial 10 >>>>>>> .... >>>>>>> ------------------------- >>>>>>> Thank you. >>>>>>> Jim >>>>>>> >>>>>>> _______________________________________________ >>>>>>> >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> ----------------------- >>>>>> Don Rojas, Ph.D. >>>>>> Associate Professor of Psychiatry >>>>>> U. of Colorado Denver Anschutz Medical Campus >>>>>> Director, UCD Magnetoencephalography Lab >>>>>> 13001 E. 17th Pl F546 >>>>>> Aurora, CO 80045 >>>>>> 303-724-4994 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> ----------------------- >>>>> Don Rojas, Ph.D. >>>>> Associate Professor of Psychiatry >>>>> U. of Colorado Denver Anschutz Medical Campus >>>>> Director, UCD Magnetoencephalography Lab >>>>> 13001 E. 17th Pl F546 >>>>> Aurora, CO 80045 >>>>> 303-724-4994 >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> Dr. J.M. (Jan-Mathijs) Schoffelen >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: 0031-24-3614793 >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail:jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web:http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Sun Jul 10 19:49:49 2011 From: megjim1 at gmail.com (Jim Li) Date: Sun, 10 Jul 2011 12:49:49 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E17AFDE.2090701@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> <4E17AFDE.2090701@donders.ru.nl> Message-ID: Hello Jörn, I sent an email to you guys a moment ago. Please let me know if you get that email or not. Thanks. Jim On Fri, Jul 8, 2011 at 8:33 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > ** > Hi, > > SInce the new updates (which should be available in the new FT download > version, see also the corresponding mail on the mailing list), I would > suggest to use a user-defined neighbourstructure, verify this and then call > channelrepair. E.g. try 'triangulation' as a method - it might result in a > better neighbourhood representation. > Also, currently neighbourselection is using config settings first before > searching the data structure for sensor position information. So if you > define cfg.layout, it will definitely use the layout (so, 2D coordinates) > instead of 3D coordinates defined in your data. This might be suboptimal as > well. > > Sorry for all the inconveniences. We will try to check why the problem you > got causes an issue and hopefully find a more generic way to solve this. > Jim, if not already done, it would be great if you followed Jan-Mathijs' > suggestion to provide further information such as example data so that we > can reproduce your problem and try to solve it. > Don, thanks for helping out ;) > > Best, > Jörn > > > > On 7/9/2011 12:57 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > As a short follow up on this, the behavior of ft_neighbourplot is suspect > only when supplying a cfg.neighbours field and plotting the result using the > 2d layout file (as in the example I gave below), so this issue may not be > the same as for the channel repair function. Using no layout file, the 3D > plotted locations and labels appear to be correct. I can verify that the > lower level functions called by ft_neighbourplot such as channelposition.m > are returning the correct position and label info, but haven't had time to > track the 2d plotting result down further. The neighbours returned by > ft_neighbourselection also appear to be okay given a specified input > distance. > > On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jörn, Jim et al. > > There is indeed a general problem, most likely with channel indexing, in > gradiometer systems. I think the data are read correctly with the low level > functions, but functions like ft_channelrepair, ft_neighbourselection and > ft_neighbourplot are not accounting for the locations correctly. I have > attached a picture that I think illustrates this issue reasonably well. The > following code was used to generate this plot: > > % read in data > cfg = []; > cfg.dataset = 'e,rfhp1.0Hz,COH'; > coh = ft_preprocessing(cfg); > > % get neighbors and plot > cfg = []; > cfg.neighbourdist = .03; > cfg.neighbours = ft_neighbourselection(cfg,coh); > cfg.layout = '4D248.lay'; > ft_neighbourplot(cfg,coh); > > You can see that the channel selected is labeled A216, which is incorrect - > it should be A248. It's three neighbors are also incorrect (A208, A118 and > A134 should probably be A195, A228 and A247). > > I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs > mentioned a fixed version of ft_channelrepair appearing today, so perhaps it > will be the same problem and the fix can be propagated to these other > functions. > > Don > > On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: > > Dear Jim, Don and others, > > First of all, what Don suggested sounds indeed like the cause, if I > remember things correctly (with my limited experience). > > Anyhow, could one of you check ft_neighbourplot with the dataset and the > neighbourselection of choice? This allows you to see what neighbours are > selected for which sensors and where they lie in space. If this looks fine, > than the problem lies indeed in how sensor position is deduced from the data > structure. > > Best, > Jörn > > > On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the 4D > reading code at the time, we had the 248-channel magnetometer system in > mind. It could be that there are some flaws related to the handling of > gradiometers. This should not only lead to (erratic) issues at the level of > channelrepair, but may also cause mayhem when doing planar gradient > transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal with > gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. through > DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that > is incorrect. The problem I think is specific to gradiometer systems, which > have two (or more) locations per channel. The function appears to assume > that the sensor index based on the sens.label field (only 1 per channel) > will correspond 1 to 1 with the sens.grad field (2 locations per channel), > which is not correct. So, my guess is that for first-order gradiometer > systems, the correct index for the sensor location is 2x the index in the > sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is > 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in > sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair > function chooses. So I think this is a bug in the function specific to > gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > > Thank you very much for confirming the problem, Don, I appreciate it, :) > > Jim > > On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, >> although we don't use the ft_channelrepair function. The same 4 quite >> distant channels (one had been deleted in the dataset I had handy) were >> chosen for repair when I ran this on one of our datasets (also a 248 channel >> 4D system). I agree the choice doesn't make any sense given the 3 cm >> distance you define. A quick look at the critical calculation in >> ft_channelrepair, line 109 distance = ... is correct given the inputs. So I >> wonder if the issue is with the actual channel indices used rather than the >> calculation, but I don't have time to track that down. All I can say is that >> for the distance you specify, channels A235, A216, A199, A215 would be much >> closer to A234 than those that are selected via the channel repair function. >> Channel A8 is in fact nearly 21 cm away from channel A234 in the array, >> based on examination of the data read in from Eugene Kronberg's pdf4D matlab >> object code, which I think was originally the basis for the FieldTrip 4D >> reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >> Dear Fieldtrip developer, >> >> Can anybody help me with this channel-repair issue I've been having? I can >> provide the raw data if you need. I really want to solve the problem, you >> know. >> >> Thanks a lot, >> >> Jim >> >> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >> >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your >>> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >>> far-away channels like A121 to do the channel-repair for A234 (these two >>> channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do >>> baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 11 15:25:00 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 11 Jul 2011 08:25:00 -0500 Subject: [FieldTrip] Group level source statistics for individual condition Message-ID: Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From leeleewebb at gmail.com Tue Jul 12 09:50:05 2011 From: leeleewebb at gmail.com (Leandra Webb) Date: Tue, 12 Jul 2011 09:50:05 +0200 Subject: [FieldTrip] Error opening socket Message-ID: Hi all I am trying to use FieldTrip in order to do Matlab processing on BCI2000 data and have tried to use the code at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_bufferin order to read data. However, whenever I run this code I get the error Error using ==> buffer ERROR: failed to create socket (1) I saw that a few people have had similar problems but it doesn't seem that this has been solved yet? Leandra -------------- next part -------------- An HTML attachment was scrubbed... URL: From leeleewebb at gmail.com Tue Jul 12 10:53:19 2011 From: leeleewebb at gmail.com (Leandra Webb) Date: Tue, 12 Jul 2011 10:53:19 +0200 Subject: [FieldTrip] Error opening socket Message-ID: My previous question can be ignored - I managed to figure this out. I wasn't running FieldTripBuffer.exe which was the problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 12:38:53 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 10:38:53 +0000 Subject: [FieldTrip] Undefined variable? Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 13 14:17:57 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 13 Jul 2011 14:17:57 +0200 Subject: [FieldTrip] Undefined variable? In-Reply-To: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> Message-ID: <4E1D8CF5.5040206@donders.ru.nl> Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: > > Hi, > > I haven't got much experience with Fieldtrip, or with Matlab, > > so I apologise if this is a stupid question. > > I've downloaded the latest version, and now my code crashes. > > It ran without problems before. > > The offending line is in ft_senslabel.m : > > if size(find(meg_zaxis+1==i),2) > > But 'meg_zaxis' doesn't seem to be defined anywhere. > > I've searched all code, but can only find 14 instances of > > precisely this line, in ft_senslabel.m and planarchannelset.m > > Am I missing something? > > Maarten > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 14:47:03 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 14:47:03 +0200 Subject: [FieldTrip] source power units changed? Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 14:57:23 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 14:57:23 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> sorry I meant bigger not smaller ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de Gesendet: Mittwoch, 13. Juli 2011 14:47 An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] source power units changed? Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 14:58:52 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 12:58:52 +0000 Subject: [FieldTrip] Undefined variable? In-Reply-To: <4E1D8CF5.5040206@donders.ru.nl> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> Hi Jörn, Here's the error message: ??? Undefined function or variable 'meg_zaxis'. Error in ==> fileio/private/ft_senslabel at 2845 if size(find(meg_zaxis+1==i),2) Error in ==> fileio/private/ft_senstype at 241 elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), sens.label)) > 0.8) Error in ==> ft_chantype at 70 if ft_senstype(input, 'neuromag') Error in ==> ft_read_event at 1048 analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); Thanks, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 13:18 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jul 13 15:12:35 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 13 Jul 2011 15:12:35 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> Message-ID: <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> Hi Jan, There has been a change related to the scaling of the leadfields when using the singleshell as a volume conductor model. This has been incorporated somewhere in the beginning of 2011, and was communicated to the list. There should be a message related to this in the archive. Best, Jan-M On Jul 13, 2011, at 2:57 PM, wrote: > sorry I meant bigger not smaller > > Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de > Gesendet: Mittwoch, 13. Juli 2011 14:47 > An: fieldtrip at donders.ru.nl > Betreff: [FieldTrip] source power units changed? > > Hi, > > I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. > > Best, > jan > > Jan Hirschmann > MSc. Neuroscience > Insititute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Duesseldorf > Universitaetsstr. 1 > 40225 Duesseldorf > Tel: 0049 - (0)211 - 81 - 18415 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 15:41:37 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 15:41:37 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD><72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFEDC4@Mail2-UKD.VMED.UKD> ah okay, I think I vaguely remember now that you say it. thanks for reminding. best, jan ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen Gesendet: Mittwoch, 13. Juli 2011 15:13 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] source power units changed? Hi Jan, There has been a change related to the scaling of the leadfields when using the singleshell as a volume conductor model. This has been incorporated somewhere in the beginning of 2011, and was communicated to the list. There should be a message related to this in the archive. Best, Jan-M On Jul 13, 2011, at 2:57 PM, wrote: sorry I meant bigger not smaller ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de Gesendet: Mittwoch, 13. Juli 2011 14:47 An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] source power units changed? Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 13 15:48:56 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 13 Jul 2011 15:48:56 +0200 Subject: [FieldTrip] Undefined variable? In-Reply-To: <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> Message-ID: <4E1DA248.6000705@donders.ru.nl> Hi Maarten, I just checked the ftp-version from July 6, and there meg_zaxis can indeed be found. Did you download fieldtrip-20110706? If you download fieldtrip-20110713, this error should not be there anymore, because all the labels are hard-coded now! Best, Jörn On 7/13/2011 2:58 PM, Maarten van-Casteren wrote: > > Hi Jörn, > > Here's the error message: > > ??? Undefined function or variable 'meg_zaxis'. > > Error in ==> fileio/private/ft_senslabel at 2845 > > if size(find(meg_zaxis+1==i),2) > > Error in ==> fileio/private/ft_senstype at 241 > > elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), > sens.label)) > 0.8) > > Error in ==> ft_chantype at 70 > > if ft_senstype(input, 'neuromag') > > Error in ==> ft_read_event at 1048 > > analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); > > Thanks, > > Maarten > > *From:*fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] *On Behalf Of *"Jörn M. Horschig" > *Sent:* 13 July 2011 13:18 > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] Undefined variable? > > Hi Maarten, > > I searched my whole FT directory and could not find a single line > containing meg_zaxis. I also manually checked planachannelset.m and > ft_senslabel.m and couldn't find the corresponding if-statement. Could > you copy the error message(s) from Matlab and send them over? > > Best, > Jörn > > On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: > > Hi, > > I haven't got much experience with Fieldtrip, or with Matlab, > > so I apologise if this is a stupid question. > > I've downloaded the latest version, and now my code crashes. > > It ran without problems before. > > The offending line is in ft_senslabel.m : > > if size(find(meg_zaxis+1==i),2) > > But 'meg_zaxis' doesn't seem to be defined anywhere. > > I've searched all code, but can only find 14 instances of > > precisely this line, in ft_senslabel.m and planarchannelset.m > > Am I missing something? > > Maarten > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 16:42:48 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 14:42:48 +0000 Subject: [FieldTrip] Undefined variable? In-Reply-To: <4E1DA248.6000705@donders.ru.nl> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> <4E1DA248.6000705@donders.ru.nl> Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EBD0@WSR21.mrc-cbsu.local> Hi Jörn Excellent, that took care of it. Everything back to normal now. Thanks very much, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 14:49 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I just checked the ftp-version from July 6, and there meg_zaxis can indeed be found. Did you download fieldtrip-20110706? If you download fieldtrip-20110713, this error should not be there anymore, because all the labels are hard-coded now! Best, Jörn On 7/13/2011 2:58 PM, Maarten van-Casteren wrote: Hi Jörn, Here's the error message: ??? Undefined function or variable 'meg_zaxis'. Error in ==> fileio/private/ft_senslabel at 2845 if size(find(meg_zaxis+1==i),2) Error in ==> fileio/private/ft_senstype at 241 elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), sens.label)) > 0.8) Error in ==> ft_chantype at 70 if ft_senstype(input, 'neuromag') Error in ==> ft_read_event at 1048 analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); Thanks, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 13:18 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 14 15:49:31 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 14 Jul 2011 15:49:31 +0200 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser Message-ID: <4E1EF3EB.4080203@donders.ru.nl> Dear Community, During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: cfg.viewmode = 'component'; cfg.layout = 'XXX.lay'; ft_databrowser(cfg, data); In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. With best regards, on behalf of the FT team, Jörn PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From Antony.Passaro at uth.tmc.edu Fri Jul 15 19:04:57 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Fri, 15 Jul 2011 12:04:57 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 15 21:04:36 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 15 Jul 2011 13:04:36 -0600 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 14:55:08 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 07:55:08 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Dear Don, Thank you for replying to my issue regarding group statistics. I apologize for not elaborating on what I did at the subject level...for each subject I compared the source estimation (dics beamformer) of the pre-stimulus to the post-stimulus using sourcestatistics for each of the two conditions. I then compared the two conditions directly across all subjects for a group level comparison using sourcestatistics again. I would like to also look at the statistically significant activation associated with each condition compared to baseline across the entire group. The solution that I came up with involves appending all trials for all subjects together into one large pseudo-subject and performing the sourcestatistics. I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 18 15:10:00 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 18 Jul 2011 15:10:00 +0200 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don > Sent: Friday, July 15, 2011 2:05 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Dear Tony, > > You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. > > Best, > > Don > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: > > > Hi everyone, > > I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. > > Any help would be much appreciated. > > Thanks, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D > Sent: Monday, July 11, 2011 8:25 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Group level source statistics for individual condition > > Hi all, > > I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? > > Thank you for your help, > -Tony > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 15:49:02 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 08:49:02 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Message-ID: Hi Jan-Mathijs, I understand the 2-step approach and I typically compute the t-statistic per subject of baseline vs activation for both conditions before performing the second-level statistic comparing conditions, but I run into problems when I want to perform the second-level statistic of baseline vs activation. I'm not sure how that is computed. I apologize for not clarifying earlier, but I typically use sourceinterpolate prior to performing the volumenormalise function and yet I still receive an error from sourcestatistics if I try to send it the output of the volumenormalise function. Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject's native space prior to normalization. If I follow the steps outlined in that link then wouldn't I be performing the source estimation using a normalized grid based on the subject's mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:10 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 18 15:59:20 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 18 Jul 2011 15:59:20 +0200 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Message-ID: <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> Hi Tony, > > Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject’s native space prior to normalization. If I follow the steps outlined in that link then wouldn’t I be performing the source estimation using a normalized grid based on the subject’s mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? The idea is to still use subject specific information (i.e. the anatomical information per subject to build a volume conduction model of the head). Yet, for the definition of the single subject dipole grids, we will use a set of subject specific coordinates, which (after spatial normalisation) would yield the same coordinates for all subjects, thus bypassing the need to interpolate the functional data onto a high spatial resolution 3D grid. The trick is to 'unwarp' a set of canonical source coordinates into the subject specific head space. In the second level step, ft_sourcestatistics can be tricked into accepting multiple subject data (each with unique source positions, as per their individual anatomy), if the source.pos per subject would be replaced with the set of canonical positions (which would be obtained after the spatial normalization). Best, Jan-Mathijs > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen > Sent: Monday, July 18, 2011 8:10 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Hi Tony, > > We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. > Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. > > Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. > > Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid > > Best, Jan-Mathijs > > > I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don > Sent: Friday, July 15, 2011 2:05 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Dear Tony, > > You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. > > Best, > > Don > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: > > > > Hi everyone, > > I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. > > Any help would be much appreciated. > > Thanks, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D > Sent: Monday, July 11, 2011 8:25 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Group level source statistics for individual condition > > Hi all, > > I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? > > Thank you for your help, > -Tony > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 16:28:38 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 09:28:38 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> Message-ID: Hi Jan-Mathijs, I see, this makes much more sense to me. So the anatomical information is preserved in the conduction model while the dipole grids are normalized, that makes sense. I'll give it a try and see what I get. As for generating the second-level (group) statistics comparing baseline to activation, what would you recommend assuming I would like to submit t-statistics from individual subjects (comparing baseline to activation)? Thank you so much for your help, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:59 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject's native space prior to normalization. If I follow the steps outlined in that link then wouldn't I be performing the source estimation using a normalized grid based on the subject's mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? The idea is to still use subject specific information (i.e. the anatomical information per subject to build a volume conduction model of the head). Yet, for the definition of the single subject dipole grids, we will use a set of subject specific coordinates, which (after spatial normalisation) would yield the same coordinates for all subjects, thus bypassing the need to interpolate the functional data onto a high spatial resolution 3D grid. The trick is to 'unwarp' a set of canonical source coordinates into the subject specific head space. In the second level step, ft_sourcestatistics can be tricked into accepting multiple subject data (each with unique source positions, as per their individual anatomy), if the source.pos per subject would be replaced with the set of canonical positions (which would be obtained after the spatial normalization). Best, Jan-Mathijs Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:10 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lieneke.janssen at student.ru.nl Mon Jul 18 17:28:48 2011 From: lieneke.janssen at student.ru.nl (Janssen, L.K. (Lieneke)) Date: Mon, 18 Jul 2011 17:28:48 +0200 (CEST) Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <1541462293.860888.1311002455687.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> Hello again dear fieldtrippers, Last week I wanted to run my coherence script again, but unfortunately it didn't work with me anymore. I hadn't changed anything in either the input or settings, so it's a mystery to me. In addition, I have two other questions related to ft_connectivityanalysis. 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. Did something change here? This brings me to point 2. 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! Thanks in advance :). Best, Lieneke From ekanal at cmu.edu Mon Jul 18 18:00:02 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Mon, 18 Jul 2011 12:00:02 -0400 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser In-Reply-To: <4E1EF3EB.4080203@donders.ru.nl> References: <4E1EF3EB.4080203@donders.ru.nl> Message-ID: It looks like there's some added functionality in the databrowser; I can select visually select subcomponents of signals in time using the mouse, and the background changes color. Have there been any changes to how the function works? Is there documentation on the wiki about the usage of the new component browser? Thanks - Elli On Jul 14, 2011, at 9:49 AM, Jörn M. Horschig wrote: > Dear Community, > > During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. > > Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: > cfg.viewmode = 'component'; > cfg.layout = 'XXX.lay'; > ft_databrowser(cfg, data); > > In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. > > With best regards, on behalf of the FT team, > Jörn > > PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Tue Jul 19 08:50:21 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 19 Jul 2011 08:50:21 +0200 Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> References: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <63A0E490-B5C3-483D-B2EC-68B19A2550D7@donders.ru.nl> Hi Lieneke, Sorry that your scripts broke. I will look into it. > 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. > > -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. > -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. > > Did something change here? This brings me to point 2. Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. > The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. > 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes'). > I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! > > Thanks in advance :). > > Best, > Lieneke Best, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 19 09:01:34 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 19 Jul 2011 09:01:34 +0200 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser In-Reply-To: References: <4E1EF3EB.4080203@donders.ru.nl> Message-ID: <4E252BCE.8000405@donders.ru.nl> Hi Elli, The functionality you talk about has always been in the databrowser. As far as I know it was initially added to check for and mark sleep spindles, but I use it for marking artifacts. The only thing which is kinda new is that this also works for components now (this does not mean for markin components, but when using the databrowser as a componentbrowser). Also, you can run artifact detection methods beforehands, and add the corresponding artfctdef to the config. The databrowser will then mark found artifacts in a different color per type of artifact (which is defined by the subfield of 'artfctdef'). On the wiki, the only documentation so far is the link I sent in the original mail. But, I see that it might be a wise idea to have a tutorial about using the databrowser (because there is more you can do with it). I'll let you know. Best, Jörn On 7/18/2011 6:00 PM, Kanal Eliezer wrote: > It looks like there's some added functionality in the databrowser; I can select visually select subcomponents of signals in time using the mouse, and the background changes color. Have there been any changes to how the function works? Is there documentation on the wiki about the usage of the new component browser? Thanks - > > Elli > > > On Jul 14, 2011, at 9:49 AM, Jörn M. Horschig wrote: > >> Dear Community, >> >> During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. >> >> Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: >> cfg.viewmode = 'component'; >> cfg.layout = 'XXX.lay'; >> ft_databrowser(cfg, data); >> >> In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. >> >> With best regards, on behalf of the FT team, >> Jörn >> >> PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From luoj at mail.nih.gov Tue Jul 19 23:08:00 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Tue, 19 Jul 2011 17:08:00 -0400 Subject: [FieldTrip] weight table for 4D data Message-ID: Hi, Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? Many thanks! Jessie From eamadei at gatech.edu Wed Jul 20 00:05:22 2011 From: eamadei at gatech.edu (Elizabeth Amadei) Date: Tue, 19 Jul 2011 18:05:22 -0400 (EDT) Subject: [FieldTrip] Question about corticomuscular coherence tutorial Message-ID: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Hi all, I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: ??? Error using ==> ft_selectdata at 535 selection of or averaging across channels in the presence of both label and labelcmb is not possible Error in ==> ft_connectivityanalysis at 157 data = ft_selectdata(data, 'channel', unique(selchan)); Has anyone come across this error before and know how to resolve it? Thank you for your help. From jan.schoffelen at donders.ru.nl Wed Jul 20 08:17:18 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 08:17:18 +0200 Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> References: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Message-ID: <088E1715-8A24-489D-9381-C12AFF1731D0@donders.ru.nl> Hi, We noticed this behavior in another context. It is a bug. We we look into it and fix it. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 08:29:51 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 08:29:51 +0200 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: Message-ID: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> Hi Jessie, Please have a look here: http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header Best wishes, Jan-Mathijs On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? > > Many thanks! > > Jessie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 11:16:38 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 11:16:38 +0200 Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> References: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Message-ID: <58F07078-301D-4418-9259-6A79D9CDE327@donders.ru.nl> Hi Elizabeth, I fixed the bug you refer to. The code should be available on the ftp-server and on google-code tonight. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 11:18:09 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 11:18:09 +0200 Subject: [FieldTrip] ft_connectivityanalysis References: <63A0E490-B5C3-483D-B2EC-68B19A2550D7@donders.ru.nl> Message-ID: Hi Lieneke, I fixed point 1. The code should be available tonight on the ftp-server and on google code. Best, Jan-Mathijs Begin forwarded message: > From: jan-mathijs schoffelen > Date: July 19, 2011 8:50:21 AM GMT+02:00 > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] ft_connectivityanalysis > > Hi Lieneke, > > Sorry that your scripts broke. I will look into it. > >> 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. >> >> -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. >> -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. >> >> Did something change here? This brings me to point 2. > > > Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: > > http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > >> 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. >> The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? > > Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. > >> 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). > > Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes'). > >> I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! >> >> Thanks in advance :). >> >> Best, >> Lieneke > > Best, > > Jan-Mathijs > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Wed Jul 20 11:22:26 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Wed, 20 Jul 2011 12:22:26 +0300 Subject: [FieldTrip] weight table for 4D data In-Reply-To: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> Message-ID: Hi with 4D software you can write in a terminal print_table . I use : print_table -posted -WP both > wts.txt this prints both analog and digital as one set of weights yuval On 20 July 2011 09:29, jan-mathijs schoffelen wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > > > Hi, > > > > Does anyone know where the weight table for 4D datasets (from 248 channel > 4D machine) is stored and how to extract it from the dataset? > > > > Many thanks! > > > > Jessie > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lieneke.janssen at student.ru.nl Wed Jul 20 13:03:57 2011 From: lieneke.janssen at student.ru.nl (Janssen, L.K. (Lieneke)) Date: Wed, 20 Jul 2011 13:03:57 +0200 (CEST) Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <1233124647.873768.1311159476345.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <474296708.873799.1311159837753.JavaMail.root@monoceros.zimbra.ru.nl> Hey Jan-Mathijs, Great, thanks a lot. I was trying your other suggestion, but then I got ill... will keep trying though :). The 2nd point: "What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb." --> I was just trying some things with these functions so I did give it the cohspctrm from freqanalysis (with powandcsd output) as input. Then I got exactly the same error as with ft_connectivityanalysis: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. ...coming from ft_selectchannels. What I find weird though is that for ft_descriptives this error only appears when I choose a selection of channels, not if it takes all channels. For ft_connectivityanalysis the error appears in both cases: when I give it a selection of channel pairs as well as when it should do all channels. I might have done something wrong or not very careful here though, because I was trying lots of things last week when I encountered the problem. I can't look back unfortunately to what I've done exactly. I wanted to figure out my previous uncarefulness yesterday but didn't get to that. The same goes for point 3.. I should try again. But what I did last week: I put in cfg.jackknife = 'yes' + had data with kept trials, but I didn't get a jackknife output there. From the code it seemed either not to actually calculate this measure or not to put it in the output... Best, Lieneke From luoj at mail.nih.gov Wed Jul 20 15:01:15 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Wed, 20 Jul 2011 09:01:15 -0400 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, Message-ID: Thank you Jan-Mathijs and Yuval for replying! Unfortunately I don't have the 4D software. Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? Many thanks, Jessie ________________________________________ From: Yuval Harpaz [yuvharpaz at gmail.com] Sent: Wednesday, July 20, 2011 5:22 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] weight table for 4D data Hi with 4D software you can write in a terminal print_table . I use : print_table -posted -WP both > wts.txt this prints both analog and digital as one set of weights yuval On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: Hi Jessie, Please have a look here: http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header Best wishes, Jan-Mathijs On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? > > Many thanks! > > Jessie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From jan.schoffelen at donders.ru.nl Wed Jul 20 16:06:00 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 16:06:00 +0200 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, Message-ID: <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> Hi Jessie, I did not suggest to use the 4D software. I pointed to some documentation which probably was not clear enough. You can look at the hdr.grad.tra matrix (after reading in the header using fieldtrip, and specifying the raw data file, so no .m4d or .xyz nonsense here). if you do: figure;imagesc(hdr.grad.tra), you'll see a matrix which essentially has the colourful bits at the far right side of it. These correspond to the weights. If you have a gradiometer system, this probably corresponds to hdr.grad.tra(1:248,597:end), for a magnetometer system it will be hdr.grad.tra(1:248,249:end). The lower right part of the tra matrix hdr.grad.tra(249:end, 249 (or 597):end) allows you to decode which reference coils contribute to which reference channel. Best, Jan-Mathijs On Jul 20, 2011, at 3:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thank you Jan-Mathijs and Yuval for replying! > > Unfortunately I don't have the 4D software. > Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? > > Many thanks, > Jessie > ________________________________________ > From: Yuval Harpaz [yuvharpaz at gmail.com] > Sent: Wednesday, July 20, 2011 5:22 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] weight table for 4D data > > Hi > with 4D software you can write in a terminal print_table . I use : > print_table -posted -WP both > wts.txt > this prints both analog and digital as one set of weights > yuval > On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >> Hi, >> >> Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? >> >> Many thanks! >> >> Jessie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From luoj at mail.nih.gov Wed Jul 20 16:34:49 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Wed, 20 Jul 2011 10:34:49 -0400 Subject: [FieldTrip] weight table for 4D data In-Reply-To: <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, , <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> Message-ID: Hi Jan-mathijs, Thanks so much for your quick reply! I'll test your instructions out. Jessie ________________________________________ From: jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Wednesday, July 20, 2011 10:06 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] weight table for 4D data Hi Jessie, I did not suggest to use the 4D software. I pointed to some documentation which probably was not clear enough. You can look at the hdr.grad.tra matrix (after reading in the header using fieldtrip, and specifying the raw data file, so no .m4d or .xyz nonsense here). if you do: figure;imagesc(hdr.grad.tra), you'll see a matrix which essentially has the colourful bits at the far right side of it. These correspond to the weights. If you have a gradiometer system, this probably corresponds to hdr.grad.tra(1:248,597:end), for a magnetometer system it will be hdr.grad.tra(1:248,249:end). The lower right part of the tra matrix hdr.grad.tra(249:end, 249 (or 597):end) allows you to decode which reference coils contribute to which reference channel. Best, Jan-Mathijs On Jul 20, 2011, at 3:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thank you Jan-Mathijs and Yuval for replying! > > Unfortunately I don't have the 4D software. > Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? > > Many thanks, > Jessie > ________________________________________ > From: Yuval Harpaz [yuvharpaz at gmail.com] > Sent: Wednesday, July 20, 2011 5:22 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] weight table for 4D data > > Hi > with 4D software you can write in a terminal print_table . I use : > print_table -posted -WP both > wts.txt > this prints both analog and digital as one set of weights > yuval > On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >> Hi, >> >> Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? >> >> Many thanks! >> >> Jessie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eamadei at gatech.edu Wed Jul 20 17:04:11 2011 From: eamadei at gatech.edu (Elizabeth Amadei) Date: Wed, 20 Jul 2011 11:04:11 -0400 (EDT) Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <58F07078-301D-4418-9259-6A79D9CDE327@donders.ru.nl> Message-ID: <1445090092.153234.1311174251813.JavaMail.root@mail8.gatech.edu> Hi Jan-Mathijs, Thank you for your quick response! I look forward to trying out the new code. Best, Elizabeth ----- Original Message ----- From: "jan-mathijs schoffelen" To: "Email discussion list for the FieldTrip project" Sent: Wednesday, July 20, 2011 5:16:38 AM Subject: Re: [FieldTrip] Question about corticomuscular coherence tutorial Hi Elizabeth, I fixed the bug you refer to. The code should be available on the ftp-server and on google-code tonight. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Antony.Passaro at uth.tmc.edu Wed Jul 20 18:36:33 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Wed, 20 Jul 2011 11:36:33 -0500 Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment Message-ID: Hi all, After installing the latest version of Fieldtrip, I tried to make a template grid using identical code from the example from the Fieldtrip website and once I run the ft_volumesegment function, Matlab quickly crashes. I am running Matlab version 7.8 on a 64-bit linux computer. The system error says it detected a floating point exception and that the error was detected while a MEX-file was running. Has anyone else come across this issue? Thank you, -Tony From Antony.Passaro at uth.tmc.edu Wed Jul 20 23:00:45 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Wed, 20 Jul 2011 16:00:45 -0500 Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment In-Reply-To: References: Message-ID: I apologize for not consulting the Fieldtrip website sooner. A search for "mex" turned up both an FAQ (unfortunately did not resolve the issue) and a development about MEX files where I found the following command which resolved the issue: ft_compile_mex(true) -Tony -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Wednesday, July 20, 2011 11:37 AM To: Email discussion list for the FieldTrip project Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment Hi all, After installing the latest version of Fieldtrip, I tried to make a template grid using identical code from the example from the Fieldtrip website and once I run the ft_volumesegment function, Matlab quickly crashes. I am running Matlab version 7.8 on a 64-bit linux computer. The system error says it detected a floating point exception and that the error was detected while a MEX-file was running. Has anyone else come across this issue? Thank you, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Tim.Bardouille at nrc-cnrc.gc.ca Thu Jul 21 15:08:10 2011 From: Tim.Bardouille at nrc-cnrc.gc.ca (Bardouille, Tim) Date: Thu, 21 Jul 2011 09:08:10 -0400 Subject: [FieldTrip] Postdoc/Research Associate position in Halifax, NS, Canada Message-ID: Hello all, Please see the attached ad for a post-doctoral fellowship at the Laboratory for Clinical MEG in Halifax, Nova Scotia, Canada. Ours is a clinical research lab operated by the National Research Council - Institute for Biodiagnostics and embedded in Atlantic Canada's largest health centre. We look forward to hearing from interested candidates. Best regards, Tim Bardouille. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Halifax_postDoc_position.pdf Type: application/pdf Size: 158148 bytes Desc: Halifax_postDoc_position.pdf URL: From luoj at mail.nih.gov Thu Jul 21 15:48:47 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 21 Jul 2011 09:48:47 -0400 Subject: [FieldTrip] LCMV and SAM Message-ID: Hi, Regarding source modelling, I noticed there are options of LCMV and SAM in fieldtrip. Would anyone provide details on the differences between the two? Thanks, Jessie From yuvharpaz at gmail.com Thu Jul 21 21:14:16 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Thu, 21 Jul 2011 22:14:16 +0300 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: Message-ID: Dear Jessie As far as I know only LCMV is applicable in current versions of fieldtrip. The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated. SAM can be run with executable files based on C source, written by Dr. Robinson. not via matlab or fieldtrip. yuval On 21 July 2011 16:48, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > Regarding source modelling, I noticed there are options of LCMV and SAM in > fieldtrip. Would anyone provide details on the differences between the two? > > Thanks, > Jessie > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From luoj at mail.nih.gov Thu Jul 21 21:56:46 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 21 Jul 2011 15:56:46 -0400 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: , Message-ID: Hi Yuval, Thank you for replying! ----------------------- The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated ------------------------ I've like to learn more about this and pros and cons of them if possible. Jessie ________________________________________ From: Yuval Harpaz [yuvharpaz at gmail.com] Sent: Thursday, July 21, 2011 3:14 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] LCMV and SAM Dear Jessie As far as I know only LCMV is applicable in current versions of fieldtrip. The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated. SAM can be run with executable files based on C source, written by Dr. Robinson. not via matlab or fieldtrip. yuval On 21 July 2011 16:48, Luo, Jessie (NIH/NIMH) [V] > wrote: Hi, Regarding source modelling, I noticed there are options of LCMV and SAM in fieldtrip. Would anyone provide details on the differences between the two? Thanks, Jessie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From mjutras at emory.edu Thu Jul 21 22:00:42 2011 From: mjutras at emory.edu (Jutras, Mike) Date: Thu, 21 Jul 2011 20:00:42 +0000 Subject: [FieldTrip] ft_freqstatistics error Message-ID: Hello, I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: % data variable 1 cnd1_1 = label: {'AD01'} freq: [1x15 double] time: [1x126 double] dimord: 'subj_chan_freq_time' powspctrm: [4-D double] cfg: [1x1 struct] >> size(cnd1_1.powspctrm) ans = 114 1 15 126 % data variable 2 cnd2_1 = label: {'AD01'} freq: [1x15 double] time: [1x126 double] dimord: 'subj_chan_freq_time' powspctrm: [4-D double] cfg: [1x1 struct] >> size(cnd2_1.powspctrm) ans = 114 1 15 126 % code for permutation test cfg cfg = []; cfg.channel = 'AD01'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'no'; cfg.avgovertime = 'no'; cfg.latency = 'all'; cfg.frequency = 'all'; %cfg.frequency = 'all'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; dum = ones(1, size(cnd1_1.powspctrm,1)); cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.alpha = 0.05; cfg.tail = 0; cfg.ivar = 1; cfg.uvar = 2; cfg.feedback = 'text'; cfg.clusterstatistic = 'maxsum'; cfg.clusterthreshold = 'parametric'; %cfg.clusterthreshold = 'nonparametric_common'; cfg.clusteralpha = 0.05; % clustercritval original value: 1.96 cfg.clustercritval = 1.96; cfg.clustertail = 0; cfg.neighbours{1}.label = 'AD01'; cfg.neighbours{1}.neighblabel = {}; >> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); computing statistic over the frequency range [2.058 29.950] computing statistic over the time range [-1.000 0.250] selection powspctrm along dimension 2 selection powspctrm along dimension 3 selection powspctrm along dimension 4 selection powspctrm along dimension 2 selection powspctrm along dimension 3 selection powspctrm along dimension 4 ??? Error using ==> ft_freqstatistics at 248 the number of observations in the design does not match the number of observations in the data Thanks for any advice, Michael -- Michael Jutras, Ph.D. Postdoctoral fellow Emory University, Yerkes National Primate Research Center 404-712-9435 ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). From jm.horschig at donders.ru.nl Thu Jul 21 22:33:20 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 21 Jul 2011 22:33:20 +0200 Subject: [FieldTrip] ft_freqstatistics error In-Reply-To: References: Message-ID: <4E288D10.3060500@donders.ru.nl> Hi Mike, I think that the problem is caused by the multidimensionality of your freq-data. If you want to cover a whole frequency range, you cannot use 15 different bins but have to work with multitapers instead and utilize how they smooth the frequencies, e.g. if you are interested in gamma-band activity between 60 and 120Hz, you use 90Hz (cfg.foi) and 30Hz smoothing (cfg.tapsmofrq). I think this is also explained in one of the tutorials on the FT wiki, so you might want to have a look there. Best, Jörn On 7/21/2011 10:00 PM, Jutras, Mike wrote: > Hello, > > I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: > > % data variable 1 > cnd1_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd1_1.powspctrm) > ans = > 114 1 15 126 > > % data variable 2 > cnd2_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd2_1.powspctrm) > ans = > 114 1 15 126 > > % code for permutation test cfg > cfg = []; > cfg.channel = 'AD01'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgovertime = 'no'; > > cfg.latency = 'all'; > cfg.frequency = 'all'; > %cfg.frequency = 'all'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > > dum = ones(1, size(cnd1_1.powspctrm,1)); > cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.ivar = 1; > cfg.uvar = 2; > cfg.feedback = 'text'; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'parametric'; > %cfg.clusterthreshold = 'nonparametric_common'; > cfg.clusteralpha = 0.05; > % clustercritval original value: 1.96 > cfg.clustercritval = 1.96; > cfg.clustertail = 0; > cfg.neighbours{1}.label = 'AD01'; > cfg.neighbours{1}.neighblabel = {}; > > >>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); > computing statistic over the frequency range [2.058 29.950] > computing statistic over the time range [-1.000 0.250] > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > ??? Error using ==> ft_freqstatistics at 248 > the number of observations in the design does not match the number of observations in the data > > Thanks for any advice, > Michael > -- > Michael Jutras, Ph.D. > Postdoctoral fellow > Emory University, Yerkes National Primate Research Center > 404-712-9435 > > > > > ________________________________ > > This e-mail message (including any attachments) is for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution > or copying of this message (including any attachments) is strictly > prohibited. > > If you have received this message in error, please contact > the sender by reply e-mail message and destroy all copies of the > original message (including attachments). > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mjutras at emory.edu Thu Jul 21 23:04:01 2011 From: mjutras at emory.edu (Jutras, Mike) Date: Thu, 21 Jul 2011 21:04:01 +0000 Subject: [FieldTrip] ft_freqstatistics error In-Reply-To: <4E288D10.3060500@donders.ru.nl> References: <4E288D10.3060500@donders.ru.nl> Message-ID: Jörn, I found the problem (which your answer led me to): the frequency bins did not match up between the two data structures, but after fixing them so they matched, the function ran without error. I had spaced the frequency bins far enough apart to account for the smoothing due to the multitapering, but I wanted to run the permutation test with multiple bin centers as I had done previously with an older version of freqstatistics. Thanks for your help! -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: Thursday, July 21, 2011 4:33 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_freqstatistics error Hi Mike, I think that the problem is caused by the multidimensionality of your freq-data. If you want to cover a whole frequency range, you cannot use 15 different bins but have to work with multitapers instead and utilize how they smooth the frequencies, e.g. if you are interested in gamma-band activity between 60 and 120Hz, you use 90Hz (cfg.foi) and 30Hz smoothing (cfg.tapsmofrq). I think this is also explained in one of the tutorials on the FT wiki, so you might want to have a look there. Best, Jörn On 7/21/2011 10:00 PM, Jutras, Mike wrote: > Hello, > > I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: > > % data variable 1 > cnd1_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd1_1.powspctrm) > ans = > 114 1 15 126 > > % data variable 2 > cnd2_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd2_1.powspctrm) > ans = > 114 1 15 126 > > % code for permutation test cfg > cfg = []; > cfg.channel = 'AD01'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgovertime = 'no'; > > cfg.latency = 'all'; > cfg.frequency = 'all'; > %cfg.frequency = 'all'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > > dum = ones(1, size(cnd1_1.powspctrm,1)); > cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.ivar = 1; > cfg.uvar = 2; > cfg.feedback = 'text'; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'parametric'; > %cfg.clusterthreshold = 'nonparametric_common'; > cfg.clusteralpha = 0.05; > % clustercritval original value: 1.96 > cfg.clustercritval = 1.96; > cfg.clustertail = 0; > cfg.neighbours{1}.label = 'AD01'; > cfg.neighbours{1}.neighblabel = {}; > > >>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); > computing statistic over the frequency range [2.058 29.950] > computing statistic over the time range [-1.000 0.250] > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > ??? Error using ==> ft_freqstatistics at 248 > the number of observations in the design does not match the number of observations in the data > > Thanks for any advice, > Michael > -- > Michael Jutras, Ph.D. > Postdoctoral fellow > Emory University, Yerkes National Primate Research Center > 404-712-9435 > > > > > ________________________________ > > This e-mail message (including any attachments) is for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution > or copying of this message (including any attachments) is strictly > prohibited. > > If you have received this message in error, please contact > the sender by reply e-mail message and destroy all copies of the > original message (including attachments). > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jedmeltzer at yahoo.com Thu Jul 21 23:21:21 2011 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Thu, 21 Jul 2011 14:21:21 -0700 (PDT) Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: Message-ID: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> Without getting into software implementation questions (basically fieldtrip has LCMV, and CTF software has SAM) I think the main difference is that LCMV is a "vector" beamformer.  At any given location, it estimates a virtual signal in all three spatial dimensions (or only two if you constrain it to tangential sources, which makes sense for MEG but not for EEG). So you have three virtual signals at each point, and how you combine them is up to you - take the biggest one, or the magnitude of the whole vector, or any other combination.  I'm not sure what the default for power mapping is in fieldtrip (I have mainly used SAM for beamforming so far, but I use fieldtrip for other purposes). SAM has an extra step involved where it "optimizes" a dipole orientation at each location to maximize the signal, so you only get one signal at each location.  In this sense it's nonlinear.  The calculation is more complex due to the optimization, but the result is simpler to deal with.  This is called a "scalar" beamformer.  For pros and cons, you might look up papers on vector vs. scalar beamformers in general.  Here's one recent one that I saw that compared them and has further references: Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of hippocampal activity using beamformers with MEG: a detailed investigation using simulations and empirical data." Hum Brain Mapp 32(5): 812-827. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Fri Jul 22 08:26:04 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 22 Jul 2011 08:26:04 +0200 Subject: [FieldTrip] LCMV and SAM In-Reply-To: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> References: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> Message-ID: Hi all, As of June 6, 2011 'beamformer_sam' was put back into the Fieldtrip toolbox (after it had gone missing for some time), although, a warning that it has been awhile since the code was tested. I think there are other differences than just the orientation selection (between the original-CTF SAM and LCMV in FT), although that is a large part of it. Note the 'fixedori' option in both FT functions (beamformer_sam and beamformer_lcmv). If set to 'yes' in beamformer_lcmv, it will give a scalar output (similar, maybe equivalent, to fixedori='robert' output in beamformer_sam), both which use SVD to find the orientation. (Default for 'fixedori' in beamformer_lcmv is 'no' so will give a vector output by default). The default option for 'fixedori' in beamformer_sam is 'spinning' which is the method described by Jed, and I think is what matches the CTF implementation. Cheers, Johanna On 21 July 2011 23:21, Jed Meltzer wrote: > Without getting into software implementation questions (basically fieldtrip > has LCMV, and CTF software has SAM) I think the main difference is that LCMV > is a "vector" beamformer. At any given location, it estimates a virtual > signal in all three spatial dimensions (or only two if you constrain it to > tangential sources, which makes sense for MEG but not for EEG). So you have > three virtual signals at each point, and how you combine them is up to you - > take the biggest one, or the magnitude of the whole vector, or any other > combination. I'm not sure what the default for power mapping is in > fieldtrip (I have mainly used SAM for beamforming so far, but I use > fieldtrip for other purposes). > > SAM has an extra step involved where it "optimizes" a dipole orientation at > each location to maximize the signal, so you only get one signal at each > location. In this sense it's nonlinear. The calculation is more complex > due to the optimization, but the result is simpler to deal with. This is > called a "scalar" beamformer. For pros and cons, you might look up papers > on vector vs. scalar beamformers in general. Here's one recent one that I > saw that compared them and has further references: > > Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of > hippocampal activity using beamformers with MEG: a detailed investigation > using simulations and empirical data." Hum Brain Mapp *32*(5): 812-827. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cas243 at georgetown.edu Sat Jul 23 02:12:26 2011 From: cas243 at georgetown.edu (Clara A. Scholl) Date: Fri, 22 Jul 2011 20:12:26 -0400 Subject: [FieldTrip] Extracting a timecourse from cluster of channels Message-ID: Hi, I am using fieldtrip's cluster-based permutation test to identify a significant channel-time cluster showing an effect. Now I would like to extract a timecourse averaged over these channels (for the purpose of comparing different conditions, not used to generate the cluster), but I'm not sure if it makes sense to do so because the channels belonging to the cluster change over time -- would the timecourse have contributions from different channels at different time points? Do I need to limit my cluster to fixed channels across time? (And if so, how do I do that?) Thanks! Clara From luoj at mail.nih.gov Sat Jul 23 18:34:01 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Sat, 23 Jul 2011 12:34:01 -0400 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com>, Message-ID: Thanks Jed and Johanna for your input. Jessie ________________________________________ From: Johanna Zumer [johanna.zumer at donders.ru.nl] Sent: Friday, July 22, 2011 2:26 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] LCMV and SAM Hi all, As of June 6, 2011 'beamformer_sam' was put back into the Fieldtrip toolbox (after it had gone missing for some time), although, a warning that it has been awhile since the code was tested. I think there are other differences than just the orientation selection (between the original-CTF SAM and LCMV in FT), although that is a large part of it. Note the 'fixedori' option in both FT functions (beamformer_sam and beamformer_lcmv). If set to 'yes' in beamformer_lcmv, it will give a scalar output (similar, maybe equivalent, to fixedori='robert' output in beamformer_sam), both which use SVD to find the orientation. (Default for 'fixedori' in beamformer_lcmv is 'no' so will give a vector output by default). The default option for 'fixedori' in beamformer_sam is 'spinning' which is the method described by Jed, and I think is what matches the CTF implementation. Cheers, Johanna On 21 July 2011 23:21, Jed Meltzer > wrote: Without getting into software implementation questions (basically fieldtrip has LCMV, and CTF software has SAM) I think the main difference is that LCMV is a "vector" beamformer. At any given location, it estimates a virtual signal in all three spatial dimensions (or only two if you constrain it to tangential sources, which makes sense for MEG but not for EEG). So you have three virtual signals at each point, and how you combine them is up to you - take the biggest one, or the magnitude of the whole vector, or any other combination. I'm not sure what the default for power mapping is in fieldtrip (I have mainly used SAM for beamforming so far, but I use fieldtrip for other purposes). SAM has an extra step involved where it "optimizes" a dipole orientation at each location to maximize the signal, so you only get one signal at each location. In this sense it's nonlinear. The calculation is more complex due to the optimization, but the result is simpler to deal with. This is called a "scalar" beamformer. For pros and cons, you might look up papers on vector vs. scalar beamformers in general. Here's one recent one that I saw that compared them and has further references: Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of hippocampal activity using beamformers with MEG: a detailed investigation using simulations and empirical data." Hum Brain Mapp 32(5): 812-827. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Panagiotis.Tsiatsis at Tuebingen.MPG.de Mon Jul 25 21:31:03 2011 From: Panagiotis.Tsiatsis at Tuebingen.MPG.de (Panagiotis Tsiatsis) Date: Mon, 25 Jul 2011 21:31:03 +0200 Subject: [FieldTrip] Any tips for unsupervised (sic) ICA ECG / EOG component rejection? Message-ID: <4E2DC477.1050705@Tuebingen.MPG.de> Dear all, I am using ICA with fieldtrip and eeglab in order to remove ECG components from my CTF MEG data. I have a separate EKG channel just like in the wonderful fieldtrip tutorial as well as vertical and horizontal EOG channels. The question is a rather practical one: Some times I have to reanalyze my data (different filtering, trial duration settings etc.) and because I have something like 30 subject with 10 sessions of ~7mins each, it is kind of time consuming to redo the ICA component rejection manually each time. *Of course eventually this has to be done by inspecting the components*, but I was just wondering whether I could use some kind of automatized criterion until I reach this level where I can say that I do not need to apply ICA again and therefore I will do the rejection manually. So please excuse my audacity to talk about automation in a procedure which is traditionally considered "supervised". A. Concerning ICA ECG artifact removal, I have the following questions: So, I will just describe you a couple of ideas for heuristics and a few concerns so that maybe you could tell me how (in)sane they sound to you, as I have little experience with ICA. 1. One criterion could be to use the average absolute value of coherence of each component when compared to the ECG channels (as calculated in the fieldtrip ECG removal tutorial) within a certain and predefined range of frequncies. In my case I used the range of [2-40]Hz. Then I convert all the "scores" to z-values and set a threshold of 3-4 to identify components that are highly coherent with the ECG . Of course, this z -value threshold (and all the z-scores) depends on all components so I am not sure whether it is a criterion that can be fully justified. 2. Similarly to (1), another criterion could be the absolute value of the correlation in time of the ECG channel to all the other components. Maybe here the frequency range should be restricted as well. Again, the absolute correlation values would be transformed to z-scores and the artifactual components would be selecting based on a z-value threshold. I am just not sure whether correlation has to offer something complementary to coherence in this case. 3. A third criterion would be the combination of 1 and 2 - calculate z-values for coherence and correlation and then reject the intersection of the components marked as artifactuals from both 1 and 2. This might be a bit conservative, especially because the correlation criterion does not seem as robust as the coherence criterion. [Of course the rejected components would have to be evaluated a-posteriori in any case.] On another note, my biggest concern at the time, stemming from the incomplete understanding of ICA and the use of an automated procedure, is the following: Let's say that in the decomposition, the ECGconsists of 2 (or 3 sometimes) components. The question is whether removing one component of the ECG only (the most prominent one) can actually do more harm that good since (and please correct me if I am wrong because I am not very confident here) the components that when appropriately combined according to the the mixing matrix would result in the ECG artifact might contain parts that "cancel out" when combined together. Therefore, if not all the "real" components that would constitute the ECG artifact are removed, there might be "artificial" deflections that are removed along with the most prominent component, which would alter the data and induce again artifacts. I know that the way that I am phrasing this is not really clear and I might have misunderstood the mechanics of ICA so please feel free to correct me. B. Concerning ICA EOG artifact removal, I wanted to ask you whether there is any way to apply similar techniques as the ones that you apply for ICA ECG removal to EOG components (i.e. the coherence criterion)? I tried to apply the coherence criterion by using the ft_artifact_eog function to detect the eyeblinks, followed by alignment of the detected EOG artifacts in the EOG channel (after extending them so that they have the same length) and their averaging in order to calculate the coherence of this "average" EOG blink to each of the ICA components. It seemed to kind of work for the few datasets that I tried but it was not as robust as the ECG method - one of the reasons for this might be the variability of the blink types (ie. vertical blinks of different speed/duration and "depth", the existence of horizontal eye movements and the non-orthogonality of horizontal and vertical EOG traces etc.) Any intuitions again on this would be really useful. My final question would be whether you think that it could be possible to improve things in terms of unsupervised artifact rejection via ICA? Maybe having some spatial templates that resemble common artifacts with robust topology and comparing the topologies of the ICA components to these templates in terms of spatial correlation would be feasible? Apologies for raising so many issues in just one (rather long) e-mail, I am looking forward to hearing from you about your experience on the above issues. Thank you in advance! Kind Regards, Panagiotis -- Panagiotis S. Tsiatsis Max Planck Institute for Biogical Cybernetics Cognitive NeuroImaging Group Tuebingen, Germany From sherrykhan78 at gmail.com Tue Jul 26 20:25:40 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 26 Jul 2011 14:25:40 -0400 Subject: [FieldTrip] Postdoctoral Fellowship: Multimodal Neuroimaging -MGH/Harvard Medical School Message-ID: Postdoctoral Fellowship: Multimodal Neuroimaging -MGH/Harvard Medical School Job Description A postdoctoral position is available with the TRANSCEND Research Program ( www.transcendresearch.org) at the Martinos Center for Biomedical Imaging in Charlestown, MA (www.martinos.org) which is affiliated with the Massachusetts General Hospital, Harvard Medical School and MIT. We are seeking a candidate with a strong basis in magnetic resonance imaging. Emphasis will be on MRI (DTI, spectroscopy, morphometry, ASL as well as resting state fMRI), and on co-registering MEG with MRI. This position will involve analysis of existing multimodal imaging data and collection of new data. The emphasis of the postdoctoral fellowship will be analysis of existing datasets with secondary activity in piloting data for new studies. It will involve working closely with a multidisciplinary team and with children, and will also involve some research oriented analysis of data collected for clinical purposes. After initial phase-in, ample opportunity will also be provided to the candidate to self-explore and lead research. Datasets to be analyzed include: MRI (including DTI and 1H-spectroscopy) and MEG data on 6-12 and teenage matched autism spectrum and control subjects with phenotyping data MRI data ( (morphometry, DTI, spectroscopy) plus laboratory and phenotyping data) on 70 children with autism plus epilepsy and/or mitochondrial dysfunction, along with one or more overnight EEGs on each patient data from children ages 2-10 with and without autism. Overall objectives: To perform multimodal analyses of research and clinical research data, to develop new approaches for performing these analyses, and to design pipelines for data analysis. To write papers and grants which will be high priorities all along the way and will be actively supported by senior faculty. To take advantage of the world class faculty and facilities of the Martinos Center for Biomedical Imaging to perform the above activities to their maximal potential. The program’s emphasis is on pathophysiologically grounded brain research and application of advanced imaging acquisition and analysis techniques to neurological and sensory aspects of autism spectrum disorders. Requirements: Candidates must have PhD in neuroscience, physics, biomedical engineering, electrical engineering, computer science or other related fields. Prior experience in MRI analysis is required. Experience with EEG will be an added advantage. Salary will be consistent with Massachusetts General Hospital, Harvard Medical School policies for Postdoctoral trainees and will range between $45,000 to $55,000 depending upon qualifications and experience. Compensation also includes full staff benefits, including health insurance, and vacation time. Contact: Interested applicants may send a CV and statement of interest addressing background and specific pertinence of the candidate’s interest to Dr. MarthaR. Herbert at mherbert1 at partners.org and cc transcend at partners.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Wed Jul 27 22:39:46 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Wed, 27 Jul 2011 16:39:46 -0400 Subject: [FieldTrip] Power analysis of resting state data Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> Hi Fieldtrip users- I am interested in calculating the Power of different frequency bands at each channel or in groups of channels during resting state. Since I don't have trials per se, and actually no triggers with which to define a period of time for analysis, I did not call ft_definetrial. Rather, I used ft_preprocessing with the information I usually put into ft_definetrial, including: cfg.dataset = 'dataset'; cfg.channel = {'MEG'}; cfg.continuous = 'yes'; cfg.detrend = 'yes'; cfg.dftfilter = 'yes'; cfg.dftfreq = [60 120 180]; cfg.method = 'channel'; Data = ft_preprocessing(cfg) The command window then indicates that it is processing each of the 275 channels. However, the output says: Data = hdr: [1x1 struct] label: {'MZP01'} time: {[1x21600 double]} trial: {[1x21600 double]} fsample: 1200 sampleinfo: [1 21600] grad: [1x1 struct] cfg: [1x1 struct] Calling ft_freqanalysis after that does a nice job of giving me the Power of frequency bands specified for one channel, which I assume is MZP01. Is there a way for me to do this and generate a matrix with such a calculation for each channel (eg 275x20)? Is there a way to specify groups of channels in a customized way, without relying on their names (I don't just want all Occipital, all Parietal, etc)? Thanks in advance for your help. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jul 28 08:06:50 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 28 Jul 2011 08:06:50 +0200 Subject: [FieldTrip] Power analysis of resting state data In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> Message-ID: Hi Beth, This sounds like a bug to me. There definitely should be more than one channel in your data structure, if the original dataset has 275. Could you check what happens when you call ft_preprocessing with no filter options etc., so just the following: cfg = []; cfg.dataset = 'dataset'; data = ft_preprocessing(cfg); Also, could you check whether the code you provided (so including the filter options again) does return anything if you leave out the 'cfg.continuous' option? Best, Eelke 2011/7/27 Belluscio, Beth (NIH/NINDS) [E] : > Hi Fieldtrip users- > >   I am interested in calculating the Power of different frequency bands at > each channel or in groups of channels during resting state. > > > >  Since I don’t have trials per se, and actually no triggers with which to > define a period of time for analysis, I did not call ft_definetrial. > Rather, I used ft_preprocessing with the information I usually put into > ft_definetrial, including: > >                 cfg.dataset = ‘dataset’; > >                 cfg.channel = {‘MEG’}; > >                 cfg.continuous = ‘yes’; > >                 cfg.detrend = ‘yes’; > >                 cfg.dftfilter = ‘yes’; > >                 cfg.dftfreq = [60 120 180]; > >                cfg.method = ‘channel’; > >                 Data = ft_preprocessing(cfg) > > The command window then indicates that it is processing each of the 275 > channels. > > However, the output says: > >                 Data = > >                                 hdr: [1x1 struct] > >                                 label: {‘MZP01’} > >                                 time: {[1x21600 double]} > >                                 trial: {[1x21600 double]} > >                                 fsample: 1200 > >                                 sampleinfo: [1 21600] > >                                 grad: [1x1 struct] > >                                 cfg: [1x1 struct] > > > > Calling ft_freqanalysis after that does a nice job of giving me the Power of > frequency bands specified for one channel, which I assume is MZP01. > > > > Is there a way for me to do this and generate a matrix with such a > calculation for each channel (eg 275x20)? > > Is there a way to specify groups of channels in a customized way, without > relying on their names (I don’t just want all Occipital, all Parietal, etc)? > > > > Thanks in advance for your help. > > Beth. > > > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From anna.lambrechts at gmail.com Thu Jul 28 11:32:29 2011 From: anna.lambrechts at gmail.com (Anna Lambrechts) Date: Thu, 28 Jul 2011 11:32:29 +0200 Subject: [FieldTrip] Group comparison statistics - ERF study Message-ID: Hi, I am trying to run a group comparison analysis on event-related fields data in a 2 (groups) x 2 (conditions) x 2 (response types) design. Is this possible at all with any fieldtrip script? As far as I know implemented statistics look at within-groups comparison. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Sat Jul 30 15:31:11 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Sat, 30 Jul 2011 15:31:11 +0200 Subject: [FieldTrip] Extracting a timecourse from cluster of channels In-Reply-To: References: Message-ID: <038801cc4ebc$f27edbc0$d77c9340$@maris@donders.ru.nl> Dear Clara, > I am using fieldtrip's cluster-based permutation test to identify a > significant channel-time cluster showing an effect. Now I would like > to extract a timecourse averaged over these channels (for the purpose > of comparing different conditions, not used to generate the cluster), > but I'm not sure if it makes sense to do so because the channels > belonging to the cluster change over time -- would the timecourse have > contributions from different channels at different time points? Do I > need to limit my cluster to fixed channels across time? (And if so, > how do I do that?) Yes, you should fix channels across time. The most important point in selecting the channels is finding evidence for the fact that the channels reflects a single source only. This is not a statistical issue, and therefore there is not a p-value that can guide you in this choice. If you have collected MEG data, the best evidence is a dipolar topography of your effect. Best, Eric Maris > > Thanks! > Clara > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at donders.ru.nl Sat Jul 30 20:45:12 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Sat, 30 Jul 2011 20:45:12 +0200 Subject: [FieldTrip] Group comparison statistics - ERF study In-Reply-To: References: Message-ID: <03a601cc4ee8$d152b760$73f82620$@maris@donders.ru.nl> Hi Anna, You can compare the two groups with respect to any linear combination that can be formed using the observations in the 2 (conditions) x 2 (response types) within-UO design. For testing interaction effects, these linear combinations are the usual contrasts. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Anna Lambrechts Sent: donderdag 28 juli 2011 11:32 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group comparison statistics - ERF study Hi, I am trying to run a group comparison analysis on event-related fields data in a 2 (groups) x 2 (conditions) x 2 (response types) design. Is this possible at all with any fieldtrip script? As far as I know implemented statistics look at within-groups comparison. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at gmx.de Sun Jul 31 13:33:15 2011 From: paul_c at gmx.de (Paul Czienskowski) Date: Sun, 31 Jul 2011 13:33:15 +0200 Subject: [FieldTrip] Auditory N1 Localization Message-ID: <4E353D7B.4000009@gmx.de> Dear all, I am trying to localize auditory evoked N1 peaks with the ft_dipolefitting function and BEM models. Occasionally the fit performed quite well, in particular with the individual models, but sometimes it did not. I have found about a quarter of the fits with the individual models being quite insensible and about the half of the fits with an standard model. Insensible means either pairs of symmetric dipoles at virtually the same place or dipoles way too far away from the expected positions. I have executed the fit with a grid defined by the grey matter from the SPM segmentations, restricted to one half of the interesting area - for I am fitting symmetric dipoles. And I used the subsequent non-linear search. I would appreciate if someone had some idea on how I might increase the yield of the fitting. Best regards and thanks in advance, Paul Czienskowski -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 From mconvertino at ufl.edu Fri Jul 1 01:09:58 2011 From: mconvertino at ufl.edu (Matteo Convertino) Date: Thu, 30 Jun 2011 19:09:58 -0400 Subject: [FieldTrip] where to download fieldtrip? Message-ID: Hello, I did not receive the email from which it is possible to download fieldtrip... , any idea ? where can i download it ? I checked the spam email and it`s not there thanks a lot Matteo Matteo Convertino mconvertino at ufl.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 1 10:31:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 1 Jul 2011 10:31:10 +0200 Subject: [FieldTrip] functionality change in ft_freqanalysis Message-ID: <27F0E6B4-4D83-487A-B434-64C65A2EE902@donders.ru.nl> Dear all, I made a slight change to the default behaviour of ft_freqanalysis. A good practice prior to doing spectral analysis is to remove the mean (and more often: the linear trend) from the time domain data, because if this is not done, it can lead to unexpected (at least unexpected to some) side effects. Some more documentation about this can be found at: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange_part_ii Anyway, we decided to let FieldTrip by default remove the first order linear trend from the time domain data, prior to doing the spectral analysis, thus avoiding unwanted side effects of the frequency transformation. This is now implemented in ft_freqanalysis when using the functions from the specest module (if you don't know what this 'specest' module means: don't worry, this is the default behaviour and you will be using it). You can overrule this trend removal by specifying the option cfg.polyremoval in ft_freqanalysis to be -1 (default = 1). You can also input different values to remove higher order polynomial trends (any value>1) or to just remove the mean value (cfg.polyremoval=0); Note that if you use a fresh copy of FieldTrip (the change will be available in tonight's release version) that the behaviour is slightly changed with respect to before only if you didn't explicitly detrend your data prior to spectral analysis. Happy fft'ing. Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From suforraxi at gmail.com Fri Jul 1 11:49:36 2011 From: suforraxi at gmail.com (Matteo Demuru) Date: Fri, 1 Jul 2011 11:49:36 +0200 Subject: [FieldTrip] WPLI statistic, permutation like test?? In-Reply-To: <786760757.45247.1309361729100.JavaMail.fmail@mwmweb077> References: <786760757.45247.1309361729100.JavaMail.fmail@mwmweb077> Message-ID: Thanks a lot On Wed, Jun 29, 2011 at 5:35 PM, Michael Wibral wrote: > Hi matteo, > > sorry for my sloppy description, > > of course you would only shuffle trials on one channel, not both. > > Michael > > > > ------------------------------ > *Von:* "Matteo Demuru" > *Gesendet:* Jun 29, 2011 10:01:15 AM > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* Re: [FieldTrip] WPLI statistic, permutation like test?? > > > Hi Micheal, > > It seems to me that if you shuffle the trials and then compute the WPLI, > the result is the same as if you do not shuffle. > > For example I have tried compute the WPLI on my trials and then switch > trial{1} with trial{2} and the obtained WPLI is the same. > > Matteo > > On Tue, Jun 28, 2011 at 8:34 PM, Michael Wibral wrote: > >> Hi Matteo, >> >> I am not an expert on the WPLI measures, but to me it seems that in doing >> >> >> "2) Randomly permute the ch2 time series" >> >> you're destroying a lot of ch2's properties (ie.g. it's spectrum will get >> a lot of high ferquencies this way) and this will typically lead to false >> positives. This is why permutation tests for connectivity measures typically >> shuffle trials (i.e. permute data in a very controlled way, keeping the >> intrinsic structure of the data). >> >> Michael >> >> >> ------------------------------ >> *Von:* "Matteo Demuru" >> *Gesendet:* Jun 28, 2011 2:46:28 PM >> *An:* fieldtrip at donders.ru.nl >> *Betreff:* [FieldTrip] WPLI statistic, permutation like test?? >> >> >> >> Hi, >> >> I have a couple of questions about using the WPLI index to assess the >> phase on my MEG data. >> >> The experiment consists of recordings during a mental calculation task: I >> have 30 sec in which each subject performed continuously an arithmetic >> operation. >> >> It seems to me that WPLI index required more than one trial in order to be >> computed. Am I right? (Is this necessary in order to reduce volume >> conduction problems?) >> I could divide my 30 sec in 5 sec-trials to create my trials, but I was >> wandering if this could be a misuse of the WPLI, i.e. WPLI is not >> appropriate for my experiment. >> >> I am also interested in assessing the significance of WPLI index, I would >> like to gauge the significance per se of my WPLI values. >> The idea is to calculate the WPLI distribution under the null hypothesis >> (not phase coupling) for each pair of channels in this way: >> >> Example to assess the significance of WPLI value for ch1 vs ch2 >> >> 1) Calculate the WPLI for ch1 and ch2, this would be the observed WPLI >> (WPLI_observed) >> >> 2) Randomly permute the ch2 time series >> >> 3) Calculate the WPLI for ch1 and ch2 (WPLI_i) >> >> 4) Repeat step 2 and 3 (for instance 100 times) in order to create the >> WPLI_i distribution >> >> 5) Calculate the proportion ( # (WPLI_i > WPLI_observed) / # (WPLI_i ) ) >> of WPLI_i which are greater than the WPLI_observed, if this proportion >> is < 0.05 I could say that the WPLI_observed represents a significant >> degree of phase, otherwise not. >> >> Does it make sense or is it not the right approach? >> >> Let suppose this is a correct approach, I have two other questions: >> >> First, usually when I compute the WPLI value between two channels I obtain >> a number of WPLI values according to the cross-spectrum times (one WPLI for >> each sliding window), in the steps above I am assuming to compute the >> average WPLI_observed and the average WPLI_i for each step. Does this >> raise any problems? >> >> Second, is it a problem using the same random permutations employed to >> obtain ch1-ch2 (WPLI_i distribution) to calculate also the ch1-ch3 (WPLI >> _i distribution). This is just an implementatiion question. I would like >> to know if I could shuffle the time series of other channels in one step >> (i.e. for ch1 something like data.trial{other_than_ch1,perm}), and finally >> extract just the column relative to ch1 from WPLI matrix. >> >> thanks >> >> Matteo >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From minsa at fastmail.co.uk Fri Jul 1 12:25:43 2011 From: minsa at fastmail.co.uk (minsa at fastmail.co.uk) Date: Fri, 01 Jul 2011 12:25:43 +0200 Subject: [FieldTrip] time-frequency analysis Message-ID: <1309515943.6917.1469280533@webmail.messagingengine.com> Hello, I'm new to field trip and I have two short questions regarding time-frequency analysis: I'm using field trip for averaging time frequency plots of 11 subjects obtained by BESA 5.3. For every subject I have two conditions, and I want to calculate (using statistical clustering) the difference bettween the two conditions. Are the single time-frequency plots normalized before clustering? After performing the average over subjects, I get a matlab-window titled 'TFC-selectplots'. The window is subdivided into 3 sections (Plots of original data, Grand average plots and Results of statistical tests). I find in the last section 'show clustering with prob. below alpha, plotted over' where I mark 'Diff. Between grand average' and 'No mask'. I get a window with the clustered difference between the two conditions. Now my question: The color-bar show symmetric values (from blue to red) 0.1, 0, 0.1, 0.2. What do these numbers correspond to? statistical probabilities? can you please help me with these two questions? I would be so thankful! Best regards, Iris From Margit.Schoenherr at uk-erlangen.de Fri Jul 1 12:33:00 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Fri, 1 Jul 2011 12:33:00 +0200 Subject: [FieldTrip] electrode positions of 4D data Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Hello, we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls hdr.grad = bti2grad(orig); which only returns the grad structure, whereas for Neuromag data at line 1056 [hdr.grad, elec] = mne2grad(orig); has 2 outputs. There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? Thank you, Margit From E.vandenBroeke at chir.umcn.nl Fri Jul 1 13:56:02 2011 From: E.vandenBroeke at chir.umcn.nl (E.vandenBroeke at chir.umcn.nl) Date: Fri, 1 Jul 2011 13:56:02 +0200 Subject: [FieldTrip] order of preprocessing steps in ERP analysis Message-ID: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> Dear fieldtrippers, I would like to know if someone could answer my question. In the analysis of ERPs I use some preprocessing steps to improve the signal-to-noise ratio; down-sampling (from 2000 to 500 Hz) and filtering (between 1-30 Hz). What should I do first; down-sampling or filtering, or doesn't it make any difference? Thanks, Best, Emanuel van den Broeke Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrysa.lithari at gmail.com Fri Jul 1 14:32:14 2011 From: chrysa.lithari at gmail.com (Chrysa Lithari) Date: Fri, 1 Jul 2011 14:32:14 +0200 Subject: [FieldTrip] neuromag BESA compatibility Message-ID: Hi to all, I have a question. I have used BESA to do the artifact rejection on my meg data, but I want to pass to Fieltrip. Does anybody know if while opening the .fif file, the rejected channels and trials will be rejected also by Fieldtrip or not? In other words, do I have to do the artifact rejection again in Fieldtrip? Thanks a lot for your time and response, -- Lithari Chrysa - PhD candidate Medical Informatics, Aristotle University of Thessaloniki, Greece - M.Sc. NeuroInformatics, Unversity of Patras, Greece - B.Sc. Computer Science, Aristotle University of Thessaloniki, Greece -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Fri Jul 1 17:12:50 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Fri, 1 Jul 2011 18:12:50 +0300 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: Dear Margit with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlabtool. I assume the electrodes were digitized. yuval 2011/7/1 Schönherr, Margit > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading > combined MEG and EEG data sets, there is no elec data structure which would > contain information about the electrode positions,labels... At line 161, the > ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line > 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode > positions, is there? I am using fieldtrip-20110603. Is anyone currently > working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 1 18:15:22 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 1 Jul 2011 18:15:22 +0200 Subject: [FieldTrip] order of preprocessing steps in ERP analysis In-Reply-To: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> References: <1DB2AC40A2EE4B4180B817DEEACBF921B10836@UMCEXBE12.umcn.nl> Message-ID: Dear Emanuel, It should not make a difference. Best, Eelke 2011/7/1 : > Dear fieldtrippers, > > I would like to know if someone could answer my question. > > In the analysis of ERPs I use some preprocessing steps to improve the > signal-to-noise ratio; down-sampling (from 2000 to 500 Hz) and filtering > (between 1-30 Hz). > > What should I do first; down-sampling or filtering, or doesn’t it make any > difference? > > Thanks, > > Best, > > Emanuel van den Broeke > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From mconvertino at ufl.edu Fri Jul 1 20:14:19 2011 From: mconvertino at ufl.edu (Matteo Convertino) Date: Fri, 1 Jul 2011 14:14:19 -0400 Subject: [FieldTrip] EEG-fMRI-MRI coupled dataset In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: Is there anyone aware of any dataset freely available of EEG+fMRI (or/and MRI) of epileptic patients ? Thanks a lot Matteo C. ___ Matteo Convertino, PhD Research Associate Agricultural and Biological Engineering Dept. College of Agriculture and Life Sciences - Institute of Food and Agricultural Sciences - Water Institute Affiliated Faculty and Quantitative Spatial Ecology, Evolution, and Environment (QSE^3) NSF-IGERT program Prof. Rafael Munoz-Carpena & Greg Kiker Research groups Frazier Rogers Hall, Museum Road, office 218, PO box 110570, 32611-0570 University of Florida, Gainesville USA Research Scientist USACE ERDC, Risk Modeling and Decision Science Area I. Linkov group Boston, MA web: http://plaza.ufl.edu/mconvertino/ http://carpena.ifas.ufl.edu/people/MatteoConvertino.shtml Office phone: +1 352-392-1864 ext. 218 / Fax: +1 352-392-4092 (USA) Mobile phone : +1 347-761-4511 (USA) Skype ID: convertino.matteo PhD 2009, University of Padova advisors: Prof. Andrea Rinaldo and Prof. Amos Maritan (Physics Dept. UniPd) co-advisor: Prof. Ignacio Rodriguez-Iturbe (Princeton University) IMAGE Dept. & International Center for Hydrology "Dino Tonini" Graduate School in Civil and Environmental Engineering Sciences Via Loredan 20, I-35131 Padova University of Padova, Italy ___ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hedderik at van-rijn.org Sat Jul 2 14:01:33 2011 From: hedderik at van-rijn.org (Hedderik van Rijn) Date: Sat, 2 Jul 2011 14:01:33 +0200 Subject: [FieldTrip] labels not updated in ft_scalpcurrentdensity using Hjorth's method Message-ID: <8D1C3271-7D6C-49CA-B713-08AE50E95FA1@van-rijn.org> Dear Fieldtrippers, for a replication study, I'm applying Hjorth's SCD method on just FCz with a given set of neighbors. After running the following code: cfg = []; elec = ft_read_sens('electrodes-Tobias.set'); cfg.elec = elec; ngh = {struct('label','FCz','neighblabel',{{'FC3','FC4','CPZ','AFz'}})}; cfg.method = 'hjorth'; cfg.neighbours = ngh; cfg.trials = 'all'; data_hjorth = ft_scalpcurrentdensity(cfg,data); The labels of the resulting dataset still refer to the original electrodes: >> length(data_hjorth.label) ans = [32] But the resulting data only contains FCz information (as expected): >> size(data_hjorth.trial{1}) ans = 1 2500 I was wondering if this is intentional, or whether the label field should only contain the electrode(s) for which the current density was calculated. If the latter is the case, line 229 of ft_scalpcurrentdensity, which reads: scd.label = data.label; should be replaced with: if strcmp(cfg.method, 'hjorth') scd.label = labelnew; else scd.label = data.label; end - Hedderik. From tjordanov at besa.de Mon Jul 4 08:43:15 2011 From: tjordanov at besa.de (tjordanov at besa.de) Date: Mon, 4 Jul 2011 08:43:15 +0200 Subject: [FieldTrip] neuromag BESA compatibility In-Reply-To: References: Message-ID: <001201cc3a15$a8a48420$f9ed8c60$@besa.de> Hi Lithari, There are two possibilities to export artifact corrected data to FieldTrip. If you have BESA 5.3 then you can use the Matlab interface and send the Data directly to Matlab with the "Send to Matlab" command. If you have BESA 5.2 or earlier then you can export the corrected data as an ascii file (vectorized or multiplex) and then use the besa2fieldtrip readers, which are available in FieldTrip or on the BESA webpage. Best regards, Todor ---------------------------------------------------------------------------- -------- Todor Iordanov Research & Development BESA GmbH Freihamer Strasse 18 82166 Graefelfing/Germany Phone: +49 89 8980 9968 HRB Munich 109956 CEOs: Dr. Michael Scherg, Theodor Scherg, Dr. Tobias Scherg ---------------------------------------------------------------------------- -------- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Chrysa Lithari Sent: Freitag, 1. Juli 2011 14:32 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] neuromag BESA compatibility Hi to all, I have a question. I have used BESA to do the artifact rejection on my meg data, but I want to pass to Fieltrip. Does anybody know if while opening the .fif file, the rejected channels and trials will be rejected also by Fieldtrip or not? In other words, do I have to do the artifact rejection again in Fieldtrip? Thanks a lot for your time and response, -- Lithari Chrysa - PhD candidate Medical Informatics, Aristotle University of Thessaloniki, Greece - M.Sc. NeuroInformatics, Unversity of Patras, Greece - B.Sc. Computer Science, Aristotle University of Thessaloniki, Greece -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jul 4 11:32:09 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 04 Jul 2011 11:32:09 +0200 Subject: [FieldTrip] EEG-fMRI-MRI coupled dataset In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> Message-ID: <4E118899.7040500@donders.ru.nl> Dear Matteo, there might be some dataset available at the SPM webpage. I did not check it, maybe there are also EEG-fMRI sets. Best, Jörn On 7/1/2011 8:14 PM, Matteo Convertino wrote: > Is there anyone aware of any dataset freely available of EEG+fMRI > (or/and MRI) of epileptic patients ? > > Thanks a lot > > Matteo C. > > > > > ___ > Matteo Convertino, PhD > > Research Associate > Agricultural and Biological Engineering Dept. College of Agriculture > and Life Sciences - Institute of Food and Agricultural Sciences > - Water Institute Affiliated Faculty and Quantitative Spatial Ecology, > Evolution, and Environment (QSE^3) NSF-IGERT program > Prof. Rafael Munoz-Carpena & Greg Kiker Research groups > Frazier Rogers Hall, Museum Road, office 218, PO box 110570, 32611-0570 > University of Florida, Gainesville > USA > > Research Scientist USACE ERDC, Risk Modeling and Decision Science Area > I. Linkov group > Boston, MA > > web: http://plaza.ufl.edu/mconvertino/ > http://carpena.ifas.ufl.edu/people/MatteoConvertino.shtml > Office phone: +1 352-392-1864 ext. 218 / Fax: +1 352-392-4092 (USA) > Mobile phone : +1 347-761-4511 (USA) > Skype ID: convertino.matteo > > PhD 2009, University of Padova > advisors: Prof. Andrea Rinaldo and Prof. Amos Maritan (Physics Dept. > UniPd) > co-advisor: Prof. Ignacio Rodriguez-Iturbe (Princeton University) > IMAGE Dept. & International Center for Hydrology "Dino Tonini" > Graduate School in Civil and Environmental Engineering Sciences > Via Loredan 20, I-35131 Padova > University of Padova, Italy > ___ > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ion.ucl.ac.uk Mon Jul 4 12:11:41 2011 From: v.litvak at ion.ucl.ac.uk (Vladimir Litvak) Date: Mon, 4 Jul 2011 11:11:41 +0100 Subject: [FieldTrip] FW: Can't read smr to ft In-Reply-To: <46E06B3F28AD344DBE53103DE027DC9D059FA8EE@exmailer2.umhnet.es> References: <46E06B3F28AD344DBE53103DE027DC9D059FA8EE@exmailer2.umhnet.es> Message-ID: Dear Graciela, You can export your data from Spike 6 to Matlab and then read the resulting mat file into Fieldtrip using ft_preprocessing. It will be automatically recognized. You should use setting as in the attached screenshot (you can choose a different sampling rate). Best, Vladimir On Sun, Jul 3, 2011 at 5:07 PM, Navarro Mora, Graciela wrote: > > > Dears, > > > > I am Graciela Navarro, from the Institute of Neuroscience in Alicante. I am > contacting you because I found on field trip discussion some of your mails > referring a problem when reading .smr format data.  I would like to know how > you dealt with the problem as I am having the same one. My original data are > generated with multichannel systems (.mcd), and I have no problem to import > the into spike2 6.03. However I cannot use ft_read_data with the .smr files > I get with spike2. > > > > I was also reading the answers of Vladimir, but my problem after doing what > he proposes is persisting. Please do you have any suggestion to me? > > > > The error is the following: > > > >>> hdr=ft_read_data('1000eeg.smr') > > Loading file 1000eeg.smr using NeuroShare library v1.7 ... > > NEV file could not be loaded! > > ??? Error using ==> read_ced_son at 107 > > File read error occurred in function 1000eeg.smr with entity 0, index 0 > > > > Error in ==> ft_read_header at 303 > >     orig = read_ced_son(filename,'readevents','no','readdata','no'); > > > > Error in ==> ft_read_data at 121 > >   hdr = ft_read_header(filename, 'headerformat', headerformat); > > > > Thanks a lot in advance, > > Greetings > > > > Graciela > > > > Graciela Navarro Mora, Ph.D. > > > > "Cellular & Molecular Mechanisms of Brain Wiring" > > Instituto de Neurociencias > > CSIC & Universidad Miguel Hernández > > Av. Ramón y Cajal, s/n > > 03550 San Juan de Alicante > > Alicante, Spain > > > > Phone: (34) 965 91 9592 > > g.navarro at umh.es > > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 13086 bytes Desc: not available URL: From Margit.Schoenherr at uk-erlangen.de Mon Jul 4 13:37:16 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 4 Jul 2011 13:37:16 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Hello Yuval, thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. Margit ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] Gesendet: Freitag, 1. Juli 2011 17:12 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] electrode positions of 4D data Dear Margit with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. yuval 2011/7/1 Schönherr, Margit > Hello, we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls hdr.grad = bti2grad(orig); which only returns the grad structure, whereas for Neuromag data at line 1056 [hdr.grad, elec] = mne2grad(orig); has 2 outputs. There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? Thank you, Margit _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From venug001 at crimson.ua.edu Mon Jul 4 13:56:19 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Mon, 4 Jul 2011 03:56:19 -0800 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de> <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Message-ID: Greetings, the location file for 4D is in the form of an .xyz file. This is not the same as a head shape file--though both use the x, y, and z, and are conceptually related. The head shape file is unique to inviduals, when the location file will tell you the exact position, in Cartesian space, and orientation of the electrodes. Many researchers on the this list, and on others have locations files for a 248 channel 4D system. Though they are standard, even those can vary very slightly from machine to machine and day to day. If you export your data from the MSI system it will put out three files, one of which is an .xyz file, which is your location file. If you have EEGLAB or Fieldtrip you should look for the.xyz file. All the best. 2011/7/4 Schönherr, Margit > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG > data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot > distinguish the electrode positions in the list of 3000 head shape > digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im > Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of > the electrodes was not in the data structure but also the EEG data. this is > when specifying channel = 'EEG'; giving it the channel labels solved it- > {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if > worse comes to worst you can try reading the EEG location with msi >> > matlab tool. I assume the electrodes > were digitized. > yuval > > 2011/7/1 Schönherr, Margit Margit.Schoenherr at uk-erlangen.de>> > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading > combined MEG and EEG data sets, there is no elec data structure which would > contain information about the electrode positions,labels... At line 161, the > ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line > 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode > positions, is there? I am using fieldtrip-20110603. Is anyone currently > working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html< > http://faculty.biu.ac.il/%7Egoldsa/index.html > > > > "Many were increasingly of the opinion that they'd all made a big mistake > in coming down from the trees in the first place. And some said that even > the trees had been a bad move, and that no one should ever have left the > oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 4 14:08:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 4 Jul 2011 14:08:29 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de> Message-ID: <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> Hi Margit, There should be information with respect to the electrode locations (if digitized indeed) in the header-information. I don't know about the digitized electrode positions, because at the time that I wrote the code dealing with 4d-data we did not simultaneously collect EEG and MEG data, so there is no way for me to check. Could you check whether your data.hdr contains the following field: data.hdr.orig.user_block_data? This should be a cell-array, and in my headers typically the 11th cell contains the info about the digitized electrodes (in my case only information about the 5 coils and landmarks is present). It's called 'b_eeg_elec_locs' (check hdr.orig.user_block_data{x}.hdr.type). The hdr.orig.user_block_data{x}.pnt contains the coordinates of the points. How many are there in your header? If this number > 11 then chances are that these are the electrode positions. We could of course then easily extend the code in order to spit these out in a more convenient format. Best wishes, Jan-Mathijs On Jul 4, 2011, at 1:37 PM, Schönherr, Margit wrote: > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. > yuval > > 2011/7/1 Schönherr, Margit > > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From Margit.Schoenherr at uk-erlangen.de Mon Jul 4 16:42:59 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 4 Jul 2011 16:42:59 +0200 Subject: [FieldTrip] electrode positions of 4D data In-Reply-To: <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> References: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD6@XMAIL1.medads.uk-erlangen.de>, <71D8F8A56F37A947912FC86D4D9F00F450458E3DD8@XMAIL1.medads.uk-erlangen.de>, <8D28C92C-E7AE-4D22-B4C3-CD608AC6FD6B@donders.ru.nl> Message-ID: <71D8F8A56F37A947912FC86D4D9F00F450458E3DD9@XMAIL1.medads.uk-erlangen.de> Hello Jan-Mathijs, thanks a lot, I have 14 user_blocks and I found the points and labels in hdr.orig.user_block_data{1,12}. Best, Margit ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Gesendet: Montag, 4. Juli 2011 14:08 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] electrode positions of 4D data Hi Margit, There should be information with respect to the electrode locations (if digitized indeed) in the header-information. I don't know about the digitized electrode positions, because at the time that I wrote the code dealing with 4d-data we did not simultaneously collect EEG and MEG data, so there is no way for me to check. Could you check whether your data.hdr contains the following field: data.hdr.orig.user_block_data? This should be a cell-array, and in my headers typically the 11th cell contains the info about the digitized electrodes (in my case only information about the 5 coils and landmarks is present). It's called 'b_eeg_elec_locs' (check hdr.orig.user_block_data{x}.hdr.type). The hdr.orig.user_block_data{x}.pnt contains the coordinates of the points. How many are there in your header? If this number > 11 then chances are that these are the electrode positions. We could of course then easily extend the code in order to spit these out in a more convenient format. Best wishes, Jan-Mathijs On Jul 4, 2011, at 1:37 PM, Schönherr, Margit wrote: > Hello Yuval, > > thank you, giving the electrode labels {'E1', ..., 'En'} reads in the EEG data only (without MEG). But still, I have no electrode positions. > > Julian, yes, we have digitized the electrodes, but unfortunately I cannot distinguish the electrode positions in the list of 3000 head shape digitization points. So, this does not solve the problem. > > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Yuval Harpaz [yuvharpaz at gmail.com] > Gesendet: Freitag, 1. Juli 2011 17:12 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] electrode positions of 4D data > > Dear Margit > with a previous version of fieldtrip I found that not only the location of the electrodes was not in the data structure but also the EEG data. this is when specifying channel = 'EEG'; giving it the channel labels solved it- {'E1' E2' ... 'En'}; if I remember well the elec position was read then. if worse comes to worst you can try reading the EEG location with msi >> matlab tool. I assume the electrodes were digitized. > yuval > > 2011/7/1 Schönherr, Margit > > Hello, > > we are using a 4D Neuroimaging device with 248 magnetometers. When reading combined MEG and EEG data sets, there is no elec data structure which would contain information about the electrode positions,labels... At line 161, the ft_read_header function calls > > hdr.grad = bti2grad(orig); > > which only returns the grad structure, whereas for Neuromag data at line 1056 > > [hdr.grad, elec] = mne2grad(orig); > > has 2 outputs. > > There doesn't seem to be anything implemented for getting the electrode positions, is there? I am using fieldtrip-20110603. Is anyone currently working on this, or has already solved the problem? > > Thank you, > Margit > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From inbalots at gmail.com Tue Jul 5 12:40:18 2011 From: inbalots at gmail.com (Inbal Lots) Date: Tue, 5 Jul 2011 13:40:18 +0300 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? Message-ID: Hello I am using ft_multiplotER to display the 'butterfly' of the MEG data after it was decimated and averaged. I would like to do several things: 1) to have the axes legends and values on the figure I get (I get only a plot with not text at all on the axes) 2) to add a title (*not* by doing it with matlab title('XXX')) 3) to be able to select a component (i.e. a relevant time piece ) and to see it's field on the head layout (i.e.cfg.layout='4D248.lay';) The code I am using, after decimation and averaging , is: cfg=[]; cfg.interactive='yes'; cfg.showlabels='yes'; cfg.fontsize=14; % cfg.layout='4D248.lay'; cfg.layout ='butterfly'; ft_multiplotER(cfg,AvrDATA); Is it possible? Thank you very much for your help Inbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ww.peng0923 at gmail.com Tue Jul 5 16:33:34 2011 From: ww.peng0923 at gmail.com (PWW) Date: Tue, 5 Jul 2011 22:33:34 +0800 Subject: [FieldTrip] source analysis and simulation Message-ID: Dear all, I am a new comer for using fieldtrip toolbox. I am a Mphil student of The University of Hong Kong, and my research is about source analysis for EEG oscillation. At the moment, I confront some problems in simulation when using fieldtrip to do source analysis. Firstly, I have tried the matlab codes on the website of http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan. When I change the dipole position, such as [3 8 8], the reconstructed source is also located at [0 0 4]. I have confirmed the simulation data, which is right and varied accroding to the dipole position. However, for the source analysis result, it doesn't change, and stills locates at the position of [0 0 4]. It seems that the problems lies at the function of ft_sourceanalysis ft_sourceanalysis. I am quite confused and hope to get a clear explaination. And thanks very much. Secondly, I have alligned my electrode file to the standard BEM head model. Then I undertook source analysis for timelocked EEG activities for simulation according to the following codes: clear all clc load headmodel.mat cfg = []; cfg.vol = vol; cfg.elec = elec; cfg.dip.pos = [0 -20 100]; % the dipole is located at about Cz channel cfg.dip.mom = [0 0 1]'; % the dipole points along the x-axis cfg.relnoise = 0; cfg.ntrials = 20; data = ft_dipolesimulation(cfg); % compute the data covariance matrix, which will capture the activity of % the simulated dipole cfg = []; cfg.covariance = 'yes'; timelock = ft_timelockanalysis(cfg, data); % do the beamformer source reconstuction on a 10 mm grid cfg = []; cfg.vol = vol; cfg.elec=elec; cfg.grid.resolution = 10; cfg.method = 'lcmv'; source = ft_sourceanalysis(cfg, timelock); cfg = []; cfg.downsample = 2; sourcePostInt = ft_sourceinterpolate(cfg, source , mri); cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.opacitymap = 'rampup'; figure ft_sourceplot(cfg, sourcePostInt); However, it still doesn't work, and the source is located at wrong position. I have no idear and worked on it for several days. So I am writing to your to ask for help, my headmodel file in the *.mat type can be downloaded in http://www.sendspace.com/file/lars5j . Thanks again for all your help. Best regards, Weiwei Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgroppe at cogsci.ucsd.edu Wed Jul 6 00:27:01 2011 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Tue, 5 Jul 2011 18:27:01 -0400 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? In-Reply-To: References: Message-ID: Hi Inbal, The Mass Univariate ERP Toolbox (http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox) has an interactive butterfly plot GUI (see the attached figure for an example). However it expects your data to be formatted according to EEGLAB's conventions (not FieldTrip's). So if you can export your data to EEGLAB it might do what you want. cheers, -David On Tue, Jul 5, 2011 at 6:40 AM, Inbal Lots wrote: > Hello > > I am using ft_multiplotER to display the 'butterfly' of the MEG data after > it was decimated and averaged. > I would like to do several things: > 1) to have the axes legends and values on the figure I get (I get only a > plot with not text at all on the axes) > 2) to add a title (not by doing it with matlab title('XXX')) > 3) to be able to select a component (i.e. a relevant  time piece ) and to > see it's field on the head layout (i.e.cfg.layout='4D248.lay';) > > The code I am using, after  decimation and averaging , is: > > cfg=[]; > cfg.interactive='yes'; > cfg.showlabels='yes'; > cfg.fontsize=14; > % cfg.layout='4D248.lay'; > cfg.layout ='butterfly'; > ft_multiplotER(cfg,AvrDATA); > > Is it possible? > > Thank you very much for your help > > Inbal > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- David Groppe, Ph.D. Postdoctoral Researcher Kutaslab Dept. of Cognitive Science University of California, San Diego http://www.cogsci.ucsd.edu/~dgroppe/ -------------- next part -------------- A non-text attachment was scrubbed... Name: Gui_erp_tmax_xo.jpg Type: image/jpeg Size: 605722 bytes Desc: not available URL: From sylvana.schister at utah.edu Wed Jul 6 19:37:00 2011 From: sylvana.schister at utah.edu (Sylvana) Date: Wed, 06 Jul 2011 11:37:00 -0600 Subject: [FieldTrip] ICA problem Message-ID: <1309973820.23419.9.camel@weston-desktop> Hi all, I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of ft_componentanalysis. I get the following error message: ??? Error using ==> surf at 74 X, Y, Z, and C cannot be complex. Error in ==> ft_plot_topo at 184 h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', 'none', 'FaceColor', shading); Error in ==> ft_topoplotER at 753 ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... Error in ==> ft_topoplotIC at 116 ft_topoplotER(cfg, varargin{:}); The complex variable is 'Zi', which is taken from 'comp'. I can modify the function to take the real part of the variable (or the absolute value), but I am not sure if this would be the correct thing to do. In case this is a bug, I thought I should report it. Any comments? Thanks for your help, Sylvana Schister Univ. of Utah Dept. of Bioengineering From stephen.whitmarsh at gmail.com Wed Jul 6 20:09:42 2011 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 6 Jul 2011 20:09:42 +0200 Subject: [FieldTrip] ICA problem In-Reply-To: <1309973820.23419.9.camel@weston-desktop> References: <1309973820.23419.9.camel@weston-desktop> Message-ID: Dear Sylvana, >From the top op my head: When running the ICA, try only computing it for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run on reference sensors in case of MEG. I have hunch that might help out. Cheers, Stephen On 6 July 2011 19:37, Sylvana wrote: > Hi all, > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > ft_componentanalysis. > > I get the following error message: > > > ??? Error using ==> surf at 74 > X, Y, Z, and C cannot be complex. > > Error in ==> ft_plot_topo at 184 >  h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > 'none', 'FaceColor', shading); > > Error in ==> ft_topoplotER at 753 > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > Error in ==> ft_topoplotIC at 116 >    ft_topoplotER(cfg, varargin{:}); > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > the function to take the real part of the variable (or the absolute > value), but I am not sure if this would be the correct thing to do. In > case this is a bug, I thought I should report it. Any comments? > > Thanks for your help, > > Sylvana Schister > Univ. of Utah > Dept. of Bioengineering > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From sherrykhan78 at gmail.com Thu Jul 7 02:44:16 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Wed, 6 Jul 2011 20:44:16 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> Message-ID: Hi Sylvana, Is the data SSS (maxfilter), I normally have this problem when data is SSS, try doing ICA with PCA (set at 64 components). Sheraz Khan Martinos Center Boston, USA On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Sylvana, > > >From the top op my head: When running the ICA, try only computing it > for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run > on reference sensors in case of MEG. > I have hunch that might help out. > > Cheers, > Stephen > > > On 6 July 2011 19:37, Sylvana wrote: > > Hi all, > > > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > > ft_componentanalysis. > > > > I get the following error message: > > > > > > ??? Error using ==> surf at 74 > > X, Y, Z, and C cannot be complex. > > > > Error in ==> ft_plot_topo at 184 > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > > 'none', 'FaceColor', shading); > > > > Error in ==> ft_topoplotER at 753 > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > Error in ==> ft_topoplotIC at 116 > > ft_topoplotER(cfg, varargin{:}); > > > > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > > the function to take the real part of the variable (or the absolute > > value), but I am not sure if this would be the correct thing to do. In > > case this is a bug, I thought I should report it. Any comments? > > > > Thanks for your help, > > > > Sylvana Schister > > Univ. of Utah > > Dept. of Bioengineering > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Thu Jul 7 03:27:46 2011 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 06 Jul 2011 21:27:46 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> Message-ID: <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> I've had this same problem with EEGlab's runICA implementation when the rank of the data was less than the number of variables (i.e., it's an ill-conditioned matrix, which is to say it has multicolinearity). Including the reference channel can do this (since it's just zeroes). Using PCA to reduce the data to a subspace can help as well since the rank will now equal the number of variables (namely the number of factor scores will equal the number of retained factors). Before you go the PCA route, it's worth trying to figure out why the data is ill-conditioned. There is likely to be something wrong with one of your channels. Maybe two of them are shorted together or something along those lines. Or if you used mean mastoid reference and included both mastoids, that can do it too (since they will be exactly inversely correlated, one of them is statistically redundant, reducing the rank by one). My EP Toolkit artifact correction routine (http://sourceforge.net/projects/erppcatoolkit/) takes all these sorts of things into account when performing eyeblink correction. Cheers! Joe On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > Hi Sylvana, > > Is the data SSS (maxfilter), I normally have this problem when data is SSS, try doing ICA with PCA (set at 64 components). > > Sheraz Khan > Martinos Center > Boston, USA > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh wrote: > Dear Sylvana, > > >From the top op my head: When running the ICA, try only computing it > for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run > on reference sensors in case of MEG. > I have hunch that might help out. > > Cheers, > Stephen > > > On 6 July 2011 19:37, Sylvana wrote: > > Hi all, > > > > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. > > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of > > ft_componentanalysis. > > > > I get the following error message: > > > > > > ??? Error using ==> surf at 74 > > X, Y, Z, and C cannot be complex. > > > > Error in ==> ft_plot_topo at 184 > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', > > 'none', 'FaceColor', shading); > > > > Error in ==> ft_topoplotER at 753 > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > Error in ==> ft_topoplotIC at 116 > > ft_topoplotER(cfg, varargin{:}); > > > > > > The complex variable is 'Zi', which is taken from 'comp'. I can modify > > the function to take the real part of the variable (or the absolute > > value), but I am not sure if this would be the correct thing to do. In > > case this is a bug, I thought I should report it. Any comments? > > > > Thanks for your help, > > > > Sylvana Schister > > Univ. of Utah > > Dept. of Bioengineering > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://homepage.mac.com/jdien07/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Thu Jul 7 06:18:09 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Thu, 7 Jul 2011 00:18:09 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> Message-ID: Hi Joseph, Most likely cause of ill-conditioned in neuromag data is maxfilter (signal space separation) which reduces the dimensionality from 306 (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar expansion of order 8). Also neuromag is consist of two different type of sensors (Planar Gradiometer and magnetometer) having different sensitivities, so either ica needs to run separately on them or combined by making them equal through normalization. Sheraz Khan Martinos Center Boston, USA On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > I've had this same problem with EEGlab's runICA implementation when the > rank of the data was less than the number of variables (i.e., it's an > ill-conditioned matrix, which is to say it has multicolinearity). Including > the reference channel can do this (since it's just zeroes). Using PCA to > reduce the data to a subspace can help as well since the rank will now equal > the number of variables (namely the number of factor scores will equal the > number of retained factors). Before you go the PCA route, it's worth trying > to figure out why the data is ill-conditioned. There is likely to be > something wrong with one of your channels. Maybe two of them are shorted > together or something along those lines. Or if you used mean mastoid > reference and included both mastoids, that can do it too (since they will be > exactly inversely correlated, one of them is statistically redundant, > reducing the rank by one). My EP Toolkit artifact correction routine ( > http://sourceforge.net/projects/erppcatoolkit/) takes all these sorts of > things into account when performing eyeblink correction. > > Cheers! > > Joe > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > Hi Sylvana, > > Is the data SSS (maxfilter), I normally have this problem when data is SSS, > try doing ICA with PCA (set at 64 components). > > Sheraz Khan > Martinos Center > Boston, USA > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Dear Sylvana, >> >> >From the top op my head: When running the ICA, try only computing it >> for the MEG or EEG channels. (cfg.channel = 'MEG';), so it doesn't run >> on reference sensors in case of MEG. >> I have hunch that might help out. >> >> Cheers, >> Stephen >> >> >> On 6 July 2011 19:37, Sylvana wrote: >> > Hi all, >> > >> > I am trying to use ICA to clean EOG and ECG artifacts of neuromag data. >> > I am running ft_topoplotIC(cfg, comp), where 'comp' is the output of >> > ft_componentanalysis. >> > >> > I get the following error message: >> > >> > >> > ??? Error using ==> surf at 74 >> > X, Y, Z, and C cannot be complex. >> > >> > Error in ==> ft_plot_topo at 184 >> > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', >> > 'none', 'FaceColor', shading); >> > >> > Error in ==> ft_topoplotER at 753 >> > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... >> > >> > Error in ==> ft_topoplotIC at 116 >> > ft_topoplotER(cfg, varargin{:}); >> > >> > >> > The complex variable is 'Zi', which is taken from 'comp'. I can modify >> > the function to take the real part of the variable (or the absolute >> > value), but I am not sure if this would be the correct thing to do. In >> > case this is a bug, I thought I should report it. Any comments? >> > >> > Thanks for your help, >> > >> > Sylvana Schister >> > Univ. of Utah >> > Dept. of Bioengineering >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jul 7 18:07:13 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jul 2011 18:07:13 +0200 Subject: [FieldTrip] Question: is there an interactive butterfly layout ? In-Reply-To: References: Message-ID: <5D55B77E-C3A9-4924-A9CC-78B26602B8D4@donders.ru.nl> Dear Inbal, You may want to check the cfg.interactive='yes' option in ft_multiplotER, which allows you to make a selection of channels and time for creating a topoplot. Just switch it on and click/drag with your mouse in the figure. It does not solve all your questions, but it does do "3". best Robert On 5 Jul 2011, at 12:40, Inbal Lots wrote: > Hello > > I am using ft_multiplotER to display the 'butterfly' of the MEG data > after it was decimated and averaged. > I would like to do several things: > 1) to have the axes legends and values on the figure I get (I get > only a plot with not text at all on the axes) > 2) to add a title (not by doing it with matlab title('XXX')) > 3) to be able to select a component (i.e. a relevant time piece ) > and to see it's field on the head layout (i.e.cfg.layout='4D248.lay';) > > The code I am using, after decimation and averaging , is: > > cfg=[]; > cfg.interactive='yes'; > cfg.showlabels='yes'; > cfg.fontsize=14; > % cfg.layout='4D248.lay'; > cfg.layout ='butterfly'; > ft_multiplotER(cfg,AvrDATA); > > Is it possible? > > Thank you very much for your help > > Inbal > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sylvana.schister at utah.edu Thu Jul 7 18:07:48 2011 From: sylvana.schister at utah.edu (Sylvana) Date: Thu, 07 Jul 2011 10:07:48 -0600 Subject: [FieldTrip] ICA problem In-Reply-To: References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> Message-ID: <1310054868.25490.10.camel@weston-desktop> Hi all, Thank you so much for your quick reply. This is all very helpful. I am using tsss filtered data. After thinking it through all day, I understood that I have a dimensionality problem. Anyway, thanks again! Cheers, Sylvana On Wed, 2011-07-06 at 22:18 -0600, Sheraz Khan wrote: > Hi Joseph, > > Most likely cause of ill-conditioned in neuromag data is maxfilter > (signal space separation) which reduces the dimensionality from 306 > (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar > expansion of order 8). Also neuromag is consist of two different type > of sensors (Planar Gradiometer and magnetometer) having different > sensitivities, so either ica needs to run separately on them or > combined by making them equal through normalization. > > Sheraz Khan > Martinos Center > Boston, USA > > > > On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > I've had this same problem with EEGlab's runICA implementation > when the rank of the data was less than the number of > variables (i.e., it's an ill-conditioned matrix, which is to > say it has multicolinearity). Including the reference channel > can do this (since it's just zeroes). Using PCA to reduce the > data to a subspace can help as well since the rank will now > equal the number of variables (namely the number of factor > scores will equal the number of retained factors). Before you > go the PCA route, it's worth trying to figure out why the data > is ill-conditioned. There is likely to be something wrong > with one of your channels. Maybe two of them are shorted > together or something along those lines. Or if you used mean > mastoid reference and included both mastoids, that can do it > too (since they will be exactly inversely correlated, one of > them is statistically redundant, reducing the rank by one). > My EP Toolkit artifact correction routine > (http://sourceforge.net/projects/erppcatoolkit/) takes all > these sorts of things into account when performing eyeblink > correction. > > > Cheers! > > > Joe > > > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > > Hi Sylvana, > > > > Is the data SSS (maxfilter), I normally have this problem > > when data is SSS, try doing ICA with PCA (set at 64 > > components). > > > > Sheraz Khan > > Martinos Center > > Boston, USA > > > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh > > wrote: > > Dear Sylvana, > > > > >From the top op my head: When running the ICA, try > > only computing it > > for the MEG or EEG channels. (cfg.channel = 'MEG';), > > so it doesn't run > > on reference sensors in case of MEG. > > I have hunch that might help out. > > > > Cheers, > > Stephen > > > > > > > > On 6 July 2011 19:37, Sylvana > > wrote: > > > Hi all, > > > > > > I am trying to use ICA to clean EOG and ECG > > artifacts of neuromag data. > > > I am running ft_topoplotIC(cfg, comp), where > > 'comp' is the output of > > > ft_componentanalysis. > > > > > > I get the following error message: > > > > > > > > > ??? Error using ==> surf at 74 > > > X, Y, Z, and C cannot be complex. > > > > > > Error in ==> ft_plot_topo at 184 > > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), > > Zi, 'EdgeColor', > > > 'none', 'FaceColor', shading); > > > > > > Error in ==> ft_topoplotER at 753 > > > > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > > > Error in ==> ft_topoplotIC at 116 > > > ft_topoplotER(cfg, varargin{:}); > > > > > > > > > The complex variable is 'Zi', which is taken from > > 'comp'. I can modify > > > the function to take the real part of the variable > > (or the absolute > > > value), but I am not sure if this would be the > > correct thing to do. In > > > case this is a bug, I thought I should report it. > > Any comments? > > > > > > Thanks for your help, > > > > > > Sylvana Schister > > > Univ. of Utah > > > Dept. of Bioengineering > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -------------------------------------------------------------------------------- > > > Joseph Dien, > Senior Research Scientist > University of Maryland > > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From sherrykhan78 at gmail.com Thu Jul 7 18:32:57 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Thu, 7 Jul 2011 12:32:57 -0400 Subject: [FieldTrip] ICA problem In-Reply-To: <1310054868.25490.10.camel@weston-desktop> References: <1309973820.23419.9.camel@weston-desktop> <97A4A716-C5AD-45EF-A06A-59229B85F68D@mac.com> <1310054868.25490.10.camel@weston-desktop> Message-ID: Hi, tsss is more tricky, if uses default 4 sec window then you different dimensionality every 4 sec. Sheraz On Thu, Jul 7, 2011 at 12:07 PM, Sylvana wrote: > Hi all, > > Thank you so much for your quick reply. This is all very helpful. I am > using tsss filtered data. After thinking it through all day, I > understood that I have a dimensionality problem. > > Anyway, thanks again! > Cheers, > Sylvana > > On Wed, 2011-07-06 at 22:18 -0600, Sheraz Khan wrote: > > Hi Joseph, > > > > Most likely cause of ill-conditioned in neuromag data is maxfilter > > (signal space separation) which reduces the dimensionality from 306 > > (Channels in neuromag machine) to 64 (Spherical harmonics Multipolar > > expansion of order 8). Also neuromag is consist of two different type > > of sensors (Planar Gradiometer and magnetometer) having different > > sensitivities, so either ica needs to run separately on them or > > combined by making them equal through normalization. > > > > Sheraz Khan > > Martinos Center > > Boston, USA > > > > > > > > On Wed, Jul 6, 2011 at 9:27 PM, Joseph Dien wrote: > > I've had this same problem with EEGlab's runICA implementation > > when the rank of the data was less than the number of > > variables (i.e., it's an ill-conditioned matrix, which is to > > say it has multicolinearity). Including the reference channel > > can do this (since it's just zeroes). Using PCA to reduce the > > data to a subspace can help as well since the rank will now > > equal the number of variables (namely the number of factor > > scores will equal the number of retained factors). Before you > > go the PCA route, it's worth trying to figure out why the data > > is ill-conditioned. There is likely to be something wrong > > with one of your channels. Maybe two of them are shorted > > together or something along those lines. Or if you used mean > > mastoid reference and included both mastoids, that can do it > > too (since they will be exactly inversely correlated, one of > > them is statistically redundant, reducing the rank by one). > > My EP Toolkit artifact correction routine > > (http://sourceforge.net/projects/erppcatoolkit/) takes all > > these sorts of things into account when performing eyeblink > > correction. > > > > > > Cheers! > > > > > > Joe > > > > > > > > > > On Jul 6, 2011, at 8:44 PM, Sheraz Khan wrote: > > > > > Hi Sylvana, > > > > > > Is the data SSS (maxfilter), I normally have this problem > > > when data is SSS, try doing ICA with PCA (set at 64 > > > components). > > > > > > Sheraz Khan > > > Martinos Center > > > Boston, USA > > > > > > On Wed, Jul 6, 2011 at 2:09 PM, Stephen Whitmarsh > > > wrote: > > > Dear Sylvana, > > > > > > >From the top op my head: When running the ICA, try > > > only computing it > > > for the MEG or EEG channels. (cfg.channel = 'MEG';), > > > so it doesn't run > > > on reference sensors in case of MEG. > > > I have hunch that might help out. > > > > > > Cheers, > > > Stephen > > > > > > > > > > > > On 6 July 2011 19:37, Sylvana > > > wrote: > > > > Hi all, > > > > > > > > I am trying to use ICA to clean EOG and ECG > > > artifacts of neuromag data. > > > > I am running ft_topoplotIC(cfg, comp), where > > > 'comp' is the output of > > > > ft_componentanalysis. > > > > > > > > I get the following error message: > > > > > > > > > > > > ??? Error using ==> surf at 74 > > > > X, Y, Z, and C cannot be complex. > > > > > > > > Error in ==> ft_plot_topo at 184 > > > > h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), > > > Zi, 'EdgeColor', > > > > 'none', 'FaceColor', shading); > > > > > > > > Error in ==> ft_topoplotER at 753 > > > > > > > > ft_plot_topo(chanX,chanY,datavector,'interpmethod',cfg.interpolation,... > > > > > > > > Error in ==> ft_topoplotIC at 116 > > > > ft_topoplotER(cfg, varargin{:}); > > > > > > > > > > > > The complex variable is 'Zi', which is taken from > > > 'comp'. I can modify > > > > the function to take the real part of the variable > > > (or the absolute > > > > value), but I am not sure if this would be the > > > correct thing to do. In > > > > case this is a bug, I thought I should report it. > > > Any comments? > > > > > > > > Thanks for your help, > > > > > > > > Sylvana Schister > > > > Univ. of Utah > > > > Dept. of Bioengineering > > > > > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > -------------------------------------------------------------------------------- > > > > > > Joseph Dien, > > Senior Research Scientist > > University of Maryland > > > > > > E-mail: jdien07 at mac.com > > Phone: 301-226-8848 > > Fax: 301-226-8811 > > http://homepage.mac.com/jdien07/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Thu Jul 7 21:22:42 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 14:22:42 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim On Thu, Jun 30, 2011 at 4:04 AM, odelia nakar wrote: > Hi Jim, > > Try : > cfg.neighbourdist = 0.03; > I found it good for my data. (When you run the function the channels that > repaired your data is displayed in the command window). > > Good luck! > Odelia. > > > ------------------------------ > Date: Thu, 30 Jun 2011 01:05:08 -0500 > From: megjim1 at gmail.com > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] channelrepair issue > > > Dear all, > > We have 4D's WH3600 MEG system (248 channels) and we found the > ----------------- > cfg = []; > cfg.dataset = > 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue = 320; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1 > ; cfg = ft_definetrial(cfg); > cfg.blc = > 'yes'; cfg.blcwindow = [-1 0]; > cfg.channel = {'MEG'}; > raw_DATA = ft_preprocessing(cfg); > raw_DATA.grad = ft_convert_units(raw_DATA.grad, 'cm') > > cfg = []; > cfg.badchannel = {'A234'}; > [raw_DATA] = ft_channelrepair(cfg, raw_DATA) > the input is raw data with 248 channels and 201 trials > repairing channel A234 > using neighbour A121 > using neighbour A143 > using neighbour A154 > using neighbour A173 > using neighbour A224 > using neighbour A8 > using neighbour A91 > repairing bad channels for trial 1 > repairing bad channels for trial 2 > repairing bad channels for trial 3 > ... > ------------------------------------ > > But channels like A121 and A143 are far away from the bad channel A234. How > can they be used as neighbours (i.e. within 4cm, the default value for > cfg.neighbourdist) for this bad channel? > > Any suggestions? > > Thanks a lot. > > Jim > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Thu Jul 7 21:26:26 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 14:26:26 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: > Hi Odelia, > > Yes, I downloaded the latest version of Fieldtrip and tried your suggestion > "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away > channels like A121 to do the channel-repair for A234 (these two channels are > 24.1172cm apart!). Here is the detail: > > --------------------------- > cfg = []; > cfg.dataset = 'e,rfhp0.1Hz'; > cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue = 320; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1; > cfg = ft_definetrial(cfg); > cfg.blc = 'yes'; % do > baseline correction with the complete trial > > cfg.blcwindow = [-1 0]; > cfg.channel = {'MEG'}; > raw_DATA = ft_preprocessing(cfg); > > > cfg = []; > cfg.badchannel = {'A234'}; > cfg.neighbourdist = 0.03; > > [raw_DATA] = ft_channelrepair(cfg, raw_DATA) > > --------------------------------------------------------------------- > > And here is the outcome: ----------------------------- > > the input is raw data with 248 channels and 201 trials > repairing channel A234 > using neighbour A121 > using neighbour A143 > using neighbour A173 > using neighbour A8 > > repairing bad channels for trial 1 > repairing bad channels for trial 2 > repairing bad channels for trial 3 > repairing bad channels for trial 4 > repairing bad channels for trial 5 > repairing bad channels for trial 6 > repairing bad channels for trial 7 > repairing bad channels for trial 8 > repairing bad channels for trial 9 > repairing bad channels for trial 10 > .... > > ------------------------- > > Thank you. > > Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Jul 7 23:30:06 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 7 Jul 2011 15:30:06 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Fri Jul 8 01:38:46 2011 From: megjim1 at gmail.com (Jim Li) Date: Thu, 7 Jul 2011 18:38:46 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > Jim, > > All I can do is confirm that this issue exists for our 4D data as well, > although we don't use the ft_channelrepair function. The same 4 quite > distant channels (one had been deleted in the dataset I had handy) were > chosen for repair when I ran this on one of our datasets (also a 248 channel > 4D system). I agree the choice doesn't make any sense given the 3 cm > distance you define. A quick look at the critical calculation in > ft_channelrepair, line 109 distance = ... is correct given the inputs. So I > wonder if the issue is with the actual channel indices used rather than the > calculation, but I don't have time to track that down. All I can say is that > for the distance you specify, channels A235, A216, A199, A215 would be much > closer to A234 than those that are selected via the channel repair function. > Channel A8 is in fact nearly 21 cm away from channel A234 in the array, > based on examination of the data read in from Eugene Kronberg's pdf4D matlab > object code, which I think was originally the basis for the FieldTrip 4D > reader function. > > Best, > > Don Rojas > > > On Jul 7, 2011, at 1:26 PM, Jim Li wrote: > > Dear Fieldtrip developer, > > Can anybody help me with this channel-repair issue I've been having? I can > provide the raw data if you need. I really want to solve the problem, you > know. > > Thanks a lot, > > Jim > > On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: > >> Hi Odelia, >> >> Yes, I downloaded the latest version of Fieldtrip and tried your >> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >> far-away channels like A121 to do the channel-repair for A234 (these two >> channels are 24.1172cm apart!). Here is the detail: >> >> --------------------------- >> cfg = []; >> cfg.dataset = 'e,rfhp0.1Hz'; >> cfg.trialdef.eventtype = 'TRIGGER'; >> cfg.trialdef.eventvalue = 320; >> cfg.trialdef.prestim = 1; >> cfg.trialdef.poststim = 1; >> cfg = ft_definetrial(cfg); >> cfg.blc = 'yes'; % do >> baseline correction with the complete trial >> >> cfg.blcwindow = [-1 0]; >> cfg.channel = {'MEG'}; >> raw_DATA = ft_preprocessing(cfg); >> >> >> cfg = []; >> cfg.badchannel = {'A234'}; >> cfg.neighbourdist = 0.03; >> >> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >> >> --------------------------------------------------------------------- >> >> And here is the outcome: ----------------------------- >> >> the input is raw data with 248 channels and 201 trials >> repairing channel A234 >> using neighbour A121 >> using neighbour A143 >> using neighbour A173 >> using neighbour A8 >> >> repairing bad channels for trial 1 >> repairing bad channels for trial 2 >> repairing bad channels for trial 3 >> repairing bad channels for trial 4 >> repairing bad channels for trial 5 >> repairing bad channels for trial 6 >> repairing bad channels for trial 7 >> repairing bad channels for trial 8 >> repairing bad channels for trial 9 >> repairing bad channels for trial 10 >> .... >> >> ------------------------- >> >> Thank you. >> >> Jim >> > _______________________________________________ > > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luoj at mail.nih.gov Fri Jul 8 02:01:23 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 7 Jul 2011 20:01:23 -0400 Subject: [FieldTrip] difficulty in reading 4D e,rfhp1.0Hz,COH file Message-ID: Hi, Can fieldtrip read this 4D file: e,rfhp1.0Hz,COH in any way? Thanks! Jessie From batrod at gmail.com Fri Jul 8 02:16:18 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Thu, 7 Jul 2011 19:16:18 -0500 Subject: [FieldTrip] ft_freqstatistics error with a newer version. Message-ID: Dear Fieldtrippers, i had a reshape error after downloading a recent version of fieldtrip (20110630) using freq_statistics: ??? Error using ==> reshape Size vector must have at least two elements. Error in ==> ft_freqstatistics at 230 dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data Error in ==> alpha_correl_behav at 97 [stat] = ft_freqstatistics(cfg, Power2{1,:}, Power4{1,:}, Power6{1,:}); With this newer version i also noticed new messages, but it may not be linked: "selection powspctrm along dimension 3 selection powspctrmsem along dimension 3 averaging powspctrm over time averaging powspctrmsem over time [...] " Thanks for any advice, Rodolphe -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 8 03:00:57 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Thu, 7 Jul 2011 19:00:57 -0600 Subject: [FieldTrip] difficulty in reading 4D e,rfhp1.0Hz,COH file In-Reply-To: References: Message-ID: A COH file is simply a regular epoch mode 4D file acquired either at the beginning (COH) or end (COH1) of a run. The coils are energized, so these are used to calculate the head position and headframe coordinate system. cfg.dataset = 'e,rfhp1.0Hz,COH'; coh_data = ft_preprocessing(cfg); should read the file. On Jul 7, 2011, at 6:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Can fieldtrip read this 4D file: e,rfhp1.0Hz,COH in any way? > Thanks! > > Jessie > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 From Don.Rojas at ucdenver.edu Fri Jul 8 03:36:53 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Thu, 7 Jul 2011 19:36:53 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: Message-ID: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at gmx.de Fri Jul 8 08:59:19 2011 From: paul_c at gmx.de (Paul Czienskowski) Date: Fri, 08 Jul 2011 08:59:19 +0200 Subject: [FieldTrip] Symmetric dipole localization Message-ID: <4E16AAC7.2060203@gmx.de> Dear all, I'm just trying to fit symmetric dipoles and have a question about this: I wondered, if it was sufficient to define the grid only on the one half of the region. Will the grid points be mirrored by the ft_dipolefitting routine? Best regards, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 From jan.schoffelen at donders.ru.nl Fri Jul 8 09:05:06 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 09:05:06 +0200 Subject: [FieldTrip] ft_freqstatistics error with a newer version. In-Reply-To: References: Message-ID: <7E620B2E-057C-4F4A-A344-5AAED57C1737@donders.ru.nl> Dear Rodolphe, I suspect you are using a single time-frequency bin in your statistics? Then it sounds like a singleton dimension issue to me. Could you generate some testdata and file a bug through the bugzilla website, uploading this testdata, as well as the code you used to generate the error? Thanks, Jan-Mathijs On Jul 8, 2011, at 2:16 AM, Rodolphe Nenert wrote: > Dear Fieldtrippers, > > i had a reshape error after downloading a recent version of fieldtrip (20110630) using freq_statistics: > > ??? Error using ==> reshape > Size vector must have at least two elements. > > Error in ==> ft_freqstatistics at 230 > dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data > > Error in ==> alpha_correl_behav at 97 > [stat] = ft_freqstatistics(cfg, Power2{1,:}, Power4{1,:}, Power6{1,:}); > > > With this newer version i also noticed new messages, but it may not be linked: > "selection powspctrm along dimension 3 > selection powspctrmsem along dimension 3 > averaging powspctrm over time > averaging powspctrmsem over time > [...] > " > > Thanks for any advice, > > Rodolphe > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 From jan.schoffelen at donders.ru.nl Fri Jul 8 09:11:54 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 09:11:54 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Message-ID: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > >> Thank you very much for confirming the problem, Don, I appreciate it, :) >> >> Jim >> >> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >>> Dear Fieldtrip developer, >>> >>> Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. >>> >>> Thanks a lot, >>> >>> Jim >>> >>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> _______________________________________________ >>> >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 8 10:20:10 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jul 2011 10:20:10 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> Message-ID: <4E16BDBA.2020209@donders.ru.nl> Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the > 4D reading code at the time, we had the 248-channel magnetometer > system in mind. It could be that there are some flaws related to the > handling of gradiometers. This should not only lead to (erratic) > issues at the level of channelrepair, but may also cause mayhem when > doing planar gradient transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal > with gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. > through DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > >> Jim et al. >> >> In thinking about this further, it seems to me that it is the >> indexing that is incorrect. The problem I think is specific to >> gradiometer systems, which have two (or more) locations per channel. >> The function appears to assume that the sensor index based on the >> sens.label field (only 1 per channel) will correspond 1 to 1 with the >> sens.grad field (2 locations per channel), which is not correct. So, >> my guess is that for first-order gradiometer systems, the correct >> index for the sensor location is 2x the index in the sens.label field. >> >> So, in an example I have handy at home, the label index for channel >> A234 is 107. Since I think Fieldtrip stores gradiometer locations (by >> default) as: >> >> Chn 1 lower coil x, y z >> Chn 1 upper coil x, y z >> Chn 2 lower coil x, y z >> Chn 2 upper coil x, y z >> . >> . >> . >> Chn N >> >> I think the correct position info for channel A234 would be found in >> sens.grad(214,:), not sens.grad(107,:), which is what the >> ft_channelrepair function chooses. So I think this is a bug in the >> function specific to gradiometer systems. >> >> Best, >> >> Don >> >> On Jul 7, 2011, at 5:38 PM, Jim Li wrote: >> >>> Thank you very much for confirming the problem, Don, I appreciate it, :) >>> Jim >>> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don >> > wrote: >>> >>> Jim, >>> >>> All I can do is confirm that this issue exists for our 4D data >>> as well, although we don't use the ft_channelrepair function. >>> The same 4 quite distant channels (one had been deleted in the >>> dataset I had handy) were chosen for repair when I ran this on >>> one of our datasets (also a 248 channel 4D system). I agree the >>> choice doesn't make any sense given the 3 cm distance you >>> define. A quick look at the critical calculation in >>> ft_channelrepair, line 109 distance = ... is correct given the >>> inputs. So I wonder if the issue is with the actual channel >>> indices used rather than the calculation, but I don't have time >>> to track that down. All I can say is that for the distance you >>> specify, channels A235, A216, A199, A215 would be much closer to >>> A234 than those that are selected via the channel repair >>> function. Channel A8 is in fact nearly 21 cm away from channel >>> A234 in the array, based on examination of the data read in from >>> Eugene Kronberg's pdf4D matlab object code, which I think was >>> originally the basis for the FieldTrip 4D reader function. >>> >>> Best, >>> >>> Don Rojas >>> >>> >>> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >>> >>>> Dear Fieldtrip developer, >>>> Can anybody help me with this channel-repair issue I've been >>>> having? I can provide the raw data if you need. I really want >>>> to solve the problem, you know. >>>> Thanks a lot, >>>> Jim >>>> >>>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li >>> > wrote: >>>> >>>> Hi Odelia, >>>> Yes, I downloaded the latest version of Fieldtrip and tried >>>> your suggestion "cfg.neighbourdist = 0.03", but it still >>>> weirdly uses the far-away channels like A121 to do the >>>> channel-repair for A234 (these two channels are 24.1172cm >>>> apart!). Here is the detail: >>>> --------------------------- >>>> cfg = []; >>>> cfg.dataset = 'e,rfhp0.1Hz'; >>>> cfg.trialdef.eventtype = 'TRIGGER'; >>>> cfg.trialdef.eventvalue = 320; >>>> cfg.trialdef.prestim = 1; >>>> cfg.trialdef.poststim = 1; >>>> cfg = ft_definetrial(cfg); >>>> cfg.blc = >>>> 'yes'; % do baseline >>>> correction with the complete trial >>>> >>>> cfg.blcwindow = [-1 0]; >>>> cfg.channel = {'MEG'}; >>>> raw_DATA = ft_preprocessing(cfg); >>>> cfg = []; >>>> cfg.badchannel = {'A234'}; >>>> cfg.neighbourdist = 0.03; >>>> >>>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>>> --------------------------------------------------------------------- >>>> And here is the outcome: ----------------------------- >>>> >>>> the input is raw data with 248 channels and 201 trials >>>> repairing channel A234 >>>> using neighbour A121 >>>> using neighbour A143 >>>> using neighbour A173 >>>> using neighbour A8 >>>> >>>> repairing bad channels for trial 1 >>>> repairing bad channels for trial 2 >>>> repairing bad channels for trial 3 >>>> repairing bad channels for trial 4 >>>> repairing bad channels for trial 5 >>>> repairing bad channels for trial 6 >>>> repairing bad channels for trial 7 >>>> repairing bad channels for trial 8 >>>> repairing bad channels for trial 9 >>>> repairing bad channels for trial 10 >>>> .... >>>> ------------------------- >>>> Thank you. >>>> Jim >>>> >>>> _______________________________________________ >>>> >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> ----------------------- >>> Don Rojas, Ph.D. >>> Associate Professor of Psychiatry >>> U. of Colorado Denver Anschutz Medical Campus >>> Director, UCD Magnetoencephalography Lab >>> 13001 E. 17th Pl F546 >>> Aurora, CO 80045 >>> 303-724-4994 >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Fri Jul 8 15:00:27 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Fri, 8 Jul 2011 15:00:27 +0200 Subject: [FieldTrip] artifact rejection issue - Poles Message-ID: Deat all, I am trying to run the tutorial scripts on a dataset I have. The sampling rate here is 6000 Hz. I cannot perform the artifact rejection. Here is the error. ??? Error using ==> filter_with_correction at 42 Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter. Error in ==> ft_preproc_bandpassfilter at 80 filt = filter_with_correction(B,A,dat,dir); Error in ==> preproc at 281 if strcmp(cfg.bpfilter, 'yes'), dat = ft_preproc_bandpassfilter(dat, fsample, cfg.bpfreq, cfg.bpfiltord, cfg.bpfilttype, cfg.bpfiltdir); end I have tried to change the cutoff, but the error is still present. Has someone ever experienced this error? Many thanks, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Fri Jul 8 15:28:47 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Fri, 8 Jul 2011 15:28:47 +0200 (CEST) Subject: [FieldTrip] ft_channelrepair with eeg data Message-ID: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> Hi Fieldtrip-warriors, I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- ### channels_to_repair={'FT9', 'CPz'}; cfg=[]; cfg.neighbourdist = 4; cfg.badchannel=channels_to_repair; data=ft_channelrepair(cfg, data); ### Running this produces the following error msg: ### ??? Error using ==> ft_checkconfig at 157 The field cfg.neighbours is required Error in ==> ft_channelrepair at 58 cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); ### It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? I also see the following in the help file for ft_channelrepair:- ### Since a nearest neighbour average is used, the input should contain a gradiometer or electrode definition, i.e. data.grad or data.elec. ### What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? I'm using a standard 10-10 64-electrode layout. Best, -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From stephen.whitmarsh at gmail.com Fri Jul 8 15:44:44 2011 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 8 Jul 2011 15:44:44 +0200 Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> References: <1079765515.779819.1310131727933.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: He Tom, Wow, look what was made this morning by Jorn at basecamp: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors Cheers, Stephen (Pte(T)) On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: > > Hi Fieldtrip-warriors, > > I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- > > ### > >   channels_to_repair={'FT9', 'CPz'}; > >   cfg=[]; >   cfg.neighbourdist = 4; >   cfg.badchannel=channels_to_repair; > >   data=ft_channelrepair(cfg, data); > > ### > > Running this produces the following error msg: > > ### > >   ??? Error using ==> ft_checkconfig at 157 >   The field cfg.neighbours is required > > >   Error in ==> ft_channelrepair at 58 >   cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); > > ### > > It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? > > I also see the following in the help file for ft_channelrepair:- > > ### > >     Since a nearest neighbour average is used, the input should contain >     a gradiometer or electrode definition, i.e. data.grad or data.elec. > > ### > > What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? > > I'm using a standard 10-10 64-electrode layout. > > Best, > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From t.marshall at fcdonders.ru.nl Fri Jul 8 16:17:12 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Fri, 8 Jul 2011 16:17:12 +0200 (CEST) Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: Message-ID: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> Thanks Stephen. ft_neighbourselection looks like it might be what I need. So now I tried this:- ### channels_to_repair={'FT9', 'CPz'}; layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay'); cfg=[]; cfg.layout=layout_file; cfg.badchannel=channels_to_repair; cfg.neighbours = ft_neighbourselection(cfg, data); data=ft_channelrepair(cfg, data); ### But what that gave me was:- ### ??? Reference to non-existent field 'elec'. Error in ==> ft_channelrepair at 92 sens = data.elec; ### This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me? Best, Tom ----- Original Message ----- From: "Stephen Whitmarsh" To: "Email discussion list for the FieldTrip project" Sent: Friday, 8 July, 2011 3:44:44 PM Subject: Re: [FieldTrip] ft_channelrepair with eeg data He Tom, Wow, look what was made this morning by Jorn at basecamp: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors Cheers, Stephen (Pte(T)) On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: > > Hi Fieldtrip-warriors, > > I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- > > ### > >   channels_to_repair={'FT9', 'CPz'}; > >   cfg=[]; >   cfg.neighbourdist = 4; >   cfg.badchannel=channels_to_repair; > >   data=ft_channelrepair(cfg, data); > > ### > > Running this produces the following error msg: > > ### > >   ??? Error using ==> ft_checkconfig at 157 >   The field cfg.neighbours is required > > >   Error in ==> ft_channelrepair at 58 >   cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); > > ### > > It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? > > I also see the following in the help file for ft_channelrepair:- > > ### > >     Since a nearest neighbour average is used, the input should contain >     a gradiometer or electrode definition, i.e. data.grad or data.elec. > > ### > > What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? > > I'm using a standard 10-10 64-electrode layout. > > Best, > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From jm.horschig at donders.ru.nl Fri Jul 8 19:15:10 2011 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Fri, 08 Jul 2011 19:15:10 +0200 Subject: [FieldTrip] ft_channelrepair with eeg data In-Reply-To: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> References: <2107953252.780560.1310134632315.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <4E173B1E.1070909@donders.ru.nl> Hey Tom, apart from the fact that we indeed decided to change ft_channelrepair to require cfg.neighbours to be user specified (I committed that change just a few hours before your message), you do need data.elec information. data.elec should contain sensor information like position for your data. As an extremely dirty workaround, you could use the the EEG layout templates as following (I did that for testing ft_channelrepair): cfg.layout = 'EEG1010.lay'; data.elec = ft_prepare_layout(cfg); data.elec.pnt = lay.pos; I do not whether there is a more appropriate way available ;) Best, Jörn On 7/8/2011 4:17 PM, Marshall, T.R. (Tom) wrote: > Thanks Stephen. ft_neighbourselection looks like it might be what I need. > > So now I tried this:- > > ### > > channels_to_repair={'FT9', 'CPz'}; > layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay'); > > cfg=[]; > cfg.layout=layout_file; > cfg.badchannel=channels_to_repair; > > cfg.neighbours = ft_neighbourselection(cfg, data); > > data=ft_channelrepair(cfg, data); > > ### > > But what that gave me was:- > > ### > > ??? Reference to non-existent field 'elec'. > > Error in ==> ft_channelrepair at 92 > sens = data.elec; > > ### > > This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me? > > Best, > Tom > > ----- Original Message ----- > From: "Stephen Whitmarsh" > To: "Email discussion list for the FieldTrip project" > Sent: Friday, 8 July, 2011 3:44:44 PM > Subject: Re: [FieldTrip] ft_channelrepair with eeg data > > He Tom, > > Wow, look what was made this morning by Jorn at basecamp: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors > > Cheers, > > Stephen (Pte(T)) > > > > On 8 July 2011 15:28, Marshall, T.R. (Tom) wrote: >> Hi Fieldtrip-warriors, >> >> I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:- >> >> ### >> >> channels_to_repair={'FT9', 'CPz'}; >> >> cfg=[]; >> cfg.neighbourdist = 4; >> cfg.badchannel=channels_to_repair; >> >> data=ft_channelrepair(cfg, data); >> >> ### >> >> Running this produces the following error msg: >> >> ### >> >> ??? Error using ==> ft_checkconfig at 157 >> The field cfg.neighbours is required >> >> >> Error in ==> ft_channelrepair at 58 >> cfg = ft_checkconfig(cfg, 'required', {'neighbours'}); >> >> ### >> >> It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here? >> >> I also see the following in the help file for ft_channelrepair:- >> >> ### >> >> Since a nearest neighbour average is used, the input should contain >> a gradiometer or electrode definition, i.e. data.grad or data.elec. >> >> ### >> >> What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure? >> >> I'm using a standard 10-10 64-electrode layout. >> >> Best, >> >> -- >> Tom Marshall, MSc. >> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging >> tel: +31(0)243668487 >> email: t.marshall at fcdonders.ru.nl >> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands >> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From megjim1 at gmail.com Fri Jul 8 19:20:46 2011 From: megjim1 at gmail.com (Jim Li) Date: Fri, 8 Jul 2011 12:20:46 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E16BDBA.2020209@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: Dear Don, jan-mathijs and Jörn, Thank you very much for tackling this problem specific for axial gradiometer systems like ours. I tried the following codes and got the 3D sensor plot. The neighbours look fine to me. For example, for channel A234 the 3 nearest neighbours are A235, A216 and A215 as expected. This is very different from the 3-cm-neighbours selected by ft_channelrepair when A234 is the bad channel, which includes A143, A173, A8, A121. --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); ft_neighbourplot(cfg, raw_DATA) ------------------------------------------------------ and the output for the last commnad looks like this: --------------------------- Using the gradiometer configuration from the dataset. undoing the SupineTip balancing there are on average 7.9 neighbours per channel Using the gradiometer configuration from the dataset. undoing the SupineTip balancing ------------------------ Thank you very much and looking forward to the new revision. Jim On Fri, Jul 8, 2011 at 3:20 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > ** > Dear Jim, Don and others, > > First of all, what Don suggested sounds indeed like the cause, if I > remember things correctly (with my limited experience). > > Anyhow, could one of you check ft_neighbourplot with the dataset and the > neighbourselection of choice? This allows you to see what neighbours are > selected for which sensors and where they lie in space. If this looks fine, > than the problem lies indeed in how sensor position is deduced from the data > structure. > > Best, > Jörn > > > > On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the 4D > reading code at the time, we had the 248-channel magnetometer system in > mind. It could be that there are some flaws related to the handling of > gradiometers. This should not only lead to (erratic) issues at the level of > channelrepair, but may also cause mayhem when doing planar gradient > transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal with > gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. through > DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that > is incorrect. The problem I think is specific to gradiometer systems, which > have two (or more) locations per channel. The function appears to assume > that the sensor index based on the sens.label field (only 1 per channel) > will correspond 1 to 1 with the sens.grad field (2 locations per channel), > which is not correct. So, my guess is that for first-order gradiometer > systems, the correct index for the sensor location is 2x the index in the > sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is > 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in > sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair > function chooses. So I think this is a bug in the function specific to > gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > > Thank you very much for confirming the problem, Don, I appreciate it, :) > > Jim > > On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, >> although we don't use the ft_channelrepair function. The same 4 quite >> distant channels (one had been deleted in the dataset I had handy) were >> chosen for repair when I ran this on one of our datasets (also a 248 channel >> 4D system). I agree the choice doesn't make any sense given the 3 cm >> distance you define. A quick look at the critical calculation in >> ft_channelrepair, line 109 distance = ... is correct given the inputs. So I >> wonder if the issue is with the actual channel indices used rather than the >> calculation, but I don't have time to track that down. All I can say is that >> for the distance you specify, channels A235, A216, A199, A215 would be much >> closer to A234 than those that are selected via the channel repair function. >> Channel A8 is in fact nearly 21 cm away from channel A234 in the array, >> based on examination of the data read in from Eugene Kronberg's pdf4D matlab >> object code, which I think was originally the basis for the FieldTrip 4D >> reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >> Dear Fieldtrip developer, >> >> Can anybody help me with this channel-repair issue I've been having? I can >> provide the raw data if you need. I really want to solve the problem, you >> know. >> >> Thanks a lot, >> >> Jim >> >> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >> >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your >>> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >>> far-away channels like A121 to do the channel-repair for A234 (these two >>> channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do >>> baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 8 19:24:54 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jul 2011 19:24:54 +0200 Subject: [FieldTrip] Functionality change - neighbourselection will be obliged by the user Message-ID: <4E173D66.1080204@donders.ru.nl> Dear FieldTrip community, Up until now, many users and functions relied on a predefined way to define proximal or neighbouring sensor, namely using a distance measurement. We changed the functionality of ft_neighbourselection and related functions, which will be explained in the following. *1 - The user is obliged to define and verify channel neighbours* Driven by some thoughts and current discussion going on in the FieldTrip mailinglist, we decided to change neighbourselection. Within the next days, all functions which require information about proximal or neighbouring sensors will be required to have a cfg.neighbour field that you as the user have to specify explicitly. This may be obvious for some functions, such as cluster statistics on channel level, but not so much for other functions such as planar gradient computation or channelrepair. In order to ease the way of getting into the whole neighbourselection issue, we wrote 3 FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template Please note that you can use ft_neighbourplot to see the current neighbourselection and verify whether this seems like a good choice. Although we try to come up with extremely smart ways to compute neighbours of your data, selection of neighbours can still be highly subjective. Therefore, we also decided to do the following: *2 - Neighbours can be defined using different methods* Since the near beginning of FieldTrip, neighbours were selected based on a 'distance' approach, meaning that nearby sensors were defined as neighbours. This has shown to be valid for some systems given a predefined distance (neighbdist) of 4cm, whereas other systems needed a different neighbdist. In order to reduce subjectivity and arbitrariness of the maximal distance of a sensor to be called 'neighbour', we implemented a 'triangulation' approach. For more information, see the corresponding FAQ above. However, since systems around the world should be similar in terms of sensor position, we decided to implement a 'template'-based approach, which loads a predefined neighbour-template from file. It is up to you to decide what approach you are most comfortable with. The standard behaviour of ft_neighbourselection still is the old 'distance' approach. *3 - Call for neighbour templates * Now, dear community, you may become active and share your neighbour-templates. Here at the Donders, we are primarily working with the CTF275 system and have thus quite some expertise and experience. For this system, you can already find a template in the newer FieldTrip versions. We will continue improving the neighbourdefinition of this template and try to be as objective as possible. Furthermore, we will start creating templates for other systems as well and try to optimize these. However, when it comes to other systems, also including EEG systems, you might be more experienced. Therefore, we would like to ask whether you want to share your expertise and send the neighbourstructure that you are using on your system to us (== me). I will then try to incorporate your subjective selection with ours, probably after some discussion. If you are willing to support us in that respect, please do *not* send a mail to the mailing-list but to my personal mail address, as I will be organizing the templates: jm.horschig at donders.ru.nl Thanks in advance for your cooperation. Best regards on behalf of the developer team, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 8 21:06:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 8 Jul 2011 21:06:10 +0200 Subject: [FieldTrip] slight change in default behaviour ft_componentanalysis (method = 'runica'/'binica') Message-ID: Dear all, I implemented a slight change in the default behaviour of ft_componentanalysis when using runica or binica as method. In general componentanalysis unmixes the sensor level data, and provides a spatial mixing matrix (comp.topo), as well as the time course of the components (in comp.trial). By construction (if you did comp=ft_componentanalysis(cfg,data)) data.trial{x} = comp.topo*comp.trial{x}; The change in behaviour pertains to the relative scaling of the mixing matrix and the component time-courses. Before, default behaviour caused the magnitude of the values in the mixing matrix to be of the same order of magnitude as the values in the original time courses (data.trial). For reasons I will not go into, this could cause numerical problems at some later stage of some analysis pipeline. Also, when using other methods in ft_componentanalysis (such as pca), the magnitude of the values in the component time courses approximately matched the magnitude of the values in the original time courses. For consistency and to avoid potential problems at later stages of analysis, I changed the default behaviour of ft_componentanalysis (with method runica or binica) such that the scaling is contained in the component time courses, rather than in the mixing matrix. Note that this only changes the output of the function up to a scaling of the mixing matrix and the time courses of the components. If you don't want this behaviour, or if you want to keep the behaviour consistent to the old times, you need to specify cfg.normalisesphere = 'no'. Have a good weekend, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 8 21:17:27 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Fri, 8 Jul 2011 13:17:27 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E16BDBA.2020209@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: Jörn, Jim et al. There is indeed a general problem, most likely with channel indexing, in gradiometer systems. I think the data are read correctly with the low level functions, but functions like ft_channelrepair, ft_neighbourselection and ft_neighbourplot are not accounting for the locations correctly. I have attached a picture that I think illustrates this issue reasonably well. The following code was used t[cid:593D3C1E-767D-4B26-B831-AF6BB4FFA711 at ucdenver.pvt]o generate this plot: % read in data cfg = []; cfg.dataset = 'e,rfhp1.0Hz,COH'; coh = ft_preprocessing(cfg); % get neighbors and plot cfg = []; cfg.neighbourdist = .03; cfg.neighbours = ft_neighbourselection(cfg,coh); cfg.layout = '4D248.lay'; ft_neighbourplot(cfg,coh); You can see that the channel selected is labeled A216, which is incorrect - it should be A248. It's three neighbors are also incorrect (A208, A118 and A134 should probably be A195, A228 and A247). I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing today, so perhaps it will be the same problem and the fix can be propagated to these other functions. Don On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighbors.jpg Type: image/jpg Size: 49281 bytes Desc: neighbors.jpg URL: From Don.Rojas at ucdenver.edu Sat Jul 9 00:57:44 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don ( Employee MEG-SOM )) Date: Fri, 8 Jul 2011 16:57:44 -0600 Subject: [FieldTrip] channelrepair issue In-Reply-To: References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> Message-ID: <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> As a short follow up on this, the behavior of ft_neighbourplot is suspect only when supplying a cfg.neighbours field and plotting the result using the 2d layout file (as in the example I gave below), so this issue may not be the same as for the channel repair function. Using no layout file, the 3D plotted locations and labels appear to be correct. I can verify that the lower level functions called by ft_neighbourplot such as channelposition.m are returning the correct position and label info, but haven't had time to track the 2d plotting result down further. The neighbours returned by ft_neighbourselection also appear to be okay given a specified input distance. On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: Jörn, Jim et al. There is indeed a general problem, most likely with channel indexing, in gradiometer systems. I think the data are read correctly with the low level functions, but functions like ft_channelrepair, ft_neighbourselection and ft_neighbourplot are not accounting for the locations correctly. I have attached a picture that I think illustrates this issue reasonably well. The following code was used to generate this plot: % read in data cfg = []; cfg.dataset = 'e,rfhp1.0Hz,COH'; coh = ft_preprocessing(cfg); % get neighbors and plot cfg = []; cfg.neighbourdist = .03; cfg.neighbours = ft_neighbourselection(cfg,coh); cfg.layout = '4D248.lay'; ft_neighbourplot(cfg,coh); You can see that the channel selected is labeled A216, which is incorrect - it should be A248. It's three neighbors are also incorrect (A208, A118 and A134 should probably be A195, A228 and A247). I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing today, so perhaps it will be the same problem and the fix can be propagated to these other functions. Don On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: Dear Jim, Don and others, First of all, what Don suggested sounds indeed like the cause, if I remember things correctly (with my limited experience). Anyhow, could one of you check ft_neighbourplot with the dataset and the neighbourselection of choice? This allows you to see what neighbours are selected for which sensors and where they lie in space. If this looks fine, than the problem lies indeed in how sensor position is deduced from the data structure. Best, Jörn On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: Dear Don, This sounds like a very likely cause of the problem. When we wrote the 4D reading code at the time, we had the 248-channel magnetometer system in mind. It could be that there are some flaws related to the handling of gradiometers. This should not only lead to (erratic) issues at the level of channelrepair, but may also cause mayhem when doing planar gradient transformation, or source reconstruction. Would you happen to 1) feel like tackling this one with me, and improve FieldTrip to deal with gradiometer systems correctly? or 2) have a small gradiometer dataset which you can send to me (e.g. through DropBox), so that I can look into it? We can further discuss this off the discussion list. Best wishes, Jan-Mathijs On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: Jim et al. In thinking about this further, it seems to me that it is the indexing that is incorrect. The problem I think is specific to gradiometer systems, which have two (or more) locations per channel. The function appears to assume that the sensor index based on the sens.label field (only 1 per channel) will correspond 1 to 1 with the sens.grad field (2 locations per channel), which is not correct. So, my guess is that for first-order gradiometer systems, the correct index for the sensor location is 2x the index in the sens.label field. So, in an example I have handy at home, the label index for channel A234 is 107. Since I think Fieldtrip stores gradiometer locations (by default) as: Chn 1 lower coil x, y z Chn 1 upper coil x, y z Chn 2 lower coil x, y z Chn 2 upper coil x, y z . . . Chn N I think the correct position info for channel A234 would be found in sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair function chooses. So I think this is a bug in the function specific to gradiometer systems. Best, Don On Jul 7, 2011, at 5:38 PM, Jim Li wrote: Thank you very much for confirming the problem, Don, I appreciate it, :) Jim On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don > wrote: Jim, All I can do is confirm that this issue exists for our 4D data as well, although we don't use the ft_channelrepair function. The same 4 quite distant channels (one had been deleted in the dataset I had handy) were chosen for repair when I ran this on one of our datasets (also a 248 channel 4D system). I agree the choice doesn't make any sense given the 3 cm distance you define. A quick look at the critical calculation in ft_channelrepair, line 109 distance = ... is correct given the inputs. So I wonder if the issue is with the actual channel indices used rather than the calculation, but I don't have time to track that down. All I can say is that for the distance you specify, channels A235, A216, A199, A215 would be much closer to A234 than those that are selected via the channel repair function. Channel A8 is in fact nearly 21 cm away from channel A234 in the array, based on examination of the data read in from Eugene Kronberg's pdf4D matlab object code, which I think was originally the basis for the FieldTrip 4D reader function. Best, Don Rojas On Jul 7, 2011, at 1:26 PM, Jim Li wrote: Dear Fieldtrip developer, Can anybody help me with this channel-repair issue I've been having? I can provide the raw data if you need. I really want to solve the problem, you know. Thanks a lot, Jim On Thu, Jul 7, 2011 at 2:22 PM, Jim Li > wrote: Hi Odelia, Yes, I downloaded the latest version of Fieldtrip and tried your suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the far-away channels like A121 to do the channel-repair for A234 (these two channels are 24.1172cm apart!). Here is the detail: --------------------------- cfg = []; cfg.dataset = 'e,rfhp0.1Hz'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 320; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; cfg = ft_definetrial(cfg); cfg.blc = 'yes'; % do baseline correction with the complete trial cfg.blcwindow = [-1 0]; cfg.channel = {'MEG'}; raw_DATA = ft_preprocessing(cfg); cfg = []; cfg.badchannel = {'A234'}; cfg.neighbourdist = 0.03; [raw_DATA] = ft_channelrepair(cfg, raw_DATA) --------------------------------------------------------------------- And here is the outcome: ----------------------------- the input is raw data with 248 channels and 201 trials repairing channel A234 using neighbour A121 using neighbour A143 using neighbour A173 using neighbour A8 repairing bad channels for trial 1 repairing bad channels for trial 2 repairing bad channels for trial 3 repairing bad channels for trial 4 repairing bad channels for trial 5 repairing bad channels for trial 6 repairing bad channels for trial 7 repairing bad channels for trial 8 repairing bad channels for trial 9 repairing bad channels for trial 10 .... ------------------------- Thank you. Jim _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Sat Jul 9 03:33:18 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Sat, 09 Jul 2011 03:33:18 +0200 Subject: [FieldTrip] channelrepair issue In-Reply-To: <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> Message-ID: <4E17AFDE.2090701@donders.ru.nl> Hi, SInce the new updates (which should be available in the new FT download version, see also the corresponding mail on the mailing list), I would suggest to use a user-defined neighbourstructure, verify this and then call channelrepair. E.g. try 'triangulation' as a method - it might result in a better neighbourhood representation. Also, currently neighbourselection is using config settings first before searching the data structure for sensor position information. So if you define cfg.layout, it will definitely use the layout (so, 2D coordinates) instead of 3D coordinates defined in your data. This might be suboptimal as well. Sorry for all the inconveniences. We will try to check why the problem you got causes an issue and hopefully find a more generic way to solve this. Jim, if not already done, it would be great if you followed Jan-Mathijs' suggestion to provide further information such as example data so that we can reproduce your problem and try to solve it. Don, thanks for helping out ;) Best, Jörn On 7/9/2011 12:57 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > As a short follow up on this, the behavior of ft_neighbourplot is > suspect only when supplying a cfg.neighbours field and plotting the > result using the 2d layout file (as in the example I gave below), so > this issue may not be the same as for the channel repair function. > Using no layout file, the 3D plotted locations and labels appear to be > correct. I can verify that the lower level functions called by > ft_neighbourplot such as channelposition.m are returning the correct > position and label info, but haven't had time to track the 2d plotting > result down further. The neighbours returned by ft_neighbourselection > also appear to be okay given a specified input distance. > > On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: > >> Jörn, Jim et al. >> >> There is indeed a general problem, most likely with channel indexing, >> in gradiometer systems. I think the data are read correctly with the >> low level functions, but functions like ft_channelrepair, >> ft_neighbourselection and ft_neighbourplot are not accounting for the >> locations correctly. I have attached a picture that I think >> illustrates this issue reasonably well. The following code was used >> to generate this plot: >> >> % read in data >> cfg = []; >> cfg.dataset = 'e,rfhp1.0Hz,COH'; >> coh = ft_preprocessing(cfg); >> >> % get neighbors and plot >> cfg = []; >> cfg.neighbourdist = .03; >> cfg.neighbours = ft_neighbourselection(cfg,coh); >> cfg.layout = '4D248.lay'; >> ft_neighbourplot(cfg,coh); >> >> You can see that the channel selected is labeled A216, which is >> incorrect - it should be A248. It's three neighbors are also >> incorrect (A208, A118 and A134 should probably be A195, A228 and A247). >> >> I'm guessing this is the same indexing issue for gradiometers. >> Jan-Mathijs mentioned a fixed version of ft_channelrepair appearing >> today, so perhaps it will be the same problem and the fix can be >> propagated to these other functions. >> >> Don >> >> On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: >> >>> Dear Jim, Don and others, >>> >>> First of all, what Don suggested sounds indeed like the cause, if I >>> remember things correctly (with my limited experience). >>> >>> Anyhow, could one of you check ft_neighbourplot with the dataset and >>> the neighbourselection of choice? This allows you to see what >>> neighbours are selected for which sensors and where they lie in >>> space. If this looks fine, than the problem lies indeed in how >>> sensor position is deduced from the data structure. >>> >>> Best, >>> Jörn >>> >>> >>> On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: >>>> Dear Don, >>>> >>>> This sounds like a very likely cause of the problem. When we wrote >>>> the 4D reading code at the time, we had the 248-channel >>>> magnetometer system in mind. It could be that there are some flaws >>>> related to the handling of gradiometers. This should not only lead >>>> to (erratic) issues at the level of channelrepair, but may also >>>> cause mayhem when doing planar gradient transformation, or source >>>> reconstruction. >>>> Would you happen to >>>> 1) feel like tackling this one with me, and improve FieldTrip to >>>> deal with gradiometer systems correctly? >>>> >>>> or >>>> >>>> 2) have a small gradiometer dataset which you can send to me (e.g. >>>> through DropBox), so that I can look into it? >>>> >>>> We can further discuss this off the discussion list. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> >>>> On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: >>>> >>>>> Jim et al. >>>>> >>>>> In thinking about this further, it seems to me that it is the >>>>> indexing that is incorrect. The problem I think is specific to >>>>> gradiometer systems, which have two (or more) locations per >>>>> channel. The function appears to assume that the sensor index >>>>> based on the sens.label field (only 1 per channel) will correspond >>>>> 1 to 1 with the sens.grad field (2 locations per channel), which >>>>> is not correct. So, my guess is that for first-order gradiometer >>>>> systems, the correct index for the sensor location is 2x the index >>>>> in the sens.label field. >>>>> >>>>> So, in an example I have handy at home, the label index for >>>>> channel A234 is 107. Since I think Fieldtrip stores gradiometer >>>>> locations (by default) as: >>>>> >>>>> Chn 1 lower coil x, y z >>>>> Chn 1 upper coil x, y z >>>>> Chn 2 lower coil x, y z >>>>> Chn 2 upper coil x, y z >>>>> . >>>>> . >>>>> . >>>>> Chn N >>>>> >>>>> I think the correct position info for channel A234 would be found >>>>> in sens.grad(214,:), not sens.grad(107,:), which is what the >>>>> ft_channelrepair function chooses. So I think this is a bug in the >>>>> function specific to gradiometer systems. >>>>> >>>>> Best, >>>>> >>>>> Don >>>>> >>>>> On Jul 7, 2011, at 5:38 PM, Jim Li wrote: >>>>> >>>>>> Thank you very much for confirming the problem, Don, I appreciate >>>>>> it, :) >>>>>> Jim >>>>>> On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don >>>>>> > wrote: >>>>>> >>>>>> Jim, >>>>>> >>>>>> All I can do is confirm that this issue exists for our 4D >>>>>> data as well, although we don't use the ft_channelrepair >>>>>> function. The same 4 quite distant channels (one had been >>>>>> deleted in the dataset I had handy) were chosen for repair >>>>>> when I ran this on one of our datasets (also a 248 channel 4D >>>>>> system). I agree the choice doesn't make any sense given the >>>>>> 3 cm distance you define. A quick look at the critical >>>>>> calculation in ft_channelrepair, line 109 distance = ... is >>>>>> correct given the inputs. So I wonder if the issue is with >>>>>> the actual channel indices used rather than the calculation, >>>>>> but I don't have time to track that down. All I can say is >>>>>> that for the distance you specify, channels A235, A216, A199, >>>>>> A215 would be much closer to A234 than those that are >>>>>> selected via the channel repair function. Channel A8 is in >>>>>> fact nearly 21 cm away from channel A234 in the array, based >>>>>> on examination of the data read in from Eugene Kronberg's >>>>>> pdf4D matlab object code, which I think was originally the >>>>>> basis for the FieldTrip 4D reader function. >>>>>> >>>>>> Best, >>>>>> >>>>>> Don Rojas >>>>>> >>>>>> >>>>>> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >>>>>> >>>>>>> Dear Fieldtrip developer, >>>>>>> Can anybody help me with this channel-repair issue I've been >>>>>>> having? I can provide the raw data if you need. I really >>>>>>> want to solve the problem, you know. >>>>>>> Thanks a lot, >>>>>>> Jim >>>>>>> >>>>>>> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li >>>>>> > wrote: >>>>>>> >>>>>>> Hi Odelia, >>>>>>> Yes, I downloaded the latest version of Fieldtrip and >>>>>>> tried your suggestion "cfg.neighbourdist = 0.03", but >>>>>>> it still weirdly uses the far-away channels like A121 to >>>>>>> do the channel-repair for A234 (these two channels are >>>>>>> 24.1172cm apart!). Here is the detail: >>>>>>> --------------------------- >>>>>>> cfg = []; >>>>>>> cfg.dataset = 'e,rfhp0.1Hz'; >>>>>>> cfg.trialdef.eventtype = 'TRIGGER'; >>>>>>> cfg.trialdef.eventvalue = 320; >>>>>>> cfg.trialdef.prestim = 1; >>>>>>> cfg.trialdef.poststim = 1; >>>>>>> cfg = ft_definetrial(cfg); >>>>>>> cfg.blc = >>>>>>> 'yes'; % do baseline >>>>>>> correction with the complete trial >>>>>>> >>>>>>> cfg.blcwindow = [-1 0]; >>>>>>> cfg.channel = {'MEG'}; >>>>>>> raw_DATA = ft_preprocessing(cfg); >>>>>>> cfg = []; >>>>>>> cfg.badchannel = {'A234'}; >>>>>>> cfg.neighbourdist = 0.03; >>>>>>> >>>>>>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>>>>>> --------------------------------------------------------------------- >>>>>>> And here is the outcome: ----------------------------- >>>>>>> >>>>>>> the input is raw data with 248 channels and 201 trials >>>>>>> repairing channel A234 >>>>>>> using neighbour A121 >>>>>>> using neighbour A143 >>>>>>> using neighbour A173 >>>>>>> using neighbour A8 >>>>>>> >>>>>>> repairing bad channels for trial 1 >>>>>>> repairing bad channels for trial 2 >>>>>>> repairing bad channels for trial 3 >>>>>>> repairing bad channels for trial 4 >>>>>>> repairing bad channels for trial 5 >>>>>>> repairing bad channels for trial 6 >>>>>>> repairing bad channels for trial 7 >>>>>>> repairing bad channels for trial 8 >>>>>>> repairing bad channels for trial 9 >>>>>>> repairing bad channels for trial 10 >>>>>>> .... >>>>>>> ------------------------- >>>>>>> Thank you. >>>>>>> Jim >>>>>>> >>>>>>> _______________________________________________ >>>>>>> >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> ----------------------- >>>>>> Don Rojas, Ph.D. >>>>>> Associate Professor of Psychiatry >>>>>> U. of Colorado Denver Anschutz Medical Campus >>>>>> Director, UCD Magnetoencephalography Lab >>>>>> 13001 E. 17th Pl F546 >>>>>> Aurora, CO 80045 >>>>>> 303-724-4994 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> ----------------------- >>>>> Don Rojas, Ph.D. >>>>> Associate Professor of Psychiatry >>>>> U. of Colorado Denver Anschutz Medical Campus >>>>> Director, UCD Magnetoencephalography Lab >>>>> 13001 E. 17th Pl F546 >>>>> Aurora, CO 80045 >>>>> 303-724-4994 >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> Dr. J.M. (Jan-Mathijs) Schoffelen >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: 0031-24-3614793 >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail:jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web:http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at gmail.com Sun Jul 10 19:49:49 2011 From: megjim1 at gmail.com (Jim Li) Date: Sun, 10 Jul 2011 12:49:49 -0500 Subject: [FieldTrip] channelrepair issue In-Reply-To: <4E17AFDE.2090701@donders.ru.nl> References: <7A6F8C1E-03B8-410A-80AB-115F504BF9FD@ucdenver.edu> <4E16BDBA.2020209@donders.ru.nl> <1B896C54-AEBC-4261-8A7A-7FC9E91FA6C6@ucdenver.edu> <4E17AFDE.2090701@donders.ru.nl> Message-ID: Hello Jörn, I sent an email to you guys a moment ago. Please let me know if you get that email or not. Thanks. Jim On Fri, Jul 8, 2011 at 8:33 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > ** > Hi, > > SInce the new updates (which should be available in the new FT download > version, see also the corresponding mail on the mailing list), I would > suggest to use a user-defined neighbourstructure, verify this and then call > channelrepair. E.g. try 'triangulation' as a method - it might result in a > better neighbourhood representation. > Also, currently neighbourselection is using config settings first before > searching the data structure for sensor position information. So if you > define cfg.layout, it will definitely use the layout (so, 2D coordinates) > instead of 3D coordinates defined in your data. This might be suboptimal as > well. > > Sorry for all the inconveniences. We will try to check why the problem you > got causes an issue and hopefully find a more generic way to solve this. > Jim, if not already done, it would be great if you followed Jan-Mathijs' > suggestion to provide further information such as example data so that we > can reproduce your problem and try to solve it. > Don, thanks for helping out ;) > > Best, > Jörn > > > > On 7/9/2011 12:57 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > As a short follow up on this, the behavior of ft_neighbourplot is suspect > only when supplying a cfg.neighbours field and plotting the result using the > 2d layout file (as in the example I gave below), so this issue may not be > the same as for the channel repair function. Using no layout file, the 3D > plotted locations and labels appear to be correct. I can verify that the > lower level functions called by ft_neighbourplot such as channelposition.m > are returning the correct position and label info, but haven't had time to > track the 2d plotting result down further. The neighbours returned by > ft_neighbourselection also appear to be okay given a specified input > distance. > > On Jul 8, 2011, at 1:17 PM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jörn, Jim et al. > > There is indeed a general problem, most likely with channel indexing, in > gradiometer systems. I think the data are read correctly with the low level > functions, but functions like ft_channelrepair, ft_neighbourselection and > ft_neighbourplot are not accounting for the locations correctly. I have > attached a picture that I think illustrates this issue reasonably well. The > following code was used to generate this plot: > > % read in data > cfg = []; > cfg.dataset = 'e,rfhp1.0Hz,COH'; > coh = ft_preprocessing(cfg); > > % get neighbors and plot > cfg = []; > cfg.neighbourdist = .03; > cfg.neighbours = ft_neighbourselection(cfg,coh); > cfg.layout = '4D248.lay'; > ft_neighbourplot(cfg,coh); > > You can see that the channel selected is labeled A216, which is incorrect - > it should be A248. It's three neighbors are also incorrect (A208, A118 and > A134 should probably be A195, A228 and A247). > > I'm guessing this is the same indexing issue for gradiometers. Jan-Mathijs > mentioned a fixed version of ft_channelrepair appearing today, so perhaps it > will be the same problem and the fix can be propagated to these other > functions. > > Don > > On Jul 8, 2011, at 2:20 AM, Jörn M. Horschig wrote: > > Dear Jim, Don and others, > > First of all, what Don suggested sounds indeed like the cause, if I > remember things correctly (with my limited experience). > > Anyhow, could one of you check ft_neighbourplot with the dataset and the > neighbourselection of choice? This allows you to see what neighbours are > selected for which sensors and where they lie in space. If this looks fine, > than the problem lies indeed in how sensor position is deduced from the data > structure. > > Best, > Jörn > > > On 7/8/2011 9:11 AM, jan-mathijs schoffelen wrote: > > Dear Don, > > This sounds like a very likely cause of the problem. When we wrote the 4D > reading code at the time, we had the 248-channel magnetometer system in > mind. It could be that there are some flaws related to the handling of > gradiometers. This should not only lead to (erratic) issues at the level of > channelrepair, but may also cause mayhem when doing planar gradient > transformation, or source reconstruction. > Would you happen to > 1) feel like tackling this one with me, and improve FieldTrip to deal with > gradiometer systems correctly? > > or > > 2) have a small gradiometer dataset which you can send to me (e.g. through > DropBox), so that I can look into it? > > We can further discuss this off the discussion list. > > Best wishes, > > Jan-Mathijs > > > > On Jul 8, 2011, at 3:36 AM, Rojas, Don ( Employee MEG-SOM ) wrote: > > Jim et al. > > In thinking about this further, it seems to me that it is the indexing that > is incorrect. The problem I think is specific to gradiometer systems, which > have two (or more) locations per channel. The function appears to assume > that the sensor index based on the sens.label field (only 1 per channel) > will correspond 1 to 1 with the sens.grad field (2 locations per channel), > which is not correct. So, my guess is that for first-order gradiometer > systems, the correct index for the sensor location is 2x the index in the > sens.label field. > > So, in an example I have handy at home, the label index for channel A234 is > 107. Since I think Fieldtrip stores gradiometer locations (by default) as: > > Chn 1 lower coil x, y z > Chn 1 upper coil x, y z > Chn 2 lower coil x, y z > Chn 2 upper coil x, y z > . > . > . > Chn N > > I think the correct position info for channel A234 would be found in > sens.grad(214,:), not sens.grad(107,:), which is what the ft_channelrepair > function chooses. So I think this is a bug in the function specific to > gradiometer systems. > > Best, > > Don > > On Jul 7, 2011, at 5:38 PM, Jim Li wrote: > > Thank you very much for confirming the problem, Don, I appreciate it, :) > > Jim > > On Thu, Jul 7, 2011 at 4:30 PM, Rojas, Don wrote: > >> Jim, >> >> All I can do is confirm that this issue exists for our 4D data as well, >> although we don't use the ft_channelrepair function. The same 4 quite >> distant channels (one had been deleted in the dataset I had handy) were >> chosen for repair when I ran this on one of our datasets (also a 248 channel >> 4D system). I agree the choice doesn't make any sense given the 3 cm >> distance you define. A quick look at the critical calculation in >> ft_channelrepair, line 109 distance = ... is correct given the inputs. So I >> wonder if the issue is with the actual channel indices used rather than the >> calculation, but I don't have time to track that down. All I can say is that >> for the distance you specify, channels A235, A216, A199, A215 would be much >> closer to A234 than those that are selected via the channel repair function. >> Channel A8 is in fact nearly 21 cm away from channel A234 in the array, >> based on examination of the data read in from Eugene Kronberg's pdf4D matlab >> object code, which I think was originally the basis for the FieldTrip 4D >> reader function. >> >> Best, >> >> Don Rojas >> >> >> On Jul 7, 2011, at 1:26 PM, Jim Li wrote: >> >> Dear Fieldtrip developer, >> >> Can anybody help me with this channel-repair issue I've been having? I can >> provide the raw data if you need. I really want to solve the problem, you >> know. >> >> Thanks a lot, >> >> Jim >> >> On Thu, Jul 7, 2011 at 2:22 PM, Jim Li wrote: >> >>> Hi Odelia, >>> >>> Yes, I downloaded the latest version of Fieldtrip and tried your >>> suggestion "cfg.neighbourdist = 0.03", but it still weirdly uses the >>> far-away channels like A121 to do the channel-repair for A234 (these two >>> channels are 24.1172cm apart!). Here is the detail: >>> >>> --------------------------- >>> cfg = []; >>> cfg.dataset = 'e,rfhp0.1Hz'; >>> cfg.trialdef.eventtype = 'TRIGGER'; >>> cfg.trialdef.eventvalue = 320; >>> cfg.trialdef.prestim = 1; >>> cfg.trialdef.poststim = 1; >>> cfg = ft_definetrial(cfg); >>> cfg.blc = 'yes'; % do >>> baseline correction with the complete trial >>> >>> cfg.blcwindow = [-1 0]; >>> cfg.channel = {'MEG'}; >>> raw_DATA = ft_preprocessing(cfg); >>> >>> >>> cfg = []; >>> cfg.badchannel = {'A234'}; >>> cfg.neighbourdist = 0.03; >>> >>> [raw_DATA] = ft_channelrepair(cfg, raw_DATA) >>> >>> --------------------------------------------------------------------- >>> >>> And here is the outcome: ----------------------------- >>> >>> the input is raw data with 248 channels and 201 trials >>> repairing channel A234 >>> using neighbour A121 >>> using neighbour A143 >>> using neighbour A173 >>> using neighbour A8 >>> >>> repairing bad channels for trial 1 >>> repairing bad channels for trial 2 >>> repairing bad channels for trial 3 >>> repairing bad channels for trial 4 >>> repairing bad channels for trial 5 >>> repairing bad channels for trial 6 >>> repairing bad channels for trial 7 >>> repairing bad channels for trial 8 >>> repairing bad channels for trial 9 >>> repairing bad channels for trial 10 >>> .... >>> >>> ------------------------- >>> >>> Thank you. >>> >>> Jim >>> >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 11 15:25:00 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 11 Jul 2011 08:25:00 -0500 Subject: [FieldTrip] Group level source statistics for individual condition Message-ID: Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From leeleewebb at gmail.com Tue Jul 12 09:50:05 2011 From: leeleewebb at gmail.com (Leandra Webb) Date: Tue, 12 Jul 2011 09:50:05 +0200 Subject: [FieldTrip] Error opening socket Message-ID: Hi all I am trying to use FieldTrip in order to do Matlab processing on BCI2000 data and have tried to use the code at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_bufferin order to read data. However, whenever I run this code I get the error Error using ==> buffer ERROR: failed to create socket (1) I saw that a few people have had similar problems but it doesn't seem that this has been solved yet? Leandra -------------- next part -------------- An HTML attachment was scrubbed... URL: From leeleewebb at gmail.com Tue Jul 12 10:53:19 2011 From: leeleewebb at gmail.com (Leandra Webb) Date: Tue, 12 Jul 2011 10:53:19 +0200 Subject: [FieldTrip] Error opening socket Message-ID: My previous question can be ignored - I managed to figure this out. I wasn't running FieldTripBuffer.exe which was the problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 12:38:53 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 10:38:53 +0000 Subject: [FieldTrip] Undefined variable? Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 13 14:17:57 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 13 Jul 2011 14:17:57 +0200 Subject: [FieldTrip] Undefined variable? In-Reply-To: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> Message-ID: <4E1D8CF5.5040206@donders.ru.nl> Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: > > Hi, > > I haven't got much experience with Fieldtrip, or with Matlab, > > so I apologise if this is a stupid question. > > I've downloaded the latest version, and now my code crashes. > > It ran without problems before. > > The offending line is in ft_senslabel.m : > > if size(find(meg_zaxis+1==i),2) > > But 'meg_zaxis' doesn't seem to be defined anywhere. > > I've searched all code, but can only find 14 instances of > > precisely this line, in ft_senslabel.m and planarchannelset.m > > Am I missing something? > > Maarten > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 14:47:03 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 14:47:03 +0200 Subject: [FieldTrip] source power units changed? Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 14:57:23 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 14:57:23 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> sorry I meant bigger not smaller ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de Gesendet: Mittwoch, 13. Juli 2011 14:47 An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] source power units changed? Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 14:58:52 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 12:58:52 +0000 Subject: [FieldTrip] Undefined variable? In-Reply-To: <4E1D8CF5.5040206@donders.ru.nl> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> Hi Jörn, Here's the error message: ??? Undefined function or variable 'meg_zaxis'. Error in ==> fileio/private/ft_senslabel at 2845 if size(find(meg_zaxis+1==i),2) Error in ==> fileio/private/ft_senstype at 241 elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), sens.label)) > 0.8) Error in ==> ft_chantype at 70 if ft_senstype(input, 'neuromag') Error in ==> ft_read_event at 1048 analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); Thanks, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 13:18 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jul 13 15:12:35 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 13 Jul 2011 15:12:35 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD> <72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> Message-ID: <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> Hi Jan, There has been a change related to the scaling of the leadfields when using the singleshell as a volume conductor model. This has been incorporated somewhere in the beginning of 2011, and was communicated to the list. There should be a message related to this in the archive. Best, Jan-M On Jul 13, 2011, at 2:57 PM, wrote: > sorry I meant bigger not smaller > > Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de > Gesendet: Mittwoch, 13. Juli 2011 14:47 > An: fieldtrip at donders.ru.nl > Betreff: [FieldTrip] source power units changed? > > Hi, > > I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. > > Best, > jan > > Jan Hirschmann > MSc. Neuroscience > Insititute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Duesseldorf > Universitaetsstr. 1 > 40225 Duesseldorf > Tel: 0049 - (0)211 - 81 - 18415 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Wed Jul 13 15:41:37 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Wed, 13 Jul 2011 15:41:37 +0200 Subject: [FieldTrip] source power units changed? In-Reply-To: <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B02AFED97@Mail2-UKD.VMED.UKD><72E993C35FB11743B79FF9286E5B6D8B02AFED9C@Mail2-UKD.VMED.UKD> <46939C2C-61FC-4CD9-869A-C226456F2A45@donders.ru.nl> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02AFEDC4@Mail2-UKD.VMED.UKD> ah okay, I think I vaguely remember now that you say it. thanks for reminding. best, jan ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen Gesendet: Mittwoch, 13. Juli 2011 15:13 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] source power units changed? Hi Jan, There has been a change related to the scaling of the leadfields when using the singleshell as a volume conductor model. This has been incorporated somewhere in the beginning of 2011, and was communicated to the list. There should be a message related to this in the archive. Best, Jan-M On Jul 13, 2011, at 2:57 PM, wrote: sorry I meant bigger not smaller ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Jan.Hirschmann at med.uni-duesseldorf.de Gesendet: Mittwoch, 13. Juli 2011 14:47 An: fieldtrip at donders.ru.nl Betreff: [FieldTrip] source power units changed? Hi, I noticed that with my fieldtrip version (20110409) I get source power values that are identical to, but 20 orders of magnitude smaller than those I get with a November 2010 version. Just wanted to report this in case it is not intended and not fixed yet. I cannot test the newest version because I get the same error that was just reported by Maarten. Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 13 15:48:56 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 13 Jul 2011 15:48:56 +0200 Subject: [FieldTrip] Undefined variable? In-Reply-To: <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> Message-ID: <4E1DA248.6000705@donders.ru.nl> Hi Maarten, I just checked the ftp-version from July 6, and there meg_zaxis can indeed be found. Did you download fieldtrip-20110706? If you download fieldtrip-20110713, this error should not be there anymore, because all the labels are hard-coded now! Best, Jörn On 7/13/2011 2:58 PM, Maarten van-Casteren wrote: > > Hi Jörn, > > Here's the error message: > > ??? Undefined function or variable 'meg_zaxis'. > > Error in ==> fileio/private/ft_senslabel at 2845 > > if size(find(meg_zaxis+1==i),2) > > Error in ==> fileio/private/ft_senstype at 241 > > elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), > sens.label)) > 0.8) > > Error in ==> ft_chantype at 70 > > if ft_senstype(input, 'neuromag') > > Error in ==> ft_read_event at 1048 > > analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); > > Thanks, > > Maarten > > *From:*fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] *On Behalf Of *"Jörn M. Horschig" > *Sent:* 13 July 2011 13:18 > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] Undefined variable? > > Hi Maarten, > > I searched my whole FT directory and could not find a single line > containing meg_zaxis. I also manually checked planachannelset.m and > ft_senslabel.m and couldn't find the corresponding if-statement. Could > you copy the error message(s) from Matlab and send them over? > > Best, > Jörn > > On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: > > Hi, > > I haven't got much experience with Fieldtrip, or with Matlab, > > so I apologise if this is a stupid question. > > I've downloaded the latest version, and now my code crashes. > > It ran without problems before. > > The offending line is in ft_senslabel.m : > > if size(find(meg_zaxis+1==i),2) > > But 'meg_zaxis' doesn't seem to be defined anywhere. > > I've searched all code, but can only find 14 instances of > > precisely this line, in ft_senslabel.m and planarchannelset.m > > Am I missing something? > > Maarten > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From Maarten.van-Casteren at mrc-cbu.cam.ac.uk Wed Jul 13 16:42:48 2011 From: Maarten.van-Casteren at mrc-cbu.cam.ac.uk (Maarten van-Casteren) Date: Wed, 13 Jul 2011 14:42:48 +0000 Subject: [FieldTrip] Undefined variable? In-Reply-To: <4E1DA248.6000705@donders.ru.nl> References: <076BBBEE0241DF4FA4F09E43B8EB01763913EAA6@WSR21.mrc-cbsu.local> <4E1D8CF5.5040206@donders.ru.nl> <076BBBEE0241DF4FA4F09E43B8EB01763913EB35@WSR21.mrc-cbsu.local> <4E1DA248.6000705@donders.ru.nl> Message-ID: <076BBBEE0241DF4FA4F09E43B8EB01763913EBD0@WSR21.mrc-cbsu.local> Hi Jörn Excellent, that took care of it. Everything back to normal now. Thanks very much, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 14:49 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I just checked the ftp-version from July 6, and there meg_zaxis can indeed be found. Did you download fieldtrip-20110706? If you download fieldtrip-20110713, this error should not be there anymore, because all the labels are hard-coded now! Best, Jörn On 7/13/2011 2:58 PM, Maarten van-Casteren wrote: Hi Jörn, Here's the error message: ??? Undefined function or variable 'meg_zaxis'. Error in ==> fileio/private/ft_senslabel at 2845 if size(find(meg_zaxis+1==i),2) Error in ==> fileio/private/ft_senstype at 241 elseif (mean(ismember(ft_senslabel('yokogawa440_old_planar'), sens.label)) > 0.8) Error in ==> ft_chantype at 70 if ft_senstype(input, 'neuromag') Error in ==> ft_read_event at 1048 analogindx = find(strcmp(ft_chantype(hdr), 'analog trigger')); Thanks, Maarten From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: 13 July 2011 13:18 To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Undefined variable? Hi Maarten, I searched my whole FT directory and could not find a single line containing meg_zaxis. I also manually checked planachannelset.m and ft_senslabel.m and couldn't find the corresponding if-statement. Could you copy the error message(s) from Matlab and send them over? Best, Jörn On 7/13/2011 12:38 PM, Maarten van-Casteren wrote: Hi, I haven't got much experience with Fieldtrip, or with Matlab, so I apologise if this is a stupid question. I've downloaded the latest version, and now my code crashes. It ran without problems before. The offending line is in ft_senslabel.m : if size(find(meg_zaxis+1==i),2) But 'meg_zaxis' doesn't seem to be defined anywhere. I've searched all code, but can only find 14 instances of precisely this line, in ft_senslabel.m and planarchannelset.m Am I missing something? Maarten _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 14 15:49:31 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 14 Jul 2011 15:49:31 +0200 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser Message-ID: <4E1EF3EB.4080203@donders.ru.nl> Dear Community, During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: cfg.viewmode = 'component'; cfg.layout = 'XXX.lay'; ft_databrowser(cfg, data); In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. With best regards, on behalf of the FT team, Jörn PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From Antony.Passaro at uth.tmc.edu Fri Jul 15 19:04:57 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Fri, 15 Jul 2011 12:04:57 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jul 15 21:04:36 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 15 Jul 2011 13:04:36 -0600 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 14:55:08 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 07:55:08 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: Dear Don, Thank you for replying to my issue regarding group statistics. I apologize for not elaborating on what I did at the subject level...for each subject I compared the source estimation (dics beamformer) of the pre-stimulus to the post-stimulus using sourcestatistics for each of the two conditions. I then compared the two conditions directly across all subjects for a group level comparison using sourcestatistics again. I would like to also look at the statistically significant activation associated with each condition compared to baseline across the entire group. The solution that I came up with involves appending all trials for all subjects together into one large pseudo-subject and performing the sourcestatistics. I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 18 15:10:00 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 18 Jul 2011 15:10:00 +0200 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: Message-ID: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don > Sent: Friday, July 15, 2011 2:05 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Dear Tony, > > You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. > > Best, > > Don > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: > > > Hi everyone, > > I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. > > Any help would be much appreciated. > > Thanks, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D > Sent: Monday, July 11, 2011 8:25 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Group level source statistics for individual condition > > Hi all, > > I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? > > Thank you for your help, > -Tony > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 15:49:02 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 08:49:02 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Message-ID: Hi Jan-Mathijs, I understand the 2-step approach and I typically compute the t-statistic per subject of baseline vs activation for both conditions before performing the second-level statistic comparing conditions, but I run into problems when I want to perform the second-level statistic of baseline vs activation. I'm not sure how that is computed. I apologize for not clarifying earlier, but I typically use sourceinterpolate prior to performing the volumenormalise function and yet I still receive an error from sourcestatistics if I try to send it the output of the volumenormalise function. Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject's native space prior to normalization. If I follow the steps outlined in that link then wouldn't I be performing the source estimation using a normalized grid based on the subject's mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:10 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 18 15:59:20 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 18 Jul 2011 15:59:20 +0200 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> Message-ID: <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> Hi Tony, > > Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject’s native space prior to normalization. If I follow the steps outlined in that link then wouldn’t I be performing the source estimation using a normalized grid based on the subject’s mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? The idea is to still use subject specific information (i.e. the anatomical information per subject to build a volume conduction model of the head). Yet, for the definition of the single subject dipole grids, we will use a set of subject specific coordinates, which (after spatial normalisation) would yield the same coordinates for all subjects, thus bypassing the need to interpolate the functional data onto a high spatial resolution 3D grid. The trick is to 'unwarp' a set of canonical source coordinates into the subject specific head space. In the second level step, ft_sourcestatistics can be tricked into accepting multiple subject data (each with unique source positions, as per their individual anatomy), if the source.pos per subject would be replaced with the set of canonical positions (which would be obtained after the spatial normalization). Best, Jan-Mathijs > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen > Sent: Monday, July 18, 2011 8:10 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Hi Tony, > > We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. > Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. > > Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. > > Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid > > Best, Jan-Mathijs > > > I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. > > Thank you, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don > Sent: Friday, July 15, 2011 2:05 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Group level source statistics for individual condition > > Dear Tony, > > You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. > > Best, > > Don > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: > > > > Hi everyone, > > I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. > > Any help would be much appreciated. > > Thanks, > -Tony > > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D > Sent: Monday, July 11, 2011 8:25 AM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Group level source statistics for individual condition > > Hi all, > > I’m trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? > > Thank you for your help, > -Tony > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at uth.tmc.edu Mon Jul 18 16:28:38 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Mon, 18 Jul 2011 09:28:38 -0500 Subject: [FieldTrip] Group level source statistics for individual condition In-Reply-To: <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> References: <3AC08626-F96A-498F-8A51-72268A7A9279@donders.ru.nl> <827020EB-D784-4408-B7D2-AA321C489F09@donders.ru.nl> Message-ID: Hi Jan-Mathijs, I see, this makes much more sense to me. So the anatomical information is preserved in the conduction model while the dipole grids are normalized, that makes sense. I'll give it a try and see what I get. As for generating the second-level (group) statistics comparing baseline to activation, what would you recommend assuming I would like to submit t-statistics from individual subjects (comparing baseline to activation)? Thank you so much for your help, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:59 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, Hmm, I always thought that it was better (more accurate at least) to perform the source estimation in a subject's native space prior to normalization. If I follow the steps outlined in that link then wouldn't I be performing the source estimation using a normalized grid based on the subject's mri instead of the native grid for that subject? It seems like there must be a way to perform the source estimation for each subject just like I normally do and then normalize those estimates prior to group level source statistics? The idea is to still use subject specific information (i.e. the anatomical information per subject to build a volume conduction model of the head). Yet, for the definition of the single subject dipole grids, we will use a set of subject specific coordinates, which (after spatial normalisation) would yield the same coordinates for all subjects, thus bypassing the need to interpolate the functional data onto a high spatial resolution 3D grid. The trick is to 'unwarp' a set of canonical source coordinates into the subject specific head space. In the second level step, ft_sourcestatistics can be tricked into accepting multiple subject data (each with unique source positions, as per their individual anatomy), if the source.pos per subject would be replaced with the set of canonical positions (which would be obtained after the spatial normalization). Best, Jan-Mathijs Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Monday, July 18, 2011 8:10 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Hi Tony, We typically take a 2-step approach. First we compute per subject a descriptive statistic for a difference across 2 conditions (e.g. baseline vs activation, or two experimental conditions). This descriptive statistic can be a relative difference, absolute difference, or a T-statistic. Then we typically do a second level statistical test, where we do statistical inference, using ft_sourcestatistics. Note that in order to get your data into normalised space, you first have to call ft_sourceinterpolate, to create a data structure containing both the anatomy (which is to be spatially normalised in ft_volumenormalise) and the functional data. Better still (at least computationally better) would be to create your single subject dipole grids (for the ft_sourceanalysis), based on a common space, as explained in the link attached. http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=mni&s[]=grid Best, Jan-Mathijs I have tried to normalize the source results using volumenormalise in the past but I always received an error from sourcestatistics after performing that step, I think it has to be in the native source space to perform the statistics? I can run it again to find out the exact error that it gives. Thank you, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Rojas, Don Sent: Friday, July 15, 2011 2:05 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Group level source statistics for individual condition Dear Tony, You don't really give details of what you did on the single subject level that you want to try to achieve on the group level. But appending all the subject sources to each other does not make sense to me. Assuming you wrote out all the sources you computed as image files, then within Fieldtrip you can use ft_volumenormalise to write the results to standard source space (which uses SPM2 or SPM8). Or, you can just use SPM8 directly, taking the normalization result from the T1 MRI data and applying it to the source result computed within that space. That will put your subjects in MNI space and then you can do stats from there in a common anatomical space. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 On Jul 15, 2011, at 11:04 AM, Passaro, Antony D wrote: Hi everyone, I tried to come up with a solution to this issue and the best I could do was to append all source analyses of pre-stim and post-stim trials for each subject to one another before performing source statistics across all trials and all subjects. However, I cant seem to find a way to normalize all subjects so they reside in the same source space prior to performing source statistics. Any help would be much appreciated. Thanks, -Tony From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Monday, July 11, 2011 8:25 AM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group level source statistics for individual condition Hi all, I'm trying to figure out how to compute the source statistics across a group of subjects for an individual condition (as compared to baseline). I have performed the single subject level source statistics for each condition compared to baseline (for all trials) and I have used those results to compute the group level statistics comparing both conditions directly. But I would also like to show the statistically significant sources across the group for each condition and while the average across subjects is informative, I would prefer to perform the same type of statistical analysis that was used to compare conditions directly. Is this possible with Fieldtrip and if so, would it require averaging the baseline and condition separately across all trials for each subject before comparing the condition and baseline at the group level using the sourcestatistics function? Thank you for your help, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lieneke.janssen at student.ru.nl Mon Jul 18 17:28:48 2011 From: lieneke.janssen at student.ru.nl (Janssen, L.K. (Lieneke)) Date: Mon, 18 Jul 2011 17:28:48 +0200 (CEST) Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <1541462293.860888.1311002455687.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> Hello again dear fieldtrippers, Last week I wanted to run my coherence script again, but unfortunately it didn't work with me anymore. I hadn't changed anything in either the input or settings, so it's a mystery to me. In addition, I have two other questions related to ft_connectivityanalysis. 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. Did something change here? This brings me to point 2. 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! Thanks in advance :). Best, Lieneke From ekanal at cmu.edu Mon Jul 18 18:00:02 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Mon, 18 Jul 2011 12:00:02 -0400 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser In-Reply-To: <4E1EF3EB.4080203@donders.ru.nl> References: <4E1EF3EB.4080203@donders.ru.nl> Message-ID: It looks like there's some added functionality in the databrowser; I can select visually select subcomponents of signals in time using the mouse, and the background changes color. Have there been any changes to how the function works? Is there documentation on the wiki about the usage of the new component browser? Thanks - Elli On Jul 14, 2011, at 9:49 AM, Jörn M. Horschig wrote: > Dear Community, > > During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. > > Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: > cfg.viewmode = 'component'; > cfg.layout = 'XXX.lay'; > ft_databrowser(cfg, data); > > In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. > > With best regards, on behalf of the FT team, > Jörn > > PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Tue Jul 19 08:50:21 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 19 Jul 2011 08:50:21 +0200 Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> References: <101807184.860947.1311002928040.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <63A0E490-B5C3-483D-B2EC-68B19A2550D7@donders.ru.nl> Hi Lieneke, Sorry that your scripts broke. I will look into it. > 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. > > -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. > -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. > > Did something change here? This brings me to point 2. Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. > The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. > 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes'). > I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! > > Thanks in advance :). > > Best, > Lieneke Best, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 19 09:01:34 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 19 Jul 2011 09:01:34 +0200 Subject: [FieldTrip] Functionality Change - new implementation of ft_databrowser, also replaces ft_componentbrowser In-Reply-To: References: <4E1EF3EB.4080203@donders.ru.nl> Message-ID: <4E252BCE.8000405@donders.ru.nl> Hi Elli, The functionality you talk about has always been in the databrowser. As far as I know it was initially added to check for and mark sleep spindles, but I use it for marking artifacts. The only thing which is kinda new is that this also works for components now (this does not mean for markin components, but when using the databrowser as a componentbrowser). Also, you can run artifact detection methods beforehands, and add the corresponding artfctdef to the config. The databrowser will then mark found artifacts in a different color per type of artifact (which is defined by the subfield of 'artfctdef'). On the wiki, the only documentation so far is the link I sent in the original mail. But, I see that it might be a wise idea to have a tutorial about using the databrowser (because there is more you can do with it). I'll let you know. Best, Jörn On 7/18/2011 6:00 PM, Kanal Eliezer wrote: > It looks like there's some added functionality in the databrowser; I can select visually select subcomponents of signals in time using the mouse, and the background changes color. Have there been any changes to how the function works? Is there documentation on the wiki about the usage of the new component browser? Thanks - > > Elli > > > On Jul 14, 2011, at 9:49 AM, Jörn M. Horschig wrote: > >> Dear Community, >> >> During the last weeks, we have been working on restructuring the ft_databrowser. We mainly intended to keep the code clearer for debugging purposes but also optimized efficiency of the code. Should you experience any problems with the new implementation, please let us know asap. Just in case: the old implementation will still be distributed as ft_databrowser_old. >> >> Additionally, we decided to stop developing ft_componentbrowser, because ft_databrowser has the same functionality. If you want to look at your components, you should call now: >> cfg.viewmode = 'component'; >> cfg.layout = 'XXX.lay'; >> ft_databrowser(cfg, data); >> >> In case you experience problems with the component viewmode, you can still go back to the old componentbrowser by calling ft_componentbrowser_old. However, for both databrowser_old and componentbrowser_old, we will discontinue support and delete these functions in future release, if the new implementation proofs to be stable. >> >> With best regards, on behalf of the FT team, >> Jörn >> >> PS: If you have never heard of the databrowser and have no clue what the databrowser is good for, please try it out. See also: http://fieldtrip.fcdonders.nl/walkthrough#visual_data_inspection >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From luoj at mail.nih.gov Tue Jul 19 23:08:00 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Tue, 19 Jul 2011 17:08:00 -0400 Subject: [FieldTrip] weight table for 4D data Message-ID: Hi, Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? Many thanks! Jessie From eamadei at gatech.edu Wed Jul 20 00:05:22 2011 From: eamadei at gatech.edu (Elizabeth Amadei) Date: Tue, 19 Jul 2011 18:05:22 -0400 (EDT) Subject: [FieldTrip] Question about corticomuscular coherence tutorial Message-ID: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Hi all, I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: ??? Error using ==> ft_selectdata at 535 selection of or averaging across channels in the presence of both label and labelcmb is not possible Error in ==> ft_connectivityanalysis at 157 data = ft_selectdata(data, 'channel', unique(selchan)); Has anyone come across this error before and know how to resolve it? Thank you for your help. From jan.schoffelen at donders.ru.nl Wed Jul 20 08:17:18 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 08:17:18 +0200 Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> References: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Message-ID: <088E1715-8A24-489D-9381-C12AFF1731D0@donders.ru.nl> Hi, We noticed this behavior in another context. It is a bug. We we look into it and fix it. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 08:29:51 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 08:29:51 +0200 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: Message-ID: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> Hi Jessie, Please have a look here: http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header Best wishes, Jan-Mathijs On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? > > Many thanks! > > Jessie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 11:16:38 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 11:16:38 +0200 Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> References: <609717296.135587.1311113122524.JavaMail.root@mail8.gatech.edu> Message-ID: <58F07078-301D-4418-9259-6A79D9CDE327@donders.ru.nl> Hi Elizabeth, I fixed the bug you refer to. The code should be available on the ftp-server and on google-code tonight. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From jan.schoffelen at donders.ru.nl Wed Jul 20 11:18:09 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 11:18:09 +0200 Subject: [FieldTrip] ft_connectivityanalysis References: <63A0E490-B5C3-483D-B2EC-68B19A2550D7@donders.ru.nl> Message-ID: Hi Lieneke, I fixed point 1. The code should be available tonight on the ftp-server and on google code. Best, Jan-Mathijs Begin forwarded message: > From: jan-mathijs schoffelen > Date: July 19, 2011 8:50:21 AM GMT+02:00 > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] ft_connectivityanalysis > > Hi Lieneke, > > Sorry that your scripts broke. I will look into it. > >> 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. >> >> -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. >> -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. >> >> Did something change here? This brings me to point 2. > > > Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: > > http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip > >> 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. >> The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense? > > Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. > >> 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). > > Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes'). > >> I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! >> >> Thanks in advance :). >> >> Best, >> Lieneke > > Best, > > Jan-Mathijs > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3614793 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Wed Jul 20 11:22:26 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Wed, 20 Jul 2011 12:22:26 +0300 Subject: [FieldTrip] weight table for 4D data In-Reply-To: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl> Message-ID: Hi with 4D software you can write in a terminal print_table . I use : print_table -posted -WP both > wts.txt this prints both analog and digital as one set of weights yuval On 20 July 2011 09:29, jan-mathijs schoffelen wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > > > Hi, > > > > Does anyone know where the weight table for 4D datasets (from 248 channel > 4D machine) is stored and how to extract it from the dataset? > > > > Many thanks! > > > > Jessie > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lieneke.janssen at student.ru.nl Wed Jul 20 13:03:57 2011 From: lieneke.janssen at student.ru.nl (Janssen, L.K. (Lieneke)) Date: Wed, 20 Jul 2011 13:03:57 +0200 (CEST) Subject: [FieldTrip] ft_connectivityanalysis In-Reply-To: <1233124647.873768.1311159476345.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <474296708.873799.1311159837753.JavaMail.root@monoceros.zimbra.ru.nl> Hey Jan-Mathijs, Great, thanks a lot. I was trying your other suggestion, but then I got ill... will keep trying though :). The 2nd point: "What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb." --> I was just trying some things with these functions so I did give it the cohspctrm from freqanalysis (with powandcsd output) as input. Then I got exactly the same error as with ft_connectivityanalysis: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. ...coming from ft_selectchannels. What I find weird though is that for ft_descriptives this error only appears when I choose a selection of channels, not if it takes all channels. For ft_connectivityanalysis the error appears in both cases: when I give it a selection of channel pairs as well as when it should do all channels. I might have done something wrong or not very careful here though, because I was trying lots of things last week when I encountered the problem. I can't look back unfortunately to what I've done exactly. I wanted to figure out my previous uncarefulness yesterday but didn't get to that. The same goes for point 3.. I should try again. But what I did last week: I put in cfg.jackknife = 'yes' + had data with kept trials, but I didn't get a jackknife output there. From the code it seemed either not to actually calculate this measure or not to put it in the output... Best, Lieneke From luoj at mail.nih.gov Wed Jul 20 15:01:15 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Wed, 20 Jul 2011 09:01:15 -0400 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, Message-ID: Thank you Jan-Mathijs and Yuval for replying! Unfortunately I don't have the 4D software. Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? Many thanks, Jessie ________________________________________ From: Yuval Harpaz [yuvharpaz at gmail.com] Sent: Wednesday, July 20, 2011 5:22 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] weight table for 4D data Hi with 4D software you can write in a terminal print_table . I use : print_table -posted -WP both > wts.txt this prints both analog and digital as one set of weights yuval On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: Hi Jessie, Please have a look here: http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header Best wishes, Jan-Mathijs On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? > > Many thanks! > > Jessie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From jan.schoffelen at donders.ru.nl Wed Jul 20 16:06:00 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 20 Jul 2011 16:06:00 +0200 Subject: [FieldTrip] weight table for 4D data In-Reply-To: References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, Message-ID: <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> Hi Jessie, I did not suggest to use the 4D software. I pointed to some documentation which probably was not clear enough. You can look at the hdr.grad.tra matrix (after reading in the header using fieldtrip, and specifying the raw data file, so no .m4d or .xyz nonsense here). if you do: figure;imagesc(hdr.grad.tra), you'll see a matrix which essentially has the colourful bits at the far right side of it. These correspond to the weights. If you have a gradiometer system, this probably corresponds to hdr.grad.tra(1:248,597:end), for a magnetometer system it will be hdr.grad.tra(1:248,249:end). The lower right part of the tra matrix hdr.grad.tra(249:end, 249 (or 597):end) allows you to decode which reference coils contribute to which reference channel. Best, Jan-Mathijs On Jul 20, 2011, at 3:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thank you Jan-Mathijs and Yuval for replying! > > Unfortunately I don't have the 4D software. > Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? > > Many thanks, > Jessie > ________________________________________ > From: Yuval Harpaz [yuvharpaz at gmail.com] > Sent: Wednesday, July 20, 2011 5:22 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] weight table for 4D data > > Hi > with 4D software you can write in a terminal print_table . I use : > print_table -posted -WP both > wts.txt > this prints both analog and digital as one set of weights > yuval > On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >> Hi, >> >> Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? >> >> Many thanks! >> >> Jessie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From luoj at mail.nih.gov Wed Jul 20 16:34:49 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Wed, 20 Jul 2011 10:34:49 -0400 Subject: [FieldTrip] weight table for 4D data In-Reply-To: <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> References: <02F661E2-5F97-45E5-993C-84D5CB1B9A39@donders.ru.nl>, , <405000DB-2616-42C3-B774-82053C6A5EDE@donders.ru.nl> Message-ID: Hi Jan-mathijs, Thanks so much for your quick reply! I'll test your instructions out. Jessie ________________________________________ From: jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Wednesday, July 20, 2011 10:06 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] weight table for 4D data Hi Jessie, I did not suggest to use the 4D software. I pointed to some documentation which probably was not clear enough. You can look at the hdr.grad.tra matrix (after reading in the header using fieldtrip, and specifying the raw data file, so no .m4d or .xyz nonsense here). if you do: figure;imagesc(hdr.grad.tra), you'll see a matrix which essentially has the colourful bits at the far right side of it. These correspond to the weights. If you have a gradiometer system, this probably corresponds to hdr.grad.tra(1:248,597:end), for a magnetometer system it will be hdr.grad.tra(1:248,249:end). The lower right part of the tra matrix hdr.grad.tra(249:end, 249 (or 597):end) allows you to decode which reference coils contribute to which reference channel. Best, Jan-Mathijs On Jul 20, 2011, at 3:01 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thank you Jan-Mathijs and Yuval for replying! > > Unfortunately I don't have the 4D software. > Do you happen to know what specific commands in fieldtrip allow me to pull out the weight table? > > Many thanks, > Jessie > ________________________________________ > From: Yuval Harpaz [yuvharpaz at gmail.com] > Sent: Wednesday, July 20, 2011 5:22 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] weight table for 4D data > > Hi > with 4D software you can write in a terminal print_table . I use : > print_table -posted -WP both > wts.txt > this prints both analog and digital as one set of weights > yuval > On 20 July 2011 09:29, jan-mathijs schoffelen > wrote: > Hi Jessie, > > Please have a look here: > > http://fieldtrip.fcdonders.nl/getting_started/bti?&#read_header > > Best wishes, > > Jan-Mathijs > > > > On Jul 19, 2011, at 11:08 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >> Hi, >> >> Does anyone know where the weight table for 4D datasets (from 248 channel 4D machine) is stored and how to extract it from the dataset? >> >> Many thanks! >> >> Jessie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eamadei at gatech.edu Wed Jul 20 17:04:11 2011 From: eamadei at gatech.edu (Elizabeth Amadei) Date: Wed, 20 Jul 2011 11:04:11 -0400 (EDT) Subject: [FieldTrip] Question about corticomuscular coherence tutorial In-Reply-To: <58F07078-301D-4418-9259-6A79D9CDE327@donders.ru.nl> Message-ID: <1445090092.153234.1311174251813.JavaMail.root@mail8.gatech.edu> Hi Jan-Mathijs, Thank you for your quick response! I look forward to trying out the new code. Best, Elizabeth ----- Original Message ----- From: "jan-mathijs schoffelen" To: "Email discussion list for the FieldTrip project" Sent: Wednesday, July 20, 2011 5:16:38 AM Subject: Re: [FieldTrip] Question about corticomuscular coherence tutorial Hi Elizabeth, I fixed the bug you refer to. The code should be available on the ftp-server and on google-code tonight. Best wishes, Jan-Mathijs On Jul 20, 2011, at 12:05 AM, Elizabeth Amadei wrote: > Hi all, > > I was working through the corticomuscular coherence tutorial, loading in the data and copying and pasting all of the commands into matlab, and I got an error message upon typing in the command fd = ft_connectivityanalysis(cfg, freq) to get the coherence. The message read: > > ??? Error using ==> ft_selectdata at 535 > selection of or averaging across channels in the presence of both label and labelcmb is not possible > > Error in ==> ft_connectivityanalysis at 157 > data = ft_selectdata(data, 'channel', unique(selchan)); > > > Has anyone come across this error before and know how to resolve it? > Thank you for your help. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Antony.Passaro at uth.tmc.edu Wed Jul 20 18:36:33 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Wed, 20 Jul 2011 11:36:33 -0500 Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment Message-ID: Hi all, After installing the latest version of Fieldtrip, I tried to make a template grid using identical code from the example from the Fieldtrip website and once I run the ft_volumesegment function, Matlab quickly crashes. I am running Matlab version 7.8 on a 64-bit linux computer. The system error says it detected a floating point exception and that the error was detected while a MEX-file was running. Has anyone else come across this issue? Thank you, -Tony From Antony.Passaro at uth.tmc.edu Wed Jul 20 23:00:45 2011 From: Antony.Passaro at uth.tmc.edu (Passaro, Antony D) Date: Wed, 20 Jul 2011 16:00:45 -0500 Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment In-Reply-To: References: Message-ID: I apologize for not consulting the Fieldtrip website sooner. A search for "mex" turned up both an FAQ (unfortunately did not resolve the issue) and a development about MEX files where I found the following command which resolved the issue: ft_compile_mex(true) -Tony -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Passaro, Antony D Sent: Wednesday, July 20, 2011 11:37 AM To: Email discussion list for the FieldTrip project Subject: [FieldTrip] Matlab crashes after calling ft_volumesegment Hi all, After installing the latest version of Fieldtrip, I tried to make a template grid using identical code from the example from the Fieldtrip website and once I run the ft_volumesegment function, Matlab quickly crashes. I am running Matlab version 7.8 on a 64-bit linux computer. The system error says it detected a floating point exception and that the error was detected while a MEX-file was running. Has anyone else come across this issue? Thank you, -Tony _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Tim.Bardouille at nrc-cnrc.gc.ca Thu Jul 21 15:08:10 2011 From: Tim.Bardouille at nrc-cnrc.gc.ca (Bardouille, Tim) Date: Thu, 21 Jul 2011 09:08:10 -0400 Subject: [FieldTrip] Postdoc/Research Associate position in Halifax, NS, Canada Message-ID: Hello all, Please see the attached ad for a post-doctoral fellowship at the Laboratory for Clinical MEG in Halifax, Nova Scotia, Canada. Ours is a clinical research lab operated by the National Research Council - Institute for Biodiagnostics and embedded in Atlantic Canada's largest health centre. We look forward to hearing from interested candidates. Best regards, Tim Bardouille. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Halifax_postDoc_position.pdf Type: application/pdf Size: 158148 bytes Desc: Halifax_postDoc_position.pdf URL: From luoj at mail.nih.gov Thu Jul 21 15:48:47 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 21 Jul 2011 09:48:47 -0400 Subject: [FieldTrip] LCMV and SAM Message-ID: Hi, Regarding source modelling, I noticed there are options of LCMV and SAM in fieldtrip. Would anyone provide details on the differences between the two? Thanks, Jessie From yuvharpaz at gmail.com Thu Jul 21 21:14:16 2011 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Thu, 21 Jul 2011 22:14:16 +0300 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: Message-ID: Dear Jessie As far as I know only LCMV is applicable in current versions of fieldtrip. The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated. SAM can be run with executable files based on C source, written by Dr. Robinson. not via matlab or fieldtrip. yuval On 21 July 2011 16:48, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > Regarding source modelling, I noticed there are options of LCMV and SAM in > fieldtrip. Would anyone provide details on the differences between the two? > > Thanks, > Jessie > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html *"Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams * -------------- next part -------------- An HTML attachment was scrubbed... URL: From luoj at mail.nih.gov Thu Jul 21 21:56:46 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Thu, 21 Jul 2011 15:56:46 -0400 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: , Message-ID: Hi Yuval, Thank you for replying! ----------------------- The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated ------------------------ I've like to learn more about this and pros and cons of them if possible. Jessie ________________________________________ From: Yuval Harpaz [yuvharpaz at gmail.com] Sent: Thursday, July 21, 2011 3:14 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] LCMV and SAM Dear Jessie As far as I know only LCMV is applicable in current versions of fieldtrip. The methods differ mainly in the way the correct orientation of dipoles on a grid of locations is estimated. SAM can be run with executable files based on C source, written by Dr. Robinson. not via matlab or fieldtrip. yuval On 21 July 2011 16:48, Luo, Jessie (NIH/NIMH) [V] > wrote: Hi, Regarding source modelling, I noticed there are options of LCMV and SAM in fieldtrip. Would anyone provide details on the differences between the two? Thanks, Jessie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- sent from my 4-year-old PC. poor fellow, only ipod classic, no mail there. Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html "Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans". Douglas Adams From mjutras at emory.edu Thu Jul 21 22:00:42 2011 From: mjutras at emory.edu (Jutras, Mike) Date: Thu, 21 Jul 2011 20:00:42 +0000 Subject: [FieldTrip] ft_freqstatistics error Message-ID: Hello, I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: % data variable 1 cnd1_1 = label: {'AD01'} freq: [1x15 double] time: [1x126 double] dimord: 'subj_chan_freq_time' powspctrm: [4-D double] cfg: [1x1 struct] >> size(cnd1_1.powspctrm) ans = 114 1 15 126 % data variable 2 cnd2_1 = label: {'AD01'} freq: [1x15 double] time: [1x126 double] dimord: 'subj_chan_freq_time' powspctrm: [4-D double] cfg: [1x1 struct] >> size(cnd2_1.powspctrm) ans = 114 1 15 126 % code for permutation test cfg cfg = []; cfg.channel = 'AD01'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'no'; cfg.avgovertime = 'no'; cfg.latency = 'all'; cfg.frequency = 'all'; %cfg.frequency = 'all'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; dum = ones(1, size(cnd1_1.powspctrm,1)); cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.alpha = 0.05; cfg.tail = 0; cfg.ivar = 1; cfg.uvar = 2; cfg.feedback = 'text'; cfg.clusterstatistic = 'maxsum'; cfg.clusterthreshold = 'parametric'; %cfg.clusterthreshold = 'nonparametric_common'; cfg.clusteralpha = 0.05; % clustercritval original value: 1.96 cfg.clustercritval = 1.96; cfg.clustertail = 0; cfg.neighbours{1}.label = 'AD01'; cfg.neighbours{1}.neighblabel = {}; >> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); computing statistic over the frequency range [2.058 29.950] computing statistic over the time range [-1.000 0.250] selection powspctrm along dimension 2 selection powspctrm along dimension 3 selection powspctrm along dimension 4 selection powspctrm along dimension 2 selection powspctrm along dimension 3 selection powspctrm along dimension 4 ??? Error using ==> ft_freqstatistics at 248 the number of observations in the design does not match the number of observations in the data Thanks for any advice, Michael -- Michael Jutras, Ph.D. Postdoctoral fellow Emory University, Yerkes National Primate Research Center 404-712-9435 ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). From jm.horschig at donders.ru.nl Thu Jul 21 22:33:20 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 21 Jul 2011 22:33:20 +0200 Subject: [FieldTrip] ft_freqstatistics error In-Reply-To: References: Message-ID: <4E288D10.3060500@donders.ru.nl> Hi Mike, I think that the problem is caused by the multidimensionality of your freq-data. If you want to cover a whole frequency range, you cannot use 15 different bins but have to work with multitapers instead and utilize how they smooth the frequencies, e.g. if you are interested in gamma-band activity between 60 and 120Hz, you use 90Hz (cfg.foi) and 30Hz smoothing (cfg.tapsmofrq). I think this is also explained in one of the tutorials on the FT wiki, so you might want to have a look there. Best, Jörn On 7/21/2011 10:00 PM, Jutras, Mike wrote: > Hello, > > I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: > > % data variable 1 > cnd1_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd1_1.powspctrm) > ans = > 114 1 15 126 > > % data variable 2 > cnd2_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd2_1.powspctrm) > ans = > 114 1 15 126 > > % code for permutation test cfg > cfg = []; > cfg.channel = 'AD01'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgovertime = 'no'; > > cfg.latency = 'all'; > cfg.frequency = 'all'; > %cfg.frequency = 'all'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > > dum = ones(1, size(cnd1_1.powspctrm,1)); > cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.ivar = 1; > cfg.uvar = 2; > cfg.feedback = 'text'; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'parametric'; > %cfg.clusterthreshold = 'nonparametric_common'; > cfg.clusteralpha = 0.05; > % clustercritval original value: 1.96 > cfg.clustercritval = 1.96; > cfg.clustertail = 0; > cfg.neighbours{1}.label = 'AD01'; > cfg.neighbours{1}.neighblabel = {}; > > >>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); > computing statistic over the frequency range [2.058 29.950] > computing statistic over the time range [-1.000 0.250] > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > ??? Error using ==> ft_freqstatistics at 248 > the number of observations in the design does not match the number of observations in the data > > Thanks for any advice, > Michael > -- > Michael Jutras, Ph.D. > Postdoctoral fellow > Emory University, Yerkes National Primate Research Center > 404-712-9435 > > > > > ________________________________ > > This e-mail message (including any attachments) is for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution > or copying of this message (including any attachments) is strictly > prohibited. > > If you have received this message in error, please contact > the sender by reply e-mail message and destroy all copies of the > original message (including attachments). > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mjutras at emory.edu Thu Jul 21 23:04:01 2011 From: mjutras at emory.edu (Jutras, Mike) Date: Thu, 21 Jul 2011 21:04:01 +0000 Subject: [FieldTrip] ft_freqstatistics error In-Reply-To: <4E288D10.3060500@donders.ru.nl> References: <4E288D10.3060500@donders.ru.nl> Message-ID: Jörn, I found the problem (which your answer led me to): the frequency bins did not match up between the two data structures, but after fixing them so they matched, the function ran without error. I had spaced the frequency bins far enough apart to account for the smoothing due to the multitapering, but I wanted to run the permutation test with multiple bin centers as I had done previously with an older version of freqstatistics. Thanks for your help! -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of "Jörn M. Horschig" Sent: Thursday, July 21, 2011 4:33 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_freqstatistics error Hi Mike, I think that the problem is caused by the multidimensionality of your freq-data. If you want to cover a whole frequency range, you cannot use 15 different bins but have to work with multitapers instead and utilize how they smooth the frequencies, e.g. if you are interested in gamma-band activity between 60 and 120Hz, you use 90Hz (cfg.foi) and 30Hz smoothing (cfg.tapsmofrq). I think this is also explained in one of the tutorials on the FT wiki, so you might want to have a look there. Best, Jörn On 7/21/2011 10:00 PM, Jutras, Mike wrote: > Hello, > > I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like: > > % data variable 1 > cnd1_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd1_1.powspctrm) > ans = > 114 1 15 126 > > % data variable 2 > cnd2_1 = > label: {'AD01'} > freq: [1x15 double] > time: [1x126 double] > dimord: 'subj_chan_freq_time' > powspctrm: [4-D double] > cfg: [1x1 struct] > >>> size(cnd2_1.powspctrm) > ans = > 114 1 15 126 > > % code for permutation test cfg > cfg = []; > cfg.channel = 'AD01'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgovertime = 'no'; > > cfg.latency = 'all'; > cfg.frequency = 'all'; > %cfg.frequency = 'all'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > > dum = ones(1, size(cnd1_1.powspctrm,1)); > cfg.design = [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)]; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.ivar = 1; > cfg.uvar = 2; > cfg.feedback = 'text'; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'parametric'; > %cfg.clusterthreshold = 'nonparametric_common'; > cfg.clusteralpha = 0.05; > % clustercritval original value: 1.96 > cfg.clustercritval = 1.96; > cfg.clustertail = 0; > cfg.neighbours{1}.label = 'AD01'; > cfg.neighbours{1}.neighblabel = {}; > > >>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1); > computing statistic over the frequency range [2.058 29.950] > computing statistic over the time range [-1.000 0.250] > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > selection powspctrm along dimension 2 > selection powspctrm along dimension 3 > selection powspctrm along dimension 4 > ??? Error using ==> ft_freqstatistics at 248 > the number of observations in the design does not match the number of observations in the data > > Thanks for any advice, > Michael > -- > Michael Jutras, Ph.D. > Postdoctoral fellow > Emory University, Yerkes National Primate Research Center > 404-712-9435 > > > > > ________________________________ > > This e-mail message (including any attachments) is for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution > or copying of this message (including any attachments) is strictly > prohibited. > > If you have received this message in error, please contact > the sender by reply e-mail message and destroy all copies of the > original message (including attachments). > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jedmeltzer at yahoo.com Thu Jul 21 23:21:21 2011 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Thu, 21 Jul 2011 14:21:21 -0700 (PDT) Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: Message-ID: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> Without getting into software implementation questions (basically fieldtrip has LCMV, and CTF software has SAM) I think the main difference is that LCMV is a "vector" beamformer.  At any given location, it estimates a virtual signal in all three spatial dimensions (or only two if you constrain it to tangential sources, which makes sense for MEG but not for EEG). So you have three virtual signals at each point, and how you combine them is up to you - take the biggest one, or the magnitude of the whole vector, or any other combination.  I'm not sure what the default for power mapping is in fieldtrip (I have mainly used SAM for beamforming so far, but I use fieldtrip for other purposes). SAM has an extra step involved where it "optimizes" a dipole orientation at each location to maximize the signal, so you only get one signal at each location.  In this sense it's nonlinear.  The calculation is more complex due to the optimization, but the result is simpler to deal with.  This is called a "scalar" beamformer.  For pros and cons, you might look up papers on vector vs. scalar beamformers in general.  Here's one recent one that I saw that compared them and has further references: Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of hippocampal activity using beamformers with MEG: a detailed investigation using simulations and empirical data." Hum Brain Mapp 32(5): 812-827. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Fri Jul 22 08:26:04 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 22 Jul 2011 08:26:04 +0200 Subject: [FieldTrip] LCMV and SAM In-Reply-To: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> References: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com> Message-ID: Hi all, As of June 6, 2011 'beamformer_sam' was put back into the Fieldtrip toolbox (after it had gone missing for some time), although, a warning that it has been awhile since the code was tested. I think there are other differences than just the orientation selection (between the original-CTF SAM and LCMV in FT), although that is a large part of it. Note the 'fixedori' option in both FT functions (beamformer_sam and beamformer_lcmv). If set to 'yes' in beamformer_lcmv, it will give a scalar output (similar, maybe equivalent, to fixedori='robert' output in beamformer_sam), both which use SVD to find the orientation. (Default for 'fixedori' in beamformer_lcmv is 'no' so will give a vector output by default). The default option for 'fixedori' in beamformer_sam is 'spinning' which is the method described by Jed, and I think is what matches the CTF implementation. Cheers, Johanna On 21 July 2011 23:21, Jed Meltzer wrote: > Without getting into software implementation questions (basically fieldtrip > has LCMV, and CTF software has SAM) I think the main difference is that LCMV > is a "vector" beamformer. At any given location, it estimates a virtual > signal in all three spatial dimensions (or only two if you constrain it to > tangential sources, which makes sense for MEG but not for EEG). So you have > three virtual signals at each point, and how you combine them is up to you - > take the biggest one, or the magnitude of the whole vector, or any other > combination. I'm not sure what the default for power mapping is in > fieldtrip (I have mainly used SAM for beamforming so far, but I use > fieldtrip for other purposes). > > SAM has an extra step involved where it "optimizes" a dipole orientation at > each location to maximize the signal, so you only get one signal at each > location. In this sense it's nonlinear. The calculation is more complex > due to the optimization, but the result is simpler to deal with. This is > called a "scalar" beamformer. For pros and cons, you might look up papers > on vector vs. scalar beamformers in general. Here's one recent one that I > saw that compared them and has further references: > > Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of > hippocampal activity using beamformers with MEG: a detailed investigation > using simulations and empirical data." Hum Brain Mapp *32*(5): 812-827. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cas243 at georgetown.edu Sat Jul 23 02:12:26 2011 From: cas243 at georgetown.edu (Clara A. Scholl) Date: Fri, 22 Jul 2011 20:12:26 -0400 Subject: [FieldTrip] Extracting a timecourse from cluster of channels Message-ID: Hi, I am using fieldtrip's cluster-based permutation test to identify a significant channel-time cluster showing an effect. Now I would like to extract a timecourse averaged over these channels (for the purpose of comparing different conditions, not used to generate the cluster), but I'm not sure if it makes sense to do so because the channels belonging to the cluster change over time -- would the timecourse have contributions from different channels at different time points? Do I need to limit my cluster to fixed channels across time? (And if so, how do I do that?) Thanks! Clara From luoj at mail.nih.gov Sat Jul 23 18:34:01 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Sat, 23 Jul 2011 12:34:01 -0400 Subject: [FieldTrip] LCMV and SAM In-Reply-To: References: <1311283281.40296.YahooMailNeo@web120524.mail.ne1.yahoo.com>, Message-ID: Thanks Jed and Johanna for your input. Jessie ________________________________________ From: Johanna Zumer [johanna.zumer at donders.ru.nl] Sent: Friday, July 22, 2011 2:26 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] LCMV and SAM Hi all, As of June 6, 2011 'beamformer_sam' was put back into the Fieldtrip toolbox (after it had gone missing for some time), although, a warning that it has been awhile since the code was tested. I think there are other differences than just the orientation selection (between the original-CTF SAM and LCMV in FT), although that is a large part of it. Note the 'fixedori' option in both FT functions (beamformer_sam and beamformer_lcmv). If set to 'yes' in beamformer_lcmv, it will give a scalar output (similar, maybe equivalent, to fixedori='robert' output in beamformer_sam), both which use SVD to find the orientation. (Default for 'fixedori' in beamformer_lcmv is 'no' so will give a vector output by default). The default option for 'fixedori' in beamformer_sam is 'spinning' which is the method described by Jed, and I think is what matches the CTF implementation. Cheers, Johanna On 21 July 2011 23:21, Jed Meltzer > wrote: Without getting into software implementation questions (basically fieldtrip has LCMV, and CTF software has SAM) I think the main difference is that LCMV is a "vector" beamformer. At any given location, it estimates a virtual signal in all three spatial dimensions (or only two if you constrain it to tangential sources, which makes sense for MEG but not for EEG). So you have three virtual signals at each point, and how you combine them is up to you - take the biggest one, or the magnitude of the whole vector, or any other combination. I'm not sure what the default for power mapping is in fieldtrip (I have mainly used SAM for beamforming so far, but I use fieldtrip for other purposes). SAM has an extra step involved where it "optimizes" a dipole orientation at each location to maximize the signal, so you only get one signal at each location. In this sense it's nonlinear. The calculation is more complex due to the optimization, but the result is simpler to deal with. This is called a "scalar" beamformer. For pros and cons, you might look up papers on vector vs. scalar beamformers in general. Here's one recent one that I saw that compared them and has further references: Quraan, M. A., S. N. Moses, et al. (2011). "Detection and localization of hippocampal activity using beamformers with MEG: a detailed investigation using simulations and empirical data." Hum Brain Mapp 32(5): 812-827. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Panagiotis.Tsiatsis at Tuebingen.MPG.de Mon Jul 25 21:31:03 2011 From: Panagiotis.Tsiatsis at Tuebingen.MPG.de (Panagiotis Tsiatsis) Date: Mon, 25 Jul 2011 21:31:03 +0200 Subject: [FieldTrip] Any tips for unsupervised (sic) ICA ECG / EOG component rejection? Message-ID: <4E2DC477.1050705@Tuebingen.MPG.de> Dear all, I am using ICA with fieldtrip and eeglab in order to remove ECG components from my CTF MEG data. I have a separate EKG channel just like in the wonderful fieldtrip tutorial as well as vertical and horizontal EOG channels. The question is a rather practical one: Some times I have to reanalyze my data (different filtering, trial duration settings etc.) and because I have something like 30 subject with 10 sessions of ~7mins each, it is kind of time consuming to redo the ICA component rejection manually each time. *Of course eventually this has to be done by inspecting the components*, but I was just wondering whether I could use some kind of automatized criterion until I reach this level where I can say that I do not need to apply ICA again and therefore I will do the rejection manually. So please excuse my audacity to talk about automation in a procedure which is traditionally considered "supervised". A. Concerning ICA ECG artifact removal, I have the following questions: So, I will just describe you a couple of ideas for heuristics and a few concerns so that maybe you could tell me how (in)sane they sound to you, as I have little experience with ICA. 1. One criterion could be to use the average absolute value of coherence of each component when compared to the ECG channels (as calculated in the fieldtrip ECG removal tutorial) within a certain and predefined range of frequncies. In my case I used the range of [2-40]Hz. Then I convert all the "scores" to z-values and set a threshold of 3-4 to identify components that are highly coherent with the ECG . Of course, this z -value threshold (and all the z-scores) depends on all components so I am not sure whether it is a criterion that can be fully justified. 2. Similarly to (1), another criterion could be the absolute value of the correlation in time of the ECG channel to all the other components. Maybe here the frequency range should be restricted as well. Again, the absolute correlation values would be transformed to z-scores and the artifactual components would be selecting based on a z-value threshold. I am just not sure whether correlation has to offer something complementary to coherence in this case. 3. A third criterion would be the combination of 1 and 2 - calculate z-values for coherence and correlation and then reject the intersection of the components marked as artifactuals from both 1 and 2. This might be a bit conservative, especially because the correlation criterion does not seem as robust as the coherence criterion. [Of course the rejected components would have to be evaluated a-posteriori in any case.] On another note, my biggest concern at the time, stemming from the incomplete understanding of ICA and the use of an automated procedure, is the following: Let's say that in the decomposition, the ECGconsists of 2 (or 3 sometimes) components. The question is whether removing one component of the ECG only (the most prominent one) can actually do more harm that good since (and please correct me if I am wrong because I am not very confident here) the components that when appropriately combined according to the the mixing matrix would result in the ECG artifact might contain parts that "cancel out" when combined together. Therefore, if not all the "real" components that would constitute the ECG artifact are removed, there might be "artificial" deflections that are removed along with the most prominent component, which would alter the data and induce again artifacts. I know that the way that I am phrasing this is not really clear and I might have misunderstood the mechanics of ICA so please feel free to correct me. B. Concerning ICA EOG artifact removal, I wanted to ask you whether there is any way to apply similar techniques as the ones that you apply for ICA ECG removal to EOG components (i.e. the coherence criterion)? I tried to apply the coherence criterion by using the ft_artifact_eog function to detect the eyeblinks, followed by alignment of the detected EOG artifacts in the EOG channel (after extending them so that they have the same length) and their averaging in order to calculate the coherence of this "average" EOG blink to each of the ICA components. It seemed to kind of work for the few datasets that I tried but it was not as robust as the ECG method - one of the reasons for this might be the variability of the blink types (ie. vertical blinks of different speed/duration and "depth", the existence of horizontal eye movements and the non-orthogonality of horizontal and vertical EOG traces etc.) Any intuitions again on this would be really useful. My final question would be whether you think that it could be possible to improve things in terms of unsupervised artifact rejection via ICA? Maybe having some spatial templates that resemble common artifacts with robust topology and comparing the topologies of the ICA components to these templates in terms of spatial correlation would be feasible? Apologies for raising so many issues in just one (rather long) e-mail, I am looking forward to hearing from you about your experience on the above issues. Thank you in advance! Kind Regards, Panagiotis -- Panagiotis S. Tsiatsis Max Planck Institute for Biogical Cybernetics Cognitive NeuroImaging Group Tuebingen, Germany From sherrykhan78 at gmail.com Tue Jul 26 20:25:40 2011 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 26 Jul 2011 14:25:40 -0400 Subject: [FieldTrip] Postdoctoral Fellowship: Multimodal Neuroimaging -MGH/Harvard Medical School Message-ID: Postdoctoral Fellowship: Multimodal Neuroimaging -MGH/Harvard Medical School Job Description A postdoctoral position is available with the TRANSCEND Research Program ( www.transcendresearch.org) at the Martinos Center for Biomedical Imaging in Charlestown, MA (www.martinos.org) which is affiliated with the Massachusetts General Hospital, Harvard Medical School and MIT. We are seeking a candidate with a strong basis in magnetic resonance imaging. Emphasis will be on MRI (DTI, spectroscopy, morphometry, ASL as well as resting state fMRI), and on co-registering MEG with MRI. This position will involve analysis of existing multimodal imaging data and collection of new data. The emphasis of the postdoctoral fellowship will be analysis of existing datasets with secondary activity in piloting data for new studies. It will involve working closely with a multidisciplinary team and with children, and will also involve some research oriented analysis of data collected for clinical purposes. After initial phase-in, ample opportunity will also be provided to the candidate to self-explore and lead research. Datasets to be analyzed include: MRI (including DTI and 1H-spectroscopy) and MEG data on 6-12 and teenage matched autism spectrum and control subjects with phenotyping data MRI data ( (morphometry, DTI, spectroscopy) plus laboratory and phenotyping data) on 70 children with autism plus epilepsy and/or mitochondrial dysfunction, along with one or more overnight EEGs on each patient data from children ages 2-10 with and without autism. Overall objectives: To perform multimodal analyses of research and clinical research data, to develop new approaches for performing these analyses, and to design pipelines for data analysis. To write papers and grants which will be high priorities all along the way and will be actively supported by senior faculty. To take advantage of the world class faculty and facilities of the Martinos Center for Biomedical Imaging to perform the above activities to their maximal potential. The program’s emphasis is on pathophysiologically grounded brain research and application of advanced imaging acquisition and analysis techniques to neurological and sensory aspects of autism spectrum disorders. Requirements: Candidates must have PhD in neuroscience, physics, biomedical engineering, electrical engineering, computer science or other related fields. Prior experience in MRI analysis is required. Experience with EEG will be an added advantage. Salary will be consistent with Massachusetts General Hospital, Harvard Medical School policies for Postdoctoral trainees and will range between $45,000 to $55,000 depending upon qualifications and experience. Compensation also includes full staff benefits, including health insurance, and vacation time. Contact: Interested applicants may send a CV and statement of interest addressing background and specific pertinence of the candidate’s interest to Dr. MarthaR. Herbert at mherbert1 at partners.org and cc transcend at partners.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Wed Jul 27 22:39:46 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Wed, 27 Jul 2011 16:39:46 -0400 Subject: [FieldTrip] Power analysis of resting state data Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> Hi Fieldtrip users- I am interested in calculating the Power of different frequency bands at each channel or in groups of channels during resting state. Since I don't have trials per se, and actually no triggers with which to define a period of time for analysis, I did not call ft_definetrial. Rather, I used ft_preprocessing with the information I usually put into ft_definetrial, including: cfg.dataset = 'dataset'; cfg.channel = {'MEG'}; cfg.continuous = 'yes'; cfg.detrend = 'yes'; cfg.dftfilter = 'yes'; cfg.dftfreq = [60 120 180]; cfg.method = 'channel'; Data = ft_preprocessing(cfg) The command window then indicates that it is processing each of the 275 channels. However, the output says: Data = hdr: [1x1 struct] label: {'MZP01'} time: {[1x21600 double]} trial: {[1x21600 double]} fsample: 1200 sampleinfo: [1 21600] grad: [1x1 struct] cfg: [1x1 struct] Calling ft_freqanalysis after that does a nice job of giving me the Power of frequency bands specified for one channel, which I assume is MZP01. Is there a way for me to do this and generate a matrix with such a calculation for each channel (eg 275x20)? Is there a way to specify groups of channels in a customized way, without relying on their names (I don't just want all Occipital, all Parietal, etc)? Thanks in advance for your help. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jul 28 08:06:50 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 28 Jul 2011 08:06:50 +0200 Subject: [FieldTrip] Power analysis of resting state data In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C057456B5F3@NIHMLBX10.nih.gov> Message-ID: Hi Beth, This sounds like a bug to me. There definitely should be more than one channel in your data structure, if the original dataset has 275. Could you check what happens when you call ft_preprocessing with no filter options etc., so just the following: cfg = []; cfg.dataset = 'dataset'; data = ft_preprocessing(cfg); Also, could you check whether the code you provided (so including the filter options again) does return anything if you leave out the 'cfg.continuous' option? Best, Eelke 2011/7/27 Belluscio, Beth (NIH/NINDS) [E] : > Hi Fieldtrip users- > >   I am interested in calculating the Power of different frequency bands at > each channel or in groups of channels during resting state. > > > >  Since I don’t have trials per se, and actually no triggers with which to > define a period of time for analysis, I did not call ft_definetrial. > Rather, I used ft_preprocessing with the information I usually put into > ft_definetrial, including: > >                 cfg.dataset = ‘dataset’; > >                 cfg.channel = {‘MEG’}; > >                 cfg.continuous = ‘yes’; > >                 cfg.detrend = ‘yes’; > >                 cfg.dftfilter = ‘yes’; > >                 cfg.dftfreq = [60 120 180]; > >                cfg.method = ‘channel’; > >                 Data = ft_preprocessing(cfg) > > The command window then indicates that it is processing each of the 275 > channels. > > However, the output says: > >                 Data = > >                                 hdr: [1x1 struct] > >                                 label: {‘MZP01’} > >                                 time: {[1x21600 double]} > >                                 trial: {[1x21600 double]} > >                                 fsample: 1200 > >                                 sampleinfo: [1 21600] > >                                 grad: [1x1 struct] > >                                 cfg: [1x1 struct] > > > > Calling ft_freqanalysis after that does a nice job of giving me the Power of > frequency bands specified for one channel, which I assume is MZP01. > > > > Is there a way for me to do this and generate a matrix with such a > calculation for each channel (eg 275x20)? > > Is there a way to specify groups of channels in a customized way, without > relying on their names (I don’t just want all Occipital, all Parietal, etc)? > > > > Thanks in advance for your help. > > Beth. > > > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From anna.lambrechts at gmail.com Thu Jul 28 11:32:29 2011 From: anna.lambrechts at gmail.com (Anna Lambrechts) Date: Thu, 28 Jul 2011 11:32:29 +0200 Subject: [FieldTrip] Group comparison statistics - ERF study Message-ID: Hi, I am trying to run a group comparison analysis on event-related fields data in a 2 (groups) x 2 (conditions) x 2 (response types) design. Is this possible at all with any fieldtrip script? As far as I know implemented statistics look at within-groups comparison. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Sat Jul 30 15:31:11 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Sat, 30 Jul 2011 15:31:11 +0200 Subject: [FieldTrip] Extracting a timecourse from cluster of channels In-Reply-To: References: Message-ID: <038801cc4ebc$f27edbc0$d77c9340$@maris@donders.ru.nl> Dear Clara, > I am using fieldtrip's cluster-based permutation test to identify a > significant channel-time cluster showing an effect. Now I would like > to extract a timecourse averaged over these channels (for the purpose > of comparing different conditions, not used to generate the cluster), > but I'm not sure if it makes sense to do so because the channels > belonging to the cluster change over time -- would the timecourse have > contributions from different channels at different time points? Do I > need to limit my cluster to fixed channels across time? (And if so, > how do I do that?) Yes, you should fix channels across time. The most important point in selecting the channels is finding evidence for the fact that the channels reflects a single source only. This is not a statistical issue, and therefore there is not a p-value that can guide you in this choice. If you have collected MEG data, the best evidence is a dipolar topography of your effect. Best, Eric Maris > > Thanks! > Clara > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at donders.ru.nl Sat Jul 30 20:45:12 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Sat, 30 Jul 2011 20:45:12 +0200 Subject: [FieldTrip] Group comparison statistics - ERF study In-Reply-To: References: Message-ID: <03a601cc4ee8$d152b760$73f82620$@maris@donders.ru.nl> Hi Anna, You can compare the two groups with respect to any linear combination that can be formed using the observations in the 2 (conditions) x 2 (response types) within-UO design. For testing interaction effects, these linear combinations are the usual contrasts. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Anna Lambrechts Sent: donderdag 28 juli 2011 11:32 To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Group comparison statistics - ERF study Hi, I am trying to run a group comparison analysis on event-related fields data in a 2 (groups) x 2 (conditions) x 2 (response types) design. Is this possible at all with any fieldtrip script? As far as I know implemented statistics look at within-groups comparison. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at gmx.de Sun Jul 31 13:33:15 2011 From: paul_c at gmx.de (Paul Czienskowski) Date: Sun, 31 Jul 2011 13:33:15 +0200 Subject: [FieldTrip] Auditory N1 Localization Message-ID: <4E353D7B.4000009@gmx.de> Dear all, I am trying to localize auditory evoked N1 peaks with the ft_dipolefitting function and BEM models. Occasionally the fit performed quite well, in particular with the individual models, but sometimes it did not. I have found about a quarter of the fits with the individual models being quite insensible and about the half of the fits with an standard model. Insensible means either pairs of symmetric dipoles at virtually the same place or dipoles way too far away from the expected positions. I have executed the fit with a grid defined by the grey matter from the SPM segmentations, restricted to one half of the interesting area - for I am fitting symmetric dipoles. And I used the subsequent non-linear search. I would appreciate if someone had some idea on how I might increase the yield of the fitting. Best regards and thanks in advance, Paul Czienskowski -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772