From zaifengg at GMAIL.COM Sun Jan 3 14:50:17 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Sun, 3 Jan 2010 15:50:17 +0200 Subject: Questions on scalp current density (SCD) for MEG data Message-ID: Hi there, I am now trying to check the scalp current density (SCD) on my MEG data by Fieldtrip. And we find a script named scalpcurrentdensity in the Fieldtrip folder. However, this script only fits for EEG data, which is claimed clearly in the script. So I wonder whether I can use SCD for MEG data? And more specifically, if I can check the SCD on the MEG data by using the current script in Fieldtrip, what kind of change should I do to the scalpcurrentdensity script (currently I just change the parameters 'ismeg' as 'yes', it also runs for MEG data, but I am not sure whether it is right)? Thanks a lot! Zaifeng Gao Post-doc Hebrew University of Jerusalem ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Mon Jan 4 09:43:50 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 4 Jan 2010 09:43:50 +0100 Subject: freqanalysis & cfg.channel In-Reply-To: <6000e5f6b659a.4b309c01@mail.nyu.edu> Message-ID: Hi Akiko, I've had a quick look through the code and currently rejection of channels by channel-numbers (e.g. '-1') instead of channels names (e.g. '-P3') is not supported. No channels are actually being rejected if you use '-1' (which is why your first channel is still noisy). The rejection should work if you use the channel name itself. On the topic of when to reject channels, personally I do this before re-preprocessing my data (e.g. preprocess the data, do artifact rejection, and remove channels for subsequent re-preprocessing) using cfg.channel. You could however also do this in e.g. freqanalysis, or in the plotting phase as you did. Personally I like to be absolutely sure I don't accidentally include (really) bad channels in over-channel comparisons/averages/etc., which is why I remove them in the earliest phase possible. Hope this is still of some use after the holidays. Best, Roemer Akiko Ikkai wrote: > Hi, > > I'm trying to run TFR on MEG data and plot the results, and getting puzzling figures. > > Both freqanalysis and multiplotTFR run fine, and figures are produced, but the first channel (first channel in ft_data.label) is always extremely noisy (barely changing from the baseline, but showing random patches of activations across time and freq). When I take out that channel with > > cfg.channel = {'all','-1'}; % when the first channel is noisy > > the second channel (now the first in label) shows the same trend, if I take out the second, the third one is bad, etc... Other channels don't seem to be affected. > > I'm pasting my code during this process below. Can anyone tell me what might be going wrong, and when the best point to delete bad channels? > > Thanks in advance, Akiko > > %%% to run freq analysis %%% > cfg.output = 'pow'; > > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 4:2:50; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > cfg.toi = -.5:0.05:2; > cfg.channel = {'all','-1'}; % when the first channel is noisy > > TFRhann_Rvalid = freqanalysis(cfg, Rvalid); > > cfg = []; > cfg.baseline = [-.1 0]; > cfg.baselinetype = 'relative'; > cfg.xlim = [-0.1 1.2]; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure(1);clf > cfg.ylim = [5 50]; > cfg.zlim = [0 2]; > multiplotTFR(cfg, TFRhann_Rvalid); % after importing channel layout > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Curran at COLORADO.EDU Wed Jan 6 02:18:59 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Tue, 5 Jan 2010 18:18:59 -0700 Subject: cluster-based permutation tests on single subjects Message-ID: I have a few related questions about Maris and Oostenveld's (2007) method for cluster-based permutation tests, in particular using an indepsamplesT statistic in a between-trials design on single subjects. 1. Is it problematic to have very different numbers of trials within each condition? 2. Any advice for calculating statistical power for different numbers of trials within each condition? 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, Karvanen, & Shishkin, 2005) to remove outliers prior to analysis? Any advice would be much appreciated. thanks Tim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Jan 6 10:29:14 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 6 Jan 2010 10:29:14 +0100 Subject: cluster-based permutation tests on single subjects In-Reply-To: Message-ID: Hi Tim, > I have a few related questions about Maris and Oostenveld's (2007) method for > cluster-based permutation tests, in particular using an indepsamplesT statistic in a > between-trials design on single subjects. > 1. Is it problematic to have very different numbers of trials within each condition? No, it is not. > 2. Any advice for calculating statistical power for different numbers of trials within > each condition? I'm not sure whether I understand what you mean. Anyhow, analytical statistical power calculation (as is possible for T-tests and anovas) are not possible for permutation tests. However, one can obtain Monte Carlo estimates of power using simulations under the alternative hypothesis. > 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, Karvanen, & > Shishkin, 2005) to remove outliers prior to analysis? This may increase your sensitivity. However, to obtain sound p-values, you must do trimming in a way that does not induce differences between the experimental conditions. Best, Eric Maris > > Any advice would be much appreciated. > thanks > Tim > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Wed Jan 6 12:32:14 2010 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Wed, 6 Jan 2010 11:32:14 +0000 Subject: cluster-based permutation tests on single subjects In-Reply-To: Message-ID: Hey Tim, trimming may improve the power of your statistics. However, after trimming, the degrees of freedom and the standard error of the T statistics need to be adjusted. This is because after trimming the remaining data points are no longer independent. The standard error of the trimmed mean is related to the winsorised variance, not the variance. The Yuen t-test on trimmed means is described here: Wilcox, R. R. (2005). Introduction to Robust Estimation and Hypothesis Testing (2nd Ed. ed.): Academic Press. Wilcox, R. R., & Keselman, H. J. (2003). Modern robust data analysis methods: measures of central tendency. Psychol Methods, 8(3), 254-274. Wilcox has validated a bootstrap trimmed mean t-test technique in which [1] the data are centred so that each condition has a trimmed mean of zero, [2] trials are sampled with replacement from each condition independently, [3] a t-test to compare trimmed means is computed, [4] the t-test obtained for the original data is compared to the distribution of t values obtained under the null hypothesis. Best, GAR Note On 6 Jan 2010, at 01:18, Tim Curran wrote: > I have a few related questions about Maris and Oostenveld's (2007) > method for cluster-based permutation tests, in particular using an > indepsamplesT statistic in a between-trials design on single subjects. > 1. Is it problematic to have very different numbers of trials within > each condition? > 2. Any advice for calculating statistical power for different > numbers of trials within each condition? > 3. Might it be advisable to somehow trim the trials (e.g., > Leonowicz, Karvanen, & Shishkin, 2005) to remove outliers prior to > analysis? > > Any advice would be much appreciated. > thanks > Tim > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ************************************************************************************ Guillaume A. Rousselet, Ph.D. Lecturer, associate editor for Frontiers in Perception Science Centre for Cognitive Neuroimaging (CCNi) Department of Psychology Faculty of Information & Mathematical Sciences (FIMS) University of Glasgow 58 Hillhead Street Glasgow, UK G12 8QB The University of Glasgow, charity number SC004401 http://web.me.com/rousseg/GARs_website/ Email: g.rousselet at psy.gla.ac.uk Fax. +44 (0)141 330 4606 Tel. +44 (0)141 330 6652 Cell +44 (0)791 779 7833 “Computers in the future may weigh no more than 1.5 tons.” Popular Mechanics, 1949 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Curran at COLORADO.EDU Wed Jan 6 14:36:10 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Wed, 6 Jan 2010 06:36:10 -0700 Subject: cluster-based permutation tests on single subjects In-Reply-To: <6F4509ADF940415E80B9295D516763F4@ru42146fac3249> Message-ID: Hi Eric, Thanks for the speedy reply! Restating my second question more simply, I am wondering how I can determine if I have enough trials in each condition. thanks Tim On Jan 6, 2010, at 2:29 AM, Eric Maris wrote: > Hi Tim, > > > >> I have a few related questions about Maris and Oostenveld's (2007) method > for >> cluster-based permutation tests, in particular using an indepsamplesT > statistic in a >> between-trials design on single subjects. >> 1. Is it problematic to have very different numbers of trials within each > condition? > > No, it is not. > >> 2. Any advice for calculating statistical power for different numbers of > trials within >> each condition? > > I'm not sure whether I understand what you mean. Anyhow, analytical > statistical power calculation (as is possible for T-tests and anovas) are > not possible for permutation tests. However, one can obtain Monte Carlo > estimates of power using simulations under the alternative hypothesis. > > >> 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, > Karvanen, & >> Shishkin, 2005) to remove outliers prior to analysis? > > This may increase your sensitivity. However, to obtain sound p-values, you > must do trimming in a way that does not induce differences between the > experimental conditions. > > > Best, > > Eric Maris > > > > >> >> Any advice would be much appreciated. >> thanks >> Tim >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zhang470 at UMN.EDU Thu Jan 7 00:42:14 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Thu, 7 Jan 2010 00:42:14 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: Hi, Fieldtrip experts. I encountered a problem with read_event.m for preprocessing Neuromag-122 data. There was no such problem for Neuromag-306 data. Unlike the Neuromag-306, the triggers for Neuromag-122 were analog signals distributed over several channels with labels that began with "STI". In my case, STI 001 ~ STI 006 were triggers for stimuli of the .fif file. STI 015 and STI 016 were triggers for behavioral responses. The MNE package has a routine function, "mne_make_combined_event_file.m", to extract the Neuromag-122 triggers and save the events as a separate fiff file. BESA can also read the Neuromag122 data with no problem. Supposedly, read_event.m in Fieldtrip has similar capability, but it was somehow stuck in reading the events in my Neuromag-122 data. Example raw data (183M) can be downloaded here: http://www.tc.umn.edu/~zhanglab/Neuromag122 Your help is greatly appreciated. Yang ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jan 7 11:19:09 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 7 Jan 2010 11:19:09 +0100 Subject: eeg_leadfield4_prepare In-Reply-To: Message-ID: It was indeed missing from the release version. I have added it and it will be included in this evening version on th eftp. best Robert On 22 Dec 2009, at 5:19, Chun-Wei Lee wrote: > Hi, > > I am using the prepare_leadfield() following the toturial "Use your > own > forward leadfield model in an inverse beamformer computation" > > but i have faced the problem that when i execute > > grid = prepare_leadfield(cfg); > > and I can't find eeg_leadfield4_prepare(), > I check the file I download and I can't find this function > I guess I ignore some step... > can anyone tell me what is going on? > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Roman.Freunberger at SBG.AC.AT Thu Jan 7 11:44:50 2010 From: Roman.Freunberger at SBG.AC.AT (Roman Freunberger) Date: Thu, 7 Jan 2010 11:44:50 +0100 Subject: Beamformer and EEG Message-ID: Dear all, Is there a way to perform source analyses from EEG data without having MRI scans from the subjects? I am not sure of how to create the headmodel and the leadfield matrix without individual scans. Thank you in advance, Roman ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhang470 at UMN.EDU Fri Jan 8 07:43:28 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Fri, 8 Jan 2010 07:43:28 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: More details for Fieldtrip developers: I tried modifying read_event.m for my Neuromag-122 data as follows for the Neuromag part since Neuromag 122 is a pretty old system. ... if isempty(binaryindx)&&isempty(analogindx) analog ={'STI 001', 'STI 002', 'STI 003', 'STI 004', 'STI 005','STI 006'}; analogindx = match_str(hdr.label, analog); end ... if ~isempty(analogindx) trigger = read_trigger(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', flt_minsample, 'endsample', flt_maxsample, 'chanindx', analogindx, 'detectflank', detectflank, 'trigshift', trigshift, 'fixneuromag', 1); event = appendevent(event, trigger); end ... I also tried the default to be neuromag_MEX instead of neuromag_MNE to deal with the triggers. analogindx properly extracted the designated channels for triggers. The problem seems to be at read_trigger.m and the fixneuromag option. In read_trigger.m, all triggers for Neuromag smaller than 5 are excluded when fixneuromag = 1. This is clearly not applicable to the Neuromag-122 data set - the common triggers were 1 to 6 for Neuromag-122 system. Regardless of whether I set fixneuromag to 1 or 0, regardless of whether I use neuromag_MNE or neuromag_mex, the resulting events for read_event.m did not look right. I tried to rewrite the read_trigger.m, but I knew other ways that worked for me. I could avoid using fieldtrip. Jensen's 4D toolbox (in combination with Uutela's fiff access) and the MNEsuite package both worked fine for my dataset. If possible, I would like to apply Fieldtrip for my data analysis. Fieldtrip appears to be very powerful and appealing - it worked with all other data formats for both EEG and MEG that I have tested so far. Thank you very much for your attention. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zhang470 at UMN.EDU Fri Jan 8 21:00:45 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Fri, 8 Jan 2010 21:00:45 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: Problem solved. I went through all the relevant files for the events in 4D toolbox, MNE, and fieldtrip and realized that read_trigger.m must be revised for my Neuromag-122 dataset. The threshold value 5 for fixneuromag as suggested by Joachim Gross for read_trigger.m did not work for my data. I noticed that the default threshold for detecting triggers was set at 0.1 in the MNE package, and the threshold was set at 2 in Jensen's 4D toolbox for detecting the events in the STI channels for Neuromag-122. In my dataset, the recorded amplitudes for the triggers were about 4.98, and the noise floor in the STI channels were smaller than 0.01. Because of the way the triggers were set up for Neuromag 122, the section for "switch detectflank" in read_trigger.m need to be bypassed. For a simple solution, I just used Hamalainen's mne_make_combined_ event_file.m in extracting the triggers and feed those parameters for event.type, event.sample, and event.value. Yang ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Mon Jan 11 14:24:51 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Mon, 11 Jan 2010 14:24:51 +0100 Subject: loreta.m missing Message-ID: Dear Fieldtrippers, loreta.m seems to be missing from the releases for quite a while (at least since Dec. 2008), altough it's called from sourceananalysis. Maybe it could be included again? Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 336 bytes Desc: not available URL: From christine.gruetzner at GOOGLEMAIL.COM Mon Jan 11 15:55:43 2010 From: christine.gruetzner at GOOGLEMAIL.COM (Christine Gruetzner) Date: Mon, 11 Jan 2010 15:55:43 +0100 Subject: Minimum norm analysis for timelock-data Message-ID: Dear Fieldtrippers, I still have this problem with performing source analysis (minimum norm estimate) on timelockdata. As already mentioned, the main problem occurs in sourcegrandaverage, probably because the output data from source analysis (using cfg.method = 'mne' on timelock data) contain an avg.pow field with the dimensions 4560x211 for each subject, where 211 is the number of time samples. I have tried several things to avoid the problem with sourcegrandaverage, but there are always new problems; for example, when I put the source data directly into sourcestatistics, without using sourcegrandaverage, there is a problem with checkdata, saying that the function requires source or volume data as input. Computing the timelockdata only for a single latency results in a problem in source analysis ('error in minimumnormestimate at 143, mom = w*dat). Does anyone have a script for computing MNE on timelockdata that works?! I would be very glad if someone could help me out with this problem! Thanks and Best Christine -- Christine Grützner, geb.Tillmann Max-Planck-Institut für Hirnforschung Abt. Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Germany Phone: +49 (0)69/6301-83225 E-Mail: tillmann at mpih-frankfurt.mpg.de http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Mon Jan 11 16:12:46 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 11 Jan 2010 16:12:46 +0100 Subject: Minimum norm analysis for timelock-data In-Reply-To: <841d3141001110655t1dbf6c77k126ed07d0ed66d02@mail.gmail.com> Message-ID: Dear Christine, > I still have this problem with performing source analysis (minimum norm estimate) on timelockdata. As already mentioned, the main problem occurs in sourcegrandaverage, probably because the output data from source analysis (using cfg.method = 'mne' on timelock data) contain an avg.pow field with the dimensions 4560x211 for each subject, where 211 is the number of time samples. i still have not fully understood your problem ... anyway ... if i recall correctly when using lcmv you get a vector of length(number_of_gridpoints) in the avg.pow field. the sample points are in avg.mom. why don't you try this: 1) add a avg.mom field with avg.mom = avg.pow 2) remove the avg.pow field (using rmfield ... or now ft_rmfield? :-)) 3) then call sourcedescriptives with cfg.projectmom='yes' otherwise run an lcmv beamformer and try sourcegrandaverage / sourcestatistics. if that works then compare your mne and lcmv source structures. best, nathan > > I have tried several things to avoid the problem with sourcegrandaverage, but there are always new problems; for example, when I put the source data directly into sourcestatistics, without using sourcegrandaverage, there is a problem with checkdata, saying that the function requires source or volume data as input. Computing the timelockdata only for a single latency results in a problem in source analysis ('error in minimumnormestimate at 143, mom = w*dat). > > Does anyone have a script for computing MNE on timelockdata that works?! I would be very glad if someone could help me out with this problem! > > Thanks and Best > Christine > > > -- > Christine Grützner, geb.Tillmann > Max-Planck-Institut für Hirnforschung > Abt. Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > Phone: +49 (0)69/6301-83225 > E-Mail: tillmann at mpih-frankfurt.mpg.de > http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Mon Jan 11 16:16:12 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Mon, 11 Jan 2010 16:16:12 +0100 Subject: Minimum norm analysis for timelock-data In-Reply-To: <841d3141001110655t1dbf6c77k126ed07d0ed66d02@mail.gmail.com> Message-ID: Computing MNE is apparently not something many people want to do with fieldtrip so it seems the implementation is still far from streamlined. For the time being, you could try a hack, which transforms your output into one which fieldtrip may swallow. I would suggest something like this: nvox = size(source.pos,1); mom = cell(1,nvox); for k = 1:length(source.inside) indx = source.inside(k); mom{indx} = source.avg.pow(xx,:); %I don't know whether avg.pow contains only the inside voxels, so xx could be either indx, or k. end source.avg.mom = mom; source.avg = rmfield(source.avg, 'pow'); I wonder whether it works after this... Best, JM PS: I would actually opt for improving fieldtrip's implementation and handling with MNE-estimates. Perhaps we could do this together? We can do this offline (not through the discussion list). Would it be possible to post some fieldtrip data-structure, along with the necessary accessories (grids, vols etc), as well as your script? On Jan 11, 2010, at 3:55 PM, Christine Gruetzner wrote: > Dear Fieldtrippers, > > I still have this problem with performing source analysis (minimum > norm estimate) on timelockdata. As already mentioned, the main > problem occurs in sourcegrandaverage, probably because the output > data from source analysis (using cfg.method = 'mne' on timelock > data) contain an avg.pow field with the dimensions 4560x211 for each > subject, where 211 is the number of time samples. > > I have tried several things to avoid the problem with > sourcegrandaverage, but there are always new problems; for example, > when I put the source data directly into sourcestatistics, without > using sourcegrandaverage, there is a problem with checkdata, saying > that the function requires source or volume data as input. Computing > the timelockdata only for a single latency results in a problem in > source analysis ('error in minimumnormestimate at 143, mom = w*dat). > > Does anyone have a script for computing MNE on timelockdata that > works?! I would be very glad if someone could help me out with this > problem! > > Thanks and Best > Christine > > > -- > Christine Grützner, geb.Tillmann > Max-Planck-Institut für Hirnforschung > Abt. Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > Phone: +49 (0)69/6301-83225 > E-Mail: tillmann at mpih-frankfurt.mpg.de > http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > 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-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Mon Jan 11 20:05:29 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Mon, 11 Jan 2010 20:05:29 +0100 Subject: sourceinterpolate and transforms Message-ID: Hi everyone! After successfully applying the function sourceanalysis to my data I wanted to use sourceinterpolate next to plot the result. As it turned out, sourceinterpolate expects that both data types, anatomical and funtional, have a field called trans. Now, it is missing in my functional data. Does anyone how I can come up with it? And what exactly is this transformation matrix? I thought it describes the tansition into the MNI or whatever coordinate system, but it seems to be there even without visual realigment and its not even 3D ... Thanks for any comments! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teristam at GMAIL.COM Tue Jan 12 08:20:41 2010 From: teristam at GMAIL.COM (teris tam) Date: Tue, 12 Jan 2010 15:20:41 +0800 Subject: Some problem using the fieldtripbuffer Message-ID: Dear all, I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer . It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program. Does anyone have an idea why this error occur and how to solve it? Thanks a lot! Best regards, Teris ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaifengg at GMAIL.COM Thu Jan 14 10:02:18 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Thu, 14 Jan 2010 11:02:18 +0200 Subject: Problems in Localizing oscillatory sources using beamformer techniques Message-ID: Dear all, I am now trying to know how to localize oscillatory sources using beamformer techniques. I use the exact codes as used in the tutor with Fieldtrip , but there are errors when I did the *volumenormalise . The script I used: * cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/opt/matlab/toolbox/spm2/templates/T1.mnc'; %this template is in MNI coordinatescfg.template sourceDiffIntN = volumenormalise(cfg, sourceDiffInt); * The errors are: * 3D CT Norm... iteration 1: ??? Error using ==> spm_brainwarp Wrong sized dim. Error in ==> spm_normalise>snbasis at 288 [Alpha,Beta,Var,fw] = spm_brainwarp(VG,VF,Affine,basX,basY,basZ,dbasX,dbasY,dbasZ,T,fwhm,VWG, VWF); Error in ==> spm_normalise at 185 Tr = snbasis(VG1,VF1,VWG,VWF,Affine,... Error in ==> ft_volumenormalise at 193 params = spm_normalise(VG,VF); Error in ==> volumenormalise at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Does anybody know how to deal with it? Thanks a lot Feng ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Thu Jan 14 15:31:39 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 14 Jan 2010 15:31:39 +0100 Subject: satellite meeting Biomag: Analysis toolboxes for MEG data Message-ID: Dear all, I would like to announce the satellite meeting in connection with Biomag2010: *Analysis toolboxes for MEG data * Sunday, March 28, 2010, Dubrovnik Free toolboxes for analysis of MEG data are now widely used in published work. These toolboxes are becoming essential for making new developments available to the users. Further they serve to bring developers and users closer together. That aim of the satellite proposal is 1) To make the users aware about the features and possibilities of the various toolboxes 2) To facilitate the communication between developers and users in order to help direct future developments 3) To bring the toolbox developers together to facility common developments and sharing. The meeting will have both presentations and demos. Registration is now open http://megcommunity.org/index.php?option=com_content&view=article&id=7&Itemid=23 Attendance will be limited. All the best, Ole -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jan 14 21:53:30 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 14 Jan 2010 21:53:30 +0100 Subject: loreta.m missing Message-ID: Hi Michael, The loreta implementation was never fully finished and tested, that is why it is not included in the release. I don't want people to start using it and then complain that loreta (either the method or the implementation) is not working. Please find it attached if you want to give it a try. best, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 11 Jan 2010, at 14:24, Michael Wibral wrote: > Dear Fieldtrippers, > > loreta.m seems to be missing from the releases for quite a while (at least since Dec. 2008), altough it's called from sourceananalysis. Maybe it could be included again? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loreta_lap3d.m Type: application/octet-stream Size: 2420 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loreta.m Type: application/octet-stream Size: 3775 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jan 14 21:54:23 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 14 Jan 2010 21:54:23 +0100 Subject: Some problem using the fieldtripbuffer Message-ID: Hi Teris, I have also occasionally encountered the problem with opening a TCP connection on windows (i.e. bci2000). The error means that the client (MATLAB) is not able to make a connection to the server (the fieldtrip buffer which is running under BCI2000). On a Linux or OSX only setup (both the matlab client and the buffer server running on linux and/or OSX) the problem never happened to me. I don't know where in the code the problem is, and since it is so difficult to reproduce, I also don't know where to start looking in the code. If it results in problems for you, then I suggest you do something like function varargout = retry_read_header(varargin) retry = 100; while retry>0 try varargout = read_header(varargin{:}); break; end retry = retry - 1; end and something similar for read_data and read_event. Of course it would be better if the problem were fully diagnosed and subsequently fixed, so any suggestions are welcome. best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 12 Jan 2010, at 8:20, teris tam wrote: > Dear all, > I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer. > It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program. > Does anyone have an idea why this error occur and how to solve it? > Thanks a lot! > Best regards, > Teris ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teristam at GMAIL.COM Fri Jan 15 03:28:18 2010 From: teristam at GMAIL.COM (teris tam) Date: Fri, 15 Jan 2010 10:28:18 +0800 Subject: Some problem using the fieldtripbuffer In-Reply-To: <8694DB79-6BDE-4DB5-9DF4-3DCA58E085E6@fcdonders.ru.nl> Message-ID: Dear Robert, It's very nice to hear from you! I have done some test in matlab trying to get down to the root of the problem. I have observed that the problem only occur if there is a repeated pulling of header information of the fieldtripbuffer by read_header(), e.g. when the matlab code is waiting for a new block of data. Adding some time delay between subsequent calls of read_header() seems to alleviate the issue: hdr = read_header(filename, 'cache',true); pause(0.1); Interestingly, repeated calling of read_data() to get the most recent data doesn't seem to have any problem, even if no time delay is added between calls. I have tried to start 2 matlab sessions to investigate whether the error comes from matlab or from the fieildtripbuffer server. When one matlab session fails to connect, the other session cannot connect to the server either (They are not connecting in parallel. I start the other session right after the first session reports error). However, the code is able to connect to the buffer again after waiting for 3-4s. I guess the problem is that repeatedly calling of read_header() may jam the buffer server. read_data() may take a longer time to process in matlab and so adding a time delay for the server to recover. We can verify this if we can get into the debug information of the buffer server (if there is any). Currently I work around the issue by adding a delay between read_header() or just use read_data() to get the most recent data. Best regards, Teris On Fri, Jan 15, 2010 at 4:54 AM, Robert Oostenveld < r.oostenveld at fcdonders.ru.nl> wrote: > Hi Teris, > > I have also occasionally encountered the problem with opening a TCP > connection on windows (i.e. bci2000). The error means that the client > (MATLAB) is not able to make a connection to the server (the fieldtrip > buffer which is running under BCI2000). > > On a Linux or OSX only setup (both the matlab client and the buffer server > running on linux and/or OSX) the problem never happened to me. I don't know > where in the code the problem is, and since it is so difficult to reproduce, > I also don't know where to start looking in the code. If it results in > problems for you, then I suggest you do something like > > function varargout = retry_read_header(varargin) > retry = 100; > while retry>0 > try > varargout = read_header(varargin{:}); > break; > end > retry = retry - 1; > end > > and something similar for read_data and read_event. > > Of course it would be better if the problem were fully diagnosed and > subsequently fixed, so any suggestions are welcome. > > best regards, > Robert > > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > On 12 Jan 2010, at 8:20, teris tam wrote: > > Dear all, > I am trying to read the signal from BCI2000 in MATLAB using the > fieldtripbuffer. I use the code given in the BCI2000 wiki at > http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer > . > It was able to read and plot the signal from BCI2000 correctly for > a certain period of time, but eventually it stopped and reported "ERROR: > failed to create socket (-2)". I was able to connect to and read from the > buffer again if I re-run the program. > Does anyone have an idea why this error occur and how to solve it? > Thanks a lot! > Best regards, > Teris > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pacodiaz at UB.EDU Fri Jan 15 15:28:07 2010 From: pacodiaz at UB.EDU (=?ISO-8859-1?Q?Paco_D=EDaz?=) Date: Fri, 15 Jan 2010 15:28:07 +0100 Subject: OPEN POST-DOC POSITION IN BARCELONA Message-ID: Hope you don't mind if I announce here the following 3 years post doc position in our group: The Barcelona BrainLab (BBL) [www.ub.edu/brainlab] invites applications for a 3-year post-doctoral position commencing during the spring 2010 in the field of the Cognitive Neuroscience of Auditory Perception. Principal Investigator: Prof. Dr. Carles Escera. Successful applicants should have completed a Ph.D. in Neurosciences, Cognitive, Computer or Biological Sciences, Engineering or related disciplines. For a more detailed information please find the attached document. Contact Person: Mrs. Marta Turró e-mail: brainlab at ub.edu Subject: ERANET-postdoc application Best regards, Paco. -- --------------------------------------------------------- Francisco Javier Díaz Santaella Institute for Brain,Cognition and Behavior (IR3C) University of Barcelona and Cognitive Neuroscience Research Group Department of Psychiatry and Clinical Psychobiology University of Barcelona P. Vall d'Hebron 171 * 08035 Barcelona * Spain Telf.: +34 93 3125035 * Cell Phone: +34 678 89 47 57 email: pacodiaz at ub.edu http://www.ub.edu/brainlab --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: call_postdoc_EN_pdf.pdf Type: application/pdf Size: 107988 bytes Desc: not available URL: From michael.wibral at WEB.DE Fri Jan 15 18:10:12 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 15 Jan 2010 18:10:12 +0100 Subject: loreta.m missing Message-ID: Hi Robert, thanks for the code. We'll give it a try. Sorry if my post sounded like a complaint of any kind - it was never meant like that. BTW: We got sourcestatistics running on MNE output by removing the time-dimension from the source data (via averaging over a little interval and fixing dimord and related info). Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 14.01.10 21:53:38 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] loreta.m missing > Hi Michael, > > The loreta implementation was never fully finished and tested, that > is why it is not included in the release. I don't want people to > start using it and then complain that loreta (either the method or > the implementation) is not working. Please find it attached if you > want to give it a try. > > best, > Robert > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > On 11 Jan 2010, at 14:24, Michael Wibral wrote: > > Dear Fieldtrippers, > > loreta.m seems to be missing from the releases for quite a while (at > least since Dec. 2008), altough it's called from sourceananalysis. > Maybe it could be included again? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 336 bytes Desc: not available URL: From aostendorf at BESA.DE Tue Jan 19 10:30:38 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 10:30:38 +0100 Subject: tinv / several questions Message-ID: Dear Fieldtrip experts, I am currently working on a script for the evaluation of BESA TFC data with Fieldtrip and have found the tutorials and sample scripts a great help. Nevertheless, I have got a few, probably rather basic, questions and would be thankful for help. 1) cohspctrm: I would like to feed coherence data exported from BESA to ft_freqstatistics. The data have been brought to resemble the output of ft_freqanalysis so the data field has explicitly been renamed to "powspctrm" (and it works). Is this correct? (I have looked through the beginning of the ft_freqstatistics code and it looks as if the existence of the 'cohspctrm' field would lead to the input being brought to the format I put in.) 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning although I have now switched the setting to cfg.highlight = 'on'. Is there a possibility to implement something like the following example (taken from the tutorial on cluster-based permutation tests on event-related fields)? pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find (pos_int==1|neg_int==-1); 3) Clustering over channels: Is it correct that I can prevent clustering over channels by setting cfg.neighbours = {} ? Is it correct to use this option also if I want to average over channels (avgoverchans = 'yes')? 4) Lately, some "nan" functions have been added to the statfun/private folder because they are not found otherwise in case somebody does not have access to the MATLAB statistics toolbox. May I suggest that a copy of tinv.m be added, too? (I also placed a copy of nanmean in public/private because I got an error message in avgoverdim.) I am really impressed with the Fieldtrip software and also with the exchange on the mailing list! Best regards to all of you Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jan 19 11:31:26 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 19 Jan 2010 11:31:26 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Dear Andrea, Could I answer question 1 and 4, and leave the others to someone else? > 1) cohspctrm: I would like to feed coherence data exported from BESA > to > ft_freqstatistics. The data have been brought to resemble the output > of > ft_freqanalysis so the data field has explicitly been renamed to > "powspctrm" > (and it works). Is this correct? (I have looked through the > beginning of the > ft_freqstatistics code and it looks as if the existence of the > 'cohspctrm' > field would lead to the input being brought to the format I put in.) As far as I can see, it can be done in two ways: 1 cfg.parameter = 'cohspctrm' and the input data is just untouched (i.e. data.cohspctrm not renamed into data.powspctrm) 2 cfg.parameter = 'powspctrm' (or empty, then it takes the default, which is 'powspctrm'), and the input data changes so that .cohspctrm is manually renamed into .powspctrm I would propose to use method 1. The reason for this is that in the future we will make the code 'smarter' such that it can directly deal with parameters, other than powspctrm directly (without the need of working around it; either within or outside freqstatistics) > 4) Lately, some "nan" functions have been added to the statfun/private > folder because they are not found otherwise in case somebody does > not have > access to the MATLAB statistics toolbox. May I suggest that a copy > of tinv.m > be added, too? (I also placed a copy of nanmean in public/private > because I > got an error message in avgoverdim.) Yes, sorry about that. I added a symbolic link to fieldtrip/private/ nanmean.m in fieldtrip/public/private. This is how it should be done, because this way we only use 1 physical copy of a file, rather than duplicating the files in different places (running the risk that they start leading a life of their own). I also created links for tinv and tcdf in statfun/private. I guess you should be able to directly update these changes (svn update). > I am really impressed with the Fieldtrip software and also with the > exchange > on the mailing list! Thanks. Keep up the good work. Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Tue Jan 19 11:56:23 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 11:56:23 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Dear Jan-Mathijs, Thanks a lot for the extra-speedy reply! I am glad to hear that I can handle coherence data this easily. [Sorry, I expressed myself in an ambiguous way: My input with its field "powspctrm" has been renamed from the BESA field name, which is "data", not from "cohspctrm", and it possesses the corresponding label structure. So that means "do not change anything" for me, which I did at first and which works fine.] Thanks also for the extra functions. It is really great that all those options are available even without the extra toolbox! All the best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Tue Jan 19 14:37:39 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 19 Jan 2010 14:37:39 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Hi Andrea, I think I can answer the second question for you. 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning although I have now switched the setting to cfg.highlight = 'on'. Is there a possibility to implement something like the following example (taken from the tutorial on cluster-based permutation tests on event-related fields)? It looks as if you are referring to ft_topoplotER and not ft_clusterplot. If that assumption is correct, than you can definitely use something like: cfg.highlight = find (pos_int==1|neg_int==-1); However, cfg.highlight would then need to be changed into cfg.highlightchannel. In the new highlighting configuration, cfg.highlight is used to determine highlighting-method (like 'on', 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate which channels your actually want to highlight. This can be a numerical index vector (like above), channel-labels, channel-labels with wildcards and anything else ft_channelselection can take as input. The tutorial on the wiki hasn't been updated yet to reflect the changes to topoplotER (I'll do that soon), but the following should work: cfg.highlight = 'on'; cfg.highlightchannel = find (pos_int==1|neg_int==-1); (using all the defaults this should mark every channel in cfg.highlightchannel with a '*' and every other channel with a 'o') Hope this helps! Best, Roemer Andrea Ostendorf wrote: > Dear Fieldtrip experts, > > I am currently working on a script for the evaluation of BESA TFC data with > Fieldtrip and have found the tutorials and sample scripts a great help. > Nevertheless, I have got a few, probably rather basic, questions and would > be thankful for help. > > > 1) cohspctrm: I would like to feed coherence data exported from BESA to > ft_freqstatistics. The data have been brought to resemble the output of > ft_freqanalysis so the data field has explicitly been renamed to "powspctrm" > (and it works). Is this correct? (I have looked through the beginning of the > ft_freqstatistics code and it looks as if the existence of the 'cohspctrm' > field would lead to the input being brought to the format I put in.) > > 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning > although I have now switched the setting to cfg.highlight = 'on'. Is there a > possibility to implement something like the following example (taken from > the tutorial on cluster-based permutation tests on event-related fields)? > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > cfg.highlight = find (pos_int==1|neg_int==-1); > > 3) Clustering over channels: > Is it correct that I can prevent clustering over channels by setting > cfg.neighbours = {} ? Is it correct to use this option also if I want to > average over channels (avgoverchans = 'yes')? > > 4) Lately, some "nan" functions have been added to the statfun/private > folder because they are not found otherwise in case somebody does not have > access to the MATLAB statistics toolbox. May I suggest that a copy of tinv.m > be added, too? (I also placed a copy of nanmean in public/private because I > got an error message in avgoverdim.) > > I am really impressed with the Fieldtrip software and also with the exchange > on the mailing list! > > Best regards to all of you > Andrea > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From clemens.maidhof at HELSINKI.FI Tue Jan 19 17:31:56 2010 From: clemens.maidhof at HELSINKI.FI (Clemens Maidhof) Date: Tue, 19 Jan 2010 18:31:56 +0200 Subject: bdf import, 16 bits events Message-ID: Dear Fieldtrip users, we are using 16 Bits for coding events in BDF data (i.e., all 16 pins for trigger input of the BioSemi connector used; 8 Bits for Presentation and 8 Bits for another device). However, when importing the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all event codes with a value higher than 28 (from Bits 9-16) seem to be incorrect: these triggers are recognized, but their value is the sum of an addition of the actual value with a value from the first 8 bits. During recording, the BioSemi software shows the correct events in the acquisition software, and also when imported into BESA all correct event codes are there. So we thought this has probably to do with the import-function in fieldtrip. Has anybody encountered the same problem or maybe even better, knows a solution ;-) ? Thanks a lot in advance for any hints and tips! Clemens -- Clemens Maidhof Cognitive Brain Research Unit, Department of Psychology, University of Helsinki & Finnish Centre of Excellence in Interdisciplinary Music Research, University of Jyväskylä, Finland clemens.maidhof at helsinki.fi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.robitaille at UMONTREAL.CA Tue Jan 19 18:02:52 2010 From: nicolas.robitaille at UMONTREAL.CA (Nicolas Robitaille) Date: Tue, 19 Jan 2010 17:02:52 +0000 Subject: bdf import, 16 bits events In-Reply-To: <4B55DE7C.8000702@helsinki.fi> Message-ID: Hi Clemens, I've encounter a similar problem. Biosemi actually merge the data as if this was a single 16-pins triggers, so a number between 0 and 65535. You could dissociate these two number and get back your two independent values with something like: t = dec2bin(yourTrigValue,16) lowerPort = bin2dec(t(9:16)) higherPort = bin2dec(t(1:8)) so both values will be between 0 and 255. Something you must carefully think about, however, is that you may get much more trig that you actually send. For example, you likely gonna get consecutive identical events on the lower port, which were originally recorded as as separate events because something happen on the higher port. Same will happen for the 0 you likely send between each code, independently on each port, to put all the pins down. Hope this help, Nicolas p.s. there could be a more computationally-efficient way to do this. ************************* Nicolas Robitaille, Ph.D. Stagiaire post-doctoral Brams ************************* Date: Tue, 19 Jan 2010 18:31:56 +0200 From: clemens.maidhof at HELSINKI.FI Subject: [FIELDTRIP] bdf import, 16 bits events To: FIELDTRIP at NIC.SURFNET.NL Dear Fieldtrip users, we are using 16 Bits for coding events in BDF data (i.e., all 16 pins for trigger input of the BioSemi connector used; 8 Bits for Presentation and 8 Bits for another device). However, when importing the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all event codes with a value higher than 28 (from Bits 9-16) seem to be incorrect: these triggers are recognized, but their value is the sum of an addition of the actual value with a value from the first 8 bits. During recording, the BioSemi software shows the correct events in the acquisition software, and also when imported into BESA all correct event codes are there. So we thought this has probably to do with the import-function in fieldtrip. Has anybody encountered the same problem or maybe even better, knows a solution ;-) ? Thanks a lot in advance for any hints and tips! Clemens -- Clemens Maidhof Cognitive Brain Research Unit, Department of Psychology, University of Helsinki & Finnish Centre of Excellence in Interdisciplinary Music Research, University of Jyväskylä, Finland clemens.maidhof at helsinki.fi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Tue Jan 19 18:51:43 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 18:51:43 +0100 Subject: Thanks / warning in ft_topoplotER In-Reply-To: <4B55B5A3.2010907@donders.ru.nl> Message-ID: Dear Roemer, dear Jan-Mathijs, Thanks for your quick answers! Sorry for getting back so late. Dear Jan-Mathijs, thanks for the comment on the symbolic links. My colleagues and I, as well as other BESA users, use Windows at work so it would be nice to get news on your proposed OS-independent solution. Dear Roemer, yes, I was referring to ft_topoplotER. I forgot to mention this although I was aware of the fact. Thanks for the explanations! I am a bit confused because I still end up with the same warning (line 214 of ft_topoplotER) even if I use cfg.highlightchannel = 'all'; (or a numerical index vector) cfg.highlight = 'on'; I used the same setting (with different data) for both ft_topoplotTFR and ft_clusterplot. Both call topoplotER, although the call looks a bit different. There is no problem in the case of ft_topoplotTFR. If I modify cfg.highlightchannel, I see a change. When using ft_clusterplot with this same setting, the significant channels appear to be highlighted but I observe no change upon modification of cfg.highlightchannel, and I get the warning in ft_topoplotER (line 214). On debugging, I see that the lines below l.606 in ft_topoplotER ("if ~strcmp(cfg.marker,'off')") are carried out only in my call of ft_topoplotTFR. Have I done anything wrong, or are the settings treated differently by both routines? Have a nice evening! And thanks a lot to both of you! All the best Andrea > > 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a > warning > although I have now switched the setting to cfg.highlight = 'on'. Is there > a > possibility to implement something like the following example (taken from > the tutorial on cluster-based permutation tests on event-related fields)? > > > It looks as if you are referring to ft_topoplotER and not > ft_clusterplot. If that assumption is correct, than you can definitely > use something like: > cfg.highlight = find (pos_int==1|neg_int==-1); > However, cfg.highlight would then need to be changed into > cfg.highlightchannel. In the new highlighting configuration, > cfg.highlight is used to determine highlighting-method (like 'on', > 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate > which channels your actually want to highlight. This can be a numerical > index vector (like above), channel-labels, channel-labels with wildcards > and anything else ft_channelselection can take as input. > > The tutorial on the wiki hasn't been updated yet to reflect the changes > to topoplotER (I'll do that soon), but the following should work: > cfg.highlight = 'on'; > cfg.highlightchannel = find (pos_int==1|neg_int==-1); > (using all the defaults this should mark every channel in > cfg.highlightchannel with a '*' and every other channel with a 'o') > > Hope this helps! > > Best, > Roemer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Wed Jan 20 12:52:14 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 20 Jan 2010 12:52:14 +0100 Subject: Thanks / warning in ft_topoplotER In-Reply-To: <6D7D6970FEC64AE5AE0EF13A14CCFF96@LAT6500Andrea> Message-ID: Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer Andrea Ostendorf wrote: > Dear Roemer, dear Jan-Mathijs, > > Thanks for your quick answers! Sorry for getting back so late. > > Dear Jan-Mathijs, thanks for the comment on the symbolic links. My > colleagues and I, as well as other BESA users, use Windows at work so it > would be nice to get news on your proposed OS-independent solution. > > Dear Roemer, yes, I was referring to ft_topoplotER. I forgot to mention this > although I was aware of the fact. Thanks for the explanations! > > I am a bit confused because I still end up with the same warning (line 214 > of ft_topoplotER) even if I use > cfg.highlightchannel = 'all'; (or a numerical index vector) > cfg.highlight = 'on'; > > I used the same setting (with different data) for both ft_topoplotTFR and > ft_clusterplot. Both call topoplotER, although the call looks a bit > different. > There is no problem in the case of ft_topoplotTFR. If I modify > cfg.highlightchannel, I see a change. > When using ft_clusterplot with this same setting, the significant channels > appear to be highlighted but I observe no change upon modification of > cfg.highlightchannel, and I get the warning in ft_topoplotER (line 214). > On debugging, I see that the lines below l.606 in ft_topoplotER > ("if ~strcmp(cfg.marker,'off')") are carried out only in my call of > ft_topoplotTFR. > > Have I done anything wrong, or are the settings treated differently by both > routines? > > Have a nice evening! And thanks a lot to both of you! > All the best > Andrea > > > > > > >> 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a >> warning >> although I have now switched the setting to cfg.highlight = 'on'. Is there >> a >> possibility to implement something like the following example (taken from >> the tutorial on cluster-based permutation tests on event-related fields)? >> >> >> It looks as if you are referring to ft_topoplotER and not >> ft_clusterplot. If that assumption is correct, than you can definitely >> use something like: >> cfg.highlight = find (pos_int==1|neg_int==-1); >> However, cfg.highlight would then need to be changed into >> cfg.highlightchannel. In the new highlighting configuration, >> cfg.highlight is used to determine highlighting-method (like 'on', >> 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate >> which channels your actually want to highlight. This can be a numerical >> index vector (like above), channel-labels, channel-labels with wildcards >> and anything else ft_channelselection can take as input. >> >> The tutorial on the wiki hasn't been updated yet to reflect the changes >> to topoplotER (I'll do that soon), but the following should work: >> cfg.highlight = 'on'; >> cfg.highlightchannel = find (pos_int==1|neg_int==-1); >> (using all the defaults this should mark every channel in >> cfg.highlightchannel with a '*' and every other channel with a 'o') >> >> Hope this helps! >> >> Best, >> Roemer >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Wed Jan 20 13:51:04 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 20 Jan 2010 13:51:04 +0100 Subject: Warning in ft_topoplotER In-Reply-To: <4B56EE6E.6000307@donders.ru.nl> Message-ID: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test_clusterplot.zip Type: application/x-zip-compressed Size: 4918 bytes Desc: not available URL: From aostendorf at BESA.DE Wed Jan 20 13:55:39 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 20 Jan 2010 13:55:39 +0100 Subject: warning in ft_topoplotER: version In-Reply-To: <4B56EE6E.6000307@donders.ru.nl> Message-ID: Dear Roemer, sorry, I forgot to tell you the version: I am currently using fieldtrip-20100114. Best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Wed Jan 20 14:07:45 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 20 Jan 2010 14:07:45 +0100 Subject: Warning in ft_topoplotER In-Reply-To: Message-ID: Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: > > Dear Roemer, > > > > thanks a lot for your help and the time you are taking to assist me! > Your remarks have been really helpful. > > > > The warning is from topoplotER, which I call indirectly through > ft_clusterplot. Thanks for pointing out that I am not to use the > options directly. I saw some options in the help of ft_clusterplot > together with the hint that more options were to be found in topoplotER. > > > > Since I keep having trouble with uploading files to your server, I > attach a test MATLAB file (stripped down to the basics) and my data. I > hope that is okay, it is really quite a small amount of data. > Otherwise, I would try my private Ubuntu computer. > > > > The warning is > > Warning: cfg.highlight is now used for specifing highlighting-mode, > use cfg.highlightchannel instead of cfg.highlight for specifiying channels > > > In ft_topoplotER at 214 > > In topoplotER at 17 > > In ft_clusterplot at 277 > > In test_clusterplot at 5 > > > > Thanks a lot! > > > > Best regards > > Andrea > > > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 12:52 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Thanks / warning in ft_topoplotER > > > > Hi Andrea, > > Always happy to help. And thank you for helping us squashing bugs! > > Are you sure you are using the most recent fieldtrip version? There > was a bug several weeks ago that gave the warning (which used to be on > line 214, but is now on line 215) even when cfg.highlight was not > numerical. (if it's numerical, it is assumed cfg.highlight is used in > the old way). If you have a version that is newer than 19-12-2009 > (date of previous bug fix), could you post the exact code you use to > call ft_topoplotER? This could give me a better idea on where in the > code the problem lies. Could you then also post the exact warning > matlab spits out? (if it's not a version problem, something > complicated is going on and all information is helpful). Thanks! > > Concerning ft_clusterplot, you're not actually supposed to use the > highlighting options directly. As clusterplot tries to determine the > clustering automatically, this could possibly interfere with it's > normal functioning. Thanks for pointing this out. I now added a check > for these 'forbidden' options and they will be removed automatically. > The updated clusterplot will be uploaded to the ftp-server somewhere > late in the evening today. > > However, if you want to manage you're own clustering directly, you can > also do this using topoplotER/TFR. It might be a bit difficult, but > you have to put all the highlighting options in its own cell > (including the ones that were already in cells). There is 'hidden' > documentation about this in topoplotER (you won't see it with the > help/doc command, but you will if you edit the function), you can find > it just below the normal documentation. > I copy-pasted it here for easy reference: > *********** > % It is possible to use multiple highlight-selections (e.g.: multiple > statistical clusters of channels) > % To do this, all the content of the highlight-options (including > cfg.highlight) should be placed in a cell-array > % (even if the normal content was already in a cell-array). Specific > marker settings (e.g. color, size) are defaulted when > % not present. > % Example (3 selections): > % cfg.highlight = {'labels', 'labels', 'numbers'} > % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} > % cfg.highlightsymbol = {'o',[],'+'} % the empty option > will be defaulted > % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option > will be defaulted > % cfg.highlightsize = []; % will be set > to default, as will the missing cfg.highlightfontsize > *********** > > Using these options you should be able to get the same individual > plots clusterplot can give you. If you do not want to see the other > channels, set cfg.marker = 'off';. On the use of the different > routines, topoplotTFR is identical to topoplotER, but is just present > because of our present naming-scheme. Clusterplot however, is a > wrapper around topoplotER/TFR designed to quickly and without much > configuring plot your statistical clusters (which requires statistics > output as input). By using the 'hidden' options above, you can make > topoplotER/TFR do exactly the same as clusterplot, but then you can > specify your own clusters. > > > We are currently looking into your question number 3, as it appears > things go a little deeper there. There are at least some situations > where cfg.neighbours = [] apparently doesn't work, but we are still > figuring out why. For the moment, a really ugly and time consuming > workaround would be to make a for-loop over single channels, but it > would prevent the clustering over channels and should provide (per > channel) the exact same output as cfg.neighbours = []; > > > I hope all of the above helps. Thanks for bringing these bugs to our > attention! > > Kind regards, > > Roemer > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Thu Jan 21 08:54:53 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 21 Jan 2010 08:54:53 +0100 Subject: data analysis competition/Biomag2010 Message-ID: Dear all, We would like to announce a data analysis competition for biomag2010: http://megcommunity.org/index.php?option=com_content&view=article&id=2&Itemid=24 It focuses on connectivity analysis and multivariate classification approaches. Please consider attending or encourage interested researchers to participate. Best regards, Ole Jensen and Jan-Mathijs Schoffelen -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Thu Jan 21 13:33:39 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 21 Jan 2010 13:33:39 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: <4B570021.9030200@donders.ru.nl> Message-ID: Dear Roemer, Thanks a lot. My previous version worked with your proposed corrections and I downloaded the new version today. Sorry, I have yet another question, this time regarding the parameters controlling statistical analysis for the cluster-based test statistic. When asking myself whether it made sense to set cfg.testtail and cfg.tail independently, I found the error message in clusterstat.m, l.32, which states that the parameters should be equal. Could you perhaps mention this requirement in the tutorials? Also, regarding cfg.alpha and cfg.clusteralpha - just to make sure that I have got things right: For a two-sided test, I have to split cfg.alpha manually so as to equal half the desired significance level but I do not have to change cfg.clusteralpha explicitly, is this correct? I gathered so from the tutorials and it looks so from the code (in clusterstat and the statfun functions, the alpha parameter is halved automatically). If nothing is specified, both parameters are set to 0.05. As a two-sided test is the default, does this mean that the false alarm rate is set at the 10% level if the user does not specify anything, or have I overlooked something? (I have to admit that I am impressed with the intricacies but that I have not really grasped the details.) By the way, the tutorial on cluster-based permutation tests on event related fields mentions a parameter cfg.alphathresh, which I only found in the clusterrand functions and which I took to mean cfg.clusteralpha. All the best to all of you Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 14:08 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Warning in ft_topoplotER Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From smaraujo at UALG.PT Tue Jan 26 14:53:19 2010 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Tue, 26 Jan 2010 13:53:19 -0000 Subject: problems with high pass filter Message-ID: Dear all, I’m analysing EEG data from children and I tried to set the high pass filter to 0.05Hz (PreProcessing). However I get a warning message “Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669240e-017”. Does anyone can help me to solve this problem? Thanks a lot! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jan 26 15:31:21 2010 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 26 Jan 2010 15:31:21 +0100 Subject: problems with high pass filter In-Reply-To: <20100126135311.88B33166C2@smtp3.ualg.pt> Message-ID: Dear Susana, Probably you data(segments) are too short for this setting. For the high pass filter with 0.05Hz to work you need very long data (0.05 Hz is a cycle of 20 seconds!), Do you need such low frequencies in your data? If not you could try f.i. 0.5Hz. Hope this helps, Ingrid ------------------------------------ Ingrid L.C. Nieuwenhuis PhD student Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands Email: ingrid.nieuwenhuis at donders.ru.nl Tel: 0031 (0)24 - 36 10887 _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Susana Araújo Sent: Tuesday, January 26, 2010 2:53 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] problems with high pass filter Dear all, I’m analysing EEG data from children and I tried to set the high pass filter to 0.05Hz (PreProcessing). However I get a warning message “Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669240e-017”. Does anyone can help me to solve this problem? Thanks a lot! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at CERCO.UPS-TLSE.FR Tue Jan 26 21:39:04 2010 From: arno at CERCO.UPS-TLSE.FR (Arnaud Delorme) Date: Tue, 26 Jan 2010 12:39:04 -0800 Subject: problems with high pass filter Message-ID: Dear Susana and Ingrid, designing efficient filters at very low frequency can be challenging. Below is a solution using pure Matlab code and elliptic filters for high pass filtering at 0.1 Hz (transition bandwidth is from 0.05 to 0.1 Hz). EEG.srate is the sampling rate, EEG.nbchan, the number of data channel and EEG.data contains the continuous data (number of channels x number of data points). The code below requires the signal processing toolbox. You may also notice that I detrend the data first. This is to remove any DC offset and very slow drifts that tend to generate more artifacts at data boundaries. The function filtfilt applies the filter in both direction (forward then backward) to avoid phase distortions. Hope this helps, Arno [N, Wn] = ellipord(.1/(EEG.srate/2), .05/(EEG.srate/2), 0.5, 3) [b a] = ellip(N, 0.5, 3, Wn, 'high'); for index = 1:EEG.nbchan EEG.data(index,:) = detrend(EEG.data(index,:)); EEG.data(index,:) = filtfilt( b, a, EEG.data(index,:)); end; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Wed Jan 27 10:08:38 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Wed, 27 Jan 2010 10:08:38 +0100 Subject: minor bug and beamformer question Message-ID: Hi everyone! I would like to report that fieldtrip's read_mri function complains about not finding the field with the transformation matrix in our neuomag fiff files. The problem was fixed by my dear colleague Hanneke by replacing if issubfield(hdr.voxel_trans, 'trans') transform = hdr.voxel_trans.trans; elseif issubfield(hdr.trans, 'trans'), transform = hdr.trans.trans; end by if isfield(hdr, 'voxel_trans') transform = hdr.voxel_trans.trans; elseif isfield(hdr, 'trans') transform = hdr.trans.trans; end Maybe this can be incorporated in future versions. Then I do have two questions about beamforming. As I understand it, beamformer methods such as DICS are able to compute time courses of brain regions. How can I visualize the time signal of a voxel in fieldtrip? Then I found that after sorting out several trials in my experiment I was not able to compute the neural activity index anymore, as the noise estimates for the grid nodes were all either NANs or zeros. I this a known problem or did I make a mistake somewhere? How could it be fixed? Thank you very much for your support! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.hartmann at UNI-KONSTANZ.DE Wed Jan 27 13:57:30 2010 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Wed, 27 Jan 2010 13:57:30 +0100 Subject: using ica to get occipital component producing alpha in eyes-closed resting eeg Message-ID: hi, i am looking for a method to identify the component(s) of an eyes-closed resting-state eeg producing occipital alpha in a single subject. so far, no method i tried (fastica, sobi) was able to produce such a component, although topoplots show them very clearly. i also tried to filter the data using a bandpass filter before letting the ica run. i have 5 minutes of data available, partly contaminated with tms-artifacts which i remove beforehand. does someone know a good and stable approach? maybe i would have to change the ica-algorithm? is there one specifically looking at frequency-information? maybe i also use the wrong approach? is there a different option to get something like a weighting matrix restricted to a specific frequency-band (and also able to seperate occipital alpha from other alpha generators like, e.g. temporal, motor etc..)? thanks in advance! greetings, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Thu Jan 28 11:07:15 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Thu, 28 Jan 2010 11:07:15 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: Message-ID: Hi Andrea, Sorry for my late reply (compared to my previous replies), I was a bit too busy. I can't seem to find any reference on cfg.testtail, are you referring to cfg.clustertail instead? We are thinking at the moment on changing how the correcting of p-values/alpha-values work, but for the moment you are correct in assuming that you need to divide the cfg.alpha manually by 2 in case of a two-sided test. This will most likely change in the near-future and be made more explicit in the documentation, but for now, the tutorials are correct. It is very important to make the distinction between cfg.clusteralpha and cfg.alpha. Cfg.clusteralpha only refers to when certain values where you want to cluster over are able to be selected for clustering. When clustering over t-values, cfg.clusteralpha only sets the threshold on /when /to cluster. A cfg.clusteralpha = 0.05 would allow more t-values to be selected for clustering, most likely producing bigger clusters, then a cfg.clusteralpha = 0.01. This /does not/ affect the false alarm rate of the statistical test at the cluster-level, this is the cfg.alpha you mentioned. So, to control your false-alarm rate when doing a two-sided cluster-level test, cfg.alpha is the only one that is important. The selection of values to cluster over however, does change when you do a two-sided test. You are correct in stating that, when using the defaults, the overall alpha-level that you are testing against is 0.10, whereas the alpha-level per tail is 0.05. I guess it's a matter of preference which way you look at it. But it is something that can be made more explicit in the documentation/tutorials, thanks for bringing this up. Thanks for noticing the old alphathresh field, the tutorial is updated now. I hope this helps! Best, Roemer On 1/21/2010 1:33 PM, Andrea Ostendorf wrote: > > Dear Roemer, > > Thanks a lot. My previous version worked with your proposed > corrections and I downloaded the new version today. > > Sorry, I have yet another question, this time regarding the parameters > controlling statistical analysis for the cluster-based test statistic. > > When asking myself whether it made sense to set cfg.testtail and > cfg.tail independently, I found the error message in clusterstat.m, > l.32, which states that the parameters should be equal. Could you > perhaps mention this requirement in the tutorials? > > > *Also, regarding cfg.alpha and cfg.clusteralpha -- just to make sure > that I have got things right: For a two-sided test, I have to split > cfg.alpha manually so as to equal half the desired significance > level but I do not have to change cfg.clusteralpha explicitly, is > this correct? I gathered so from the tutorials and it looks so from > the code (in clusterstat and the statfun functions, the alpha > parameter is halved automatically). If nothing is specified, both > parameters are set to 0.05. As a two-sided test is the default, does > this mean that the false alarm rate is set at the 10% level if the > user does not specify anything, or have I overlooked something? (I > have to admit that I am impressed with the intricacies but that I > have not really grasped the details...)* > > > *By the way, the tutorial on c*luster-based permutation tests on > event related fields mentions a parameter cfg.alphathresh, which I > only found in the clusterrand functions and which I took to mean > cfg.clusteralpha. > > All the best to all of you > > Andrea > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 14:08 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Warning in ft_topoplotER > > Hi Andrea, > > Thanks for the data/script, it was exactly what I needed. There was a > silly bug in ft_clusterplot where several calls to cfg.highlight were > not changed to cfg.highlightchannel during the big update, and I > failed to notice them during browsing. Things should be fixed now > (will be on the ftp-server tonight). You can fix it in your own > version easily by changing in line 267 and line 285 cfg.highlight >>> > cfg.highlightchannel. Clusterplot should work as intended afterwards. > > I also realised now that any additional options that go into > clusterplot will not be used (like cfg.marker), these are fixed now as > well (on ftp-server tonight). > > Thanks for pointing out these bugs! > > Best, > Roemer > > > > Andrea Ostendorf wrote: > > Dear Roemer, > > thanks a lot for your help and the time you are taking to assist me! > Your remarks have been really helpful. > > The warning is from topoplotER, which I call indirectly through > ft_clusterplot. Thanks for pointing out that I am not to use the > options directly. I saw some options in the help of ft_clusterplot > together with the hint that more options were to be found in topoplotER. > > Since I keep having trouble with uploading files to your server, I > attach a test MATLAB file (stripped down to the basics) and my data. I > hope that is okay, it is really quite a small amount of data. > Otherwise, I would try my private Ubuntu computer. > > The warning is > > Warning: cfg.highlight is now used for specifing highlighting-mode, > use cfg.highlightchannel instead of cfg.highlight for specifiying channels > > > In ft_topoplotER at 214 > > In topoplotER at 17 > > In ft_clusterplot at 277 > > In test_clusterplot at 5 > > Thanks a lot! > > Best regards > > Andrea > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 12:52 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Thanks / warning in ft_topoplotER > > Hi Andrea, > > Always happy to help. And thank you for helping us squashing bugs! > > Are you sure you are using the most recent fieldtrip version? There > was a bug several weeks ago that gave the warning (which used to be on > line 214, but is now on line 215) even when cfg.highlight was not > numerical. (if it's numerical, it is assumed cfg.highlight is used in > the old way). If you have a version that is newer than 19-12-2009 > (date of previous bug fix), could you post the exact code you use to > call ft_topoplotER? This could give me a better idea on where in the > code the problem lies. Could you then also post the exact warning > matlab spits out? (if it's not a version problem, something > complicated is going on and all information is helpful). Thanks! > > Concerning ft_clusterplot, you're not actually supposed to use the > highlighting options directly. As clusterplot tries to determine the > clustering automatically, this could possibly interfere with it's > normal functioning. Thanks for pointing this out. I now added a check > for these 'forbidden' options and they will be removed automatically. > The updated clusterplot will be uploaded to the ftp-server somewhere > late in the evening today. > > However, if you want to manage you're own clustering directly, you can > also do this using topoplotER/TFR. It might be a bit difficult, but > you have to put all the highlighting options in its own cell > (including the ones that were already in cells). There is 'hidden' > documentation about this in topoplotER (you won't see it with the > help/doc command, but you will if you edit the function), you can find > it just below the normal documentation. > I copy-pasted it here for easy reference: > *********** > % It is possible to use multiple highlight-selections (e.g.: multiple > statistical clusters of channels) > % To do this, all the content of the highlight-options (including > cfg.highlight) should be placed in a cell-array > % (even if the normal content was already in a cell-array). Specific > marker settings (e.g. color, size) are defaulted when > % not present. > % Example (3 selections): > % cfg.highlight = {'labels', 'labels', 'numbers'} > % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} > % cfg.highlightsymbol = {'o',[],'+'} % the empty option > will be defaulted > % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option > will be defaulted > % cfg.highlightsize = []; % will be set > to default, as will the missing cfg.highlightfontsize > *********** > > Using these options you should be able to get the same individual > plots clusterplot can give you. If you do not want to see the other > channels, set cfg.marker = 'off';. On the use of the different > routines, topoplotTFR is identical to topoplotER, but is just present > because of our present naming-scheme. Clusterplot however, is a > wrapper around topoplotER/TFR designed to quickly and without much > configuring plot your statistical clusters (which requires statistics > output as input). By using the 'hidden' options above, you can make > topoplotER/TFR do exactly the same as clusterplot, but then you can > specify your own clusters. > > > We are currently looking into your question number 3, as it appears > things go a little deeper there. There are at least some situations > where cfg.neighbours = [] apparently doesn't work, but we are still > figuring out why. For the moment, a really ugly and time consuming > workaround would be to make a for-loop over single channels, but it > would prevent the clustering over channels and should provide (per > channel) the exact same output as cfg.neighbours = []; > > > I hope all of the above helps. Thanks for bringing these bugs to our > attention! > > Kind regards, > > Roemer > > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > > -- > Roemer van der Meij MSc > Scientific Programmer& Data-Analyst > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3612631 > E-mail:r.vandermeij at donders.ru.nl > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4791 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Thu Jan 28 11:21:06 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 28 Jan 2010 11:21:06 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: <4B6161D3.2060802@donders.ru.nl> Message-ID: Hi Roemer, thanks a lot for the answer. So I will allow alpha and clusteralpha to be varied independently. You are correct in suggesting that I was referring to "cfg.clustertail", which I understand from the code (error message in clusterstat.m, l.32) to be required to equal "cfg.tail". Sorry about the typo! All the best, Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Donnerstag, 28. Januar 2010 11:07 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks! / Question regarding test statistics Hi Andrea, Sorry for my late reply (compared to my previous replies), I was a bit too busy. I can't seem to find any reference on cfg.testtail, are you referring to cfg.clustertail instead? We are thinking at the moment on changing how the correcting of p-values/alpha-values work, but for the moment you are correct in assuming that you need to divide the cfg.alpha manually by 2 in case of a two-sided test. This will most likely change in the near-future and be made more explicit in the documentation, but for now, the tutorials are correct. It is very important to make the distinction between cfg.clusteralpha and cfg.alpha. Cfg.clusteralpha only refers to when certain values where you want to cluster over are able to be selected for clustering. When clustering over t-values, cfg.clusteralpha only sets the threshold on when to cluster. A cfg.clusteralpha = 0.05 would allow more t-values to be selected for clustering, most likely producing bigger clusters, then a cfg.clusteralpha = 0.01. This does not affect the false alarm rate of the statistical test at the cluster-level, this is the cfg.alpha you mentioned. So, to control your false-alarm rate when doing a two-sided cluster-level test, cfg.alpha is the only one that is important. The selection of values to cluster over however, does change when you do a two-sided test. You are correct in stating that, when using the defaults, the overall alpha-level that you are testing against is 0.10, whereas the alpha-level per tail is 0.05. I guess it's a matter of preference which way you look at it. But it is something that can be made more explicit in the documentation/tutorials, thanks for bringing this up. Thanks for noticing the old alphathresh field, the tutorial is updated now. I hope this helps! Best, Roemer On 1/21/2010 1:33 PM, Andrea Ostendorf wrote: Dear Roemer, Thanks a lot. My previous version worked with your proposed corrections and I downloaded the new version today. Sorry, I have yet another question, this time regarding the parameters controlling statistical analysis for the cluster-based test statistic. When asking myself whether it made sense to set cfg.testtail and cfg.tail independently, I found the error message in clusterstat.m, l.32, which states that the parameters should be equal. Could you perhaps mention this requirement in the tutorials? Also, regarding cfg.alpha and cfg.clusteralpha - just to make sure that I have got things right: For a two-sided test, I have to split cfg.alpha manually so as to equal half the desired significance level but I do not have to change cfg.clusteralpha explicitly, is this correct? I gathered so from the tutorials and it looks so from the code (in clusterstat and the statfun functions, the alpha parameter is halved automatically). If nothing is specified, both parameters are set to 0.05. As a two-sided test is the default, does this mean that the false alarm rate is set at the 10% level if the user does not specify anything, or have I overlooked something? (I have to admit that I am impressed with the intricacies but that I have not really grasped the details.) By the way, the tutorial on cluster-based permutation tests on event related fields mentions a parameter cfg.alphathresh, which I only found in the clusterrand functions and which I took to mean cfg.clusteralpha. All the best to all of you Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 14:08 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Warning in ft_topoplotER Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4791 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4812 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From masaki.maruyama at CEA.FR Fri Jan 29 17:07:00 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Fri, 29 Jan 2010 17:07:00 +0100 Subject: Beamformer Message-ID: Dear Fieldtrip users, Please let me ask two questions about beamformer. (1) Beamformer for different-type sensors I have two different types of sensors: planer gradiometers and magnetometers. I would like to know if beamformers should compute the different-type signals separately. If so, after beamformer sourceanalysis, is it appropriate to integrate two NAIs (neural activity indexes) in such as (NAI_mag + NAI_grad)/2 or NAI_mag x NAI_grad? I would appreciate any comments/ advices on this issue. (2) Common filters in LCMV-beamformer Although the Fieldtrip website does NOT tell that common filters are available in LCMV, I'm wondering if it is limited to cases of single trial beamformer. According to the discussion of Drs Floris and Robert on 2009 Feb 2, the current version of LCMV cannot well optimize spatial filters in noisy signals of single trials, but it possibly optimizes well in averaged signals. My question is whether it makes sense to prepare a common spatial filter across conditions using averaged signals, and then apply it to the averaged signal of each condition, with setting cfg.grid.filter? I tried the method using the following script, and its computation finished without any error message. However, I'm afraid that my understanding might be incorrect, i.e., the issue of common filter has nothing to do with the issue of optimization. Could someone please make the issues clearer? Thank you in advance for your kind responses, With best regards, Masaki Maruyama Inserm U.992 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE http://www.unicog.org/ %Optimize spatial filter in common across conditions and times for cnd = 1:length(MegFile) load(MegFile{cnd}); %Load "DataPostICA" containing single trials in a condition cfg = [];cfg.removemean = 'no'; %Optimization of spatial filter based on covariance of averaged field (see Robert email on 04/02/2009) cfg.keeptrials = 'no';cfg.covariance = 'no'; data_temp = timelockanalysis(cfg,DataPostICA); if cnd == 1 data_cmb = data_temp; else data_cmb = appenddata([],data_cmb,data_temp); end clear data_temp end cfg.keeptrials = 'no';cfg.covariance = 'yes'; cfg.covariancewindow = [-0.5 1]; data = timelockanalysis(cfg,data_cmb); cfg = [];cfg.method = 'lcmv';cfg.grid = grid;cfg.vol = hdm;cfg.lambda = '5%'; cfg.keepfilter = 'yes'; source = sourceanalysis(cfg, data); common_filter = source.avg.filter; %Beamforming using the common spatial filter for cnd = 1:length(MegFile) load(MegFile{cnd});%Load "DataPostICA" again cfg = [];cfg.removemean = 'no'; cfg.covariancewindow = [-0.5 1]; cfg.keeptrials = 'no';cfg.covariance = 'no'; data_temp = timelockanalysis(cfg,DataPostICA); cfg.keeptrials = 'no';cfg.covariance = 'yes'; data = timelockanalysis(cfg,data_temp); cfg = [];cfg.method = 'lcmv';cfg.grid = grid;cfg.vol = hdm;cfg.lambda = '5%'; cfg.grid.filter = common_filter; source = sourceanalysis(cfg, data); save(strcat('SourceAnalysis','_cnd',num2str(cnd)), 'source'); end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaifengg at GMAIL.COM Sun Jan 3 14:50:17 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Sun, 3 Jan 2010 15:50:17 +0200 Subject: Questions on scalp current density (SCD) for MEG data Message-ID: Hi there, I am now trying to check the scalp current density (SCD) on my MEG data by Fieldtrip. And we find a script named scalpcurrentdensity in the Fieldtrip folder. However, this script only fits for EEG data, which is claimed clearly in the script. So I wonder whether I can use SCD for MEG data? And more specifically, if I can check the SCD on the MEG data by using the current script in Fieldtrip, what kind of change should I do to the scalpcurrentdensity script (currently I just change the parameters 'ismeg' as 'yes', it also runs for MEG data, but I am not sure whether it is right)? Thanks a lot! Zaifeng Gao Post-doc Hebrew University of Jerusalem ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Mon Jan 4 09:43:50 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 4 Jan 2010 09:43:50 +0100 Subject: freqanalysis & cfg.channel In-Reply-To: <6000e5f6b659a.4b309c01@mail.nyu.edu> Message-ID: Hi Akiko, I've had a quick look through the code and currently rejection of channels by channel-numbers (e.g. '-1') instead of channels names (e.g. '-P3') is not supported. No channels are actually being rejected if you use '-1' (which is why your first channel is still noisy). The rejection should work if you use the channel name itself. On the topic of when to reject channels, personally I do this before re-preprocessing my data (e.g. preprocess the data, do artifact rejection, and remove channels for subsequent re-preprocessing) using cfg.channel. You could however also do this in e.g. freqanalysis, or in the plotting phase as you did. Personally I like to be absolutely sure I don't accidentally include (really) bad channels in over-channel comparisons/averages/etc., which is why I remove them in the earliest phase possible. Hope this is still of some use after the holidays. Best, Roemer Akiko Ikkai wrote: > Hi, > > I'm trying to run TFR on MEG data and plot the results, and getting puzzling figures. > > Both freqanalysis and multiplotTFR run fine, and figures are produced, but the first channel (first channel in ft_data.label) is always extremely noisy (barely changing from the baseline, but showing random patches of activations across time and freq). When I take out that channel with > > cfg.channel = {'all','-1'}; % when the first channel is noisy > > the second channel (now the first in label) shows the same trend, if I take out the second, the third one is bad, etc... Other channels don't seem to be affected. > > I'm pasting my code during this process below. Can anyone tell me what might be going wrong, and when the best point to delete bad channels? > > Thanks in advance, Akiko > > %%% to run freq analysis %%% > cfg.output = 'pow'; > > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 4:2:50; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > cfg.toi = -.5:0.05:2; > cfg.channel = {'all','-1'}; % when the first channel is noisy > > TFRhann_Rvalid = freqanalysis(cfg, Rvalid); > > cfg = []; > cfg.baseline = [-.1 0]; > cfg.baselinetype = 'relative'; > cfg.xlim = [-0.1 1.2]; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure(1);clf > cfg.ylim = [5 50]; > cfg.zlim = [0 2]; > multiplotTFR(cfg, TFRhann_Rvalid); % after importing channel layout > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Curran at COLORADO.EDU Wed Jan 6 02:18:59 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Tue, 5 Jan 2010 18:18:59 -0700 Subject: cluster-based permutation tests on single subjects Message-ID: I have a few related questions about Maris and Oostenveld's (2007) method for cluster-based permutation tests, in particular using an indepsamplesT statistic in a between-trials design on single subjects. 1. Is it problematic to have very different numbers of trials within each condition? 2. Any advice for calculating statistical power for different numbers of trials within each condition? 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, Karvanen, & Shishkin, 2005) to remove outliers prior to analysis? Any advice would be much appreciated. thanks Tim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Jan 6 10:29:14 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 6 Jan 2010 10:29:14 +0100 Subject: cluster-based permutation tests on single subjects In-Reply-To: Message-ID: Hi Tim, > I have a few related questions about Maris and Oostenveld's (2007) method for > cluster-based permutation tests, in particular using an indepsamplesT statistic in a > between-trials design on single subjects. > 1. Is it problematic to have very different numbers of trials within each condition? No, it is not. > 2. Any advice for calculating statistical power for different numbers of trials within > each condition? I'm not sure whether I understand what you mean. Anyhow, analytical statistical power calculation (as is possible for T-tests and anovas) are not possible for permutation tests. However, one can obtain Monte Carlo estimates of power using simulations under the alternative hypothesis. > 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, Karvanen, & > Shishkin, 2005) to remove outliers prior to analysis? This may increase your sensitivity. However, to obtain sound p-values, you must do trimming in a way that does not induce differences between the experimental conditions. Best, Eric Maris > > Any advice would be much appreciated. > thanks > Tim > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Wed Jan 6 12:32:14 2010 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Wed, 6 Jan 2010 11:32:14 +0000 Subject: cluster-based permutation tests on single subjects In-Reply-To: Message-ID: Hey Tim, trimming may improve the power of your statistics. However, after trimming, the degrees of freedom and the standard error of the T statistics need to be adjusted. This is because after trimming the remaining data points are no longer independent. The standard error of the trimmed mean is related to the winsorised variance, not the variance. The Yuen t-test on trimmed means is described here: Wilcox, R. R. (2005). Introduction to Robust Estimation and Hypothesis Testing (2nd Ed. ed.): Academic Press. Wilcox, R. R., & Keselman, H. J. (2003). Modern robust data analysis methods: measures of central tendency. Psychol Methods, 8(3), 254-274. Wilcox has validated a bootstrap trimmed mean t-test technique in which [1] the data are centred so that each condition has a trimmed mean of zero, [2] trials are sampled with replacement from each condition independently, [3] a t-test to compare trimmed means is computed, [4] the t-test obtained for the original data is compared to the distribution of t values obtained under the null hypothesis. Best, GAR Note On 6 Jan 2010, at 01:18, Tim Curran wrote: > I have a few related questions about Maris and Oostenveld's (2007) > method for cluster-based permutation tests, in particular using an > indepsamplesT statistic in a between-trials design on single subjects. > 1. Is it problematic to have very different numbers of trials within > each condition? > 2. Any advice for calculating statistical power for different > numbers of trials within each condition? > 3. Might it be advisable to somehow trim the trials (e.g., > Leonowicz, Karvanen, & Shishkin, 2005) to remove outliers prior to > analysis? > > Any advice would be much appreciated. > thanks > Tim > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ************************************************************************************ Guillaume A. Rousselet, Ph.D. Lecturer, associate editor for Frontiers in Perception Science Centre for Cognitive Neuroimaging (CCNi) Department of Psychology Faculty of Information & Mathematical Sciences (FIMS) University of Glasgow 58 Hillhead Street Glasgow, UK G12 8QB The University of Glasgow, charity number SC004401 http://web.me.com/rousseg/GARs_website/ Email: g.rousselet at psy.gla.ac.uk Fax. +44 (0)141 330 4606 Tel. +44 (0)141 330 6652 Cell +44 (0)791 779 7833 “Computers in the future may weigh no more than 1.5 tons.” Popular Mechanics, 1949 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Curran at COLORADO.EDU Wed Jan 6 14:36:10 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Wed, 6 Jan 2010 06:36:10 -0700 Subject: cluster-based permutation tests on single subjects In-Reply-To: <6F4509ADF940415E80B9295D516763F4@ru42146fac3249> Message-ID: Hi Eric, Thanks for the speedy reply! Restating my second question more simply, I am wondering how I can determine if I have enough trials in each condition. thanks Tim On Jan 6, 2010, at 2:29 AM, Eric Maris wrote: > Hi Tim, > > > >> I have a few related questions about Maris and Oostenveld's (2007) method > for >> cluster-based permutation tests, in particular using an indepsamplesT > statistic in a >> between-trials design on single subjects. >> 1. Is it problematic to have very different numbers of trials within each > condition? > > No, it is not. > >> 2. Any advice for calculating statistical power for different numbers of > trials within >> each condition? > > I'm not sure whether I understand what you mean. Anyhow, analytical > statistical power calculation (as is possible for T-tests and anovas) are > not possible for permutation tests. However, one can obtain Monte Carlo > estimates of power using simulations under the alternative hypothesis. > > >> 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, > Karvanen, & >> Shishkin, 2005) to remove outliers prior to analysis? > > This may increase your sensitivity. However, to obtain sound p-values, you > must do trimming in a way that does not induce differences between the > experimental conditions. > > > Best, > > Eric Maris > > > > >> >> Any advice would be much appreciated. >> thanks >> Tim >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zhang470 at UMN.EDU Thu Jan 7 00:42:14 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Thu, 7 Jan 2010 00:42:14 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: Hi, Fieldtrip experts. I encountered a problem with read_event.m for preprocessing Neuromag-122 data. There was no such problem for Neuromag-306 data. Unlike the Neuromag-306, the triggers for Neuromag-122 were analog signals distributed over several channels with labels that began with "STI". In my case, STI 001 ~ STI 006 were triggers for stimuli of the .fif file. STI 015 and STI 016 were triggers for behavioral responses. The MNE package has a routine function, "mne_make_combined_event_file.m", to extract the Neuromag-122 triggers and save the events as a separate fiff file. BESA can also read the Neuromag122 data with no problem. Supposedly, read_event.m in Fieldtrip has similar capability, but it was somehow stuck in reading the events in my Neuromag-122 data. Example raw data (183M) can be downloaded here: http://www.tc.umn.edu/~zhanglab/Neuromag122 Your help is greatly appreciated. Yang ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jan 7 11:19:09 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 7 Jan 2010 11:19:09 +0100 Subject: eeg_leadfield4_prepare In-Reply-To: Message-ID: It was indeed missing from the release version. I have added it and it will be included in this evening version on th eftp. best Robert On 22 Dec 2009, at 5:19, Chun-Wei Lee wrote: > Hi, > > I am using the prepare_leadfield() following the toturial "Use your > own > forward leadfield model in an inverse beamformer computation" > > but i have faced the problem that when i execute > > grid = prepare_leadfield(cfg); > > and I can't find eeg_leadfield4_prepare(), > I check the file I download and I can't find this function > I guess I ignore some step... > can anyone tell me what is going on? > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Roman.Freunberger at SBG.AC.AT Thu Jan 7 11:44:50 2010 From: Roman.Freunberger at SBG.AC.AT (Roman Freunberger) Date: Thu, 7 Jan 2010 11:44:50 +0100 Subject: Beamformer and EEG Message-ID: Dear all, Is there a way to perform source analyses from EEG data without having MRI scans from the subjects? I am not sure of how to create the headmodel and the leadfield matrix without individual scans. Thank you in advance, Roman ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhang470 at UMN.EDU Fri Jan 8 07:43:28 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Fri, 8 Jan 2010 07:43:28 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: More details for Fieldtrip developers: I tried modifying read_event.m for my Neuromag-122 data as follows for the Neuromag part since Neuromag 122 is a pretty old system. ... if isempty(binaryindx)&&isempty(analogindx) analog ={'STI 001', 'STI 002', 'STI 003', 'STI 004', 'STI 005','STI 006'}; analogindx = match_str(hdr.label, analog); end ... if ~isempty(analogindx) trigger = read_trigger(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', flt_minsample, 'endsample', flt_maxsample, 'chanindx', analogindx, 'detectflank', detectflank, 'trigshift', trigshift, 'fixneuromag', 1); event = appendevent(event, trigger); end ... I also tried the default to be neuromag_MEX instead of neuromag_MNE to deal with the triggers. analogindx properly extracted the designated channels for triggers. The problem seems to be at read_trigger.m and the fixneuromag option. In read_trigger.m, all triggers for Neuromag smaller than 5 are excluded when fixneuromag = 1. This is clearly not applicable to the Neuromag-122 data set - the common triggers were 1 to 6 for Neuromag-122 system. Regardless of whether I set fixneuromag to 1 or 0, regardless of whether I use neuromag_MNE or neuromag_mex, the resulting events for read_event.m did not look right. I tried to rewrite the read_trigger.m, but I knew other ways that worked for me. I could avoid using fieldtrip. Jensen's 4D toolbox (in combination with Uutela's fiff access) and the MNEsuite package both worked fine for my dataset. If possible, I would like to apply Fieldtrip for my data analysis. Fieldtrip appears to be very powerful and appealing - it worked with all other data formats for both EEG and MEG that I have tested so far. Thank you very much for your attention. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zhang470 at UMN.EDU Fri Jan 8 21:00:45 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Fri, 8 Jan 2010 21:00:45 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: Problem solved. I went through all the relevant files for the events in 4D toolbox, MNE, and fieldtrip and realized that read_trigger.m must be revised for my Neuromag-122 dataset. The threshold value 5 for fixneuromag as suggested by Joachim Gross for read_trigger.m did not work for my data. I noticed that the default threshold for detecting triggers was set at 0.1 in the MNE package, and the threshold was set at 2 in Jensen's 4D toolbox for detecting the events in the STI channels for Neuromag-122. In my dataset, the recorded amplitudes for the triggers were about 4.98, and the noise floor in the STI channels were smaller than 0.01. Because of the way the triggers were set up for Neuromag 122, the section for "switch detectflank" in read_trigger.m need to be bypassed. For a simple solution, I just used Hamalainen's mne_make_combined_ event_file.m in extracting the triggers and feed those parameters for event.type, event.sample, and event.value. Yang ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Mon Jan 11 14:24:51 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Mon, 11 Jan 2010 14:24:51 +0100 Subject: loreta.m missing Message-ID: Dear Fieldtrippers, loreta.m seems to be missing from the releases for quite a while (at least since Dec. 2008), altough it's called from sourceananalysis. Maybe it could be included again? Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 336 bytes Desc: not available URL: From christine.gruetzner at GOOGLEMAIL.COM Mon Jan 11 15:55:43 2010 From: christine.gruetzner at GOOGLEMAIL.COM (Christine Gruetzner) Date: Mon, 11 Jan 2010 15:55:43 +0100 Subject: Minimum norm analysis for timelock-data Message-ID: Dear Fieldtrippers, I still have this problem with performing source analysis (minimum norm estimate) on timelockdata. As already mentioned, the main problem occurs in sourcegrandaverage, probably because the output data from source analysis (using cfg.method = 'mne' on timelock data) contain an avg.pow field with the dimensions 4560x211 for each subject, where 211 is the number of time samples. I have tried several things to avoid the problem with sourcegrandaverage, but there are always new problems; for example, when I put the source data directly into sourcestatistics, without using sourcegrandaverage, there is a problem with checkdata, saying that the function requires source or volume data as input. Computing the timelockdata only for a single latency results in a problem in source analysis ('error in minimumnormestimate at 143, mom = w*dat). Does anyone have a script for computing MNE on timelockdata that works?! I would be very glad if someone could help me out with this problem! Thanks and Best Christine -- Christine Grützner, geb.Tillmann Max-Planck-Institut für Hirnforschung Abt. Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Germany Phone: +49 (0)69/6301-83225 E-Mail: tillmann at mpih-frankfurt.mpg.de http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Mon Jan 11 16:12:46 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 11 Jan 2010 16:12:46 +0100 Subject: Minimum norm analysis for timelock-data In-Reply-To: <841d3141001110655t1dbf6c77k126ed07d0ed66d02@mail.gmail.com> Message-ID: Dear Christine, > I still have this problem with performing source analysis (minimum norm estimate) on timelockdata. As already mentioned, the main problem occurs in sourcegrandaverage, probably because the output data from source analysis (using cfg.method = 'mne' on timelock data) contain an avg.pow field with the dimensions 4560x211 for each subject, where 211 is the number of time samples. i still have not fully understood your problem ... anyway ... if i recall correctly when using lcmv you get a vector of length(number_of_gridpoints) in the avg.pow field. the sample points are in avg.mom. why don't you try this: 1) add a avg.mom field with avg.mom = avg.pow 2) remove the avg.pow field (using rmfield ... or now ft_rmfield? :-)) 3) then call sourcedescriptives with cfg.projectmom='yes' otherwise run an lcmv beamformer and try sourcegrandaverage / sourcestatistics. if that works then compare your mne and lcmv source structures. best, nathan > > I have tried several things to avoid the problem with sourcegrandaverage, but there are always new problems; for example, when I put the source data directly into sourcestatistics, without using sourcegrandaverage, there is a problem with checkdata, saying that the function requires source or volume data as input. Computing the timelockdata only for a single latency results in a problem in source analysis ('error in minimumnormestimate at 143, mom = w*dat). > > Does anyone have a script for computing MNE on timelockdata that works?! I would be very glad if someone could help me out with this problem! > > Thanks and Best > Christine > > > -- > Christine Grützner, geb.Tillmann > Max-Planck-Institut für Hirnforschung > Abt. Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > Phone: +49 (0)69/6301-83225 > E-Mail: tillmann at mpih-frankfurt.mpg.de > http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Mon Jan 11 16:16:12 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Mon, 11 Jan 2010 16:16:12 +0100 Subject: Minimum norm analysis for timelock-data In-Reply-To: <841d3141001110655t1dbf6c77k126ed07d0ed66d02@mail.gmail.com> Message-ID: Computing MNE is apparently not something many people want to do with fieldtrip so it seems the implementation is still far from streamlined. For the time being, you could try a hack, which transforms your output into one which fieldtrip may swallow. I would suggest something like this: nvox = size(source.pos,1); mom = cell(1,nvox); for k = 1:length(source.inside) indx = source.inside(k); mom{indx} = source.avg.pow(xx,:); %I don't know whether avg.pow contains only the inside voxels, so xx could be either indx, or k. end source.avg.mom = mom; source.avg = rmfield(source.avg, 'pow'); I wonder whether it works after this... Best, JM PS: I would actually opt for improving fieldtrip's implementation and handling with MNE-estimates. Perhaps we could do this together? We can do this offline (not through the discussion list). Would it be possible to post some fieldtrip data-structure, along with the necessary accessories (grids, vols etc), as well as your script? On Jan 11, 2010, at 3:55 PM, Christine Gruetzner wrote: > Dear Fieldtrippers, > > I still have this problem with performing source analysis (minimum > norm estimate) on timelockdata. As already mentioned, the main > problem occurs in sourcegrandaverage, probably because the output > data from source analysis (using cfg.method = 'mne' on timelock > data) contain an avg.pow field with the dimensions 4560x211 for each > subject, where 211 is the number of time samples. > > I have tried several things to avoid the problem with > sourcegrandaverage, but there are always new problems; for example, > when I put the source data directly into sourcestatistics, without > using sourcegrandaverage, there is a problem with checkdata, saying > that the function requires source or volume data as input. Computing > the timelockdata only for a single latency results in a problem in > source analysis ('error in minimumnormestimate at 143, mom = w*dat). > > Does anyone have a script for computing MNE on timelockdata that > works?! I would be very glad if someone could help me out with this > problem! > > Thanks and Best > Christine > > > -- > Christine Grützner, geb.Tillmann > Max-Planck-Institut für Hirnforschung > Abt. Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > Phone: +49 (0)69/6301-83225 > E-Mail: tillmann at mpih-frankfurt.mpg.de > http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > 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-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Mon Jan 11 20:05:29 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Mon, 11 Jan 2010 20:05:29 +0100 Subject: sourceinterpolate and transforms Message-ID: Hi everyone! After successfully applying the function sourceanalysis to my data I wanted to use sourceinterpolate next to plot the result. As it turned out, sourceinterpolate expects that both data types, anatomical and funtional, have a field called trans. Now, it is missing in my functional data. Does anyone how I can come up with it? And what exactly is this transformation matrix? I thought it describes the tansition into the MNI or whatever coordinate system, but it seems to be there even without visual realigment and its not even 3D ... Thanks for any comments! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teristam at GMAIL.COM Tue Jan 12 08:20:41 2010 From: teristam at GMAIL.COM (teris tam) Date: Tue, 12 Jan 2010 15:20:41 +0800 Subject: Some problem using the fieldtripbuffer Message-ID: Dear all, I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer . It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program. Does anyone have an idea why this error occur and how to solve it? Thanks a lot! Best regards, Teris ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaifengg at GMAIL.COM Thu Jan 14 10:02:18 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Thu, 14 Jan 2010 11:02:18 +0200 Subject: Problems in Localizing oscillatory sources using beamformer techniques Message-ID: Dear all, I am now trying to know how to localize oscillatory sources using beamformer techniques. I use the exact codes as used in the tutor with Fieldtrip , but there are errors when I did the *volumenormalise . The script I used: * cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/opt/matlab/toolbox/spm2/templates/T1.mnc'; %this template is in MNI coordinatescfg.template sourceDiffIntN = volumenormalise(cfg, sourceDiffInt); * The errors are: * 3D CT Norm... iteration 1: ??? Error using ==> spm_brainwarp Wrong sized dim. Error in ==> spm_normalise>snbasis at 288 [Alpha,Beta,Var,fw] = spm_brainwarp(VG,VF,Affine,basX,basY,basZ,dbasX,dbasY,dbasZ,T,fwhm,VWG, VWF); Error in ==> spm_normalise at 185 Tr = snbasis(VG1,VF1,VWG,VWF,Affine,... Error in ==> ft_volumenormalise at 193 params = spm_normalise(VG,VF); Error in ==> volumenormalise at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Does anybody know how to deal with it? Thanks a lot Feng ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Thu Jan 14 15:31:39 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 14 Jan 2010 15:31:39 +0100 Subject: satellite meeting Biomag: Analysis toolboxes for MEG data Message-ID: Dear all, I would like to announce the satellite meeting in connection with Biomag2010: *Analysis toolboxes for MEG data * Sunday, March 28, 2010, Dubrovnik Free toolboxes for analysis of MEG data are now widely used in published work. These toolboxes are becoming essential for making new developments available to the users. Further they serve to bring developers and users closer together. That aim of the satellite proposal is 1) To make the users aware about the features and possibilities of the various toolboxes 2) To facilitate the communication between developers and users in order to help direct future developments 3) To bring the toolbox developers together to facility common developments and sharing. The meeting will have both presentations and demos. Registration is now open http://megcommunity.org/index.php?option=com_content&view=article&id=7&Itemid=23 Attendance will be limited. All the best, Ole -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jan 14 21:53:30 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 14 Jan 2010 21:53:30 +0100 Subject: loreta.m missing Message-ID: Hi Michael, The loreta implementation was never fully finished and tested, that is why it is not included in the release. I don't want people to start using it and then complain that loreta (either the method or the implementation) is not working. Please find it attached if you want to give it a try. best, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 11 Jan 2010, at 14:24, Michael Wibral wrote: > Dear Fieldtrippers, > > loreta.m seems to be missing from the releases for quite a while (at least since Dec. 2008), altough it's called from sourceananalysis. Maybe it could be included again? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loreta_lap3d.m Type: application/octet-stream Size: 2420 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loreta.m Type: application/octet-stream Size: 3775 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jan 14 21:54:23 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 14 Jan 2010 21:54:23 +0100 Subject: Some problem using the fieldtripbuffer Message-ID: Hi Teris, I have also occasionally encountered the problem with opening a TCP connection on windows (i.e. bci2000). The error means that the client (MATLAB) is not able to make a connection to the server (the fieldtrip buffer which is running under BCI2000). On a Linux or OSX only setup (both the matlab client and the buffer server running on linux and/or OSX) the problem never happened to me. I don't know where in the code the problem is, and since it is so difficult to reproduce, I also don't know where to start looking in the code. If it results in problems for you, then I suggest you do something like function varargout = retry_read_header(varargin) retry = 100; while retry>0 try varargout = read_header(varargin{:}); break; end retry = retry - 1; end and something similar for read_data and read_event. Of course it would be better if the problem were fully diagnosed and subsequently fixed, so any suggestions are welcome. best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 12 Jan 2010, at 8:20, teris tam wrote: > Dear all, > I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer. > It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program. > Does anyone have an idea why this error occur and how to solve it? > Thanks a lot! > Best regards, > Teris ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teristam at GMAIL.COM Fri Jan 15 03:28:18 2010 From: teristam at GMAIL.COM (teris tam) Date: Fri, 15 Jan 2010 10:28:18 +0800 Subject: Some problem using the fieldtripbuffer In-Reply-To: <8694DB79-6BDE-4DB5-9DF4-3DCA58E085E6@fcdonders.ru.nl> Message-ID: Dear Robert, It's very nice to hear from you! I have done some test in matlab trying to get down to the root of the problem. I have observed that the problem only occur if there is a repeated pulling of header information of the fieldtripbuffer by read_header(), e.g. when the matlab code is waiting for a new block of data. Adding some time delay between subsequent calls of read_header() seems to alleviate the issue: hdr = read_header(filename, 'cache',true); pause(0.1); Interestingly, repeated calling of read_data() to get the most recent data doesn't seem to have any problem, even if no time delay is added between calls. I have tried to start 2 matlab sessions to investigate whether the error comes from matlab or from the fieildtripbuffer server. When one matlab session fails to connect, the other session cannot connect to the server either (They are not connecting in parallel. I start the other session right after the first session reports error). However, the code is able to connect to the buffer again after waiting for 3-4s. I guess the problem is that repeatedly calling of read_header() may jam the buffer server. read_data() may take a longer time to process in matlab and so adding a time delay for the server to recover. We can verify this if we can get into the debug information of the buffer server (if there is any). Currently I work around the issue by adding a delay between read_header() or just use read_data() to get the most recent data. Best regards, Teris On Fri, Jan 15, 2010 at 4:54 AM, Robert Oostenveld < r.oostenveld at fcdonders.ru.nl> wrote: > Hi Teris, > > I have also occasionally encountered the problem with opening a TCP > connection on windows (i.e. bci2000). The error means that the client > (MATLAB) is not able to make a connection to the server (the fieldtrip > buffer which is running under BCI2000). > > On a Linux or OSX only setup (both the matlab client and the buffer server > running on linux and/or OSX) the problem never happened to me. I don't know > where in the code the problem is, and since it is so difficult to reproduce, > I also don't know where to start looking in the code. If it results in > problems for you, then I suggest you do something like > > function varargout = retry_read_header(varargin) > retry = 100; > while retry>0 > try > varargout = read_header(varargin{:}); > break; > end > retry = retry - 1; > end > > and something similar for read_data and read_event. > > Of course it would be better if the problem were fully diagnosed and > subsequently fixed, so any suggestions are welcome. > > best regards, > Robert > > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > On 12 Jan 2010, at 8:20, teris tam wrote: > > Dear all, > I am trying to read the signal from BCI2000 in MATLAB using the > fieldtripbuffer. I use the code given in the BCI2000 wiki at > http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer > . > It was able to read and plot the signal from BCI2000 correctly for > a certain period of time, but eventually it stopped and reported "ERROR: > failed to create socket (-2)". I was able to connect to and read from the > buffer again if I re-run the program. > Does anyone have an idea why this error occur and how to solve it? > Thanks a lot! > Best regards, > Teris > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pacodiaz at UB.EDU Fri Jan 15 15:28:07 2010 From: pacodiaz at UB.EDU (=?ISO-8859-1?Q?Paco_D=EDaz?=) Date: Fri, 15 Jan 2010 15:28:07 +0100 Subject: OPEN POST-DOC POSITION IN BARCELONA Message-ID: Hope you don't mind if I announce here the following 3 years post doc position in our group: The Barcelona BrainLab (BBL) [www.ub.edu/brainlab] invites applications for a 3-year post-doctoral position commencing during the spring 2010 in the field of the Cognitive Neuroscience of Auditory Perception. Principal Investigator: Prof. Dr. Carles Escera. Successful applicants should have completed a Ph.D. in Neurosciences, Cognitive, Computer or Biological Sciences, Engineering or related disciplines. For a more detailed information please find the attached document. Contact Person: Mrs. Marta Turró e-mail: brainlab at ub.edu Subject: ERANET-postdoc application Best regards, Paco. -- --------------------------------------------------------- Francisco Javier Díaz Santaella Institute for Brain,Cognition and Behavior (IR3C) University of Barcelona and Cognitive Neuroscience Research Group Department of Psychiatry and Clinical Psychobiology University of Barcelona P. Vall d'Hebron 171 * 08035 Barcelona * Spain Telf.: +34 93 3125035 * Cell Phone: +34 678 89 47 57 email: pacodiaz at ub.edu http://www.ub.edu/brainlab --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: call_postdoc_EN_pdf.pdf Type: application/pdf Size: 107988 bytes Desc: not available URL: From michael.wibral at WEB.DE Fri Jan 15 18:10:12 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 15 Jan 2010 18:10:12 +0100 Subject: loreta.m missing Message-ID: Hi Robert, thanks for the code. We'll give it a try. Sorry if my post sounded like a complaint of any kind - it was never meant like that. BTW: We got sourcestatistics running on MNE output by removing the time-dimension from the source data (via averaging over a little interval and fixing dimord and related info). Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 14.01.10 21:53:38 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] loreta.m missing > Hi Michael, > > The loreta implementation was never fully finished and tested, that > is why it is not included in the release. I don't want people to > start using it and then complain that loreta (either the method or > the implementation) is not working. Please find it attached if you > want to give it a try. > > best, > Robert > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > On 11 Jan 2010, at 14:24, Michael Wibral wrote: > > Dear Fieldtrippers, > > loreta.m seems to be missing from the releases for quite a while (at > least since Dec. 2008), altough it's called from sourceananalysis. > Maybe it could be included again? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 336 bytes Desc: not available URL: From aostendorf at BESA.DE Tue Jan 19 10:30:38 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 10:30:38 +0100 Subject: tinv / several questions Message-ID: Dear Fieldtrip experts, I am currently working on a script for the evaluation of BESA TFC data with Fieldtrip and have found the tutorials and sample scripts a great help. Nevertheless, I have got a few, probably rather basic, questions and would be thankful for help. 1) cohspctrm: I would like to feed coherence data exported from BESA to ft_freqstatistics. The data have been brought to resemble the output of ft_freqanalysis so the data field has explicitly been renamed to "powspctrm" (and it works). Is this correct? (I have looked through the beginning of the ft_freqstatistics code and it looks as if the existence of the 'cohspctrm' field would lead to the input being brought to the format I put in.) 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning although I have now switched the setting to cfg.highlight = 'on'. Is there a possibility to implement something like the following example (taken from the tutorial on cluster-based permutation tests on event-related fields)? pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find (pos_int==1|neg_int==-1); 3) Clustering over channels: Is it correct that I can prevent clustering over channels by setting cfg.neighbours = {} ? Is it correct to use this option also if I want to average over channels (avgoverchans = 'yes')? 4) Lately, some "nan" functions have been added to the statfun/private folder because they are not found otherwise in case somebody does not have access to the MATLAB statistics toolbox. May I suggest that a copy of tinv.m be added, too? (I also placed a copy of nanmean in public/private because I got an error message in avgoverdim.) I am really impressed with the Fieldtrip software and also with the exchange on the mailing list! Best regards to all of you Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jan 19 11:31:26 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 19 Jan 2010 11:31:26 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Dear Andrea, Could I answer question 1 and 4, and leave the others to someone else? > 1) cohspctrm: I would like to feed coherence data exported from BESA > to > ft_freqstatistics. The data have been brought to resemble the output > of > ft_freqanalysis so the data field has explicitly been renamed to > "powspctrm" > (and it works). Is this correct? (I have looked through the > beginning of the > ft_freqstatistics code and it looks as if the existence of the > 'cohspctrm' > field would lead to the input being brought to the format I put in.) As far as I can see, it can be done in two ways: 1 cfg.parameter = 'cohspctrm' and the input data is just untouched (i.e. data.cohspctrm not renamed into data.powspctrm) 2 cfg.parameter = 'powspctrm' (or empty, then it takes the default, which is 'powspctrm'), and the input data changes so that .cohspctrm is manually renamed into .powspctrm I would propose to use method 1. The reason for this is that in the future we will make the code 'smarter' such that it can directly deal with parameters, other than powspctrm directly (without the need of working around it; either within or outside freqstatistics) > 4) Lately, some "nan" functions have been added to the statfun/private > folder because they are not found otherwise in case somebody does > not have > access to the MATLAB statistics toolbox. May I suggest that a copy > of tinv.m > be added, too? (I also placed a copy of nanmean in public/private > because I > got an error message in avgoverdim.) Yes, sorry about that. I added a symbolic link to fieldtrip/private/ nanmean.m in fieldtrip/public/private. This is how it should be done, because this way we only use 1 physical copy of a file, rather than duplicating the files in different places (running the risk that they start leading a life of their own). I also created links for tinv and tcdf in statfun/private. I guess you should be able to directly update these changes (svn update). > I am really impressed with the Fieldtrip software and also with the > exchange > on the mailing list! Thanks. Keep up the good work. Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Tue Jan 19 11:56:23 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 11:56:23 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Dear Jan-Mathijs, Thanks a lot for the extra-speedy reply! I am glad to hear that I can handle coherence data this easily. [Sorry, I expressed myself in an ambiguous way: My input with its field "powspctrm" has been renamed from the BESA field name, which is "data", not from "cohspctrm", and it possesses the corresponding label structure. So that means "do not change anything" for me, which I did at first and which works fine.] Thanks also for the extra functions. It is really great that all those options are available even without the extra toolbox! All the best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Tue Jan 19 14:37:39 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 19 Jan 2010 14:37:39 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Hi Andrea, I think I can answer the second question for you. 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning although I have now switched the setting to cfg.highlight = 'on'. Is there a possibility to implement something like the following example (taken from the tutorial on cluster-based permutation tests on event-related fields)? It looks as if you are referring to ft_topoplotER and not ft_clusterplot. If that assumption is correct, than you can definitely use something like: cfg.highlight = find (pos_int==1|neg_int==-1); However, cfg.highlight would then need to be changed into cfg.highlightchannel. In the new highlighting configuration, cfg.highlight is used to determine highlighting-method (like 'on', 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate which channels your actually want to highlight. This can be a numerical index vector (like above), channel-labels, channel-labels with wildcards and anything else ft_channelselection can take as input. The tutorial on the wiki hasn't been updated yet to reflect the changes to topoplotER (I'll do that soon), but the following should work: cfg.highlight = 'on'; cfg.highlightchannel = find (pos_int==1|neg_int==-1); (using all the defaults this should mark every channel in cfg.highlightchannel with a '*' and every other channel with a 'o') Hope this helps! Best, Roemer Andrea Ostendorf wrote: > Dear Fieldtrip experts, > > I am currently working on a script for the evaluation of BESA TFC data with > Fieldtrip and have found the tutorials and sample scripts a great help. > Nevertheless, I have got a few, probably rather basic, questions and would > be thankful for help. > > > 1) cohspctrm: I would like to feed coherence data exported from BESA to > ft_freqstatistics. The data have been brought to resemble the output of > ft_freqanalysis so the data field has explicitly been renamed to "powspctrm" > (and it works). Is this correct? (I have looked through the beginning of the > ft_freqstatistics code and it looks as if the existence of the 'cohspctrm' > field would lead to the input being brought to the format I put in.) > > 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning > although I have now switched the setting to cfg.highlight = 'on'. Is there a > possibility to implement something like the following example (taken from > the tutorial on cluster-based permutation tests on event-related fields)? > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > cfg.highlight = find (pos_int==1|neg_int==-1); > > 3) Clustering over channels: > Is it correct that I can prevent clustering over channels by setting > cfg.neighbours = {} ? Is it correct to use this option also if I want to > average over channels (avgoverchans = 'yes')? > > 4) Lately, some "nan" functions have been added to the statfun/private > folder because they are not found otherwise in case somebody does not have > access to the MATLAB statistics toolbox. May I suggest that a copy of tinv.m > be added, too? (I also placed a copy of nanmean in public/private because I > got an error message in avgoverdim.) > > I am really impressed with the Fieldtrip software and also with the exchange > on the mailing list! > > Best regards to all of you > Andrea > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From clemens.maidhof at HELSINKI.FI Tue Jan 19 17:31:56 2010 From: clemens.maidhof at HELSINKI.FI (Clemens Maidhof) Date: Tue, 19 Jan 2010 18:31:56 +0200 Subject: bdf import, 16 bits events Message-ID: Dear Fieldtrip users, we are using 16 Bits for coding events in BDF data (i.e., all 16 pins for trigger input of the BioSemi connector used; 8 Bits for Presentation and 8 Bits for another device). However, when importing the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all event codes with a value higher than 28 (from Bits 9-16) seem to be incorrect: these triggers are recognized, but their value is the sum of an addition of the actual value with a value from the first 8 bits. During recording, the BioSemi software shows the correct events in the acquisition software, and also when imported into BESA all correct event codes are there. So we thought this has probably to do with the import-function in fieldtrip. Has anybody encountered the same problem or maybe even better, knows a solution ;-) ? Thanks a lot in advance for any hints and tips! Clemens -- Clemens Maidhof Cognitive Brain Research Unit, Department of Psychology, University of Helsinki & Finnish Centre of Excellence in Interdisciplinary Music Research, University of Jyväskylä, Finland clemens.maidhof at helsinki.fi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.robitaille at UMONTREAL.CA Tue Jan 19 18:02:52 2010 From: nicolas.robitaille at UMONTREAL.CA (Nicolas Robitaille) Date: Tue, 19 Jan 2010 17:02:52 +0000 Subject: bdf import, 16 bits events In-Reply-To: <4B55DE7C.8000702@helsinki.fi> Message-ID: Hi Clemens, I've encounter a similar problem. Biosemi actually merge the data as if this was a single 16-pins triggers, so a number between 0 and 65535. You could dissociate these two number and get back your two independent values with something like: t = dec2bin(yourTrigValue,16) lowerPort = bin2dec(t(9:16)) higherPort = bin2dec(t(1:8)) so both values will be between 0 and 255. Something you must carefully think about, however, is that you may get much more trig that you actually send. For example, you likely gonna get consecutive identical events on the lower port, which were originally recorded as as separate events because something happen on the higher port. Same will happen for the 0 you likely send between each code, independently on each port, to put all the pins down. Hope this help, Nicolas p.s. there could be a more computationally-efficient way to do this. ************************* Nicolas Robitaille, Ph.D. Stagiaire post-doctoral Brams ************************* Date: Tue, 19 Jan 2010 18:31:56 +0200 From: clemens.maidhof at HELSINKI.FI Subject: [FIELDTRIP] bdf import, 16 bits events To: FIELDTRIP at NIC.SURFNET.NL Dear Fieldtrip users, we are using 16 Bits for coding events in BDF data (i.e., all 16 pins for trigger input of the BioSemi connector used; 8 Bits for Presentation and 8 Bits for another device). However, when importing the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all event codes with a value higher than 28 (from Bits 9-16) seem to be incorrect: these triggers are recognized, but their value is the sum of an addition of the actual value with a value from the first 8 bits. During recording, the BioSemi software shows the correct events in the acquisition software, and also when imported into BESA all correct event codes are there. So we thought this has probably to do with the import-function in fieldtrip. Has anybody encountered the same problem or maybe even better, knows a solution ;-) ? Thanks a lot in advance for any hints and tips! Clemens -- Clemens Maidhof Cognitive Brain Research Unit, Department of Psychology, University of Helsinki & Finnish Centre of Excellence in Interdisciplinary Music Research, University of Jyväskylä, Finland clemens.maidhof at helsinki.fi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Tue Jan 19 18:51:43 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 18:51:43 +0100 Subject: Thanks / warning in ft_topoplotER In-Reply-To: <4B55B5A3.2010907@donders.ru.nl> Message-ID: Dear Roemer, dear Jan-Mathijs, Thanks for your quick answers! Sorry for getting back so late. Dear Jan-Mathijs, thanks for the comment on the symbolic links. My colleagues and I, as well as other BESA users, use Windows at work so it would be nice to get news on your proposed OS-independent solution. Dear Roemer, yes, I was referring to ft_topoplotER. I forgot to mention this although I was aware of the fact. Thanks for the explanations! I am a bit confused because I still end up with the same warning (line 214 of ft_topoplotER) even if I use cfg.highlightchannel = 'all'; (or a numerical index vector) cfg.highlight = 'on'; I used the same setting (with different data) for both ft_topoplotTFR and ft_clusterplot. Both call topoplotER, although the call looks a bit different. There is no problem in the case of ft_topoplotTFR. If I modify cfg.highlightchannel, I see a change. When using ft_clusterplot with this same setting, the significant channels appear to be highlighted but I observe no change upon modification of cfg.highlightchannel, and I get the warning in ft_topoplotER (line 214). On debugging, I see that the lines below l.606 in ft_topoplotER ("if ~strcmp(cfg.marker,'off')") are carried out only in my call of ft_topoplotTFR. Have I done anything wrong, or are the settings treated differently by both routines? Have a nice evening! And thanks a lot to both of you! All the best Andrea > > 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a > warning > although I have now switched the setting to cfg.highlight = 'on'. Is there > a > possibility to implement something like the following example (taken from > the tutorial on cluster-based permutation tests on event-related fields)? > > > It looks as if you are referring to ft_topoplotER and not > ft_clusterplot. If that assumption is correct, than you can definitely > use something like: > cfg.highlight = find (pos_int==1|neg_int==-1); > However, cfg.highlight would then need to be changed into > cfg.highlightchannel. In the new highlighting configuration, > cfg.highlight is used to determine highlighting-method (like 'on', > 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate > which channels your actually want to highlight. This can be a numerical > index vector (like above), channel-labels, channel-labels with wildcards > and anything else ft_channelselection can take as input. > > The tutorial on the wiki hasn't been updated yet to reflect the changes > to topoplotER (I'll do that soon), but the following should work: > cfg.highlight = 'on'; > cfg.highlightchannel = find (pos_int==1|neg_int==-1); > (using all the defaults this should mark every channel in > cfg.highlightchannel with a '*' and every other channel with a 'o') > > Hope this helps! > > Best, > Roemer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Wed Jan 20 12:52:14 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 20 Jan 2010 12:52:14 +0100 Subject: Thanks / warning in ft_topoplotER In-Reply-To: <6D7D6970FEC64AE5AE0EF13A14CCFF96@LAT6500Andrea> Message-ID: Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer Andrea Ostendorf wrote: > Dear Roemer, dear Jan-Mathijs, > > Thanks for your quick answers! Sorry for getting back so late. > > Dear Jan-Mathijs, thanks for the comment on the symbolic links. My > colleagues and I, as well as other BESA users, use Windows at work so it > would be nice to get news on your proposed OS-independent solution. > > Dear Roemer, yes, I was referring to ft_topoplotER. I forgot to mention this > although I was aware of the fact. Thanks for the explanations! > > I am a bit confused because I still end up with the same warning (line 214 > of ft_topoplotER) even if I use > cfg.highlightchannel = 'all'; (or a numerical index vector) > cfg.highlight = 'on'; > > I used the same setting (with different data) for both ft_topoplotTFR and > ft_clusterplot. Both call topoplotER, although the call looks a bit > different. > There is no problem in the case of ft_topoplotTFR. If I modify > cfg.highlightchannel, I see a change. > When using ft_clusterplot with this same setting, the significant channels > appear to be highlighted but I observe no change upon modification of > cfg.highlightchannel, and I get the warning in ft_topoplotER (line 214). > On debugging, I see that the lines below l.606 in ft_topoplotER > ("if ~strcmp(cfg.marker,'off')") are carried out only in my call of > ft_topoplotTFR. > > Have I done anything wrong, or are the settings treated differently by both > routines? > > Have a nice evening! And thanks a lot to both of you! > All the best > Andrea > > > > > > >> 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a >> warning >> although I have now switched the setting to cfg.highlight = 'on'. Is there >> a >> possibility to implement something like the following example (taken from >> the tutorial on cluster-based permutation tests on event-related fields)? >> >> >> It looks as if you are referring to ft_topoplotER and not >> ft_clusterplot. If that assumption is correct, than you can definitely >> use something like: >> cfg.highlight = find (pos_int==1|neg_int==-1); >> However, cfg.highlight would then need to be changed into >> cfg.highlightchannel. In the new highlighting configuration, >> cfg.highlight is used to determine highlighting-method (like 'on', >> 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate >> which channels your actually want to highlight. This can be a numerical >> index vector (like above), channel-labels, channel-labels with wildcards >> and anything else ft_channelselection can take as input. >> >> The tutorial on the wiki hasn't been updated yet to reflect the changes >> to topoplotER (I'll do that soon), but the following should work: >> cfg.highlight = 'on'; >> cfg.highlightchannel = find (pos_int==1|neg_int==-1); >> (using all the defaults this should mark every channel in >> cfg.highlightchannel with a '*' and every other channel with a 'o') >> >> Hope this helps! >> >> Best, >> Roemer >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Wed Jan 20 13:51:04 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 20 Jan 2010 13:51:04 +0100 Subject: Warning in ft_topoplotER In-Reply-To: <4B56EE6E.6000307@donders.ru.nl> Message-ID: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test_clusterplot.zip Type: application/x-zip-compressed Size: 4918 bytes Desc: not available URL: From aostendorf at BESA.DE Wed Jan 20 13:55:39 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 20 Jan 2010 13:55:39 +0100 Subject: warning in ft_topoplotER: version In-Reply-To: <4B56EE6E.6000307@donders.ru.nl> Message-ID: Dear Roemer, sorry, I forgot to tell you the version: I am currently using fieldtrip-20100114. Best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Wed Jan 20 14:07:45 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 20 Jan 2010 14:07:45 +0100 Subject: Warning in ft_topoplotER In-Reply-To: Message-ID: Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: > > Dear Roemer, > > > > thanks a lot for your help and the time you are taking to assist me! > Your remarks have been really helpful. > > > > The warning is from topoplotER, which I call indirectly through > ft_clusterplot. Thanks for pointing out that I am not to use the > options directly. I saw some options in the help of ft_clusterplot > together with the hint that more options were to be found in topoplotER. > > > > Since I keep having trouble with uploading files to your server, I > attach a test MATLAB file (stripped down to the basics) and my data. I > hope that is okay, it is really quite a small amount of data. > Otherwise, I would try my private Ubuntu computer. > > > > The warning is > > Warning: cfg.highlight is now used for specifing highlighting-mode, > use cfg.highlightchannel instead of cfg.highlight for specifiying channels > > > In ft_topoplotER at 214 > > In topoplotER at 17 > > In ft_clusterplot at 277 > > In test_clusterplot at 5 > > > > Thanks a lot! > > > > Best regards > > Andrea > > > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 12:52 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Thanks / warning in ft_topoplotER > > > > Hi Andrea, > > Always happy to help. And thank you for helping us squashing bugs! > > Are you sure you are using the most recent fieldtrip version? There > was a bug several weeks ago that gave the warning (which used to be on > line 214, but is now on line 215) even when cfg.highlight was not > numerical. (if it's numerical, it is assumed cfg.highlight is used in > the old way). If you have a version that is newer than 19-12-2009 > (date of previous bug fix), could you post the exact code you use to > call ft_topoplotER? This could give me a better idea on where in the > code the problem lies. Could you then also post the exact warning > matlab spits out? (if it's not a version problem, something > complicated is going on and all information is helpful). Thanks! > > Concerning ft_clusterplot, you're not actually supposed to use the > highlighting options directly. As clusterplot tries to determine the > clustering automatically, this could possibly interfere with it's > normal functioning. Thanks for pointing this out. I now added a check > for these 'forbidden' options and they will be removed automatically. > The updated clusterplot will be uploaded to the ftp-server somewhere > late in the evening today. > > However, if you want to manage you're own clustering directly, you can > also do this using topoplotER/TFR. It might be a bit difficult, but > you have to put all the highlighting options in its own cell > (including the ones that were already in cells). There is 'hidden' > documentation about this in topoplotER (you won't see it with the > help/doc command, but you will if you edit the function), you can find > it just below the normal documentation. > I copy-pasted it here for easy reference: > *********** > % It is possible to use multiple highlight-selections (e.g.: multiple > statistical clusters of channels) > % To do this, all the content of the highlight-options (including > cfg.highlight) should be placed in a cell-array > % (even if the normal content was already in a cell-array). Specific > marker settings (e.g. color, size) are defaulted when > % not present. > % Example (3 selections): > % cfg.highlight = {'labels', 'labels', 'numbers'} > % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} > % cfg.highlightsymbol = {'o',[],'+'} % the empty option > will be defaulted > % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option > will be defaulted > % cfg.highlightsize = []; % will be set > to default, as will the missing cfg.highlightfontsize > *********** > > Using these options you should be able to get the same individual > plots clusterplot can give you. If you do not want to see the other > channels, set cfg.marker = 'off';. On the use of the different > routines, topoplotTFR is identical to topoplotER, but is just present > because of our present naming-scheme. Clusterplot however, is a > wrapper around topoplotER/TFR designed to quickly and without much > configuring plot your statistical clusters (which requires statistics > output as input). By using the 'hidden' options above, you can make > topoplotER/TFR do exactly the same as clusterplot, but then you can > specify your own clusters. > > > We are currently looking into your question number 3, as it appears > things go a little deeper there. There are at least some situations > where cfg.neighbours = [] apparently doesn't work, but we are still > figuring out why. For the moment, a really ugly and time consuming > workaround would be to make a for-loop over single channels, but it > would prevent the clustering over channels and should provide (per > channel) the exact same output as cfg.neighbours = []; > > > I hope all of the above helps. Thanks for bringing these bugs to our > attention! > > Kind regards, > > Roemer > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Thu Jan 21 08:54:53 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 21 Jan 2010 08:54:53 +0100 Subject: data analysis competition/Biomag2010 Message-ID: Dear all, We would like to announce a data analysis competition for biomag2010: http://megcommunity.org/index.php?option=com_content&view=article&id=2&Itemid=24 It focuses on connectivity analysis and multivariate classification approaches. Please consider attending or encourage interested researchers to participate. Best regards, Ole Jensen and Jan-Mathijs Schoffelen -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Thu Jan 21 13:33:39 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 21 Jan 2010 13:33:39 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: <4B570021.9030200@donders.ru.nl> Message-ID: Dear Roemer, Thanks a lot. My previous version worked with your proposed corrections and I downloaded the new version today. Sorry, I have yet another question, this time regarding the parameters controlling statistical analysis for the cluster-based test statistic. When asking myself whether it made sense to set cfg.testtail and cfg.tail independently, I found the error message in clusterstat.m, l.32, which states that the parameters should be equal. Could you perhaps mention this requirement in the tutorials? Also, regarding cfg.alpha and cfg.clusteralpha - just to make sure that I have got things right: For a two-sided test, I have to split cfg.alpha manually so as to equal half the desired significance level but I do not have to change cfg.clusteralpha explicitly, is this correct? I gathered so from the tutorials and it looks so from the code (in clusterstat and the statfun functions, the alpha parameter is halved automatically). If nothing is specified, both parameters are set to 0.05. As a two-sided test is the default, does this mean that the false alarm rate is set at the 10% level if the user does not specify anything, or have I overlooked something? (I have to admit that I am impressed with the intricacies but that I have not really grasped the details.) By the way, the tutorial on cluster-based permutation tests on event related fields mentions a parameter cfg.alphathresh, which I only found in the clusterrand functions and which I took to mean cfg.clusteralpha. All the best to all of you Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 14:08 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Warning in ft_topoplotER Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From smaraujo at UALG.PT Tue Jan 26 14:53:19 2010 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Tue, 26 Jan 2010 13:53:19 -0000 Subject: problems with high pass filter Message-ID: Dear all, I’m analysing EEG data from children and I tried to set the high pass filter to 0.05Hz (PreProcessing). However I get a warning message “Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669240e-017”. Does anyone can help me to solve this problem? Thanks a lot! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jan 26 15:31:21 2010 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 26 Jan 2010 15:31:21 +0100 Subject: problems with high pass filter In-Reply-To: <20100126135311.88B33166C2@smtp3.ualg.pt> Message-ID: Dear Susana, Probably you data(segments) are too short for this setting. For the high pass filter with 0.05Hz to work you need very long data (0.05 Hz is a cycle of 20 seconds!), Do you need such low frequencies in your data? If not you could try f.i. 0.5Hz. Hope this helps, Ingrid ------------------------------------ Ingrid L.C. Nieuwenhuis PhD student Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands Email: ingrid.nieuwenhuis at donders.ru.nl Tel: 0031 (0)24 - 36 10887 _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Susana Araújo Sent: Tuesday, January 26, 2010 2:53 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] problems with high pass filter Dear all, I’m analysing EEG data from children and I tried to set the high pass filter to 0.05Hz (PreProcessing). However I get a warning message “Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669240e-017”. Does anyone can help me to solve this problem? Thanks a lot! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at CERCO.UPS-TLSE.FR Tue Jan 26 21:39:04 2010 From: arno at CERCO.UPS-TLSE.FR (Arnaud Delorme) Date: Tue, 26 Jan 2010 12:39:04 -0800 Subject: problems with high pass filter Message-ID: Dear Susana and Ingrid, designing efficient filters at very low frequency can be challenging. Below is a solution using pure Matlab code and elliptic filters for high pass filtering at 0.1 Hz (transition bandwidth is from 0.05 to 0.1 Hz). EEG.srate is the sampling rate, EEG.nbchan, the number of data channel and EEG.data contains the continuous data (number of channels x number of data points). The code below requires the signal processing toolbox. You may also notice that I detrend the data first. This is to remove any DC offset and very slow drifts that tend to generate more artifacts at data boundaries. The function filtfilt applies the filter in both direction (forward then backward) to avoid phase distortions. Hope this helps, Arno [N, Wn] = ellipord(.1/(EEG.srate/2), .05/(EEG.srate/2), 0.5, 3) [b a] = ellip(N, 0.5, 3, Wn, 'high'); for index = 1:EEG.nbchan EEG.data(index,:) = detrend(EEG.data(index,:)); EEG.data(index,:) = filtfilt( b, a, EEG.data(index,:)); end; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Wed Jan 27 10:08:38 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Wed, 27 Jan 2010 10:08:38 +0100 Subject: minor bug and beamformer question Message-ID: Hi everyone! I would like to report that fieldtrip's read_mri function complains about not finding the field with the transformation matrix in our neuomag fiff files. The problem was fixed by my dear colleague Hanneke by replacing if issubfield(hdr.voxel_trans, 'trans') transform = hdr.voxel_trans.trans; elseif issubfield(hdr.trans, 'trans'), transform = hdr.trans.trans; end by if isfield(hdr, 'voxel_trans') transform = hdr.voxel_trans.trans; elseif isfield(hdr, 'trans') transform = hdr.trans.trans; end Maybe this can be incorporated in future versions. Then I do have two questions about beamforming. As I understand it, beamformer methods such as DICS are able to compute time courses of brain regions. How can I visualize the time signal of a voxel in fieldtrip? Then I found that after sorting out several trials in my experiment I was not able to compute the neural activity index anymore, as the noise estimates for the grid nodes were all either NANs or zeros. I this a known problem or did I make a mistake somewhere? How could it be fixed? Thank you very much for your support! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.hartmann at UNI-KONSTANZ.DE Wed Jan 27 13:57:30 2010 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Wed, 27 Jan 2010 13:57:30 +0100 Subject: using ica to get occipital component producing alpha in eyes-closed resting eeg Message-ID: hi, i am looking for a method to identify the component(s) of an eyes-closed resting-state eeg producing occipital alpha in a single subject. so far, no method i tried (fastica, sobi) was able to produce such a component, although topoplots show them very clearly. i also tried to filter the data using a bandpass filter before letting the ica run. i have 5 minutes of data available, partly contaminated with tms-artifacts which i remove beforehand. does someone know a good and stable approach? maybe i would have to change the ica-algorithm? is there one specifically looking at frequency-information? maybe i also use the wrong approach? is there a different option to get something like a weighting matrix restricted to a specific frequency-band (and also able to seperate occipital alpha from other alpha generators like, e.g. temporal, motor etc..)? thanks in advance! greetings, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Thu Jan 28 11:07:15 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Thu, 28 Jan 2010 11:07:15 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: Message-ID: Hi Andrea, Sorry for my late reply (compared to my previous replies), I was a bit too busy. I can't seem to find any reference on cfg.testtail, are you referring to cfg.clustertail instead? We are thinking at the moment on changing how the correcting of p-values/alpha-values work, but for the moment you are correct in assuming that you need to divide the cfg.alpha manually by 2 in case of a two-sided test. This will most likely change in the near-future and be made more explicit in the documentation, but for now, the tutorials are correct. It is very important to make the distinction between cfg.clusteralpha and cfg.alpha. Cfg.clusteralpha only refers to when certain values where you want to cluster over are able to be selected for clustering. When clustering over t-values, cfg.clusteralpha only sets the threshold on /when /to cluster. A cfg.clusteralpha = 0.05 would allow more t-values to be selected for clustering, most likely producing bigger clusters, then a cfg.clusteralpha = 0.01. This /does not/ affect the false alarm rate of the statistical test at the cluster-level, this is the cfg.alpha you mentioned. So, to control your false-alarm rate when doing a two-sided cluster-level test, cfg.alpha is the only one that is important. The selection of values to cluster over however, does change when you do a two-sided test. You are correct in stating that, when using the defaults, the overall alpha-level that you are testing against is 0.10, whereas the alpha-level per tail is 0.05. I guess it's a matter of preference which way you look at it. But it is something that can be made more explicit in the documentation/tutorials, thanks for bringing this up. Thanks for noticing the old alphathresh field, the tutorial is updated now. I hope this helps! Best, Roemer On 1/21/2010 1:33 PM, Andrea Ostendorf wrote: > > Dear Roemer, > > Thanks a lot. My previous version worked with your proposed > corrections and I downloaded the new version today. > > Sorry, I have yet another question, this time regarding the parameters > controlling statistical analysis for the cluster-based test statistic. > > When asking myself whether it made sense to set cfg.testtail and > cfg.tail independently, I found the error message in clusterstat.m, > l.32, which states that the parameters should be equal. Could you > perhaps mention this requirement in the tutorials? > > > *Also, regarding cfg.alpha and cfg.clusteralpha -- just to make sure > that I have got things right: For a two-sided test, I have to split > cfg.alpha manually so as to equal half the desired significance > level but I do not have to change cfg.clusteralpha explicitly, is > this correct? I gathered so from the tutorials and it looks so from > the code (in clusterstat and the statfun functions, the alpha > parameter is halved automatically). If nothing is specified, both > parameters are set to 0.05. As a two-sided test is the default, does > this mean that the false alarm rate is set at the 10% level if the > user does not specify anything, or have I overlooked something? (I > have to admit that I am impressed with the intricacies but that I > have not really grasped the details...)* > > > *By the way, the tutorial on c*luster-based permutation tests on > event related fields mentions a parameter cfg.alphathresh, which I > only found in the clusterrand functions and which I took to mean > cfg.clusteralpha. > > All the best to all of you > > Andrea > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 14:08 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Warning in ft_topoplotER > > Hi Andrea, > > Thanks for the data/script, it was exactly what I needed. There was a > silly bug in ft_clusterplot where several calls to cfg.highlight were > not changed to cfg.highlightchannel during the big update, and I > failed to notice them during browsing. Things should be fixed now > (will be on the ftp-server tonight). You can fix it in your own > version easily by changing in line 267 and line 285 cfg.highlight >>> > cfg.highlightchannel. Clusterplot should work as intended afterwards. > > I also realised now that any additional options that go into > clusterplot will not be used (like cfg.marker), these are fixed now as > well (on ftp-server tonight). > > Thanks for pointing out these bugs! > > Best, > Roemer > > > > Andrea Ostendorf wrote: > > Dear Roemer, > > thanks a lot for your help and the time you are taking to assist me! > Your remarks have been really helpful. > > The warning is from topoplotER, which I call indirectly through > ft_clusterplot. Thanks for pointing out that I am not to use the > options directly. I saw some options in the help of ft_clusterplot > together with the hint that more options were to be found in topoplotER. > > Since I keep having trouble with uploading files to your server, I > attach a test MATLAB file (stripped down to the basics) and my data. I > hope that is okay, it is really quite a small amount of data. > Otherwise, I would try my private Ubuntu computer. > > The warning is > > Warning: cfg.highlight is now used for specifing highlighting-mode, > use cfg.highlightchannel instead of cfg.highlight for specifiying channels > > > In ft_topoplotER at 214 > > In topoplotER at 17 > > In ft_clusterplot at 277 > > In test_clusterplot at 5 > > Thanks a lot! > > Best regards > > Andrea > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 12:52 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Thanks / warning in ft_topoplotER > > Hi Andrea, > > Always happy to help. And thank you for helping us squashing bugs! > > Are you sure you are using the most recent fieldtrip version? There > was a bug several weeks ago that gave the warning (which used to be on > line 214, but is now on line 215) even when cfg.highlight was not > numerical. (if it's numerical, it is assumed cfg.highlight is used in > the old way). If you have a version that is newer than 19-12-2009 > (date of previous bug fix), could you post the exact code you use to > call ft_topoplotER? This could give me a better idea on where in the > code the problem lies. Could you then also post the exact warning > matlab spits out? (if it's not a version problem, something > complicated is going on and all information is helpful). Thanks! > > Concerning ft_clusterplot, you're not actually supposed to use the > highlighting options directly. As clusterplot tries to determine the > clustering automatically, this could possibly interfere with it's > normal functioning. Thanks for pointing this out. I now added a check > for these 'forbidden' options and they will be removed automatically. > The updated clusterplot will be uploaded to the ftp-server somewhere > late in the evening today. > > However, if you want to manage you're own clustering directly, you can > also do this using topoplotER/TFR. It might be a bit difficult, but > you have to put all the highlighting options in its own cell > (including the ones that were already in cells). There is 'hidden' > documentation about this in topoplotER (you won't see it with the > help/doc command, but you will if you edit the function), you can find > it just below the normal documentation. > I copy-pasted it here for easy reference: > *********** > % It is possible to use multiple highlight-selections (e.g.: multiple > statistical clusters of channels) > % To do this, all the content of the highlight-options (including > cfg.highlight) should be placed in a cell-array > % (even if the normal content was already in a cell-array). Specific > marker settings (e.g. color, size) are defaulted when > % not present. > % Example (3 selections): > % cfg.highlight = {'labels', 'labels', 'numbers'} > % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} > % cfg.highlightsymbol = {'o',[],'+'} % the empty option > will be defaulted > % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option > will be defaulted > % cfg.highlightsize = []; % will be set > to default, as will the missing cfg.highlightfontsize > *********** > > Using these options you should be able to get the same individual > plots clusterplot can give you. If you do not want to see the other > channels, set cfg.marker = 'off';. On the use of the different > routines, topoplotTFR is identical to topoplotER, but is just present > because of our present naming-scheme. Clusterplot however, is a > wrapper around topoplotER/TFR designed to quickly and without much > configuring plot your statistical clusters (which requires statistics > output as input). By using the 'hidden' options above, you can make > topoplotER/TFR do exactly the same as clusterplot, but then you can > specify your own clusters. > > > We are currently looking into your question number 3, as it appears > things go a little deeper there. There are at least some situations > where cfg.neighbours = [] apparently doesn't work, but we are still > figuring out why. For the moment, a really ugly and time consuming > workaround would be to make a for-loop over single channels, but it > would prevent the clustering over channels and should provide (per > channel) the exact same output as cfg.neighbours = []; > > > I hope all of the above helps. Thanks for bringing these bugs to our > attention! > > Kind regards, > > Roemer > > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > > -- > Roemer van der Meij MSc > Scientific Programmer& Data-Analyst > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3612631 > E-mail:r.vandermeij at donders.ru.nl > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4791 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Thu Jan 28 11:21:06 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 28 Jan 2010 11:21:06 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: <4B6161D3.2060802@donders.ru.nl> Message-ID: Hi Roemer, thanks a lot for the answer. So I will allow alpha and clusteralpha to be varied independently. You are correct in suggesting that I was referring to "cfg.clustertail", which I understand from the code (error message in clusterstat.m, l.32) to be required to equal "cfg.tail". Sorry about the typo! All the best, Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Donnerstag, 28. Januar 2010 11:07 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks! / Question regarding test statistics Hi Andrea, Sorry for my late reply (compared to my previous replies), I was a bit too busy. I can't seem to find any reference on cfg.testtail, are you referring to cfg.clustertail instead? We are thinking at the moment on changing how the correcting of p-values/alpha-values work, but for the moment you are correct in assuming that you need to divide the cfg.alpha manually by 2 in case of a two-sided test. This will most likely change in the near-future and be made more explicit in the documentation, but for now, the tutorials are correct. It is very important to make the distinction between cfg.clusteralpha and cfg.alpha. Cfg.clusteralpha only refers to when certain values where you want to cluster over are able to be selected for clustering. When clustering over t-values, cfg.clusteralpha only sets the threshold on when to cluster. A cfg.clusteralpha = 0.05 would allow more t-values to be selected for clustering, most likely producing bigger clusters, then a cfg.clusteralpha = 0.01. This does not affect the false alarm rate of the statistical test at the cluster-level, this is the cfg.alpha you mentioned. So, to control your false-alarm rate when doing a two-sided cluster-level test, cfg.alpha is the only one that is important. The selection of values to cluster over however, does change when you do a two-sided test. You are correct in stating that, when using the defaults, the overall alpha-level that you are testing against is 0.10, whereas the alpha-level per tail is 0.05. I guess it's a matter of preference which way you look at it. But it is something that can be made more explicit in the documentation/tutorials, thanks for bringing this up. Thanks for noticing the old alphathresh field, the tutorial is updated now. I hope this helps! Best, Roemer On 1/21/2010 1:33 PM, Andrea Ostendorf wrote: Dear Roemer, Thanks a lot. My previous version worked with your proposed corrections and I downloaded the new version today. Sorry, I have yet another question, this time regarding the parameters controlling statistical analysis for the cluster-based test statistic. When asking myself whether it made sense to set cfg.testtail and cfg.tail independently, I found the error message in clusterstat.m, l.32, which states that the parameters should be equal. Could you perhaps mention this requirement in the tutorials? Also, regarding cfg.alpha and cfg.clusteralpha - just to make sure that I have got things right: For a two-sided test, I have to split cfg.alpha manually so as to equal half the desired significance level but I do not have to change cfg.clusteralpha explicitly, is this correct? I gathered so from the tutorials and it looks so from the code (in clusterstat and the statfun functions, the alpha parameter is halved automatically). If nothing is specified, both parameters are set to 0.05. As a two-sided test is the default, does this mean that the false alarm rate is set at the 10% level if the user does not specify anything, or have I overlooked something? (I have to admit that I am impressed with the intricacies but that I have not really grasped the details.) By the way, the tutorial on cluster-based permutation tests on event related fields mentions a parameter cfg.alphathresh, which I only found in the clusterrand functions and which I took to mean cfg.clusteralpha. All the best to all of you Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 14:08 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Warning in ft_topoplotER Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4791 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4812 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From masaki.maruyama at CEA.FR Fri Jan 29 17:07:00 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Fri, 29 Jan 2010 17:07:00 +0100 Subject: Beamformer Message-ID: Dear Fieldtrip users, Please let me ask two questions about beamformer. (1) Beamformer for different-type sensors I have two different types of sensors: planer gradiometers and magnetometers. I would like to know if beamformers should compute the different-type signals separately. If so, after beamformer sourceanalysis, is it appropriate to integrate two NAIs (neural activity indexes) in such as (NAI_mag + NAI_grad)/2 or NAI_mag x NAI_grad? I would appreciate any comments/ advices on this issue. (2) Common filters in LCMV-beamformer Although the Fieldtrip website does NOT tell that common filters are available in LCMV, I'm wondering if it is limited to cases of single trial beamformer. According to the discussion of Drs Floris and Robert on 2009 Feb 2, the current version of LCMV cannot well optimize spatial filters in noisy signals of single trials, but it possibly optimizes well in averaged signals. My question is whether it makes sense to prepare a common spatial filter across conditions using averaged signals, and then apply it to the averaged signal of each condition, with setting cfg.grid.filter? I tried the method using the following script, and its computation finished without any error message. However, I'm afraid that my understanding might be incorrect, i.e., the issue of common filter has nothing to do with the issue of optimization. Could someone please make the issues clearer? Thank you in advance for your kind responses, With best regards, Masaki Maruyama Inserm U.992 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE http://www.unicog.org/ %Optimize spatial filter in common across conditions and times for cnd = 1:length(MegFile) load(MegFile{cnd}); %Load "DataPostICA" containing single trials in a condition cfg = [];cfg.removemean = 'no'; %Optimization of spatial filter based on covariance of averaged field (see Robert email on 04/02/2009) cfg.keeptrials = 'no';cfg.covariance = 'no'; data_temp = timelockanalysis(cfg,DataPostICA); if cnd == 1 data_cmb = data_temp; else data_cmb = appenddata([],data_cmb,data_temp); end clear data_temp end cfg.keeptrials = 'no';cfg.covariance = 'yes'; cfg.covariancewindow = [-0.5 1]; data = timelockanalysis(cfg,data_cmb); cfg = [];cfg.method = 'lcmv';cfg.grid = grid;cfg.vol = hdm;cfg.lambda = '5%'; cfg.keepfilter = 'yes'; source = sourceanalysis(cfg, data); common_filter = source.avg.filter; %Beamforming using the common spatial filter for cnd = 1:length(MegFile) load(MegFile{cnd});%Load "DataPostICA" again cfg = [];cfg.removemean = 'no'; cfg.covariancewindow = [-0.5 1]; cfg.keeptrials = 'no';cfg.covariance = 'no'; data_temp = timelockanalysis(cfg,DataPostICA); cfg.keeptrials = 'no';cfg.covariance = 'yes'; data = timelockanalysis(cfg,data_temp); cfg = [];cfg.method = 'lcmv';cfg.grid = grid;cfg.vol = hdm;cfg.lambda = '5%'; cfg.grid.filter = common_filter; source = sourceanalysis(cfg, data); save(strcat('SourceAnalysis','_cnd',num2str(cnd)), 'source'); end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaifengg at GMAIL.COM Sun Jan 3 14:50:17 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Sun, 3 Jan 2010 15:50:17 +0200 Subject: Questions on scalp current density (SCD) for MEG data Message-ID: Hi there, I am now trying to check the scalp current density (SCD) on my MEG data by Fieldtrip. And we find a script named scalpcurrentdensity in the Fieldtrip folder. However, this script only fits for EEG data, which is claimed clearly in the script. So I wonder whether I can use SCD for MEG data? And more specifically, if I can check the SCD on the MEG data by using the current script in Fieldtrip, what kind of change should I do to the scalpcurrentdensity script (currently I just change the parameters 'ismeg' as 'yes', it also runs for MEG data, but I am not sure whether it is right)? Thanks a lot! Zaifeng Gao Post-doc Hebrew University of Jerusalem ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Mon Jan 4 09:43:50 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 4 Jan 2010 09:43:50 +0100 Subject: freqanalysis & cfg.channel In-Reply-To: <6000e5f6b659a.4b309c01@mail.nyu.edu> Message-ID: Hi Akiko, I've had a quick look through the code and currently rejection of channels by channel-numbers (e.g. '-1') instead of channels names (e.g. '-P3') is not supported. No channels are actually being rejected if you use '-1' (which is why your first channel is still noisy). The rejection should work if you use the channel name itself. On the topic of when to reject channels, personally I do this before re-preprocessing my data (e.g. preprocess the data, do artifact rejection, and remove channels for subsequent re-preprocessing) using cfg.channel. You could however also do this in e.g. freqanalysis, or in the plotting phase as you did. Personally I like to be absolutely sure I don't accidentally include (really) bad channels in over-channel comparisons/averages/etc., which is why I remove them in the earliest phase possible. Hope this is still of some use after the holidays. Best, Roemer Akiko Ikkai wrote: > Hi, > > I'm trying to run TFR on MEG data and plot the results, and getting puzzling figures. > > Both freqanalysis and multiplotTFR run fine, and figures are produced, but the first channel (first channel in ft_data.label) is always extremely noisy (barely changing from the baseline, but showing random patches of activations across time and freq). When I take out that channel with > > cfg.channel = {'all','-1'}; % when the first channel is noisy > > the second channel (now the first in label) shows the same trend, if I take out the second, the third one is bad, etc... Other channels don't seem to be affected. > > I'm pasting my code during this process below. Can anyone tell me what might be going wrong, and when the best point to delete bad channels? > > Thanks in advance, Akiko > > %%% to run freq analysis %%% > cfg.output = 'pow'; > > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 4:2:50; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > cfg.toi = -.5:0.05:2; > cfg.channel = {'all','-1'}; % when the first channel is noisy > > TFRhann_Rvalid = freqanalysis(cfg, Rvalid); > > cfg = []; > cfg.baseline = [-.1 0]; > cfg.baselinetype = 'relative'; > cfg.xlim = [-0.1 1.2]; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure(1);clf > cfg.ylim = [5 50]; > cfg.zlim = [0 2]; > multiplotTFR(cfg, TFRhann_Rvalid); % after importing channel layout > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Curran at COLORADO.EDU Wed Jan 6 02:18:59 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Tue, 5 Jan 2010 18:18:59 -0700 Subject: cluster-based permutation tests on single subjects Message-ID: I have a few related questions about Maris and Oostenveld's (2007) method for cluster-based permutation tests, in particular using an indepsamplesT statistic in a between-trials design on single subjects. 1. Is it problematic to have very different numbers of trials within each condition? 2. Any advice for calculating statistical power for different numbers of trials within each condition? 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, Karvanen, & Shishkin, 2005) to remove outliers prior to analysis? Any advice would be much appreciated. thanks Tim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Jan 6 10:29:14 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 6 Jan 2010 10:29:14 +0100 Subject: cluster-based permutation tests on single subjects In-Reply-To: Message-ID: Hi Tim, > I have a few related questions about Maris and Oostenveld's (2007) method for > cluster-based permutation tests, in particular using an indepsamplesT statistic in a > between-trials design on single subjects. > 1. Is it problematic to have very different numbers of trials within each condition? No, it is not. > 2. Any advice for calculating statistical power for different numbers of trials within > each condition? I'm not sure whether I understand what you mean. Anyhow, analytical statistical power calculation (as is possible for T-tests and anovas) are not possible for permutation tests. However, one can obtain Monte Carlo estimates of power using simulations under the alternative hypothesis. > 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, Karvanen, & > Shishkin, 2005) to remove outliers prior to analysis? This may increase your sensitivity. However, to obtain sound p-values, you must do trimming in a way that does not induce differences between the experimental conditions. Best, Eric Maris > > Any advice would be much appreciated. > thanks > Tim > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Wed Jan 6 12:32:14 2010 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Wed, 6 Jan 2010 11:32:14 +0000 Subject: cluster-based permutation tests on single subjects In-Reply-To: Message-ID: Hey Tim, trimming may improve the power of your statistics. However, after trimming, the degrees of freedom and the standard error of the T statistics need to be adjusted. This is because after trimming the remaining data points are no longer independent. The standard error of the trimmed mean is related to the winsorised variance, not the variance. The Yuen t-test on trimmed means is described here: Wilcox, R. R. (2005). Introduction to Robust Estimation and Hypothesis Testing (2nd Ed. ed.): Academic Press. Wilcox, R. R., & Keselman, H. J. (2003). Modern robust data analysis methods: measures of central tendency. Psychol Methods, 8(3), 254-274. Wilcox has validated a bootstrap trimmed mean t-test technique in which [1] the data are centred so that each condition has a trimmed mean of zero, [2] trials are sampled with replacement from each condition independently, [3] a t-test to compare trimmed means is computed, [4] the t-test obtained for the original data is compared to the distribution of t values obtained under the null hypothesis. Best, GAR Note On 6 Jan 2010, at 01:18, Tim Curran wrote: > I have a few related questions about Maris and Oostenveld's (2007) > method for cluster-based permutation tests, in particular using an > indepsamplesT statistic in a between-trials design on single subjects. > 1. Is it problematic to have very different numbers of trials within > each condition? > 2. Any advice for calculating statistical power for different > numbers of trials within each condition? > 3. Might it be advisable to somehow trim the trials (e.g., > Leonowicz, Karvanen, & Shishkin, 2005) to remove outliers prior to > analysis? > > Any advice would be much appreciated. > thanks > Tim > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ************************************************************************************ Guillaume A. Rousselet, Ph.D. Lecturer, associate editor for Frontiers in Perception Science Centre for Cognitive Neuroimaging (CCNi) Department of Psychology Faculty of Information & Mathematical Sciences (FIMS) University of Glasgow 58 Hillhead Street Glasgow, UK G12 8QB The University of Glasgow, charity number SC004401 http://web.me.com/rousseg/GARs_website/ Email: g.rousselet at psy.gla.ac.uk Fax. +44 (0)141 330 4606 Tel. +44 (0)141 330 6652 Cell +44 (0)791 779 7833 “Computers in the future may weigh no more than 1.5 tons.” Popular Mechanics, 1949 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Curran at COLORADO.EDU Wed Jan 6 14:36:10 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Wed, 6 Jan 2010 06:36:10 -0700 Subject: cluster-based permutation tests on single subjects In-Reply-To: <6F4509ADF940415E80B9295D516763F4@ru42146fac3249> Message-ID: Hi Eric, Thanks for the speedy reply! Restating my second question more simply, I am wondering how I can determine if I have enough trials in each condition. thanks Tim On Jan 6, 2010, at 2:29 AM, Eric Maris wrote: > Hi Tim, > > > >> I have a few related questions about Maris and Oostenveld's (2007) method > for >> cluster-based permutation tests, in particular using an indepsamplesT > statistic in a >> between-trials design on single subjects. >> 1. Is it problematic to have very different numbers of trials within each > condition? > > No, it is not. > >> 2. Any advice for calculating statistical power for different numbers of > trials within >> each condition? > > I'm not sure whether I understand what you mean. Anyhow, analytical > statistical power calculation (as is possible for T-tests and anovas) are > not possible for permutation tests. However, one can obtain Monte Carlo > estimates of power using simulations under the alternative hypothesis. > > >> 3. Might it be advisable to somehow trim the trials (e.g., Leonowicz, > Karvanen, & >> Shishkin, 2005) to remove outliers prior to analysis? > > This may increase your sensitivity. However, to obtain sound p-values, you > must do trimming in a way that does not induce differences between the > experimental conditions. > > > Best, > > Eric Maris > > > > >> >> Any advice would be much appreciated. >> thanks >> Tim >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zhang470 at UMN.EDU Thu Jan 7 00:42:14 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Thu, 7 Jan 2010 00:42:14 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: Hi, Fieldtrip experts. I encountered a problem with read_event.m for preprocessing Neuromag-122 data. There was no such problem for Neuromag-306 data. Unlike the Neuromag-306, the triggers for Neuromag-122 were analog signals distributed over several channels with labels that began with "STI". In my case, STI 001 ~ STI 006 were triggers for stimuli of the .fif file. STI 015 and STI 016 were triggers for behavioral responses. The MNE package has a routine function, "mne_make_combined_event_file.m", to extract the Neuromag-122 triggers and save the events as a separate fiff file. BESA can also read the Neuromag122 data with no problem. Supposedly, read_event.m in Fieldtrip has similar capability, but it was somehow stuck in reading the events in my Neuromag-122 data. Example raw data (183M) can be downloaded here: http://www.tc.umn.edu/~zhanglab/Neuromag122 Your help is greatly appreciated. Yang ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jan 7 11:19:09 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 7 Jan 2010 11:19:09 +0100 Subject: eeg_leadfield4_prepare In-Reply-To: Message-ID: It was indeed missing from the release version. I have added it and it will be included in this evening version on th eftp. best Robert On 22 Dec 2009, at 5:19, Chun-Wei Lee wrote: > Hi, > > I am using the prepare_leadfield() following the toturial "Use your > own > forward leadfield model in an inverse beamformer computation" > > but i have faced the problem that when i execute > > grid = prepare_leadfield(cfg); > > and I can't find eeg_leadfield4_prepare(), > I check the file I download and I can't find this function > I guess I ignore some step... > can anyone tell me what is going on? > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Roman.Freunberger at SBG.AC.AT Thu Jan 7 11:44:50 2010 From: Roman.Freunberger at SBG.AC.AT (Roman Freunberger) Date: Thu, 7 Jan 2010 11:44:50 +0100 Subject: Beamformer and EEG Message-ID: Dear all, Is there a way to perform source analyses from EEG data without having MRI scans from the subjects? I am not sure of how to create the headmodel and the leadfield matrix without individual scans. Thank you in advance, Roman ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhang470 at UMN.EDU Fri Jan 8 07:43:28 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Fri, 8 Jan 2010 07:43:28 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: More details for Fieldtrip developers: I tried modifying read_event.m for my Neuromag-122 data as follows for the Neuromag part since Neuromag 122 is a pretty old system. ... if isempty(binaryindx)&&isempty(analogindx) analog ={'STI 001', 'STI 002', 'STI 003', 'STI 004', 'STI 005','STI 006'}; analogindx = match_str(hdr.label, analog); end ... if ~isempty(analogindx) trigger = read_trigger(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', flt_minsample, 'endsample', flt_maxsample, 'chanindx', analogindx, 'detectflank', detectflank, 'trigshift', trigshift, 'fixneuromag', 1); event = appendevent(event, trigger); end ... I also tried the default to be neuromag_MEX instead of neuromag_MNE to deal with the triggers. analogindx properly extracted the designated channels for triggers. The problem seems to be at read_trigger.m and the fixneuromag option. In read_trigger.m, all triggers for Neuromag smaller than 5 are excluded when fixneuromag = 1. This is clearly not applicable to the Neuromag-122 data set - the common triggers were 1 to 6 for Neuromag-122 system. Regardless of whether I set fixneuromag to 1 or 0, regardless of whether I use neuromag_MNE or neuromag_mex, the resulting events for read_event.m did not look right. I tried to rewrite the read_trigger.m, but I knew other ways that worked for me. I could avoid using fieldtrip. Jensen's 4D toolbox (in combination with Uutela's fiff access) and the MNEsuite package both worked fine for my dataset. If possible, I would like to apply Fieldtrip for my data analysis. Fieldtrip appears to be very powerful and appealing - it worked with all other data formats for both EEG and MEG that I have tested so far. Thank you very much for your attention. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zhang470 at UMN.EDU Fri Jan 8 21:00:45 2010 From: zhang470 at UMN.EDU (Yang Zhang) Date: Fri, 8 Jan 2010 21:00:45 +0100 Subject: read_event for Neuromag 122 trigger events Message-ID: Problem solved. I went through all the relevant files for the events in 4D toolbox, MNE, and fieldtrip and realized that read_trigger.m must be revised for my Neuromag-122 dataset. The threshold value 5 for fixneuromag as suggested by Joachim Gross for read_trigger.m did not work for my data. I noticed that the default threshold for detecting triggers was set at 0.1 in the MNE package, and the threshold was set at 2 in Jensen's 4D toolbox for detecting the events in the STI channels for Neuromag-122. In my dataset, the recorded amplitudes for the triggers were about 4.98, and the noise floor in the STI channels were smaller than 0.01. Because of the way the triggers were set up for Neuromag 122, the section for "switch detectflank" in read_trigger.m need to be bypassed. For a simple solution, I just used Hamalainen's mne_make_combined_ event_file.m in extracting the triggers and feed those parameters for event.type, event.sample, and event.value. Yang ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Mon Jan 11 14:24:51 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Mon, 11 Jan 2010 14:24:51 +0100 Subject: loreta.m missing Message-ID: Dear Fieldtrippers, loreta.m seems to be missing from the releases for quite a while (at least since Dec. 2008), altough it's called from sourceananalysis. Maybe it could be included again? Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 336 bytes Desc: not available URL: From christine.gruetzner at GOOGLEMAIL.COM Mon Jan 11 15:55:43 2010 From: christine.gruetzner at GOOGLEMAIL.COM (Christine Gruetzner) Date: Mon, 11 Jan 2010 15:55:43 +0100 Subject: Minimum norm analysis for timelock-data Message-ID: Dear Fieldtrippers, I still have this problem with performing source analysis (minimum norm estimate) on timelockdata. As already mentioned, the main problem occurs in sourcegrandaverage, probably because the output data from source analysis (using cfg.method = 'mne' on timelock data) contain an avg.pow field with the dimensions 4560x211 for each subject, where 211 is the number of time samples. I have tried several things to avoid the problem with sourcegrandaverage, but there are always new problems; for example, when I put the source data directly into sourcestatistics, without using sourcegrandaverage, there is a problem with checkdata, saying that the function requires source or volume data as input. Computing the timelockdata only for a single latency results in a problem in source analysis ('error in minimumnormestimate at 143, mom = w*dat). Does anyone have a script for computing MNE on timelockdata that works?! I would be very glad if someone could help me out with this problem! Thanks and Best Christine -- Christine Grützner, geb.Tillmann Max-Planck-Institut für Hirnforschung Abt. Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Germany Phone: +49 (0)69/6301-83225 E-Mail: tillmann at mpih-frankfurt.mpg.de http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Mon Jan 11 16:12:46 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 11 Jan 2010 16:12:46 +0100 Subject: Minimum norm analysis for timelock-data In-Reply-To: <841d3141001110655t1dbf6c77k126ed07d0ed66d02@mail.gmail.com> Message-ID: Dear Christine, > I still have this problem with performing source analysis (minimum norm estimate) on timelockdata. As already mentioned, the main problem occurs in sourcegrandaverage, probably because the output data from source analysis (using cfg.method = 'mne' on timelock data) contain an avg.pow field with the dimensions 4560x211 for each subject, where 211 is the number of time samples. i still have not fully understood your problem ... anyway ... if i recall correctly when using lcmv you get a vector of length(number_of_gridpoints) in the avg.pow field. the sample points are in avg.mom. why don't you try this: 1) add a avg.mom field with avg.mom = avg.pow 2) remove the avg.pow field (using rmfield ... or now ft_rmfield? :-)) 3) then call sourcedescriptives with cfg.projectmom='yes' otherwise run an lcmv beamformer and try sourcegrandaverage / sourcestatistics. if that works then compare your mne and lcmv source structures. best, nathan > > I have tried several things to avoid the problem with sourcegrandaverage, but there are always new problems; for example, when I put the source data directly into sourcestatistics, without using sourcegrandaverage, there is a problem with checkdata, saying that the function requires source or volume data as input. Computing the timelockdata only for a single latency results in a problem in source analysis ('error in minimumnormestimate at 143, mom = w*dat). > > Does anyone have a script for computing MNE on timelockdata that works?! I would be very glad if someone could help me out with this problem! > > Thanks and Best > Christine > > > -- > Christine Grützner, geb.Tillmann > Max-Planck-Institut für Hirnforschung > Abt. Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > Phone: +49 (0)69/6301-83225 > E-Mail: tillmann at mpih-frankfurt.mpg.de > http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Mon Jan 11 16:16:12 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Mon, 11 Jan 2010 16:16:12 +0100 Subject: Minimum norm analysis for timelock-data In-Reply-To: <841d3141001110655t1dbf6c77k126ed07d0ed66d02@mail.gmail.com> Message-ID: Computing MNE is apparently not something many people want to do with fieldtrip so it seems the implementation is still far from streamlined. For the time being, you could try a hack, which transforms your output into one which fieldtrip may swallow. I would suggest something like this: nvox = size(source.pos,1); mom = cell(1,nvox); for k = 1:length(source.inside) indx = source.inside(k); mom{indx} = source.avg.pow(xx,:); %I don't know whether avg.pow contains only the inside voxels, so xx could be either indx, or k. end source.avg.mom = mom; source.avg = rmfield(source.avg, 'pow'); I wonder whether it works after this... Best, JM PS: I would actually opt for improving fieldtrip's implementation and handling with MNE-estimates. Perhaps we could do this together? We can do this offline (not through the discussion list). Would it be possible to post some fieldtrip data-structure, along with the necessary accessories (grids, vols etc), as well as your script? On Jan 11, 2010, at 3:55 PM, Christine Gruetzner wrote: > Dear Fieldtrippers, > > I still have this problem with performing source analysis (minimum > norm estimate) on timelockdata. As already mentioned, the main > problem occurs in sourcegrandaverage, probably because the output > data from source analysis (using cfg.method = 'mne' on timelock > data) contain an avg.pow field with the dimensions 4560x211 for each > subject, where 211 is the number of time samples. > > I have tried several things to avoid the problem with > sourcegrandaverage, but there are always new problems; for example, > when I put the source data directly into sourcestatistics, without > using sourcegrandaverage, there is a problem with checkdata, saying > that the function requires source or volume data as input. Computing > the timelockdata only for a single latency results in a problem in > source analysis ('error in minimumnormestimate at 143, mom = w*dat). > > Does anyone have a script for computing MNE on timelockdata that > works?! I would be very glad if someone could help me out with this > problem! > > Thanks and Best > Christine > > > -- > Christine Grützner, geb.Tillmann > Max-Planck-Institut für Hirnforschung > Abt. Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > Phone: +49 (0)69/6301-83225 > E-Mail: tillmann at mpih-frankfurt.mpg.de > http://www.mpih-frankfurt.mpg.de/global/Np/Staff/tillmann.htm > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > 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-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Mon Jan 11 20:05:29 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Mon, 11 Jan 2010 20:05:29 +0100 Subject: sourceinterpolate and transforms Message-ID: Hi everyone! After successfully applying the function sourceanalysis to my data I wanted to use sourceinterpolate next to plot the result. As it turned out, sourceinterpolate expects that both data types, anatomical and funtional, have a field called trans. Now, it is missing in my functional data. Does anyone how I can come up with it? And what exactly is this transformation matrix? I thought it describes the tansition into the MNI or whatever coordinate system, but it seems to be there even without visual realigment and its not even 3D ... Thanks for any comments! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teristam at GMAIL.COM Tue Jan 12 08:20:41 2010 From: teristam at GMAIL.COM (teris tam) Date: Tue, 12 Jan 2010 15:20:41 +0800 Subject: Some problem using the fieldtripbuffer Message-ID: Dear all, I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer . It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program. Does anyone have an idea why this error occur and how to solve it? Thanks a lot! Best regards, Teris ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaifengg at GMAIL.COM Thu Jan 14 10:02:18 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Thu, 14 Jan 2010 11:02:18 +0200 Subject: Problems in Localizing oscillatory sources using beamformer techniques Message-ID: Dear all, I am now trying to know how to localize oscillatory sources using beamformer techniques. I use the exact codes as used in the tutor with Fieldtrip , but there are errors when I did the *volumenormalise . The script I used: * cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/opt/matlab/toolbox/spm2/templates/T1.mnc'; %this template is in MNI coordinatescfg.template sourceDiffIntN = volumenormalise(cfg, sourceDiffInt); * The errors are: * 3D CT Norm... iteration 1: ??? Error using ==> spm_brainwarp Wrong sized dim. Error in ==> spm_normalise>snbasis at 288 [Alpha,Beta,Var,fw] = spm_brainwarp(VG,VF,Affine,basX,basY,basZ,dbasX,dbasY,dbasZ,T,fwhm,VWG, VWF); Error in ==> spm_normalise at 185 Tr = snbasis(VG1,VF1,VWG,VWF,Affine,... Error in ==> ft_volumenormalise at 193 params = spm_normalise(VG,VF); Error in ==> volumenormalise at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Does anybody know how to deal with it? Thanks a lot Feng ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Thu Jan 14 15:31:39 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 14 Jan 2010 15:31:39 +0100 Subject: satellite meeting Biomag: Analysis toolboxes for MEG data Message-ID: Dear all, I would like to announce the satellite meeting in connection with Biomag2010: *Analysis toolboxes for MEG data * Sunday, March 28, 2010, Dubrovnik Free toolboxes for analysis of MEG data are now widely used in published work. These toolboxes are becoming essential for making new developments available to the users. Further they serve to bring developers and users closer together. That aim of the satellite proposal is 1) To make the users aware about the features and possibilities of the various toolboxes 2) To facilitate the communication between developers and users in order to help direct future developments 3) To bring the toolbox developers together to facility common developments and sharing. The meeting will have both presentations and demos. Registration is now open http://megcommunity.org/index.php?option=com_content&view=article&id=7&Itemid=23 Attendance will be limited. All the best, Ole -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jan 14 21:53:30 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 14 Jan 2010 21:53:30 +0100 Subject: loreta.m missing Message-ID: Hi Michael, The loreta implementation was never fully finished and tested, that is why it is not included in the release. I don't want people to start using it and then complain that loreta (either the method or the implementation) is not working. Please find it attached if you want to give it a try. best, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 11 Jan 2010, at 14:24, Michael Wibral wrote: > Dear Fieldtrippers, > > loreta.m seems to be missing from the releases for quite a while (at least since Dec. 2008), altough it's called from sourceananalysis. Maybe it could be included again? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loreta_lap3d.m Type: application/octet-stream Size: 2420 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loreta.m Type: application/octet-stream Size: 3775 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jan 14 21:54:23 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 14 Jan 2010 21:54:23 +0100 Subject: Some problem using the fieldtripbuffer Message-ID: Hi Teris, I have also occasionally encountered the problem with opening a TCP connection on windows (i.e. bci2000). The error means that the client (MATLAB) is not able to make a connection to the server (the fieldtrip buffer which is running under BCI2000). On a Linux or OSX only setup (both the matlab client and the buffer server running on linux and/or OSX) the problem never happened to me. I don't know where in the code the problem is, and since it is so difficult to reproduce, I also don't know where to start looking in the code. If it results in problems for you, then I suggest you do something like function varargout = retry_read_header(varargin) retry = 100; while retry>0 try varargout = read_header(varargin{:}); break; end retry = retry - 1; end and something similar for read_data and read_event. Of course it would be better if the problem were fully diagnosed and subsequently fixed, so any suggestions are welcome. best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 12 Jan 2010, at 8:20, teris tam wrote: > Dear all, > I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer. > It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program. > Does anyone have an idea why this error occur and how to solve it? > Thanks a lot! > Best regards, > Teris ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teristam at GMAIL.COM Fri Jan 15 03:28:18 2010 From: teristam at GMAIL.COM (teris tam) Date: Fri, 15 Jan 2010 10:28:18 +0800 Subject: Some problem using the fieldtripbuffer In-Reply-To: <8694DB79-6BDE-4DB5-9DF4-3DCA58E085E6@fcdonders.ru.nl> Message-ID: Dear Robert, It's very nice to hear from you! I have done some test in matlab trying to get down to the root of the problem. I have observed that the problem only occur if there is a repeated pulling of header information of the fieldtripbuffer by read_header(), e.g. when the matlab code is waiting for a new block of data. Adding some time delay between subsequent calls of read_header() seems to alleviate the issue: hdr = read_header(filename, 'cache',true); pause(0.1); Interestingly, repeated calling of read_data() to get the most recent data doesn't seem to have any problem, even if no time delay is added between calls. I have tried to start 2 matlab sessions to investigate whether the error comes from matlab or from the fieildtripbuffer server. When one matlab session fails to connect, the other session cannot connect to the server either (They are not connecting in parallel. I start the other session right after the first session reports error). However, the code is able to connect to the buffer again after waiting for 3-4s. I guess the problem is that repeatedly calling of read_header() may jam the buffer server. read_data() may take a longer time to process in matlab and so adding a time delay for the server to recover. We can verify this if we can get into the debug information of the buffer server (if there is any). Currently I work around the issue by adding a delay between read_header() or just use read_data() to get the most recent data. Best regards, Teris On Fri, Jan 15, 2010 at 4:54 AM, Robert Oostenveld < r.oostenveld at fcdonders.ru.nl> wrote: > Hi Teris, > > I have also occasionally encountered the problem with opening a TCP > connection on windows (i.e. bci2000). The error means that the client > (MATLAB) is not able to make a connection to the server (the fieldtrip > buffer which is running under BCI2000). > > On a Linux or OSX only setup (both the matlab client and the buffer server > running on linux and/or OSX) the problem never happened to me. I don't know > where in the code the problem is, and since it is so difficult to reproduce, > I also don't know where to start looking in the code. If it results in > problems for you, then I suggest you do something like > > function varargout = retry_read_header(varargin) > retry = 100; > while retry>0 > try > varargout = read_header(varargin{:}); > break; > end > retry = retry - 1; > end > > and something similar for read_data and read_event. > > Of course it would be better if the problem were fully diagnosed and > subsequently fixed, so any suggestions are welcome. > > best regards, > Robert > > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > On 12 Jan 2010, at 8:20, teris tam wrote: > > Dear all, > I am trying to read the signal from BCI2000 in MATLAB using the > fieldtripbuffer. I use the code given in the BCI2000 wiki at > http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer > . > It was able to read and plot the signal from BCI2000 correctly for > a certain period of time, but eventually it stopped and reported "ERROR: > failed to create socket (-2)". I was able to connect to and read from the > buffer again if I re-run the program. > Does anyone have an idea why this error occur and how to solve it? > Thanks a lot! > Best regards, > Teris > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pacodiaz at UB.EDU Fri Jan 15 15:28:07 2010 From: pacodiaz at UB.EDU (=?ISO-8859-1?Q?Paco_D=EDaz?=) Date: Fri, 15 Jan 2010 15:28:07 +0100 Subject: OPEN POST-DOC POSITION IN BARCELONA Message-ID: Hope you don't mind if I announce here the following 3 years post doc position in our group: The Barcelona BrainLab (BBL) [www.ub.edu/brainlab] invites applications for a 3-year post-doctoral position commencing during the spring 2010 in the field of the Cognitive Neuroscience of Auditory Perception. Principal Investigator: Prof. Dr. Carles Escera. Successful applicants should have completed a Ph.D. in Neurosciences, Cognitive, Computer or Biological Sciences, Engineering or related disciplines. For a more detailed information please find the attached document. Contact Person: Mrs. Marta Turró e-mail: brainlab at ub.edu Subject: ERANET-postdoc application Best regards, Paco. -- --------------------------------------------------------- Francisco Javier Díaz Santaella Institute for Brain,Cognition and Behavior (IR3C) University of Barcelona and Cognitive Neuroscience Research Group Department of Psychiatry and Clinical Psychobiology University of Barcelona P. Vall d'Hebron 171 * 08035 Barcelona * Spain Telf.: +34 93 3125035 * Cell Phone: +34 678 89 47 57 email: pacodiaz at ub.edu http://www.ub.edu/brainlab --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: call_postdoc_EN_pdf.pdf Type: application/pdf Size: 107988 bytes Desc: not available URL: From michael.wibral at WEB.DE Fri Jan 15 18:10:12 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 15 Jan 2010 18:10:12 +0100 Subject: loreta.m missing Message-ID: Hi Robert, thanks for the code. We'll give it a try. Sorry if my post sounded like a complaint of any kind - it was never meant like that. BTW: We got sourcestatistics running on MNE output by removing the time-dimension from the source data (via averaging over a little interval and fixing dimord and related info). Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 14.01.10 21:53:38 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] loreta.m missing > Hi Michael, > > The loreta implementation was never fully finished and tested, that > is why it is not included in the release. I don't want people to > start using it and then complain that loreta (either the method or > the implementation) is not working. Please find it attached if you > want to give it a try. > > best, > Robert > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > On 11 Jan 2010, at 14:24, Michael Wibral wrote: > > Dear Fieldtrippers, > > loreta.m seems to be missing from the releases for quite a while (at > least since Dec. 2008), altough it's called from sourceananalysis. > Maybe it could be included again? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 336 bytes Desc: not available URL: From aostendorf at BESA.DE Tue Jan 19 10:30:38 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 10:30:38 +0100 Subject: tinv / several questions Message-ID: Dear Fieldtrip experts, I am currently working on a script for the evaluation of BESA TFC data with Fieldtrip and have found the tutorials and sample scripts a great help. Nevertheless, I have got a few, probably rather basic, questions and would be thankful for help. 1) cohspctrm: I would like to feed coherence data exported from BESA to ft_freqstatistics. The data have been brought to resemble the output of ft_freqanalysis so the data field has explicitly been renamed to "powspctrm" (and it works). Is this correct? (I have looked through the beginning of the ft_freqstatistics code and it looks as if the existence of the 'cohspctrm' field would lead to the input being brought to the format I put in.) 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning although I have now switched the setting to cfg.highlight = 'on'. Is there a possibility to implement something like the following example (taken from the tutorial on cluster-based permutation tests on event-related fields)? pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find (pos_int==1|neg_int==-1); 3) Clustering over channels: Is it correct that I can prevent clustering over channels by setting cfg.neighbours = {} ? Is it correct to use this option also if I want to average over channels (avgoverchans = 'yes')? 4) Lately, some "nan" functions have been added to the statfun/private folder because they are not found otherwise in case somebody does not have access to the MATLAB statistics toolbox. May I suggest that a copy of tinv.m be added, too? (I also placed a copy of nanmean in public/private because I got an error message in avgoverdim.) I am really impressed with the Fieldtrip software and also with the exchange on the mailing list! Best regards to all of you Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jan 19 11:31:26 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 19 Jan 2010 11:31:26 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Dear Andrea, Could I answer question 1 and 4, and leave the others to someone else? > 1) cohspctrm: I would like to feed coherence data exported from BESA > to > ft_freqstatistics. The data have been brought to resemble the output > of > ft_freqanalysis so the data field has explicitly been renamed to > "powspctrm" > (and it works). Is this correct? (I have looked through the > beginning of the > ft_freqstatistics code and it looks as if the existence of the > 'cohspctrm' > field would lead to the input being brought to the format I put in.) As far as I can see, it can be done in two ways: 1 cfg.parameter = 'cohspctrm' and the input data is just untouched (i.e. data.cohspctrm not renamed into data.powspctrm) 2 cfg.parameter = 'powspctrm' (or empty, then it takes the default, which is 'powspctrm'), and the input data changes so that .cohspctrm is manually renamed into .powspctrm I would propose to use method 1. The reason for this is that in the future we will make the code 'smarter' such that it can directly deal with parameters, other than powspctrm directly (without the need of working around it; either within or outside freqstatistics) > 4) Lately, some "nan" functions have been added to the statfun/private > folder because they are not found otherwise in case somebody does > not have > access to the MATLAB statistics toolbox. May I suggest that a copy > of tinv.m > be added, too? (I also placed a copy of nanmean in public/private > because I > got an error message in avgoverdim.) Yes, sorry about that. I added a symbolic link to fieldtrip/private/ nanmean.m in fieldtrip/public/private. This is how it should be done, because this way we only use 1 physical copy of a file, rather than duplicating the files in different places (running the risk that they start leading a life of their own). I also created links for tinv and tcdf in statfun/private. I guess you should be able to directly update these changes (svn update). > I am really impressed with the Fieldtrip software and also with the > exchange > on the mailing list! Thanks. Keep up the good work. Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Tue Jan 19 11:56:23 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 11:56:23 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Dear Jan-Mathijs, Thanks a lot for the extra-speedy reply! I am glad to hear that I can handle coherence data this easily. [Sorry, I expressed myself in an ambiguous way: My input with its field "powspctrm" has been renamed from the BESA field name, which is "data", not from "cohspctrm", and it possesses the corresponding label structure. So that means "do not change anything" for me, which I did at first and which works fine.] Thanks also for the extra functions. It is really great that all those options are available even without the extra toolbox! All the best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Tue Jan 19 14:37:39 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 19 Jan 2010 14:37:39 +0100 Subject: tinv / several questions In-Reply-To: Message-ID: Hi Andrea, I think I can answer the second question for you. 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning although I have now switched the setting to cfg.highlight = 'on'. Is there a possibility to implement something like the following example (taken from the tutorial on cluster-based permutation tests on event-related fields)? It looks as if you are referring to ft_topoplotER and not ft_clusterplot. If that assumption is correct, than you can definitely use something like: cfg.highlight = find (pos_int==1|neg_int==-1); However, cfg.highlight would then need to be changed into cfg.highlightchannel. In the new highlighting configuration, cfg.highlight is used to determine highlighting-method (like 'on', 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate which channels your actually want to highlight. This can be a numerical index vector (like above), channel-labels, channel-labels with wildcards and anything else ft_channelselection can take as input. The tutorial on the wiki hasn't been updated yet to reflect the changes to topoplotER (I'll do that soon), but the following should work: cfg.highlight = 'on'; cfg.highlightchannel = find (pos_int==1|neg_int==-1); (using all the defaults this should mark every channel in cfg.highlightchannel with a '*' and every other channel with a 'o') Hope this helps! Best, Roemer Andrea Ostendorf wrote: > Dear Fieldtrip experts, > > I am currently working on a script for the evaluation of BESA TFC data with > Fieldtrip and have found the tutorials and sample scripts a great help. > Nevertheless, I have got a few, probably rather basic, questions and would > be thankful for help. > > > 1) cohspctrm: I would like to feed coherence data exported from BESA to > ft_freqstatistics. The data have been brought to resemble the output of > ft_freqanalysis so the data field has explicitly been renamed to "powspctrm" > (and it works). Is this correct? (I have looked through the beginning of the > ft_freqstatistics code and it looks as if the existence of the 'cohspctrm' > field would lead to the input being brought to the format I put in.) > > 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a warning > although I have now switched the setting to cfg.highlight = 'on'. Is there a > possibility to implement something like the following example (taken from > the tutorial on cluster-based permutation tests on event-related fields)? > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > cfg.highlight = find (pos_int==1|neg_int==-1); > > 3) Clustering over channels: > Is it correct that I can prevent clustering over channels by setting > cfg.neighbours = {} ? Is it correct to use this option also if I want to > average over channels (avgoverchans = 'yes')? > > 4) Lately, some "nan" functions have been added to the statfun/private > folder because they are not found otherwise in case somebody does not have > access to the MATLAB statistics toolbox. May I suggest that a copy of tinv.m > be added, too? (I also placed a copy of nanmean in public/private because I > got an error message in avgoverdim.) > > I am really impressed with the Fieldtrip software and also with the exchange > on the mailing list! > > Best regards to all of you > Andrea > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From clemens.maidhof at HELSINKI.FI Tue Jan 19 17:31:56 2010 From: clemens.maidhof at HELSINKI.FI (Clemens Maidhof) Date: Tue, 19 Jan 2010 18:31:56 +0200 Subject: bdf import, 16 bits events Message-ID: Dear Fieldtrip users, we are using 16 Bits for coding events in BDF data (i.e., all 16 pins for trigger input of the BioSemi connector used; 8 Bits for Presentation and 8 Bits for another device). However, when importing the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all event codes with a value higher than 28 (from Bits 9-16) seem to be incorrect: these triggers are recognized, but their value is the sum of an addition of the actual value with a value from the first 8 bits. During recording, the BioSemi software shows the correct events in the acquisition software, and also when imported into BESA all correct event codes are there. So we thought this has probably to do with the import-function in fieldtrip. Has anybody encountered the same problem or maybe even better, knows a solution ;-) ? Thanks a lot in advance for any hints and tips! Clemens -- Clemens Maidhof Cognitive Brain Research Unit, Department of Psychology, University of Helsinki & Finnish Centre of Excellence in Interdisciplinary Music Research, University of Jyväskylä, Finland clemens.maidhof at helsinki.fi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.robitaille at UMONTREAL.CA Tue Jan 19 18:02:52 2010 From: nicolas.robitaille at UMONTREAL.CA (Nicolas Robitaille) Date: Tue, 19 Jan 2010 17:02:52 +0000 Subject: bdf import, 16 bits events In-Reply-To: <4B55DE7C.8000702@helsinki.fi> Message-ID: Hi Clemens, I've encounter a similar problem. Biosemi actually merge the data as if this was a single 16-pins triggers, so a number between 0 and 65535. You could dissociate these two number and get back your two independent values with something like: t = dec2bin(yourTrigValue,16) lowerPort = bin2dec(t(9:16)) higherPort = bin2dec(t(1:8)) so both values will be between 0 and 255. Something you must carefully think about, however, is that you may get much more trig that you actually send. For example, you likely gonna get consecutive identical events on the lower port, which were originally recorded as as separate events because something happen on the higher port. Same will happen for the 0 you likely send between each code, independently on each port, to put all the pins down. Hope this help, Nicolas p.s. there could be a more computationally-efficient way to do this. ************************* Nicolas Robitaille, Ph.D. Stagiaire post-doctoral Brams ************************* Date: Tue, 19 Jan 2010 18:31:56 +0200 From: clemens.maidhof at HELSINKI.FI Subject: [FIELDTRIP] bdf import, 16 bits events To: FIELDTRIP at NIC.SURFNET.NL Dear Fieldtrip users, we are using 16 Bits for coding events in BDF data (i.e., all 16 pins for trigger input of the BioSemi connector used; 8 Bits for Presentation and 8 Bits for another device). However, when importing the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all event codes with a value higher than 28 (from Bits 9-16) seem to be incorrect: these triggers are recognized, but their value is the sum of an addition of the actual value with a value from the first 8 bits. During recording, the BioSemi software shows the correct events in the acquisition software, and also when imported into BESA all correct event codes are there. So we thought this has probably to do with the import-function in fieldtrip. Has anybody encountered the same problem or maybe even better, knows a solution ;-) ? Thanks a lot in advance for any hints and tips! Clemens -- Clemens Maidhof Cognitive Brain Research Unit, Department of Psychology, University of Helsinki & Finnish Centre of Excellence in Interdisciplinary Music Research, University of Jyväskylä, Finland clemens.maidhof at helsinki.fi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Tue Jan 19 18:51:43 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Tue, 19 Jan 2010 18:51:43 +0100 Subject: Thanks / warning in ft_topoplotER In-Reply-To: <4B55B5A3.2010907@donders.ru.nl> Message-ID: Dear Roemer, dear Jan-Mathijs, Thanks for your quick answers! Sorry for getting back so late. Dear Jan-Mathijs, thanks for the comment on the symbolic links. My colleagues and I, as well as other BESA users, use Windows at work so it would be nice to get news on your proposed OS-independent solution. Dear Roemer, yes, I was referring to ft_topoplotER. I forgot to mention this although I was aware of the fact. Thanks for the explanations! I am a bit confused because I still end up with the same warning (line 214 of ft_topoplotER) even if I use cfg.highlightchannel = 'all'; (or a numerical index vector) cfg.highlight = 'on'; I used the same setting (with different data) for both ft_topoplotTFR and ft_clusterplot. Both call topoplotER, although the call looks a bit different. There is no problem in the case of ft_topoplotTFR. If I modify cfg.highlightchannel, I see a change. When using ft_clusterplot with this same setting, the significant channels appear to be highlighted but I observe no change upon modification of cfg.highlightchannel, and I get the warning in ft_topoplotER (line 214). On debugging, I see that the lines below l.606 in ft_topoplotER ("if ~strcmp(cfg.marker,'off')") are carried out only in my call of ft_topoplotTFR. Have I done anything wrong, or are the settings treated differently by both routines? Have a nice evening! And thanks a lot to both of you! All the best Andrea > > 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a > warning > although I have now switched the setting to cfg.highlight = 'on'. Is there > a > possibility to implement something like the following example (taken from > the tutorial on cluster-based permutation tests on event-related fields)? > > > It looks as if you are referring to ft_topoplotER and not > ft_clusterplot. If that assumption is correct, than you can definitely > use something like: > cfg.highlight = find (pos_int==1|neg_int==-1); > However, cfg.highlight would then need to be changed into > cfg.highlightchannel. In the new highlighting configuration, > cfg.highlight is used to determine highlighting-method (like 'on', > 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate > which channels your actually want to highlight. This can be a numerical > index vector (like above), channel-labels, channel-labels with wildcards > and anything else ft_channelselection can take as input. > > The tutorial on the wiki hasn't been updated yet to reflect the changes > to topoplotER (I'll do that soon), but the following should work: > cfg.highlight = 'on'; > cfg.highlightchannel = find (pos_int==1|neg_int==-1); > (using all the defaults this should mark every channel in > cfg.highlightchannel with a '*' and every other channel with a 'o') > > Hope this helps! > > Best, > Roemer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Wed Jan 20 12:52:14 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 20 Jan 2010 12:52:14 +0100 Subject: Thanks / warning in ft_topoplotER In-Reply-To: <6D7D6970FEC64AE5AE0EF13A14CCFF96@LAT6500Andrea> Message-ID: Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer Andrea Ostendorf wrote: > Dear Roemer, dear Jan-Mathijs, > > Thanks for your quick answers! Sorry for getting back so late. > > Dear Jan-Mathijs, thanks for the comment on the symbolic links. My > colleagues and I, as well as other BESA users, use Windows at work so it > would be nice to get news on your proposed OS-independent solution. > > Dear Roemer, yes, I was referring to ft_topoplotER. I forgot to mention this > although I was aware of the fact. Thanks for the explanations! > > I am a bit confused because I still end up with the same warning (line 214 > of ft_topoplotER) even if I use > cfg.highlightchannel = 'all'; (or a numerical index vector) > cfg.highlight = 'on'; > > I used the same setting (with different data) for both ft_topoplotTFR and > ft_clusterplot. Both call topoplotER, although the call looks a bit > different. > There is no problem in the case of ft_topoplotTFR. If I modify > cfg.highlightchannel, I see a change. > When using ft_clusterplot with this same setting, the significant channels > appear to be highlighted but I observe no change upon modification of > cfg.highlightchannel, and I get the warning in ft_topoplotER (line 214). > On debugging, I see that the lines below l.606 in ft_topoplotER > ("if ~strcmp(cfg.marker,'off')") are carried out only in my call of > ft_topoplotTFR. > > Have I done anything wrong, or are the settings treated differently by both > routines? > > Have a nice evening! And thanks a lot to both of you! > All the best > Andrea > > > > > > >> 2) ft_clusterplot: Since cfg.highlight has changed, I keep getting a >> warning >> although I have now switched the setting to cfg.highlight = 'on'. Is there >> a >> possibility to implement something like the following example (taken from >> the tutorial on cluster-based permutation tests on event-related fields)? >> >> >> It looks as if you are referring to ft_topoplotER and not >> ft_clusterplot. If that assumption is correct, than you can definitely >> use something like: >> cfg.highlight = find (pos_int==1|neg_int==-1); >> However, cfg.highlight would then need to be changed into >> cfg.highlightchannel. In the new highlighting configuration, >> cfg.highlight is used to determine highlighting-method (like 'on', >> 'labels', 'numbers'), while cfg.highlightchannel is meant to indicate >> which channels your actually want to highlight. This can be a numerical >> index vector (like above), channel-labels, channel-labels with wildcards >> and anything else ft_channelselection can take as input. >> >> The tutorial on the wiki hasn't been updated yet to reflect the changes >> to topoplotER (I'll do that soon), but the following should work: >> cfg.highlight = 'on'; >> cfg.highlightchannel = find (pos_int==1|neg_int==-1); >> (using all the defaults this should mark every channel in >> cfg.highlightchannel with a '*' and every other channel with a 'o') >> >> Hope this helps! >> >> Best, >> Roemer >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Wed Jan 20 13:51:04 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 20 Jan 2010 13:51:04 +0100 Subject: Warning in ft_topoplotER In-Reply-To: <4B56EE6E.6000307@donders.ru.nl> Message-ID: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test_clusterplot.zip Type: application/x-zip-compressed Size: 4918 bytes Desc: not available URL: From aostendorf at BESA.DE Wed Jan 20 13:55:39 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 20 Jan 2010 13:55:39 +0100 Subject: warning in ft_topoplotER: version In-Reply-To: <4B56EE6E.6000307@donders.ru.nl> Message-ID: Dear Roemer, sorry, I forgot to tell you the version: I am currently using fieldtrip-20100114. Best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Wed Jan 20 14:07:45 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 20 Jan 2010 14:07:45 +0100 Subject: Warning in ft_topoplotER In-Reply-To: Message-ID: Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: > > Dear Roemer, > > > > thanks a lot for your help and the time you are taking to assist me! > Your remarks have been really helpful. > > > > The warning is from topoplotER, which I call indirectly through > ft_clusterplot. Thanks for pointing out that I am not to use the > options directly. I saw some options in the help of ft_clusterplot > together with the hint that more options were to be found in topoplotER. > > > > Since I keep having trouble with uploading files to your server, I > attach a test MATLAB file (stripped down to the basics) and my data. I > hope that is okay, it is really quite a small amount of data. > Otherwise, I would try my private Ubuntu computer. > > > > The warning is > > Warning: cfg.highlight is now used for specifing highlighting-mode, > use cfg.highlightchannel instead of cfg.highlight for specifiying channels > > > In ft_topoplotER at 214 > > In topoplotER at 17 > > In ft_clusterplot at 277 > > In test_clusterplot at 5 > > > > Thanks a lot! > > > > Best regards > > Andrea > > > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 12:52 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Thanks / warning in ft_topoplotER > > > > Hi Andrea, > > Always happy to help. And thank you for helping us squashing bugs! > > Are you sure you are using the most recent fieldtrip version? There > was a bug several weeks ago that gave the warning (which used to be on > line 214, but is now on line 215) even when cfg.highlight was not > numerical. (if it's numerical, it is assumed cfg.highlight is used in > the old way). If you have a version that is newer than 19-12-2009 > (date of previous bug fix), could you post the exact code you use to > call ft_topoplotER? This could give me a better idea on where in the > code the problem lies. Could you then also post the exact warning > matlab spits out? (if it's not a version problem, something > complicated is going on and all information is helpful). Thanks! > > Concerning ft_clusterplot, you're not actually supposed to use the > highlighting options directly. As clusterplot tries to determine the > clustering automatically, this could possibly interfere with it's > normal functioning. Thanks for pointing this out. I now added a check > for these 'forbidden' options and they will be removed automatically. > The updated clusterplot will be uploaded to the ftp-server somewhere > late in the evening today. > > However, if you want to manage you're own clustering directly, you can > also do this using topoplotER/TFR. It might be a bit difficult, but > you have to put all the highlighting options in its own cell > (including the ones that were already in cells). There is 'hidden' > documentation about this in topoplotER (you won't see it with the > help/doc command, but you will if you edit the function), you can find > it just below the normal documentation. > I copy-pasted it here for easy reference: > *********** > % It is possible to use multiple highlight-selections (e.g.: multiple > statistical clusters of channels) > % To do this, all the content of the highlight-options (including > cfg.highlight) should be placed in a cell-array > % (even if the normal content was already in a cell-array). Specific > marker settings (e.g. color, size) are defaulted when > % not present. > % Example (3 selections): > % cfg.highlight = {'labels', 'labels', 'numbers'} > % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} > % cfg.highlightsymbol = {'o',[],'+'} % the empty option > will be defaulted > % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option > will be defaulted > % cfg.highlightsize = []; % will be set > to default, as will the missing cfg.highlightfontsize > *********** > > Using these options you should be able to get the same individual > plots clusterplot can give you. If you do not want to see the other > channels, set cfg.marker = 'off';. On the use of the different > routines, topoplotTFR is identical to topoplotER, but is just present > because of our present naming-scheme. Clusterplot however, is a > wrapper around topoplotER/TFR designed to quickly and without much > configuring plot your statistical clusters (which requires statistics > output as input). By using the 'hidden' options above, you can make > topoplotER/TFR do exactly the same as clusterplot, but then you can > specify your own clusters. > > > We are currently looking into your question number 3, as it appears > things go a little deeper there. There are at least some situations > where cfg.neighbours = [] apparently doesn't work, but we are still > figuring out why. For the moment, a really ugly and time consuming > workaround would be to make a for-loop over single channels, but it > would prevent the clustering over channels and should provide (per > channel) the exact same output as cfg.neighbours = []; > > > I hope all of the above helps. Thanks for bringing these bugs to our > attention! > > Kind regards, > > Roemer > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Thu Jan 21 08:54:53 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Thu, 21 Jan 2010 08:54:53 +0100 Subject: data analysis competition/Biomag2010 Message-ID: Dear all, We would like to announce a data analysis competition for biomag2010: http://megcommunity.org/index.php?option=com_content&view=article&id=2&Itemid=24 It focuses on connectivity analysis and multivariate classification approaches. Please consider attending or encourage interested researchers to participate. Best regards, Ole Jensen and Jan-Mathijs Schoffelen -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Thu Jan 21 13:33:39 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 21 Jan 2010 13:33:39 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: <4B570021.9030200@donders.ru.nl> Message-ID: Dear Roemer, Thanks a lot. My previous version worked with your proposed corrections and I downloaded the new version today. Sorry, I have yet another question, this time regarding the parameters controlling statistical analysis for the cluster-based test statistic. When asking myself whether it made sense to set cfg.testtail and cfg.tail independently, I found the error message in clusterstat.m, l.32, which states that the parameters should be equal. Could you perhaps mention this requirement in the tutorials? Also, regarding cfg.alpha and cfg.clusteralpha - just to make sure that I have got things right: For a two-sided test, I have to split cfg.alpha manually so as to equal half the desired significance level but I do not have to change cfg.clusteralpha explicitly, is this correct? I gathered so from the tutorials and it looks so from the code (in clusterstat and the statfun functions, the alpha parameter is halved automatically). If nothing is specified, both parameters are set to 0.05. As a two-sided test is the default, does this mean that the false alarm rate is set at the 10% level if the user does not specify anything, or have I overlooked something? (I have to admit that I am impressed with the intricacies but that I have not really grasped the details.) By the way, the tutorial on cluster-based permutation tests on event related fields mentions a parameter cfg.alphathresh, which I only found in the clusterrand functions and which I took to mean cfg.clusteralpha. All the best to all of you Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 14:08 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Warning in ft_topoplotER Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From smaraujo at UALG.PT Tue Jan 26 14:53:19 2010 From: smaraujo at UALG.PT (=?iso-8859-1?Q?Susana_Ara=FAjo?=) Date: Tue, 26 Jan 2010 13:53:19 -0000 Subject: problems with high pass filter Message-ID: Dear all, I’m analysing EEG data from children and I tried to set the high pass filter to 0.05Hz (PreProcessing). However I get a warning message “Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669240e-017”. Does anyone can help me to solve this problem? Thanks a lot! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jan 26 15:31:21 2010 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 26 Jan 2010 15:31:21 +0100 Subject: problems with high pass filter In-Reply-To: <20100126135311.88B33166C2@smtp3.ualg.pt> Message-ID: Dear Susana, Probably you data(segments) are too short for this setting. For the high pass filter with 0.05Hz to work you need very long data (0.05 Hz is a cycle of 20 seconds!), Do you need such low frequencies in your data? If not you could try f.i. 0.5Hz. Hope this helps, Ingrid ------------------------------------ Ingrid L.C. Nieuwenhuis PhD student Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands Email: ingrid.nieuwenhuis at donders.ru.nl Tel: 0031 (0)24 - 36 10887 _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Susana Araújo Sent: Tuesday, January 26, 2010 2:53 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] problems with high pass filter Dear all, I’m analysing EEG data from children and I tried to set the high pass filter to 0.05Hz (PreProcessing). However I get a warning message “Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669240e-017”. Does anyone can help me to solve this problem? Thanks a lot! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at CERCO.UPS-TLSE.FR Tue Jan 26 21:39:04 2010 From: arno at CERCO.UPS-TLSE.FR (Arnaud Delorme) Date: Tue, 26 Jan 2010 12:39:04 -0800 Subject: problems with high pass filter Message-ID: Dear Susana and Ingrid, designing efficient filters at very low frequency can be challenging. Below is a solution using pure Matlab code and elliptic filters for high pass filtering at 0.1 Hz (transition bandwidth is from 0.05 to 0.1 Hz). EEG.srate is the sampling rate, EEG.nbchan, the number of data channel and EEG.data contains the continuous data (number of channels x number of data points). The code below requires the signal processing toolbox. You may also notice that I detrend the data first. This is to remove any DC offset and very slow drifts that tend to generate more artifacts at data boundaries. The function filtfilt applies the filter in both direction (forward then backward) to avoid phase distortions. Hope this helps, Arno [N, Wn] = ellipord(.1/(EEG.srate/2), .05/(EEG.srate/2), 0.5, 3) [b a] = ellip(N, 0.5, 3, Wn, 'high'); for index = 1:EEG.nbchan EEG.data(index,:) = detrend(EEG.data(index,:)); EEG.data(index,:) = filtfilt( b, a, EEG.data(index,:)); end; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Wed Jan 27 10:08:38 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Wed, 27 Jan 2010 10:08:38 +0100 Subject: minor bug and beamformer question Message-ID: Hi everyone! I would like to report that fieldtrip's read_mri function complains about not finding the field with the transformation matrix in our neuomag fiff files. The problem was fixed by my dear colleague Hanneke by replacing if issubfield(hdr.voxel_trans, 'trans') transform = hdr.voxel_trans.trans; elseif issubfield(hdr.trans, 'trans'), transform = hdr.trans.trans; end by if isfield(hdr, 'voxel_trans') transform = hdr.voxel_trans.trans; elseif isfield(hdr, 'trans') transform = hdr.trans.trans; end Maybe this can be incorporated in future versions. Then I do have two questions about beamforming. As I understand it, beamformer methods such as DICS are able to compute time courses of brain regions. How can I visualize the time signal of a voxel in fieldtrip? Then I found that after sorting out several trials in my experiment I was not able to compute the neural activity index anymore, as the noise estimates for the grid nodes were all either NANs or zeros. I this a known problem or did I make a mistake somewhere? How could it be fixed? Thank you very much for your support! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.hartmann at UNI-KONSTANZ.DE Wed Jan 27 13:57:30 2010 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Wed, 27 Jan 2010 13:57:30 +0100 Subject: using ica to get occipital component producing alpha in eyes-closed resting eeg Message-ID: hi, i am looking for a method to identify the component(s) of an eyes-closed resting-state eeg producing occipital alpha in a single subject. so far, no method i tried (fastica, sobi) was able to produce such a component, although topoplots show them very clearly. i also tried to filter the data using a bandpass filter before letting the ica run. i have 5 minutes of data available, partly contaminated with tms-artifacts which i remove beforehand. does someone know a good and stable approach? maybe i would have to change the ica-algorithm? is there one specifically looking at frequency-information? maybe i also use the wrong approach? is there a different option to get something like a weighting matrix restricted to a specific frequency-band (and also able to seperate occipital alpha from other alpha generators like, e.g. temporal, motor etc..)? thanks in advance! greetings, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Thu Jan 28 11:07:15 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Thu, 28 Jan 2010 11:07:15 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: Message-ID: Hi Andrea, Sorry for my late reply (compared to my previous replies), I was a bit too busy. I can't seem to find any reference on cfg.testtail, are you referring to cfg.clustertail instead? We are thinking at the moment on changing how the correcting of p-values/alpha-values work, but for the moment you are correct in assuming that you need to divide the cfg.alpha manually by 2 in case of a two-sided test. This will most likely change in the near-future and be made more explicit in the documentation, but for now, the tutorials are correct. It is very important to make the distinction between cfg.clusteralpha and cfg.alpha. Cfg.clusteralpha only refers to when certain values where you want to cluster over are able to be selected for clustering. When clustering over t-values, cfg.clusteralpha only sets the threshold on /when /to cluster. A cfg.clusteralpha = 0.05 would allow more t-values to be selected for clustering, most likely producing bigger clusters, then a cfg.clusteralpha = 0.01. This /does not/ affect the false alarm rate of the statistical test at the cluster-level, this is the cfg.alpha you mentioned. So, to control your false-alarm rate when doing a two-sided cluster-level test, cfg.alpha is the only one that is important. The selection of values to cluster over however, does change when you do a two-sided test. You are correct in stating that, when using the defaults, the overall alpha-level that you are testing against is 0.10, whereas the alpha-level per tail is 0.05. I guess it's a matter of preference which way you look at it. But it is something that can be made more explicit in the documentation/tutorials, thanks for bringing this up. Thanks for noticing the old alphathresh field, the tutorial is updated now. I hope this helps! Best, Roemer On 1/21/2010 1:33 PM, Andrea Ostendorf wrote: > > Dear Roemer, > > Thanks a lot. My previous version worked with your proposed > corrections and I downloaded the new version today. > > Sorry, I have yet another question, this time regarding the parameters > controlling statistical analysis for the cluster-based test statistic. > > When asking myself whether it made sense to set cfg.testtail and > cfg.tail independently, I found the error message in clusterstat.m, > l.32, which states that the parameters should be equal. Could you > perhaps mention this requirement in the tutorials? > > > *Also, regarding cfg.alpha and cfg.clusteralpha -- just to make sure > that I have got things right: For a two-sided test, I have to split > cfg.alpha manually so as to equal half the desired significance > level but I do not have to change cfg.clusteralpha explicitly, is > this correct? I gathered so from the tutorials and it looks so from > the code (in clusterstat and the statfun functions, the alpha > parameter is halved automatically). If nothing is specified, both > parameters are set to 0.05. As a two-sided test is the default, does > this mean that the false alarm rate is set at the 10% level if the > user does not specify anything, or have I overlooked something? (I > have to admit that I am impressed with the intricacies but that I > have not really grasped the details...)* > > > *By the way, the tutorial on c*luster-based permutation tests on > event related fields mentions a parameter cfg.alphathresh, which I > only found in the clusterrand functions and which I took to mean > cfg.clusteralpha. > > All the best to all of you > > Andrea > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 14:08 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Warning in ft_topoplotER > > Hi Andrea, > > Thanks for the data/script, it was exactly what I needed. There was a > silly bug in ft_clusterplot where several calls to cfg.highlight were > not changed to cfg.highlightchannel during the big update, and I > failed to notice them during browsing. Things should be fixed now > (will be on the ftp-server tonight). You can fix it in your own > version easily by changing in line 267 and line 285 cfg.highlight >>> > cfg.highlightchannel. Clusterplot should work as intended afterwards. > > I also realised now that any additional options that go into > clusterplot will not be used (like cfg.marker), these are fixed now as > well (on ftp-server tonight). > > Thanks for pointing out these bugs! > > Best, > Roemer > > > > Andrea Ostendorf wrote: > > Dear Roemer, > > thanks a lot for your help and the time you are taking to assist me! > Your remarks have been really helpful. > > The warning is from topoplotER, which I call indirectly through > ft_clusterplot. Thanks for pointing out that I am not to use the > options directly. I saw some options in the help of ft_clusterplot > together with the hint that more options were to be found in topoplotER. > > Since I keep having trouble with uploading files to your server, I > attach a test MATLAB file (stripped down to the basics) and my data. I > hope that is okay, it is really quite a small amount of data. > Otherwise, I would try my private Ubuntu computer. > > The warning is > > Warning: cfg.highlight is now used for specifing highlighting-mode, > use cfg.highlightchannel instead of cfg.highlight for specifiying channels > > > In ft_topoplotER at 214 > > In topoplotER at 17 > > In ft_clusterplot at 277 > > In test_clusterplot at 5 > > Thanks a lot! > > Best regards > > Andrea > > ------------------------------------------------------------------------ > > *From:* FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > *On Behalf Of *Roemer van der Meij > *Sent:* Mittwoch, 20. Januar 2010 12:52 > *To:* FIELDTRIP at NIC.SURFNET.NL > *Subject:* Re: [FIELDTRIP] Thanks / warning in ft_topoplotER > > Hi Andrea, > > Always happy to help. And thank you for helping us squashing bugs! > > Are you sure you are using the most recent fieldtrip version? There > was a bug several weeks ago that gave the warning (which used to be on > line 214, but is now on line 215) even when cfg.highlight was not > numerical. (if it's numerical, it is assumed cfg.highlight is used in > the old way). If you have a version that is newer than 19-12-2009 > (date of previous bug fix), could you post the exact code you use to > call ft_topoplotER? This could give me a better idea on where in the > code the problem lies. Could you then also post the exact warning > matlab spits out? (if it's not a version problem, something > complicated is going on and all information is helpful). Thanks! > > Concerning ft_clusterplot, you're not actually supposed to use the > highlighting options directly. As clusterplot tries to determine the > clustering automatically, this could possibly interfere with it's > normal functioning. Thanks for pointing this out. I now added a check > for these 'forbidden' options and they will be removed automatically. > The updated clusterplot will be uploaded to the ftp-server somewhere > late in the evening today. > > However, if you want to manage you're own clustering directly, you can > also do this using topoplotER/TFR. It might be a bit difficult, but > you have to put all the highlighting options in its own cell > (including the ones that were already in cells). There is 'hidden' > documentation about this in topoplotER (you won't see it with the > help/doc command, but you will if you edit the function), you can find > it just below the normal documentation. > I copy-pasted it here for easy reference: > *********** > % It is possible to use multiple highlight-selections (e.g.: multiple > statistical clusters of channels) > % To do this, all the content of the highlight-options (including > cfg.highlight) should be placed in a cell-array > % (even if the normal content was already in a cell-array). Specific > marker settings (e.g. color, size) are defaulted when > % not present. > % Example (3 selections): > % cfg.highlight = {'labels', 'labels', 'numbers'} > % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} > % cfg.highlightsymbol = {'o',[],'+'} % the empty option > will be defaulted > % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option > will be defaulted > % cfg.highlightsize = []; % will be set > to default, as will the missing cfg.highlightfontsize > *********** > > Using these options you should be able to get the same individual > plots clusterplot can give you. If you do not want to see the other > channels, set cfg.marker = 'off';. On the use of the different > routines, topoplotTFR is identical to topoplotER, but is just present > because of our present naming-scheme. Clusterplot however, is a > wrapper around topoplotER/TFR designed to quickly and without much > configuring plot your statistical clusters (which requires statistics > output as input). By using the 'hidden' options above, you can make > topoplotER/TFR do exactly the same as clusterplot, but then you can > specify your own clusters. > > > We are currently looking into your question number 3, as it appears > things go a little deeper there. There are at least some situations > where cfg.neighbours = [] apparently doesn't work, but we are still > figuring out why. For the moment, a really ugly and time consuming > workaround would be to make a for-loop over single channels, but it > would prevent the clustering over channels and should provide (per > channel) the exact same output as cfg.neighbours = []; > > > I hope all of the above helps. Thanks for bringing these bugs to our > attention! > > Kind regards, > > Roemer > > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > > -- > Roemer van der Meij MSc > Scientific Programmer& Data-Analyst > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3612631 > E-mail:r.vandermeij at donders.ru.nl > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4788 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4791 (20100120) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Thu Jan 28 11:21:06 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 28 Jan 2010 11:21:06 +0100 Subject: Thanks! / Question regarding test statistics In-Reply-To: <4B6161D3.2060802@donders.ru.nl> Message-ID: Hi Roemer, thanks a lot for the answer. So I will allow alpha and clusteralpha to be varied independently. You are correct in suggesting that I was referring to "cfg.clustertail", which I understand from the code (error message in clusterstat.m, l.32) to be required to equal "cfg.tail". Sorry about the typo! All the best, Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Donnerstag, 28. Januar 2010 11:07 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks! / Question regarding test statistics Hi Andrea, Sorry for my late reply (compared to my previous replies), I was a bit too busy. I can't seem to find any reference on cfg.testtail, are you referring to cfg.clustertail instead? We are thinking at the moment on changing how the correcting of p-values/alpha-values work, but for the moment you are correct in assuming that you need to divide the cfg.alpha manually by 2 in case of a two-sided test. This will most likely change in the near-future and be made more explicit in the documentation, but for now, the tutorials are correct. It is very important to make the distinction between cfg.clusteralpha and cfg.alpha. Cfg.clusteralpha only refers to when certain values where you want to cluster over are able to be selected for clustering. When clustering over t-values, cfg.clusteralpha only sets the threshold on when to cluster. A cfg.clusteralpha = 0.05 would allow more t-values to be selected for clustering, most likely producing bigger clusters, then a cfg.clusteralpha = 0.01. This does not affect the false alarm rate of the statistical test at the cluster-level, this is the cfg.alpha you mentioned. So, to control your false-alarm rate when doing a two-sided cluster-level test, cfg.alpha is the only one that is important. The selection of values to cluster over however, does change when you do a two-sided test. You are correct in stating that, when using the defaults, the overall alpha-level that you are testing against is 0.10, whereas the alpha-level per tail is 0.05. I guess it's a matter of preference which way you look at it. But it is something that can be made more explicit in the documentation/tutorials, thanks for bringing this up. Thanks for noticing the old alphathresh field, the tutorial is updated now. I hope this helps! Best, Roemer On 1/21/2010 1:33 PM, Andrea Ostendorf wrote: Dear Roemer, Thanks a lot. My previous version worked with your proposed corrections and I downloaded the new version today. Sorry, I have yet another question, this time regarding the parameters controlling statistical analysis for the cluster-based test statistic. When asking myself whether it made sense to set cfg.testtail and cfg.tail independently, I found the error message in clusterstat.m, l.32, which states that the parameters should be equal. Could you perhaps mention this requirement in the tutorials? Also, regarding cfg.alpha and cfg.clusteralpha - just to make sure that I have got things right: For a two-sided test, I have to split cfg.alpha manually so as to equal half the desired significance level but I do not have to change cfg.clusteralpha explicitly, is this correct? I gathered so from the tutorials and it looks so from the code (in clusterstat and the statfun functions, the alpha parameter is halved automatically). If nothing is specified, both parameters are set to 0.05. As a two-sided test is the default, does this mean that the false alarm rate is set at the 10% level if the user does not specify anything, or have I overlooked something? (I have to admit that I am impressed with the intricacies but that I have not really grasped the details.) By the way, the tutorial on cluster-based permutation tests on event related fields mentions a parameter cfg.alphathresh, which I only found in the clusterrand functions and which I took to mean cfg.clusteralpha. All the best to all of you Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 14:08 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Warning in ft_topoplotER Hi Andrea, Thanks for the data/script, it was exactly what I needed. There was a silly bug in ft_clusterplot where several calls to cfg.highlight were not changed to cfg.highlightchannel during the big update, and I failed to notice them during browsing. Things should be fixed now (will be on the ftp-server tonight). You can fix it in your own version easily by changing in line 267 and line 285 cfg.highlight >>> cfg.highlightchannel. Clusterplot should work as intended afterwards. I also realised now that any additional options that go into clusterplot will not be used (like cfg.marker), these are fixed now as well (on ftp-server tonight). Thanks for pointing out these bugs! Best, Roemer Andrea Ostendorf wrote: Dear Roemer, thanks a lot for your help and the time you are taking to assist me! Your remarks have been really helpful. The warning is from topoplotER, which I call indirectly through ft_clusterplot. Thanks for pointing out that I am not to use the options directly. I saw some options in the help of ft_clusterplot together with the hint that more options were to be found in topoplotER. Since I keep having trouble with uploading files to your server, I attach a test MATLAB file (stripped down to the basics) and my data. I hope that is okay, it is really quite a small amount of data. Otherwise, I would try my private Ubuntu computer. The warning is Warning: cfg.highlight is now used for specifing highlighting-mode, use cfg.highlightchannel instead of cfg.highlight for specifiying channels > In ft_topoplotER at 214 In topoplotER at 17 In ft_clusterplot at 277 In test_clusterplot at 5 Thanks a lot! Best regards Andrea _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Roemer van der Meij Sent: Mittwoch, 20. Januar 2010 12:52 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Thanks / warning in ft_topoplotER Hi Andrea, Always happy to help. And thank you for helping us squashing bugs! Are you sure you are using the most recent fieldtrip version? There was a bug several weeks ago that gave the warning (which used to be on line 214, but is now on line 215) even when cfg.highlight was not numerical. (if it's numerical, it is assumed cfg.highlight is used in the old way). If you have a version that is newer than 19-12-2009 (date of previous bug fix), could you post the exact code you use to call ft_topoplotER? This could give me a better idea on where in the code the problem lies. Could you then also post the exact warning matlab spits out? (if it's not a version problem, something complicated is going on and all information is helpful). Thanks! Concerning ft_clusterplot, you're not actually supposed to use the highlighting options directly. As clusterplot tries to determine the clustering automatically, this could possibly interfere with it's normal functioning. Thanks for pointing this out. I now added a check for these 'forbidden' options and they will be removed automatically. The updated clusterplot will be uploaded to the ftp-server somewhere late in the evening today. However, if you want to manage you're own clustering directly, you can also do this using topoplotER/TFR. It might be a bit difficult, but you have to put all the highlighting options in its own cell (including the ones that were already in cells). There is 'hidden' documentation about this in topoplotER (you won't see it with the help/doc command, but you will if you edit the function), you can find it just below the normal documentation. I copy-pasted it here for easy reference: *********** % It is possible to use multiple highlight-selections (e.g.: multiple statistical clusters of channels) % To do this, all the content of the highlight-options (including cfg.highlight) should be placed in a cell-array % (even if the normal content was already in a cell-array). Specific marker settings (e.g. color, size) are defaulted when % not present. % Example (3 selections): % cfg.highlight = {'labels', 'labels', 'numbers'} % cfg.highlightchannel = {{'MZF03','MZC01','MRT54'}, [1:5], 'C*'} % cfg.highlightsymbol = {'o',[],'+'} % the empty option will be defaulted % cfg.highlightcolor = {'r',[0 0 1]}; % the missing option will be defaulted % cfg.highlightsize = []; % will be set to default, as will the missing cfg.highlightfontsize *********** Using these options you should be able to get the same individual plots clusterplot can give you. If you do not want to see the other channels, set cfg.marker = 'off';. On the use of the different routines, topoplotTFR is identical to topoplotER, but is just present because of our present naming-scheme. Clusterplot however, is a wrapper around topoplotER/TFR designed to quickly and without much configuring plot your statistical clusters (which requires statistics output as input). By using the 'hidden' options above, you can make topoplotER/TFR do exactly the same as clusterplot, but then you can specify your own clusters. We are currently looking into your question number 3, as it appears things go a little deeper there. There are at least some situations where cfg.neighbours = [] apparently doesn't work, but we are still figuring out why. For the moment, a really ugly and time consuming workaround would be to make a for-loop over single channels, but it would prevent the clustering over channels and should provide (per channel) the exact same output as cfg.neighbours = []; I hope all of the above helps. Thanks for bringing these bugs to our attention! Kind regards, Roemer __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4791 (20100120) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -- Roemer van der Meij MSc Scientific Programmer & Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl __________ Information from ESET NOD32 Antivirus, version of virus signature database 4812 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From masaki.maruyama at CEA.FR Fri Jan 29 17:07:00 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Fri, 29 Jan 2010 17:07:00 +0100 Subject: Beamformer Message-ID: Dear Fieldtrip users, Please let me ask two questions about beamformer. (1) Beamformer for different-type sensors I have two different types of sensors: planer gradiometers and magnetometers. I would like to know if beamformers should compute the different-type signals separately. If so, after beamformer sourceanalysis, is it appropriate to integrate two NAIs (neural activity indexes) in such as (NAI_mag + NAI_grad)/2 or NAI_mag x NAI_grad? I would appreciate any comments/ advices on this issue. (2) Common filters in LCMV-beamformer Although the Fieldtrip website does NOT tell that common filters are available in LCMV, I'm wondering if it is limited to cases of single trial beamformer. According to the discussion of Drs Floris and Robert on 2009 Feb 2, the current version of LCMV cannot well optimize spatial filters in noisy signals of single trials, but it possibly optimizes well in averaged signals. My question is whether it makes sense to prepare a common spatial filter across conditions using averaged signals, and then apply it to the averaged signal of each condition, with setting cfg.grid.filter? I tried the method using the following script, and its computation finished without any error message. However, I'm afraid that my understanding might be incorrect, i.e., the issue of common filter has nothing to do with the issue of optimization. Could someone please make the issues clearer? Thank you in advance for your kind responses, With best regards, Masaki Maruyama Inserm U.992 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE http://www.unicog.org/ %Optimize spatial filter in common across conditions and times for cnd = 1:length(MegFile) load(MegFile{cnd}); %Load "DataPostICA" containing single trials in a condition cfg = [];cfg.removemean = 'no'; %Optimization of spatial filter based on covariance of averaged field (see Robert email on 04/02/2009) cfg.keeptrials = 'no';cfg.covariance = 'no'; data_temp = timelockanalysis(cfg,DataPostICA); if cnd == 1 data_cmb = data_temp; else data_cmb = appenddata([],data_cmb,data_temp); end clear data_temp end cfg.keeptrials = 'no';cfg.covariance = 'yes'; cfg.covariancewindow = [-0.5 1]; data = timelockanalysis(cfg,data_cmb); cfg = [];cfg.method = 'lcmv';cfg.grid = grid;cfg.vol = hdm;cfg.lambda = '5%'; cfg.keepfilter = 'yes'; source = sourceanalysis(cfg, data); common_filter = source.avg.filter; %Beamforming using the common spatial filter for cnd = 1:length(MegFile) load(MegFile{cnd});%Load "DataPostICA" again cfg = [];cfg.removemean = 'no'; cfg.covariancewindow = [-0.5 1]; cfg.keeptrials = 'no';cfg.covariance = 'no'; data_temp = timelockanalysis(cfg,DataPostICA); cfg.keeptrials = 'no';cfg.covariance = 'yes'; data = timelockanalysis(cfg,data_temp); cfg = [];cfg.method = 'lcmv';cfg.grid = grid;cfg.vol = hdm;cfg.lambda = '5%'; cfg.grid.filter = common_filter; source = sourceanalysis(cfg, data); save(strcat('SourceAnalysis','_cnd',num2str(cnd)), 'source'); end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: