From f.roux at bcbl.eu Sun Feb 1 16:03:57 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Sun, 1 Feb 2015 16:03:57 +0100 (CET) Subject: [FieldTrip] problem with copyfields and removefields after fieldtrip update during call to ft_freqanalysis and ft_topoplotTFR Message-ID: <1739525902.373403.1422803037589.JavaMail.root@bcbl.eu> Dear all, I've updated my ft version to 20150115 but now I am having problems with two functions that ft is calling and which are not in my Matlab path. While calling ft_freqanalysis and ft_topoplotTFR I received error messages related to "copyfields" and "removefields". If I am not mistaken, these functions are not native Matlab functions, so I suppose that these are ft-specifc and that they are located in a subfolder somewhere in the main ft folder but that my Matlab path does not include them. I've commented out the lines in the ft-code where these functions are called to avoid the problem but I am not sure whether there could be any other problems arising from the fact that my ft-path seems not to be set correctly. I usually add ft to my Matlab path through: addpath('/home/user/fieldtrip-20150115/'); ft_defaults; and have never experienced any problems so far. Has anybody experienced a similar problem after updating their ft-version and can anyone tell me how to fix this? Best, Fred --------------------------------------------------------------------------- From ktyler at swin.edu.au Mon Feb 2 02:26:11 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 2 Feb 2015 01:26:11 +0000 Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial Message-ID: Hi all, Just a question: I was running through the 'Beamforming oscillatory responses in MEG and EEG data' tutorial, and at one plot, the strongest motor response is located in the center of the head. The tutorial asks "Can you explain this finding?" Has anyone else done this tutorial? Because I am not at all sure why a motor response would show up in the centre of the head. Can anyone enlighten me? When I have been getting results that look like this, I kept feeling there was an error or some artefact going on. Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Feb 2 05:13:17 2015 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 2 Feb 2015 04:13:17 +0000 Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial In-Reply-To: References: Message-ID: Hi Kaelasha, Take a look at http://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_biashttp://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_biashttp://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_bias This should help clarify what's going on. Peter __________________________ Peter Goodin, BSc (Hons), Ph.D Candidate. Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 http://www.swinburne.edu.au/swinburneresearchers/index.php?fuseaction=profile&pid=4149 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Kaelasha Tyler [ktyler at swin.edu.au] Sent: Monday, 2 February 2015 12:26 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial Hi all, Just a question: I was running through the 'Beamforming oscillatory responses in MEG and EEG data' tutorial, and at one plot, the strongest motor response is located in the center of the head. The tutorial asks "Can you explain this finding?" Has anyone else done this tutorial? Because I am not at all sure why a motor response would show up in the centre of the head. Can anyone enlighten me? When I have been getting results that look like this, I kept feeling there was an error or some artefact going on. Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Feb 2 09:24:40 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 2 Feb 2015 09:24:40 +0100 Subject: [FieldTrip] basic question Message-ID: Dear all, I've got a basic question regarding spectral analysis. In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Feb 2 09:25:23 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 2 Feb 2015 09:25:23 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <000001d03cab$039169c0$0ab43d40$@de> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> <000001d03cab$039169c0$0ab43d40$@de> Message-ID: <002f01d03ec1$ca3e86d0$5ebb9470$@artinis.com> Hi Todor, you are right that in saying that only one taper shows distinct peaks in all three frequency bands. I dare to say that you chose a rather long signal (something of several seconds), hence the broad frequency smoothing when adding a single taper. As you also indicated, the purpose of using multitapering is not to represent the PSD as 'clean' as possible - then you would need as little smoothing in the frequency domain as possible and therefore use a boxcar taper. In real life, we have noisy signals unfortunately, and most importantly, neurophysiological signals (of higher frequency) are of wide bandwidth, center frequencies of neurophysiological signals vary strongly across participants, etc. All these make your signal imperfect, and are probably properties that you did not simulate. You can calculate the amount of 'smoothing'/smearing in the frequency domain yourself a priori (2*length of your signal * frequency smoothing = # tapers). The choice of tapering depends thus a lot on what you want. If you want to increase statistical power across observations, where you expect activity in a certain, frequency band, slightly different across observations, possibly contaminated by noise, then multitapers might be the way to go. The advantage is that you have very good control over the bandwidth of your decomposition, and the frequency response is pretty amazing (as you probably saw in the script, additional tapers increase the magnitude of the main lobe while roughly maintaining the magnitude of the side lobes). It all depends on what you want though. We are dealing with tricky signals anyway due to their neurophysiological origin (imperfect sinusoids, lots of noise of different sources, etc.), so we need to choose a method that best suits our needs. Multitapers are one of those that I wouldn't want to miss (in practice mostly when dealing with gamma band responses due to their wide bandwidth). There are more than enough cases where multitapering can also be a pretty bad choice (e.g. when analyzing lower frequencies in shorter trials). Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of tjordanov at besa.de > Sent: Friday, January 30, 2015 5:37 PM > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Eelke, hi Jörn, > > thank you for your elaborate answers and for the script - it is very > informative and useful. > I am in some extent familiar with the theory behind multitapering and I am > also convinced that it has very good theoretical properties. However, let us > take a look at the application. I simulated 200 trials data with jitter in the > frequency. You can find the frequency profile of the trials as attachment > ("FrequenciesForSimulation.png"). There are 67 trials with central frequency > 34 Hz (variation between 32 and 36 Hz), 67 trials with central frequency 50 Hz > (48 to 52 Hz) and 66 trials with central frequency 66 Hz (64 to 68 Hz). I > performed multitaper analysis with 1, 2 and 3 tapers (see results > "Multitaper1taper.png", "Multitaper2tapers.png", "Multitaper3tapers.png"). > As we can see from the results only the decomposition with one taper > detected correctly the three frequencies, all other two methods (with 2 and > 3 tapers) just distorted (smoothed) the first result. I can see that such kind of > smoothing is good for the statistical power between subjects but it does not > prove the advantage of using multiple tapers compared to using just single > taper. What do you think? > > Best, > Todor > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Jörn M. Horschig > Sent: Freitag, 30. Januar 2015 13:34 > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > maybe this matlab function helps illustrating what dpss multitapers are, and > will thus clarify what makes them so powerful compared to other > techniques: > https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 > (go to example 5) > > Best, > Jörn > > > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Friday, January 30, 2015 11:52 AM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Todor, > > > > Although your procedure would also yield smoothing in the frequency > > domain which is independent from that in the time domain, it is not at > > all equivalent to using multitapers! > > > > The tapers in the discrete prolate spheroidal sequence (dpss, == > > multitaper in fieldtrip) are pairwise orthogonal, hence their > > estimates are independent from one another. This will result in there > > being more information extracted from the signal than if you used a > > single taper and then apply Gaussian smoothing over frequencies. You > > could have a look at https://en.wikipedia.org/wiki/Multitaper which > > gives quite a decent overview of multitapering. Or for the full > > details, refer to the original paper by David Thompson: > > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > > > Best. > > Eelke > > > > On 30 January 2015 at 11:10, tjordanov at besa.de > > wrote: > > > Hi Eelke, > > > > > > I found your answer very interesting. If I understand you correctly, > > > the > > advantage of the multitaper method is that it smoothes in the > > frequency domain independently of the smoothing in the time domain. > > Then it should be equivalent (or similar) with the following procedure: > > > 1) Calculate single trial single taper decomposition of the signal. > > > 2) Choose an appropriate 1D Gauss function (note that it is > > > important to be 1D else it would smooth in both - time and > > > frequency) > > > 3) Apply the selected Gauss function on the decomposed signal only > > > in the > > frequency direction (not in time in order to avoid temporal smearing). > > Do this for all trials and all time points. > > > 4) Calculate the average over the trials. > > > In this procedure the choice of the Gaussian would determine the > > > amount > > of smearing in the frequency domain. > > > > > > Is this so, or I misunderstood something? > > > > > > Best, > > > Todor > > > > > > > > > -----Original Message----- > > > From: fieldtrip-bounces at science.ru.nl > > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > > Sent: Mittwoch, 28. Januar 2015 12:24 > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > > > Hi Nico, > > > > > > As for question (2), you probably first need to think about what > > > constitutes > > a "better" result. Using more tapers with dpss will always result in > > more frequency smoothing. If your source signal is primarily composed > > of pure sinusoids, and you interpret a spectrum as "better" > > > if it shows clearer peaks, then you will always get the "best" > > > result for the > > single-taper case. > > > > > > Multitapering allows optimal control over the amount of smoothing > > > you > > obtain in the frequency domain, which is more or less independent of > > the amount of smoothing you obtain in the time domain (as opposed to > e.g. > > wavelets, where these are fundamentally linked). When dealing with > > brain signals, you will often find that a certain stimulus might > > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > > while in another subject or another trial the same stimulus might > > induce a 50-60 Hz response or so. Of course, in the average over > > trials (and subjects), this heterogeneity (i.e., > > noise) will wash out, but it will severely damage your statistical sensitivity. > > Therefore, using multitapers to add smoothing can produce a much more > > consistent result and therefore be "better" in the sense of actually > > understanding the brain. > > > > > > As for your simulation, perhaps using filtered noise would be better > > > than > > sinusoids. Also, since multitapering benefits you most strongly when > > taking variation over observations into account, you could consider > > simulating different observations, each consisting of noise filtered > > in a slightly different randomly chosen bandwidth, and inspecting the > > resulting variation over observations in the spectra. > > > > > > Best, > > > Eelke > > > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > > >> Hi Nico, > > >> > > >> I'm not sure about the second question, but as for the first > > >> question, you can manually set the scales for ft_singleplotTFR > > >> using > > cfg.zlim. > > >> > > >> Hope that helps, > > >> > > >> Max > > >> > > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > >> > > >> wrote: > > >>> > > >>> Hello FieldTrip community, > > >>> > > >>> > > >>> > > >>> I am new to FieldTrip and I try to simulate data to compare the > > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > >>> > > >>> Therefore I simulate Data manually using different latency, > > >>> amplitude and frequency combinations using the following equation: > > >>> > > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > >>> > > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > >>> > > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > >>> > > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > >>> > > >>> sig = sig1+sig2+sig3+sig4; > > >>> > > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > > >>> > > >>> > > >>> After using ft_frequanalysis (see the following cfgs) > > >>> > > >>> > > >>> Cfg Wavelet: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'wavelet'; > > >>> > > >>> cfg.width = 7; > > >>> > > >>> cfg.gwidth = 3; > > >>> > > >>> cfg.foilim = [1 70]; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> Cfg Hanning / Multitaper: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'mtmconvol' > > >>> > > >>> cfg.foi = 1:1:70 > > >>> > > >>> cfg.tapsmofrq = 0.2*cfg.foi; > > >>> > > >>> cfg.taper = 'dpss' / ‘hanning’; > > >>> > > >>> cfg.t_ftimwin = 4./cfg.foi; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> > > >>> the data is plotted with ft_singleplotTFR (see cfg below) > > >>> > > >>> > > >>> cfg singleplot: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.maskstyle = 'saturation'; > > >>> > > >>> cfg.colorbar = 'yes'; > > >>> > > >>> cfg.layout = 'AC_Osc.lay'; > > >>> > > >>> ft_singleplotTFR(cfg, TFRwave); > > >>> > > >>> > > >>> Two problems occur. First, the power scale of wavelet and > > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > > ~15*10^4). > > >>> > > >>> 1. How can I get the scale of all methods equal, or do I have to > > >>> change the Wavelet settings to get the right scale of the values? > > >>> > > >>> Second, the best result of Multitaper analysis is performed using > > >>> only one Taper. The goal was to get a result, where the advantages > > >>> and disadvantages of Multitaper analysis compared to the other > > methods can be seen. > > >>> > > >>> 2. How can I change the simulation so that more tapers show better > > >>> results than a single taper does? > > >>> > > >>> > > >>> Thank you for your time and help. > > >>> > > >>> > > >>> Regards, > > >>> > > >>> > > >>> > > >>> Nicolas Weeger > > >>> > > >>> Student of Master-Program Appied Research, > > >>> > > >>> University Ansbach, > > >>> > > >>> Germany > > >>> > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> > > >> > > >> > > >> -- > > >> Max Cantor > > >> Lab Manager > > >> Computational Neurolinguistics Lab > > >> University of Michigan > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From behinger at uos.de Mon Feb 2 10:12:50 2015 From: behinger at uos.de (Benedikt Ehinger) Date: Mon, 02 Feb 2015 10:12:50 +0100 Subject: [FieldTrip] basic question In-Reply-To: References: Message-ID: <54CF3F92.2050202@uos.de> Dear Hweeling, we use the following code: % Make 23 logarithmical spaced .25-octave frequencies cfg.foi = logspace(log10(4),log10(181),23); cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz % The windows should have 3/4 octave smoothing in frequency domain cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq % The timewindow should be so, that for freqs below 16, it results in n=1 % Taper used, but for frequencies higher, it should be a constant 250ms. % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1) cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)))]; I guess the first line is the answer to your question. I hope this bit of code helps. Best, Benedikt Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee: > Dear all, > > I've got a basic question regarding spectral analysis. > > In Hipp's neuron paper, it was mentioned that "spectral estimates were > computed across 23 logarithmically scaled frequencies from 4 - 181 Hz > (0.25 octave steps)". May I know how can one implement this using > Fieldtrip? > > Thanks. > > Best regards, > Hweeling > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Feb 2 11:47:52 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 2 Feb 2015 11:47:52 +0100 Subject: [FieldTrip] basic question In-Reply-To: <54CF3F92.2050202@uos.de> References: <54CF3F92.2050202@uos.de> Message-ID: <005401d03ed5$b1db9ba0$1592d2e0$@artinis.com> Hi Benedikt and Hweeling, note that the rounding step is not necessary, because FieldTrip will round to steps according to your frequency resolution. Actual frequencies of interest (foi) are subject to the time window of your trials defining the Raleigh frequency (i.e. frequency resolution). With trials of 2s you have a frequency resolution of 0.5 Hz, so you can only get estimates at 4 Hz, 4.5 Hz, 5 Hz etc. With the code you sent around, you request frequency at 4.0000 4.7568 5.6568 6.7271 will thus effectively 4, 5, 6 and 7 Hz will be computed (due to the rounding to the next step of the 0.5 Hz resolution). I do not know the length of your trials, but I thought I drop this here to avoid future questions on ‘why this didn’t work as expected’ ;) Best, Jörn Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Benedikt Ehinger Sent: Monday, February 2, 2015 10:13 AM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] basic question Dear Hweeling, we use the following code: % Make 23 logarithmical spaced .25-octave frequencies cfg.foi = logspace(log10(4),log10(181),23); cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz % The windows should have 3/4 octave smoothing in frequency domain cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq % The timewindow should be so, that for freqs below 16, it results in n=1 % Taper used, but for frequencies higher, it should be a constant 250ms. % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1) cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)) )]; I guess the first line is the answer to your question. I hope this bit of code helps. Best, Benedikt Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee: Dear all, I've got a basic question regarding spectral analysis. In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip? Thanks. Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _____ Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Feb 2 17:46:00 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 2 Feb 2015 17:46:00 +0100 Subject: [FieldTrip] Fwd: help with topoplot_TFR References: Message-ID: <4473FF08-8792-476C-A525-994186956989@uni-konstanz.de> Hi Payashi, I’m forwarding your message to the list again. > > Dear Tzvetan, > > Thank you, that works perfectly. Many apologies, this is the last question. Is it possible to topographically represent the change in alpha/delta ratio (i.e. one epoch in time from another) ? I have calculated this by selecting two epochs of time from my 'ADR' matrix and subtracting them. However, I get the following error message when I put this into topoplot ER I suspect you should check whether you did the subtraction properly. Regarding to this you should check the functionality of ft_selectdata (select the epochs) and ft_math(subtract them). I suggest you try these first and see whether the input to ft_topoplotER is properly organized. best tzvetan > > Index exceeds matrix dimensions. > > Error in topoplot_common (line 556) > dat = dat(sellab, xmin:xmax); > > Error in ft_topoplotER (line 192) > cfg = topoplot_common(cfg, varargin{:}); > > Many thanks > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > On 29 Jan 2015, at 18:31, Tzvetan Popov wrote: > >> >> Hi Payashi, >> >>> I have computed the ratio per sample and called it ADR. It is a 14x1x480 matrix (channels x freq x time). >> good, so now you squeeze(ADR) in order to get the actual ‘chan_time’ representation. Then you introduce a new variable say tlk_ADR: >> tlk_ADR.avg =ADR; >> tlk_ADR.label = freq_ADR.label; >> tlk_ADR.dimord = freq_ADR.dimord; >> tlk_ADR.time = freq_ADR.time; >> tlk_ADR.elec = freq_ADR.elec; >> >> then you call all plotting functions that deal with time domain signals such as ft_multiplotER, ft_singleplotER and ft_topoplotER. Not …TFR. >> So your code would look like; >>> cfg=[]; >>> cfg.xlim = [3000 3200]; >>> cfg.colorbar = 'yes'; >>> figure >>> ft_topoplotER(cfg, tlk_ADR); >> >> good luck >> tzvetan >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabra005 at odu.edu Wed Feb 4 17:08:05 2015 From: nabra005 at odu.edu (NIJO ABRAHAM) Date: Wed, 4 Feb 2015 11:08:05 -0500 Subject: [FieldTrip] ft_rejectartifact error with "interactive=yes" following 2014b Matlab upgrade Message-ID: Hi FTs, Recently I updated to Fieldtrip version 20150115 (was using 2014 Septemper version earlier) which resulted in a GUI error in the Matlab command window when any buttons in the interactive window were clicked. The GUI which I activated was cfg.artfctdefvalue.zvalue.interactive = 'yes'; I believe this error arises only on the Matlab2014b version since the error was not reproduced in Matlab2014a version. Given below is the error that was displayed: MATLAB COMMAND WINDOW showing trial 1, channel Cz No appropriate method, property, or field Key for class matlab.ui.eventdata.ActionData. Error in ft_artifact_zvalue>parseKeyboardEvent (line 1079) key = eventdata.Key; Error in ft_artifact_zvalue>keyboard_cb (line 680) key = parseKeyboardEvent(eventdata); Error using waitfor Error while evaluating UIControl Callback SAMPLE OF THE CODE: cfg=[]; cfg.continuous = 'yes'; cfg.trl = trl_2; cfg.artfctdef.zvalue.channel = data.label{jj}; cfg.artfctdef.zvalue.cutoff = 8; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.05; cfg.artfctdef.zvalue.fltpadding = 0; cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; cfg.artfctdef.zvalue.interactive = 'yes'; %%%%%% P.S. - I was aware of Bug2461 and that is why I upgraded to the latest FT version since a post dated this month states that FT had partially resolved the issues from Handle graphics 2. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Holger.Krause at med.uni-duesseldorf.de Wed Feb 4 17:24:15 2015 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Wed, 4 Feb 2015 17:24:15 +0100 Subject: [FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica' Message-ID: Dear all, documentation of FT_COMPONENTANALYSIS states: > You may specify a particular seed for random numbers called by > rand/randn/randi, or the random state used by a previous call to this > function to replicate results. For example: > cfg.randomseed = integer seed value of user's choice > cfg.randomseed = comp.cfg.callinfo.randomseed (from previous call) Aiming at reproducing independent components, I would expect cfg.method = 'runica'; cfg.randomseed = 5; comp = ft_componentanalysis(cfg, some_preprocessed_data); to yield the same results as cfg.method = 'runica'; cfg.randomseed = 5; comp = ft_componentanalysis(cfg, some_preprocessed_data); Unfortunately, this is not (always) the case. As far as I can see, all the FT functions seem to handle the 'randomseed' option properly. It is 'external/eeglab/runica.m', which is nasty, and sets the state of the prng to a value depending on system time (line 812): > rand('state',sum(100*clock)); % set the random number generator state to > % a position dependent on the system clock I'm not sure, what's FT's policy regarding making changes to external toolboxes. In this case, I would recommend to delete the aforementioned line, as it effectively renders fieldtrip's aims to have reproducible pseudo random numbers void. And, without this line, two consecutive calls of ft_componentanalysis() seem to produce identical results (checked by eye in ft_databrowser()). Could some FT developer please comment on this? Cheers, Holger -- Dr. rer. nat. Holger Krause MEG-Labor, Raum 13.54.-1.84 Telefon: +49 211 81-19031 Institut für klinische Neurowissenschaften http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik Düsseldorf From johanna.zumer at gmail.com Wed Feb 4 17:39:23 2015 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Wed, 4 Feb 2015 16:39:23 +0000 Subject: [FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica' In-Reply-To: References: Message-ID: Dear Holger, Please see the discussion on this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2585 in which it is a known bug, but still an open discussion as to solution. Sorry for the problem, but perhaps your email will help spur a solution... Cheers, Johanna 2015-02-04 16:24 GMT+00:00 Holger Krause < Holger.Krause at med.uni-duesseldorf.de>: > Dear all, > > documentation of FT_COMPONENTANALYSIS states: > > > You may specify a particular seed for random numbers called by > > rand/randn/randi, or the random state used by a previous call to this > > function to replicate results. For example: > > cfg.randomseed = integer seed value of user's choice > > cfg.randomseed = comp.cfg.callinfo.randomseed (from previous call) > > Aiming at reproducing independent components, I would expect > > cfg.method = 'runica'; > cfg.randomseed = 5; > comp = ft_componentanalysis(cfg, some_preprocessed_data); > > to yield the same results as > > cfg.method = 'runica'; > cfg.randomseed = 5; > comp = ft_componentanalysis(cfg, some_preprocessed_data); > > Unfortunately, this is not (always) the case. As far as I can see, all the > FT > functions seem to handle the 'randomseed' option properly. It is > 'external/eeglab/runica.m', which is nasty, and sets the state of the prng > to > a value depending on system time (line 812): > > > rand('state',sum(100*clock)); % set the random number generator > state to > > % a position dependent on the system clock > > I'm not sure, what's FT's policy regarding making changes to external > toolboxes. In this case, I would recommend to delete the aforementioned > line, > as it effectively renders fieldtrip's aims to have reproducible pseudo > random > numbers void. And, without this line, two consecutive calls of > ft_componentanalysis() seem to produce identical results (checked by eye in > ft_databrowser()). > > Could some FT developer please comment on this? > > Cheers, > > Holger > > -- > Dr. rer. nat. Holger Krause MEG-Labor, Raum > 13.54.-1.84 > Telefon: +49 211 81-19031 Institut für klinische > Neurowissenschaften > http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik > Düsseldorf > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Feb 5 11:39:28 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 5 Feb 2015 10:39:28 +0000 Subject: [FieldTrip] MNI coordinate to Anatomy Message-ID: ?Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Thu Feb 5 11:49:42 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Thu, 5 Feb 2015 10:49:42 +0000 Subject: [FieldTrip] MNI coordinate to Anatomy In-Reply-To: References: Message-ID: Hi Rabat, The function that jumps to my mind is ft_volumelookup. However, this quickly, I could only find the following page that might be relevant to you: http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source Hope it helps, arjen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Rajat Thomas [r.thomas at nin.knaw.nl] Sent: Thursday, February 05, 2015 11:39 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] MNI coordinate to Anatomy ​Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Feb 5 11:52:27 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 5 Feb 2015 11:52:27 +0100 Subject: [FieldTrip] MNI coordinate to Anatomy In-Reply-To: References: Message-ID: <002b01d04131$d53975a0$7fac60e0$@artinis.com> Dear Rajat, you can use ft_volumelookup in Fieldtrip (ahja, Arjen beat me to it!). You can also specify an atlas in your cfg when using ft_sourceplot, which will show the anatomical label according to that atlas. You need to specify an atlas which is in the same coordinate system, see http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#plotting_sources_of_oscillatory_gamma-band_activity (scroll down to the exercise. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Rajat Thomas Sent: Thursday, February 5, 2015 11:39 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] MNI coordinate to Anatomy ​Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From vahidgerami.mse at gmail.com Thu Feb 5 15:16:37 2015 From: vahidgerami.mse at gmail.com (vahid gerami) Date: Thu, 5 Feb 2015 17:46:37 +0330 Subject: [FieldTrip] real time EEG Message-ID: hello im new at fieldtrip. i want to record EEG signals as realtime using my own BCI interface connected to a laptob via RS232.ive found ft_realtime_oddball(cfg) for real time signal acquisition. i have problem configuring the function. i dont know the correct configuration. please help me about the cfg parameters. my bci send continues data at 9220 byte and 115200 baudrate 8 bit no parity. regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.uni-hamburg.de Thu Feb 5 15:39:00 2015 From: p.taesler at uke.uni-hamburg.de (Philipp Taesler) Date: Thu, 5 Feb 2015 15:39:00 +0100 Subject: [FieldTrip] real time EEG In-Reply-To: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> References: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> Message-ID: <54D38084.7010904@uke.uni-hamburg.de> Hello Vahid, I have not worked with real-time much, also I've never read EEG data over RS232, but you might want to look at the ft_realtime_signalproxy.m function. Apparently it is just generating random data, you can see this in line 114. Here you would have to splice in your RS232 data somehow, maybe you can get a hint getting started here http://de.mathworks.com/help/matlab/matlab_external/getting-started-with-serial-i-o.html Maybe you will also get some more help from someone who has actually worked with something closer to your setup. Best regards and happy hacking, Phil Am 05.02.2015 um 15:16 schrieb vahid gerami: > hello > im new at fieldtrip. i want to record EEG signals as realtime using my > own BCI interface connected to a laptob via RS232.ive > found ft_realtime_oddball(cfg) for real time signal acquisition. i have > problem configuring the function. i dont know the correct configuration. > please help me about the cfg parameters. my bci send continues data at > 9220 byte and 115200 baudrate 8 bit no parity. > regards > > ------------------------------------------------------------------------ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. > Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > > ------------------------------------------------------------------------ > > SAVE PAPER - THINK BEFORE PRINTING > -- Philipp Taesler, MSc. Department of Systems Neuroscience University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 Hamburg, Germany Phone: +49-40-7410-59902 Fax: +49-40-7410-59955 Email: p.taesler at uke.uni-hamburg.de -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From constantino.mendezbertolo at ctb.upm.es Thu Feb 5 15:56:24 2015 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 5 Feb 2015 15:56:24 +0100 Subject: [FieldTrip] Component analysis: search for the explained variance Message-ID: tl;dr: anybody knows whether this info is stored (or not) and where? thx Queridos fieldtrippers, I am trying to find where the info about the amount of variance that each component explains is stored (if it is) after running ft_componentanalysis (method='pca') I know the interesting data is in two fields: topo + unmixing. May it happen that I am supposed to derive the variance explained by each component using some kind of mathematical sorcery and this values. If my question is too naive, I apologize, I think that the channels (actually 'components') of the output structure are sorted in descending order of variance explained during the call to the function, I searched there and in ft_databrowser unfructiosly. Also parsed the mailing list (there are two other answered questions [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html] [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html] Peace, -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Feb 5 16:43:47 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 5 Feb 2015 16:43:47 +0100 Subject: [FieldTrip] real time EEG In-Reply-To: <54D38084.7010904@uke.uni-hamburg.de> References: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> <54D38084.7010904@uke.uni-hamburg.de> Message-ID: <005a01d0415a$882f07b0$988d1710$@artinis.com> Dear Vahid, Generally, I would propose that you start by reading on the wiki about the different implementations: http://fieldtrip.fcdonders.nl/development/realtime/buffer_overview most relevant by this this site: http://fieldtrip.fcdonders.nl/development/realtime/implementation What FieldTrip provides is basically an interface for streaming data. You need to set up a shared memory segment that your data acquisition software writes to and that some other client accesses. That other client opens an IP socket, and you can get access from any programme, e.g. Matlab, to the streamed data. That other client (or interface as called in the wiki) probably needs to be tailored to your acquisition software, or in your case it should read out the data coming in at the serial port. You might need to write this interface yourself. Good luck! Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Philipp Taesler > Sent: Thursday, February 5, 2015 3:39 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] real time EEG > > Hello Vahid, > > I have not worked with real-time much, also I've never read EEG data over > RS232, but you might want to look at the > > ft_realtime_signalproxy.m > > function. Apparently it is just generating random data, you can see this in line > 114. Here you would have to splice in your RS232 data somehow, maybe you > can get a hint getting started here > > http://de.mathworks.com/help/matlab/matlab_external/getting-started- > with-serial-i-o.html > > Maybe you will also get some more help from someone who has actually > worked with something closer to your setup. > > Best regards and happy hacking, > Phil > > > > Am 05.02.2015 um 15:16 schrieb vahid gerami: > > hello > > im new at fieldtrip. i want to record EEG signals as realtime using my > > own BCI interface connected to a laptob via RS232.ive found > > ft_realtime_oddball(cfg) for real time signal acquisition. i have > > problem configuring the function. i dont know the correct configuration. > > please help me about the cfg parameters. my bci send continues data at > > 9220 byte and 115200 baudrate 8 bit no parity. > > regards > > > > ---------------------------------------------------------------------- > > -- > > > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > > Rechts; Gerichtsstand: Hamburg | www.uke.de > > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. > > Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > > > > ---------------------------------------------------------------------- > > -- > > > > SAVE PAPER - THINK BEFORE PRINTING > > > > -- > Philipp Taesler, MSc. > Department of Systems Neuroscience > University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 > Hamburg, Germany > > Phone: +49-40-7410-59902 > Fax: +49-40-7410-59955 > Email: p.taesler at uke.uni-hamburg.de > -- > > __________________________________________________________ > ___________ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. > Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > __________________________________________________________ > ___________ > > SAVE PAPER - THINK BEFORE PRINTING > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From constantino.mendezbertolo at ctb.upm.es Thu Feb 5 18:34:26 2015 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 5 Feb 2015 18:34:26 +0100 Subject: [FieldTrip] Component analysis: search for the explained variance In-Reply-To: References: Message-ID: Dear all, here is a snippet from the ft_componentanalysis code which may prove useful to anybody facing this situation [from ft_componentanalysis) % compute data cross-covariance matrix > C = (dat*dat')./(size(dat,2)-1); > > % eigenvalue decomposition (EVD) > [E,D] = eig(C); > > % sort eigenvectors in descending order of eigenvalues > d = cat(2,(Nchan)',diag(D)); > d = sortrows(d,[-2]); > one could then use something like this to obtain the percentage of explained variance for each component.. > varianza=d(Nchan,2)/sum(diag(C));] paz! 2015-02-05 15:56 GMT+01:00 Constantino Méndez Bértolo < constantino.mendezbertolo at ctb.upm.es>: > tl;dr: anybody knows whether this info is stored (or not) and where? thx > > Queridos fieldtrippers, > > I am trying to find where the info about the amount of variance that each > component explains is stored (if it is) after running ft_componentanalysis > (method='pca') > > I know the interesting data is in two fields: topo + unmixing. May it > happen that I am supposed to derive the variance explained by each > component using some kind of mathematical sorcery and this values. > > If my question is too naive, I apologize, I think that the channels > (actually 'components') of the output structure are sorted in descending > order of variance explained during the call to the function, I searched > there and in ft_databrowser unfructiosly. Also parsed the mailing list > (there are two other answered questions > [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html] > [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html > ] > > Peace, > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuria.donamayor at neuro.uni-luebeck.de Fri Feb 6 13:57:53 2015 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Fri, 6 Feb 2015 13:57:53 +0100 Subject: [FieldTrip] =?iso-8859-1?q?PhD_position_-_University_of_L=FCbeck?= =?iso-8859-1?q?=2C_Germany?= In-Reply-To: <2DBCAEA0-13BA-42A8-A889-F05AE7253174@neuro.uni-luebeck.de> References: <2DBCAEA0-13BA-42A8-A889-F05AE7253174@neuro.uni-luebeck.de> Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E7CA30ACEBC@solaris.neuro.uni-luebeck.de> Dear fieldtrippers, a colleague of mine, Dr. Jörg Bahlmann, currently has an opening for a PhD student. Could you please circulate the attached pdf to anyone who might me interested? Thanks, Nuria -------------------------------------------------- An der Universität zu Lübeck, Klinik für Neurologie ist eine Stelle als Doktorand/Doktorandin zu besetzen. Die Stelle beinhaltet die Durchführung, Auswertung und Interpretation von neurokognitiven Experimenten. Speziell handelt es sich um Untersuchungen zur Interaktion von Motivation und kognitiver Kontrolle bei Parkinson-Patienten und gesunden Probanden. Hierbei kommen die Methoden der funktionellen Kernspintomographie (fMRT) und Transkranielle Magnetstimulation (TMS) zur Anwendung. Das Projekt ist in den Forschungsschwerpunkt der Arbeitsgruppe Kognitive Neurologie eingebettet. Die Arbeitsgruppe ist multidisziplinär und kombiniert eine Vielzahl von neurowissenschaftlichen Methoden. Sie ist im Center of Brain, Behavior, and Metabolism (CBBM) integriert, welches Neurowissenschaftlern ein exzellentes Forschungsumfeld bietet. Für die Forschung stehen ein 3T-MRT-Scanner, mehrere EEG-Labore, TMS-Geräte und ein NIRS-Gerät zur Verfügung. Die Kandidatin/der Kandidat sollte einen Master of Science oder ein Diplom in Psychologie oder anderen einschlägigen Fächern vorweisen können und großes Interesse an Themen und Methoden der kognitiven Neurowissenschaften mitbringen. Vorerfahrung mit fMRT oder TMS und Programmiererfahrung (Matlab, Python, Presentation®) sind von Vorteil, aber nicht Einstellungsvoraussetzung. Die Stelle ist zum nächstmöglichen Zeitpunkt zu besetzen. Sie ist zunächst für zwei Jahre befristet und wird nach Entgeltgruppe 13 TV-L, 65% vergütet. Die Universität Lübeck strebt eine Erhöhung des Anteils von Frauen in der Wissenschaft an und fordert entsprechend qualifizierte Frauen ausdrücklich zur Bewerbung auf. Bewerbungen von Schwerbehinderten werden bei gleicher Eignung und Befähigung bevorzugt berücksichtigt. Bei inhaltlichen Fragen zur ausgeschriebenen Stelle wenden Sie sich bitte an Herrn PD Dr. Jörg Bahlmann (Tel.: 0451-317931-313, E-Mail: joerg.bahlmann at neuro.uni-luebeck.de). Ihre vollständige Bewerbung (Anschreiben, Lebenslauf, Zeugnisse zusammengefasst in einer pdf-Datei) senden Sie bitte bis zum 15. März 2015 an joerg.bahlmann at neuro.uni-luebeck.de -------------- next part -------------- A non-text attachment was scrubbed... Name: Ausschreibung_Doktorandin.pdf Type: application/pdf Size: 110356 bytes Desc: Ausschreibung_Doktorandin.pdf URL: From r.oostenveld at donders.ru.nl Fri Feb 6 14:25:12 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 6 Feb 2015 14:25:12 +0100 Subject: [FieldTrip] MEG/EEG FieldTrip toolkit course in Nijmegen: pre-registration now open Message-ID: Dear All, — Please disseminate to PhD students and postdoctoral researchers working with MEG, EEG and ECoG data analysis. --- On April 20-23, 2015 we will host the "Toolkit of Cognitive Neuroscience: advanced data analysis and source modelling of EEG and MEG data" at the Donders Institute in Nijmegen. This intense 4-day toolkit course will teach you advanced MEG and EEG data analysis skills. Preprocessing, frequency analysis, source reconstruction, connectivity and various statistical methods will be covered. The toolkit will consist of a number of lectures, followed by hands-on sessions in which you will be tutored through the complete analysis of a MEG data set using the FieldTrip toolbox. The lectures and tutoring will be provided by the core FieldTrip development team, and there will also be plenty of opportunity to interact and ask questions to us about your research and data. On the final day you will have the opportunity to work on your own dataset under supervision of the tutors. We can host 40 participants for this toolkit. From past experience we expect the course to be oversubscribed, hence we will start with pre-registration. The final selection of the participants will be based on the motivation, background experience and research interests that are provided in the registration form. The deadline for pre-registration is March 13, 2015. More information, including a preliminary program, can be found at https://www.ru.nl/donders/course-information/courses/toolkit-eeg-meg/ Looking forward to welcoming you in Nijmegen, Robert Oostenveld and Jan-Mathijs Schoffelen. ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Feb 6 15:19:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 6 Feb 2015 15:19:59 +0100 Subject: [FieldTrip] ANNOUNCEMENT: change of source data structure, source.inside now logical rather than indices Message-ID: <5F1DDBF3-8937-43F7-A09E-586FD17992F5@donders.ru.nl> Dear FieldTrip users, For a long time we have been planning to make some changes in the representation of source-reconstructed data. These changes should facilitate the maintenance of the code, the reuse of functionality and accomodate future extensions. Over the last few days I have been working on a first set of changes to the code that affect how the source positions inside the brain are represented. It used to be the case that source.inside and source.outside could be two vectors, containing the indices (i.e. 1, 2, 3, …) of source positions that are inside or outside the brain, respectively. I.e. the combined length of both vectors was equal to size(source.pos.1). In some cases however, the source.inside was represented as a boolean/logical vector with a true or false (a 1 or 0) value for each source position. With this logical representation, there is no need for source.outside. To improve consistency between the source and the volume representation, and to facilitate working with parcellated brain atlases, we have decided to move to a consistent implementation throughout FieldTrip that always uses the boolean/logical representation. So all FieldTrip functions will from now on return source.inside as a boolean vector. The consequence is that the code in your scripts such as for i=1:length(source.inside) select = source.inside(i); % do something with the selected source end will fail, since source.inside will only contain 0 or 1 values. If the source.inside vector has a 0 (i.e. not inside the brain), it will fail, since 0 is not a valid index. This is something you will notice, as MATLAB will give an error. If all values in source.inside vector are 1 (i.e. all inside the brain), MATLAB might not give an error immediately, but the result of the computation is not what it should be, since the computation is repeated over and over for source position 1 rather than all source positions. To get the original behavour with the indices, please use some code like this insideindx = find(source.inside) and then loop over all elements of insideindx. Appologies for the inconvenience this might cause. best regards, Robert PS another upcoming change will be that in the near future we will also deprecate the source.avg and the source.trial sub-structures. Instead of these sub-structures, the results of the source reconstruction will be represented at the top-level of the source structure, as is the case with all other data representations. Please see the ft_datatype_source function (or http://fieldtrip.fcdonders.nl/reference/ft_datatype_source) for an example of the new representation with source.pow rather than source.avg.pow. From Johanna.Fiess at uni-konstanz.de Fri Feb 6 17:23:25 2015 From: Johanna.Fiess at uni-konstanz.de (Johanna Fiess) Date: Fri, 06 Feb 2015 17:23:25 +0100 Subject: [FieldTrip] =?utf-8?q?ANNOUNCEMENT=3A_change_of_source_data_struc?= =?utf-8?q?ture=2C=09source=2Einside_now_logical_rather_than_indice?= =?utf-8?q?s?= In-Reply-To: <5F1DDBF3-8937-43F7-A09E-586FD17992F5@donders.ru.nl> Message-ID: <79edc59a9c2f41fe.54d4ea7e@limbe.rz.uni-konstanz.de> Hallo Christian, ich weiß nicht, ob Du auch auf dem Verteiler bist - und ob diese Änderung für Dich von Interesse ist. Schicke es Dir einfach mal weiter. Viele Grüße und ein schönes WE Hanna Am Freitag, 06. Februar 2015 15:19 CET, Robert Oostenveld schrieb: > Dear FieldTrip users, > > For a long time we have been planning to make some changes in the representation of source-reconstructed data. These changes should facilitate the maintenance of the code, the reuse of functionality and accomodate future extensions. Over the last few days I have been working on a first set of changes to the code that affect how the source positions inside the brain are represented. > It used to be the case that source.inside and source.outside could be two vectors, containing the indices (i.e. 1, 2, 3, …) of source positions that are inside or outside the brain, respectively. I.e. the combined length of both vectors was equal to size(source.pos.1). In some cases however, the source.inside was represented as a boolean/logical vector with a true or false (a 1 or 0) value for each source position. With this logical representation, there is no need for source.outside. > > To improve consistency between the source and the volume representation, and to facilitate working with parcellated brain atlases, we have decided to move to a consistent implementation throughout FieldTrip that always uses the boolean/logical representation. So all FieldTrip functions will from now on return source.inside as a boolean vector. > > The consequence is that the code in your scripts such as > > for i=1:length(source.inside) > select = source.inside(i); > % do something with the selected source end > > will fail, since source.inside will only contain 0 or 1 values. If the source.inside vector has a 0 (i.e. not inside the brain), it will fail, since 0 is not a valid index. This is something you will notice, as MATLAB will give an error. If all values in source.inside vector are 1 (i.e. all inside the brain), MATLAB might not give an error immediately, but the result of the computation is not what it should be, since the computation is repeated over and over for source position 1 rather than all source positions. > > To get the original behavour with the indices, please use some code like this > insideindx = find(source.inside) > and then loop over all elements of insideindx. > > > Appologies for the inconvenience this might cause. > > best regards, > Robert > > > PS another upcoming change will be that in the near future we will also deprecate the source.avg and the source.trial sub-structures. Instead of these sub-structures, the results of the source reconstruction will be represented at the top-level of the source structure, as is the case with all other data representations. Please see the ft_datatype_source function (or http://fieldtrip.fcdonders.nl/reference/ft_datatype_source) for an example of the new representation with source.pow rather than source.avg.pow. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dipl.-Psych. Johanna Fiess Fachbereich Psychologie Universität Konstanz Postfach 905 78457 Konstanz Telefon: +49-(0)7531-88-4604 Fax: +49-(0)7531-88-4601 From berdakho at gmail.com Sat Feb 7 19:32:30 2015 From: berdakho at gmail.com (Berdakh Abibullaev) Date: Sat, 7 Feb 2015 12:32:30 -0600 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes Message-ID: Hi there, Is there any way to "Import anatomy folder" generated by FSL into the FieldTrip ? We are trying to work with infant MRI data pre-processed by FSL for infant EEG source estimation. The data description is available here: http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html And, I am copying it below: Description. The database consists of MRI average templates for a number of ages; in 1-3 month increments through 18 months; then half-year increments through 19-5 years; then 5 year increments through 89 years. The templates were done separately for brain and head. Also included are segmentation PVE volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for infants. Access to the dataset is separated by ages (infants; 0-12 mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 through 17-5 yrs; adults 20-89 years). The segment data for ages 15-months and older consists of GM, WM, CSF, and T2W-derived CSF. The best combination of segments would be the image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. For 3 through 12 months, the best combination of segments would be the nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other Matter") and does not reflect actual CSF. The T2W-derived CSF is identified as bright voxels in the T2W scan and represent actual CSF in the brain or head. There is an atlas derived from FSL "Harvard-Oxford" cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old templates. Overview: ANTS....brain.nii.gz: Average MRI template derived from extracted brain ANTS....head.nii.gz: Average MRI template derived from whole head ANTS....brain-head: brain extracted from head template ANTS....T2W_brain: MRI template separate for extracted brain T2W ANTS....T2W_head: MRI template separate for whole head T2W Segments AVG...T2W_brain...: T2W for individual participants, warped to template, averaged AVG...image_seg_...: Image-based segment averages AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a posteriori FAST AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter AVG....seg_csf: "Other matter" in 3-class segmentation AVG....seg_t2wcsf: T2W-derived CSF Atlas: ANTS...brain...brainstem: The individual files have the brain areas ANTS...brain_atlas: Segmented atlas for all brain areas Please help. Thanks, Berdakh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Feb 8 10:08:07 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 8 Feb 2015 09:08:07 +0000 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes In-Reply-To: References: Message-ID: Hi Berdakh, What do you mean with ‘import anatomy folder’? Please check out the links below in order to formulate your question more constructively. http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 Note that FieldTrip’s low-level fileio functions know how to deal with compressed nifti files, so if your question means ‘can I use FieldTrip to load in images that have been constructed with FSL’, the answer would be yes. For information about supported dataformats, see: http://fieldtrip.fcdonders.nl/dataformat Best wishes, Jan-Mathijs On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev > wrote: Hi there, Is there any way to "Import anatomy folder" generated by FSL into the FieldTrip ? We are trying to work with infant MRI data pre-processed by FSL for infant EEG source estimation. The data description is available here: http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html And, I am copying it below: Description. The database consists of MRI average templates for a number of ages; in 1-3 month increments through 18 months; then half-year increments through 19-5 years; then 5 year increments through 89 years. The templates were done separately for brain and head. Also included are segmentation PVE volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for infants. Access to the dataset is separated by ages (infants; 0-12 mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 through 17-5 yrs; adults 20-89 years). The segment data for ages 15-months and older consists of GM, WM, CSF, and T2W-derived CSF. The best combination of segments would be the image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. For 3 through 12 months, the best combination of segments would be the nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other Matter") and does not reflect actual CSF. The T2W-derived CSF is identified as bright voxels in the T2W scan and represent actual CSF in the brain or head. There is an atlas derived from FSL "Harvard-Oxford" cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old templates. Overview: ANTS....brain.nii.gz: Average MRI template derived from extracted brain ANTS....head.nii.gz: Average MRI template derived from whole head ANTS....brain-head: brain extracted from head template ANTS....T2W_brain: MRI template separate for extracted brain T2W ANTS....T2W_head: MRI template separate for whole head T2W Segments AVG...T2W_brain...: T2W for individual participants, warped to template, averaged AVG...image_seg_...: Image-based segment averages AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a posteriori FAST AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter AVG....seg_csf: "Other matter" in 3-class segmentation AVG....seg_t2wcsf: T2W-derived CSF Atlas: ANTS...brain...brainstem: The individual files have the brain areas ANTS...brain_atlas: Segmented atlas for all brain areas Please help. Thanks, Berdakh. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 16:52:06 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 10:52:06 -0500 Subject: [FieldTrip] cfg.trl matrix Message-ID: I've imported a cnt file that contains TTL trigger events. I defined a prestim time of 1 second and poststim time of 0.5 seconds. However, when I checked the cfg.trl matrix the offset shows "-5000". Can someone explain why? -AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Feb 8 17:34:11 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sun, 8 Feb 2015 17:34:11 +0100 Subject: [FieldTrip] cfg.trl matrix In-Reply-To: References: Message-ID: Hi asauf, is your samplefreq 5000? The offset is the sample amount between the first sample of the trial and the sample corresponding to t=0 in that trial. Best, arjen Op 8 feb. 2015 16:52 schreef "Ausaf Bari" het volgende: > I've imported a cnt file that contains TTL trigger events. I defined a > prestim time of 1 second and poststim time of 0.5 seconds. However, when I > checked the cfg.trl matrix the offset shows "-5000". Can someone explain > why? > > -AB > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berdakho at gmail.com Sun Feb 8 17:43:47 2015 From: berdakho at gmail.com (Berdakh Abibullaev) Date: Sun, 8 Feb 2015 10:43:47 -0600 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes In-Reply-To: References: Message-ID: Hello Jan-Mathijs, My apologies for not being constructive in posing my question. By anatomy folder I meant the MRI segmentation results (scalp, outer skull, inner skull (CSF) and brain) generated by FSL. *Can I use the FieldTrip to load those segmentation results to generate meshes and model BEM for source estimation? * As you know that extracting cortical matters from infant MRI is an extremely difficult task as most MRI segmentation tools are developed using adult brain parameters. And, I presume that "ft_volumesegment" cannot handle infant MRI segmentation. Thanks again, Berdakh. On Sun, Feb 8, 2015 at 3:08 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Berdakh, > > What do you mean with 'import anatomy folder'? Please check out the links > below in order to formulate your question more constructively. > > > http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community > > > http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 > > Note that FieldTrip's low-level fileio functions know how to deal with > compressed nifti files, so if your question means 'can I use FieldTrip to > load in images that have been constructed with FSL', the answer would be > yes. > For information about supported dataformats, see: > http://fieldtrip.fcdonders.nl/dataformat > > Best wishes, > > Jan-Mathijs > > On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev > wrote: > > Hi there, > > Is there any way to "Import anatomy folder" generated by FSL into the > FieldTrip > ? > > We are trying to work with infant MRI data pre-processed by FSL for infant > EEG source estimation. > > > The data description is available here: > http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html > And, I am copying it below: > > Description. > > The database consists of MRI average templates for a number of ages; in > 1-3 month increments through 18 months; then half-year increments through > 19-5 years; then 5 year increments through 89 years. The templates were > done separately for brain and head. Also included are segmentation PVE > volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for > infants. Access to the dataset is separated by ages (infants; 0-12 mo; > preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; > adolescents 11-0 through 17-5 yrs; adults 20-89 years). > > The segment data for ages 15-months and older consists of GM, WM, CSF, and > T2W-derived CSF. The best combination of segments would be the > image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. > For 3 through 12 months, the best combination of segments would be the > nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE > segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other > Matter") and does not reflect actual CSF. The T2W-derived CSF is identified > as bright voxels in the T2W scan and represent actual CSF in the brain or > head. There is an atlas derived from FSL "Harvard-Oxford" cortical and > subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old > templates. > > Overview: > > ANTS....brain.nii.gz: Average MRI template derived from extracted brain > ANTS....head.nii.gz: Average MRI template derived from whole head > ANTS....brain-head: brain extracted from head template > ANTS....T2W_brain: MRI template separate for extracted brain T2W > ANTS....T2W_head: MRI template separate for whole head T2W > > Segments > AVG...T2W_brain...: T2W for individual participants, warped to template, > averaged > AVG...image_seg_...: Image-based segment averages > AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST > AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a > posteriori FAST > AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter > AVG....seg_csf: "Other matter" in 3-class segmentation > AVG....seg_t2wcsf: T2W-derived CSF > > Atlas: > ANTS...brain...brainstem: The individual files have the brain areas > ANTS...brain_atlas: Segmented atlas for all brain areas > > Please help. > > Thanks, > Berdakh. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 17:46:24 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 11:46:24 -0500 Subject: [FieldTrip] cfg.trl matrix In-Reply-To: References: Message-ID: Thanks Arjen. It makes sense now. Yes my sample frequency is 5000. -AB On Sun, Feb 8, 2015 at 11:34 AM, Arjen Stolk wrote: > Hi asauf, is your samplefreq 5000? The offset is the sample amount between > the first sample of the trial and the sample corresponding to t=0 in that > trial. Best, arjen > Op 8 feb. 2015 16:52 schreef "Ausaf Bari" het volgende: > >> I've imported a cnt file that contains TTL trigger events. I defined a >> prestim time of 1 second and poststim time of 0.5 seconds. However, when I >> checked the cfg.trl matrix the offset shows "-5000". Can someone explain >> why? >> >> -AB >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Ausaf A. Bari MD PhD Clinical Fellow Functional Neurosurgery Toronto Western Hospital University of Toronto Phone: 647-624-1929 Email: ausafb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 17:52:24 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 11:52:24 -0500 Subject: [FieldTrip] Problem with ft_databrowser Message-ID: I have 122 trials (equal trial lengths) with 14 channels. I tried to use this: cfg = ft_databrowser(cfg,data); *I'm getting this error:* Warning: The field cfg.demean is deprecated, please specify it as cfg.preproc.demean instead of cfg. > In ft_checkconfig at 461 In ft_databrowser at 157 the input is raw data with 0 channels and 122 trials Error using ft_datatype_raw (line 88) inconsistent number of channels in trial 1 Error in ft_checkdata (line 222) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_databrowser (line 261) data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'yes', 'hassampleinfo', 'yes'); Can someone help? -AB My cfg array looks like this: cfg = dataset: '/Users/user/Desktop/test.cnt' trialfun: @ft_trialfun_general trialdef: [1x1 struct] callinfo: [1x1 struct] version: [1x1 struct] trackconfig: 'off' checkconfig: 'loose' checksize: 100000 showcallinfo: 'yes' debug: 'no' trackcallinfo: 'yes' trackdatainfo: 'no' trackparaminfo: 'no' dataformat: 'ns_cnt' headerformat: 'ns_cnt' event: [1x488 struct] trl: [122x4 double] channel: [] continuous: 'no' demean: 'yes' viewmode: 'vertical' My data array look like this: data = hdr: [1x1 struct] label: {} time: {1x122 cell} trial: {1x122 cell} fsample: 5000 sampleinfo: [122x2 double] trialinfo: [122x1 double] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Sun Feb 8 20:23:24 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Sun, 08 Feb 2015 20:23:24 +0100 Subject: [FieldTrip] Connectivity - Partial directed coherence Message-ID: <54D7B7AC.6040600@uni-ulm.de> Dear Fieldtrippers, I am doing connectivity analysis, more precisely a partial directed coherence. As I understand the output (chan x chan x freq) contains both input (what is the information input from electrode X to electrode Y) and output info (what is the information output from electrode X to Y). How do I have to read the Matrix? For example: I want to know how much information electrode 1 gets from electrode 10 (and vice versa). Thank you a lot! Barbara -- Barbara Schorr, MSc Clinical and Biological Psychology University of Ulm Albert-Einstein-Allee 47 89069 Ulm Therapiezentrum Burgau Kapuzinerstraße 34 89331 Burgau From RICHARDS at mailbox.sc.edu Sun Feb 8 21:09:39 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 8 Feb 2015 20:09:39 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 51, Issue 6 In-Reply-To: References: Message-ID: The answer to the question about the ³Neurodevelopmental MRI database², is yes you can import these files. They are nifti.nii.gz files, and I have used field trip to import them. I also have gone through the field trip procedure to make source models, BEM and FEM head models from these data (though that work is not available on the www site). I have used these head models in EMSE, BESA, CURRY, Fieldtrip. FYI others on this list. Each age has the complete information to make head models for source analysis. This includes: Average MRI template GM, WM, T2WCSF segmented priors Fully segmented BEM-3, 4, or 5 compartment MRI volume Fully segmented head volume for FEM model (e.g., gm, wm, csf, skull, skin, eyes, muscle..) 10-10 electrode positions already co-registered on the head MRI volume (created on the head as Virtual-10-10 electrodes) EGI-GSN-128 and HGSN-128 electrode positions based on average electrodes from individual participants. See Richards, J.E. & Xie, W. (2015) Brains for all the ages: Structural neurodevelopment in infants and children from a life-span perspective. In J. Benson (Ed.), Advances in Child Development and Behavior (Volume 48, chapter 7). Philadephia, PA: Elsevier. DOI:10.1016/bs.acdb.2014.11.001 Richards, J.E. Boswell, C., Stevens, M., & Vendemia, J.M.C. (2015). Evaluating methods for constructing average high-density electrode positions. Brain Topography, 28, 70-86, doi 10.1007/s01548-014-0400-8(pdf ) I am working on a paper describing the child and adolescent electrode positions. John > >Message: 1 >Date: Sat, 7 Feb 2015 12:32:30 -0600 >From: Berdakh Abibullaev >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes >Message-ID: > >Content-Type: text/plain; charset="iso-8859-1" > >Hi there, > >Is there any way to "Import anatomy folder" generated by FSL into the >FieldTrip >? > >We are trying to work with infant MRI data pre-processed by FSL for infant >EEG source estimation. > > > >The data description is available here: > >http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html >And, I am copying it below: > >Description. > >The database consists of MRI average templates for a number of ages; in >1-3 >month increments through 18 months; then half-year increments through 19-5 >years; then 5 year increments through 89 years. The templates were done >separately for brain and head. Also included are segmentation PVE volumes >for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for >infants. >Access to the dataset is separated by ages (infants; 0-12 mo; preschool, >15 >mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 >through 17-5 yrs; adults 20-89 years). > >The segment data for ages 15-months and older consists of GM, WM, CSF, and >T2W-derived CSF. The best combination of segments would be the >image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. >For 3 through 12 months, the best combination of segments would be the >nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE >segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other >Matter") and does not reflect actual CSF. The T2W-derived CSF is >identified >as bright voxels in the T2W scan and represent actual CSF in the brain or >head. There is an atlas derived from FSL "Harvard-Oxford" cortical and >subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old >templates. > >Overview: > >ANTS....brain.nii.gz: Average MRI template derived from extracted brain >ANTS....head.nii.gz: Average MRI template derived from whole head >ANTS....brain-head: brain extracted from head template >ANTS....T2W_brain: MRI template separate for extracted brain T2W >ANTS....T2W_head: MRI template separate for whole head T2W > >Segments >AVG...T2W_brain...: T2W for individual participants, warped to template, >averaged >AVG...image_seg_...: Image-based segment averages >AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori >FAST >AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a >posteriori FAST >AVG...nma_seg_: For infants, non-myelinated axons separate from gray >matter >AVG....seg_csf: "Other matter" in 3-class segmentation >AVG....seg_t2wcsf: T2W-derived CSF > >Atlas: >ANTS...brain...brainstem: The individual files have the brain areas >ANTS...brain_atlas: Segmented atlas for all brain areas > > > >Please help. > >Thanks, >Berdakh. >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >0f1d6/attachment-0001.html> > >------------------------------ > >Message: 2 >Date: Sun, 8 Feb 2015 09:08:07 +0000 >From: "Schoffelen, J.M. (Jan Mathijs)" >To: FieldTrip discussion list >Subject: Re: [FieldTrip] Fieldtrip Compatibility with FSL generated > meshes >Message-ID: >Content-Type: text/plain; charset="windows-1252" > >Hi Berdakh, > >What do you mean with ?import anatomy folder?? Please check out the links >below in order to formulate your question more constructively. > >http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_communi >ty > >http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002 >202 > >Note that FieldTrip?s low-level fileio functions know how to deal with >compressed nifti files, so if your question means ?can I use FieldTrip to >load in images that have been constructed with FSL?, the answer would be >yes. >For information about supported dataformats, see: >http://fieldtrip.fcdonders.nl/dataformat > >Best wishes, > >Jan-Mathijs > >On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev >> wrote: > >Hi there, > >Is there any way to "Import anatomy folder" generated by FSL into the >FieldTrip >? > >We are trying to work with infant MRI data pre-processed by FSL for >infant EEG source estimation. > > >The data description is available here: >http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html >And, I am copying it below: > >Description. > >The database consists of MRI average templates for a number of ages; in >1-3 month increments through 18 months; then half-year increments through >19-5 years; then 5 year increments through 89 years. The templates were >done separately for brain and head. Also included are segmentation PVE >volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) >for infants. Access to the dataset is separated by ages (infants; 0-12 >mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; >adolescents 11-0 through 17-5 yrs; adults 20-89 years). > >The segment data for ages 15-months and older consists of GM, WM, CSF, >and T2W-derived CSF. The best combination of segments would be the >image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. >For 3 through 12 months, the best combination of segments would be the >nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE >segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other >Matter") and does not reflect actual CSF. The T2W-derived CSF is >identified as bright voxels in the T2W scan and represent actual CSF in >the brain or head. There is an atlas derived from FSL "Harvard-Oxford" >cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and >20-24 year old templates. > >Overview: > >ANTS....brain.nii.gz: Average MRI template derived from extracted brain >ANTS....head.nii.gz: Average MRI template derived from whole head >ANTS....brain-head: brain extracted from head template >ANTS....T2W_brain: MRI template separate for extracted brain T2W >ANTS....T2W_head: MRI template separate for whole head T2W > >Segments >AVG...T2W_brain...: T2W for individual participants, warped to template, >averaged >AVG...image_seg_...: Image-based segment averages >AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori >FAST >AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a >posteriori FAST >AVG...nma_seg_: For infants, non-myelinated axons separate from gray >matter >AVG....seg_csf: "Other matter" in 3-class segmentation >AVG....seg_t2wcsf: T2W-derived CSF > >Atlas: >ANTS...brain...brainstem: The individual files have the brain areas >ANTS...brain_atlas: Segmented atlas for all brain areas > >Please help. > >Thanks, >Berdakh. > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >b4262/attachment-0001.html> > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 51, Issue 6 >**************************************** From n.lam at donders.ru.nl Sun Feb 8 22:49:24 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Sun, 8 Feb 2015 21:49:24 +0000 Subject: [FieldTrip] Problem with ft_databrowser In-Reply-To: References: Message-ID: Hi Ausaf, I believe (as is noted in the error message) that you need to change your cfg structure: cfg.demean = 'yes'; should be 'cfg.preproc.demean' = 'yes'; Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Ausaf Bari [ausafb at gmail.com] Sent: 08 February 2015 17:52 To: FieldTrip discussion list Subject: [FieldTrip] Problem with ft_databrowser I have 122 trials (equal trial lengths) with 14 channels. I tried to use this: cfg = ft_databrowser(cfg,data); I'm getting this error: Warning: The field cfg.demean is deprecated, please specify it as cfg.preproc.demean instead of cfg. > In ft_checkconfig at 461 In ft_databrowser at 157 the input is raw data with 0 channels and 122 trials Error using ft_datatype_raw (line 88) inconsistent number of channels in trial 1 Error in ft_checkdata (line 222) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_databrowser (line 261) data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'yes', 'hassampleinfo', 'yes'); Can someone help? -AB My cfg array looks like this: cfg = dataset: '/Users/user/Desktop/test.cnt' trialfun: @ft_trialfun_general trialdef: [1x1 struct] callinfo: [1x1 struct] version: [1x1 struct] trackconfig: 'off' checkconfig: 'loose' checksize: 100000 showcallinfo: 'yes' debug: 'no' trackcallinfo: 'yes' trackdatainfo: 'no' trackparaminfo: 'no' dataformat: 'ns_cnt' headerformat: 'ns_cnt' event: [1x488 struct] trl: [122x4 double] channel: [] continuous: 'no' demean: 'yes' viewmode: 'vertical' My data array look like this: data = hdr: [1x1 struct] label: {} time: {1x122 cell} trial: {1x122 cell} fsample: 5000 sampleinfo: [122x2 double] trialinfo: [122x1 double] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Tue Feb 10 06:10:44 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Tue, 10 Feb 2015 00:10:44 -0500 Subject: [FieldTrip] Selecting Trials from Blocks Message-ID: I have large .cnt (neuroscan) files with trials under different conditions. The trials are marked by triggers but the conditions are not marked. I have my own record of timestamps for the start of each condition block. How do cut out a block (e.g. 30 minute block) and then subsequently break that into trials based on triggers? I know you can use ft_redefinetrial to choose a section based on a begsample and endsample but I'm having trouble using the resulting data structure as an input to ft_definetrial. -AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Tue Feb 10 08:43:41 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Tue, 10 Feb 2015 02:43:41 -0500 Subject: [FieldTrip] Selecting Trials from Blocks In-Reply-To: References: Message-ID: Hi Ausaf, Have you tried to read all EEG events as usual? You then can compare the tri or trialinfo sample value to your condition values. This information could then be stored in a new column of data in the data.trl structure. Best, Raquel On Tue, Feb 10, 2015 at 12:10 AM, Ausaf Bari wrote: > I have large .cnt (neuroscan) files with trials under different > conditions. The trials are marked by triggers but the conditions are not > marked. I have my own record of timestamps for the start of each condition > block. How do cut out a block (e.g. 30 minute block) and then subsequently > break that into trials based on triggers? > > I know you can use ft_redefinetrial to choose a section based on a > begsample and endsample but I'm having trouble using the resulting data > structure as an input to ft_definetrial. > > -AB > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Tue Feb 10 13:54:16 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Tue, 10 Feb 2015 07:54:16 -0500 Subject: [FieldTrip] Selecting Trials from Blocks In-Reply-To: References: Message-ID: Thanks Raquel. I didn't realize I could recode by adding that column. I'll try it. Thanks! On Tuesday, February 10, 2015, Raquel Bibi wrote: > Hi Ausaf, > Have you tried to read all EEG events as usual? You then can compare the > tri or trialinfo sample value to your condition values. This information > could then be stored in a new column of data in the data.trl structure. > Best, > > Raquel > > On Tue, Feb 10, 2015 at 12:10 AM, Ausaf Bari > wrote: > >> I have large .cnt (neuroscan) files with trials under different >> conditions. The trials are marked by triggers but the conditions are not >> marked. I have my own record of timestamps for the start of each condition >> block. How do cut out a block (e.g. 30 minute block) and then subsequently >> break that into trials based on triggers? >> >> I know you can use ft_redefinetrial to choose a section based on a >> begsample and endsample but I'm having trouble using the resulting data >> structure as an input to ft_definetrial. >> >> -AB >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- Ausaf A. Bari MD PhD Clinical Fellow Functional Neurosurgery Toronto Western Hospital University of Toronto Phone: 647-624-1929 Email: ausafb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgio.arcara at gmail.com Wed Feb 11 10:46:57 2015 From: giorgio.arcara at gmail.com (Giorgio Arcara) Date: Wed, 11 Feb 2015 10:46:57 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA Message-ID: Dear Fieldtrip users, I recorded some MEG data in two separate recordings. The recordings were one immediately after the other, with a short pause (of few seconds) in the middle. In my recording I stored the head position continuously (CTF-system). My aim is to combine the data from the two recordings to run a single ICA, with the aim of identifying artifacts. After the preprocessing and after using ft_appenddata I receive I warning because there is an inconsistency in sensor positions stored in the data structure. The appending works but I lose all sensor information. (to draw some figures I solved retrieving the sensor information from some previous data objects). I'm just using this data for an ERF analysis, but I'd like to perform also source analysis later. My questions are: how to deal with this issue? Do you think it is reasonable (as I think) to perform an ICA on the overall data even if from different files? Could this issue affect a following source analysis? Thanks! -- *Giorgio Arcara* Post-doc research fellow Department of Neuroscience, University of Padua Via Giustiniani, 2 35128, Padua, Italy https://sites.google.com/site/giorgioarcara/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Feb 11 12:16:37 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 11 Feb 2015 12:16:37 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA In-Reply-To: References: Message-ID: Dear Giorgio, FieldTrip kind of 'protects' the users against themselves when appending different data sets, because if sensor positions are substantially different then this could be a serious problem. However, if you are certain the sensor positions are highly comparable (e.g. if you've used interactive realignment during the recording session) you can simply take the .grad field (which contains the sensor positions) of one of the datasets (best to use the first one, if that's the one you aligned to) and put it in the combined data structure. Best, Eleke On 11 February 2015 at 10:46, Giorgio Arcara wrote: > Dear Fieldtrip users, > > I recorded some MEG data in two separate recordings. The recordings were one > immediately after the other, with a short pause (of few seconds) in the > middle. In my recording I stored the head position continuously > (CTF-system). > > My aim is to combine the data from the two recordings to run a single ICA, > with the aim of identifying artifacts. > > After the preprocessing and after using ft_appenddata I receive I warning > because there is an inconsistency in sensor positions stored in the data > structure. > > The appending works but I lose all sensor information. (to draw some figures > I solved retrieving the sensor information from some previous data objects). > > I'm just using this data for an ERF analysis, but I'd like to perform also > source analysis later. > > > My questions are: how to deal with this issue? Do you think it is reasonable > (as I think) to perform an ICA on the overall data even if from different > files? Could this issue affect a following source analysis? > > > > > Thanks! > > > -- > Giorgio Arcara > > Post-doc research fellow > > Department of Neuroscience, University of Padua > Via Giustiniani, 2 > 35128, Padua, Italy > > https://sites.google.com/site/giorgioarcara/ > From jorn at artinis.com Wed Feb 11 14:29:48 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Wed, 11 Feb 2015 14:29:48 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA In-Reply-To: References: Message-ID: <002b01d045fe$d0361780$70a24680$@artinis.com> Hi Giorgio, you could also try to use ft_megrealign, which projects the channels of your data to source space and then projects the activity back to some predefined set of sensors. I have never tested how well this function works, but it was intended for such purposes back then ;) http://fieldtrip.fcdonders.nl/reference/ft_megrealign The documentation states that it's for timelocked data, but I am 100% sure that the code will only work on raw data. Maybe test both, simply copying over the sensor description as Eleke (I like that typo!) suggested and compare it with what ft_megrealign gives you and decide for yourself what you prefer best/seems to give most reliable results. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems  |  +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Wednesday, February 11, 2015 12:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Appending data from two sessions for ICA > > Dear Giorgio, > > FieldTrip kind of 'protects' the users against themselves when appending > different data sets, because if sensor positions are substantially different > then this could be a serious problem. However, if you are certain the sensor > positions are highly comparable (e.g. if you've used interactive realignment > during the recording session) you can simply take the .grad field (which > contains the sensor positions) of one of the datasets (best to use the first > one, if that's the one you aligned to) and put it in the combined data > structure. > > Best, > Eleke > > On 11 February 2015 at 10:46, Giorgio Arcara > wrote: > > Dear Fieldtrip users, > > > > I recorded some MEG data in two separate recordings. The recordings > > were one immediately after the other, with a short pause (of few > > seconds) in the middle. In my recording I stored the head position > > continuously (CTF-system). > > > > My aim is to combine the data from the two recordings to run a single > > ICA, with the aim of identifying artifacts. > > > > After the preprocessing and after using ft_appenddata I receive I > > warning because there is an inconsistency in sensor positions stored > > in the data structure. > > > > The appending works but I lose all sensor information. (to draw some > > figures I solved retrieving the sensor information from some previous data > objects). > > > > I'm just using this data for an ERF analysis, but I'd like to perform > > also source analysis later. > > > > > > My questions are: how to deal with this issue? Do you think it is > > reasonable (as I think) to perform an ICA on the overall data even if > > from different files? Could this issue affect a following source analysis? > > > > > > > > > > Thanks! > > > > > > -- > > Giorgio Arcara > > > > Post-doc research fellow > > > > Department of Neuroscience, University of Padua Via Giustiniani, 2 > > 35128, Padua, Italy > > > > https://sites.google.com/site/giorgioarcara/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Thu Feb 12 11:00:35 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 12 Feb 2015 11:00:35 +0100 Subject: [FieldTrip] Fwd: Postdoc Position Available References: <54DBD62D.1020501@sipi.usc.edu> Message-ID: <164C4977-18F6-4225-B2E1-E373A80A74FD@donders.ru.nl> Post-Doctoral Research Associate Biomedical Imaging Group Signal and Image Processing Institute University of Southern California A Postdoctoral Research Associate position is available immediately to work on brain network analysis with a focus on integrating electrophysiological (MEG, EEG, ECoG, LFP) measures with MR imaging data. This position requires knowledge of the models and methods used for connectivity modeling, and the mathematical and software background to develop and implement novel approaches. This is part of an NIH supported project to develop a multimodal brain connectivity atlas in collaboration with John Mosher and colleagues in the Epilepsy Center at the Cleveland Clinic. Data in the atlas will include spontaneous and evoked invasive and noninvasive electrophysiology and structural, resting and diffusion MRI. The position will also involve working with and contributing to the BrainStorm software (http://neuroimage.usc.edu/brainstorm/). Required Qualifications: PhD in Electrical Engineering, Statistics, Computer Science, Physics, Neuroscience or related fields and publications related to brain mapping. Programming experience, preferably including Matlab, Java, C, C++. The University of Southern California strongly values diversity and is committed to equal opportunity in employment. Women and men, and members of all racial and ethnic groups, are encouraged to apply. Send applications to: Richard M. Leahy, Ph.D. Professor and Director Signal and Image Processing Institute 3740 McClintock Ave, EEB400 University of Southern California Los Angeles, CA 90089 2564 http://neuroimage.usc.edu leahy at sipi.usc.edu -- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PostDoc_2015.pdf Type: application/pdf Size: 10763 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From payashi.garry at seh.ox.ac.uk Thu Feb 12 14:38:31 2015 From: payashi.garry at seh.ox.ac.uk (Payashi Garry) Date: Thu, 12 Feb 2015 13:38:31 +0000 Subject: [FieldTrip] TFR channel average plot Message-ID: Dear FieldTrip discussion list I was wondering if there was a way of displaying the channel average plot in multi plot TFR? I would like to represent my time/frequency plot as an average of all the channels and was wondering if there was a function in multi plot to enable this? Many thanks Payashi **** Dr Payashi Garry MB BChir FRCA Specialty Registrar in Anaesthetics and BRC Research Fellow Nuffield Department of Clinical Neurosciences John Radcliffe Hospital Oxford OX3 9DU Tel: 01865 572878 From tzvetan.popov at uni-konstanz.de Thu Feb 12 15:54:20 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 12 Feb 2015 15:54:20 +0100 Subject: [FieldTrip] TFR channel average plot In-Reply-To: References: Message-ID: <117D696B-CFE9-4A1E-B691-3F492C0C1382@uni-konstanz.de> Dear Payashi, there are two options: 1). During the call to ft_mulitplotTFR you can interactively select all the channels with the mouse cursor. This is allowed by the cfg.interactive = ‘yes’;, which is the default. 2). You call ft_singleplotTFR without specifying cfg.channel = XY. Thus you’ll get an average across all channels in your input structure. best tzvetan > Dear FieldTrip discussion list > > I was wondering if there was a way of displaying the channel average plot in multi plot TFR? I would like to represent my time/frequency plot as an average of all the channels and was wondering if there was a function in multi plot to enable this? > > Many thanks > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.donda at hotmail.com Thu Feb 12 17:26:04 2015 From: a.donda at hotmail.com (A. Donda) Date: Thu, 12 Feb 2015 16:26:04 +0000 Subject: [FieldTrip] "mask" option being ignored when plotting source statistics Message-ID: Hi everybody, when trying to plot the results of the group-level source statistics with the option "mask", it seems that ft_sourceplot ignores the "mask" option and just plots all values of the t-statistic map. I even changed manually the field data.mask (taking logic values 0 / 1) to see whether that affects the plot, but nothing changes. Is there something obvious in the plotting function "ft_sourceplot" that I oversaw? The result of statistics for differences between two source estimates has the following structure: stat = prob: [38x48x41 double] cirange: [38x48x41 double] mask: [38x48x41 logical] stat: [38x48x41 double] ref: [38x48x41 double] dim: [38 48 41] inside: [1x37163 double] outside: [1x37621 double] pos: [74784x3 double] freq: 22.4439 cfg: [1x1 struct] Then I interpolate the stat data to one normalized (to MNI space) mri from one subject cfg = [];cfg.parameter = 'all';statplot = ft_sourceinterpolate(cfg, stat, norm); To plot only significant voxels I use stat.mask (i.e. statplot.mask: values 0 and 1) to mask the data, but it is ignored when plotting: cfg = [];cfg.method = 'ortho';cfg.funparameter = 'stat';cfg.maskparameter = 'mask';cfg.maskstyle = 'saturation';cfg.opacitymap = 'rampup';cfg.opacitylim =[0 1]figureft_sourceplot(cfg, statplot); The plot simply shows all values of the funparameter statplot.stat If I missed sthg, I would be grateful for any feedback. Thanks! A. Donda -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Thu Feb 12 23:13:34 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Thu, 12 Feb 2015 17:13:34 -0500 Subject: [FieldTrip] Error with Precprocessing LFPs Message-ID: Can someone explain what this error means? Reading data ..... Scaling data ..... Reading Event Table... Warning: events imported with a time shift might be innacurate Warning: Matrix is singular to working precision. > In ft_preproc_polyremoval at 76 In fieldtrip-20150212/private/preproc at 315 In ft_preprocessing at 590 Warning: Matrix is singular to working precision. > In ft_preproc_polyremoval at 76 In ft_preproc_baselinecorrect at 49 In fieldtrip-20150212/private/preproc at 348 In ft_preprocessing at 590 The error occurs after "data=ft_preprocessing(cfg)": cfg = []; cfg.dataset = 'file.cnt'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = [11 12 21 22 31 32 41 42 51 52]; cfg.trialdef.prestim = -1; cfg.trialdef.poststim = .5; cfg = ft_definetrial(cfg); cfg.channel={'channel2' 'channel3'}; cfg.demean ='yes'; cfg.reref = 'yes'; cfg.implicitref = []; cfg.refchannel = {'channel3'}; data = ft_preprocessing(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From elam4HCP at gmail.com Sat Feb 14 01:33:59 2015 From: elam4HCP at gmail.com (elam4HCP at gmail.com) Date: Fri, 13 Feb 2015 18:33:59 -0600 Subject: [FieldTrip] Announcing the 2015 HCP Course: "Exploring the Human Connectome" Message-ID: <125601d047ed$ecca8160$c65f8420$@gmail.com> We are pleased to announce the 2015 HCP Course: "Exploring the Human Connectome", to be held June 8-12 at the Marriott Resort Waikiki Beach , in Honolulu, Hawaii, USA. This 5-day intensive course will provide training in the acquisition, analysis and visualization of imaging and behavioral data from the Human Connectome Project (HCP) using methods and informatics tools developed by the WU-Minn HCP consortium plus data made freely available to the neuroscience community. The course is designed for investigators who are interested in: * using data being collected and distributed by HCP * acquiring and analyzing HCP-style imaging and behavioral data at your own institution * processing your own non-HCP imaging data using HCP pipelines and methods * learning to use Connectome Workbench tools and the CIFTI connectivity data format * learning HCP multi-modal neuroimaging analysis methods, including those that combine MEG and MRI data * positioning yourself to capitalize on HCP-style data from forthcoming large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human Disease) Participants will learn how to acquire, analyze, visualize, and interpret data from resting-state and task-evoked magnetoencephalography (MEG), four major MR modalities (structural MR, resting-state fMRI, diffusion imaging, task-evoked fMRI), plus extensive behavioral data. Lectures and labs will provide grounding in neurobiological as well as methodological issues involved in interpreting multimodal data, and will span the range from single-voxel/vertex to brain network analysis approaches. The course is open to graduate students, postdocs, faculty, and industry participants. The course is aimed at both new and existing users of HCP data, methods, and tools, and will cover both basic and advanced topics. Prior experience in human neuroimaging or in computational analysis of brain networks is desirable, preferably including familiarity with FSL and Freesurfer software. For more info and to register visit the HCP Course website . If you would like a flyer to post for interested colleagues, email elam at wustl.edu. We hope to see you in Hawaii! Best, 2015 HCP Course Organizers Jennifer Elam, Ph.D. Outreach Coordinator, Human Connectome Project Washington University School of Medicine Department of Anatomy and Neurobiology, Box 8108 660 South Euclid Avenue St. Louis, MO 63110 314-362-9387 elamj at pcg.wustl.edu www.humanconnectome.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From demiral.007 at gmail.com Sat Feb 14 17:58:21 2015 From: demiral.007 at gmail.com (Baris Demiral) Date: Sat, 14 Feb 2015 11:58:21 -0500 Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? Message-ID: Hi all, I am testing clustering based correction algorithms on a TF power data in a predefined frequent band; theta. I have four conditions. I used F statistic. I defined neighbors moderately so that the number of neighbors is not very small or extremely large. In some analyses I used pairwise t-test statistic to compare between conditions as well. I have a-priory expectations, such that some conditions will increase the centro-frontal theta, and some will increase the posterior theta. I use maxsum and wcm approaches. I heave the following questions: -Why do I observe that very distant electrodes are clustered together? I noticed that FCZ is clustered with occipital electrodes and belong to the same cluster written as in stat.cfg.posclusterlabel (label 1). In some ways I can understand that because my task produces highly posteriorized theta power. The centro-frontal power is weaker. This leads to my next question: "Is there a watershed type of algorithm to separate these activities?" - Are the electrodes I see in the plotting (marked by *,x,+) the peak electrodes in the clusters, or do these electrodes form the significant clusters (with smaller p values < .01, .05 etc)? Because, if the cluster is formed between distant electrodes as mentioned above, I would expect to see the intermediate electrodes (such as CZ etc.) in the cluster electrode list as well. -Can you implement in plotting function where color can represent the cluster number? The *,+,x signs represent thresholds, but I cannot see which electrode belongs to which cluster. If you color code electrodes, it will be very helpful. -Is there a range of weight values for the weighted cluster mass (wcm) approach? I looked at the paper, and seems like 0.45-.055 seems to be the weight parameter. Is this correct? Thanks, -- S. Baris Demiral NIH/NIDCD 10 Center Drive Building 10, 5C410 Bethesda, 20892 MD -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Sun Feb 15 04:53:04 2015 From: pgoodin at swin.edu.au (Peter Goodin) Date: Sun, 15 Feb 2015 03:53:04 +0000 Subject: [FieldTrip] MEG resting state covariance matrix estimate without empty room recording? Message-ID: Hi Fieldtrip list, I'm having a bit of a quandary at the moment regarding resting state data. In order to generate the covariance matrix all the papers I've seen estimate it from an empty room recording on the day of testing which makes sense. The problem I have is that while I have 5+ minutes of resting state data for each participant, there's no empty room recordings to go along with it. So I've been doing some thinking about the "least wrong" method of estimating the covariance (between a "trial by trial" method where covariance is estimated from epoched data) vs. estimation from the entire recording. My conclusions have been less than stellar with the idea that the trial by trial method is a really stupid one due to the non-timelocked nature of resting state analysis while estimation from the entire recording is fraught with problems due to the shifting nature of resting state data leading to a bad estimation of noise to begin with. To further complicate the issue I'm using a neuromag system which removes noise from outside the head sphere as a required method, but I'm not sure if this would be a positive or negative influence on the covariance matrix. Has anyone had to deal with a similar problem / can anyone recommend any literature on the topic? Thanks for any assistance, Peter _____________________ Peter Goodin, BSc (Hons), Ph.D Candidate (submitted). Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 http://www.swinburne.edu.au/swinburneresearchers/index.php?fuseaction=profile&pid=4149 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 From RICHARDS at mailbox.sc.edu Sun Feb 15 06:27:01 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 15 Feb 2015 05:27:01 +0000 Subject: [FieldTrip] lead field Cholesky.... Message-ID: I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Mon Feb 16 06:19:33 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 16 Feb 2015 05:19:33 +0000 Subject: [FieldTrip] ROI for ft_sourcestatistics Message-ID: Hi all, I'm having some difficulty restricting source statistics to a region of interest. I am running the ft_sourcestatistics with the following cfg for ROI: cfg.atlas = ft_read_atlas('~/MATLAB/fieldtrip-20140910/template/atlas/aal/ROI_MNI_V4.nii') cfg.roi ={-5,0,3}; cfg.sphere=3; cfg.inputcoord = 'mni'; This results in the following error: Error using ft_volumelookup (line 131) either specify cfg.sphere or cfg.box Error in statistics_wrapper (line 140) tmp = ft_volumelookup(tmpcfg, varargin{1}); Error in ft_sourcestatistics (line 112) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I had understood that this should have chosen the grid position (-5, 0, 3) and then then selected grid points within a 3cm radius around this point as the ROI. These variables are just for trying it out, and are not what I will be using once I get this code working. Any help much appreciated. P.s. I had thought that the following code would return anatomical labels for this ROI. Instead it just returns a matrix of zeros with the dimensions of source.dim. cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi ={-5,0,3}; cfg.sphere=3; labels = ft_volumelookup( cfg, sourceData) Again, any help will be much appreciated! Regards, Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Mon Feb 16 14:34:45 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Mon, 16 Feb 2015 13:34:45 +0000 Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? In-Reply-To: References: Message-ID: Hi S. Baris Demiral, I have answers some of your questions, see below. Please note that it was difficult to answer all your questions because you didn't provide provide the actual code you used. Although your description is helpful, being able to see the actual parameters you implemented, and the specific function (e.g, did you use ft_freqstatistics, and did you use ft_clusterplot?) make it easier for anyone in the community attempting to answer your questions. Please see the FAQ for more details: http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_communityhttp://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community. I'd like to point out that you can make good use of the search function (both inside FT - on the top right corner, and just on google), and reading the documentation for the functions that you are using, as many of your answers can be found there. Finally, this FAQ should be of interest to you: http://fieldtrip.fcdonders.nl/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Baris Demiral [demiral.007 at gmail.com] Sent: 14 February 2015 17:58 To: FieldTrip discussion list Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? Hi all, I am testing clustering based correction algorithms on a TF power data in a predefined frequent band; theta. I have four conditions. I used F statistic. I defined neighbors moderately so that the number of neighbors is not very small or extremely large. In some analyses I used pairwise t-test statistic to compare between conditions as well. I have a-priory expectations, such that some conditions will increase the centro-frontal theta, and some will increase the posterior theta. I use maxsum and wcm approaches. I heave the following questions: -Why do I observe that very distant electrodes are clustered together? I noticed that FCZ is clustered with occipital electrodes and belong to the same cluster written as in stat.cfg.posclusterlabel (label 1). ==> This could be due to the way your defined your neighbourhood structure. However, I can't make any conclusion from your defnition of "not very small or extremely large". Usually, when the neighbours are defined it specifies the neighbourhood size in the matlab workspace, and it would also help to know what you specific for cfg.method, when calling ft_prepare_neighbours. ==> It is important to note that even if there was a watershed method that it wouldn't answer the question of whether the centro-frontal theta is distinct from the occipital theta. More generally, the use of clustering won't answer this question either. It is better to use a feature in the data e.g., power change, to determine whether the theta differs between (groups of) sensors. In some ways I can understand that because my task produces highly posteriorized theta power. The centro-frontal power is weaker. This leads to my next question: "Is there a watershed type of algorithm to separate these activities?" - Are the electrodes I see in the plotting (marked by *,x,+) the peak electrodes in the clusters, or do these electrodes form the significant clusters (with smaller p values < .01, .05 etc)? ==> I assume you are using ft_clusterplot, and in the documentation of this function it states that the "(default ['*','x','+','o','.'] for p < [0.01 0.05 0.1 0.2 0.3])" ==> Electrodes marked with the same symbol belong the the same cluster (whether they are significant depends on the symbol, or the way you've assigned what the symbols mean). Because, if the cluster is formed between distant electrodes as mentioned above, I would expect to see the intermediate electrodes (such as CZ etc.) in the cluster electrode list as well. -Can you implement in plotting function where color can represent the cluster number? The *,+,x signs represent thresholds, but I cannot see which electrode belongs to which cluster. If you color code electrodes, it will be very helpful. ==> The elements in stat.poscluster/stat.negclusters are sorted according their p-values such that the cluster with the smallest p-value is first. ==> Part of this tutorial also applies to TF data, it should help you with differentiating clusters (and not just using the symbols): http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock The section of interest begins following text "We now briefly discuss the configuration fields that are not specific for ft_timelockstatistics:". ==> I cannot implement this feature, however, if you would like to contribute to FT by adding this functionality, you're welcome to do so, see http://fieldtrip.fcdonders.nl/contribute -Is there a range of weight values for the weighted cluster mass (wcm) approach? I looked at the paper, and seems like 0.45-.055 seems to be the weight parameter. Is this correct? ==> As a user, you need to determine and define a weight that is suitable for your data. The parameter to specify the weight is, cfg.wcm_weight. Thanks, -- S. Baris Demiral NIH/NIDCD 10 Center Drive Building 10, 5C410 Bethesda, 20892 MD -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Feb 16 14:37:47 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 16 Feb 2015 13:37:47 +0000 Subject: [FieldTrip] lead field Cholesky.... In-Reply-To: References: Message-ID: Update on this. I may have solved my own problem. I had “nasal cavity” with an assigned conductivity of 0. I changed this to a very small value, and it passed this step at least once. I will let you know if this happens again. Thanks in advance for your consideration. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** From: , John Richards > Date: Sunday, February 15, 2015 at 12:26 AM To: "fieldtrip at science.ru.nl" > Subject: lead field Cholesky.... I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From marta.bortoletto at cognitiveneuroscience.it Mon Feb 16 15:09:00 2015 From: marta.bortoletto at cognitiveneuroscience.it (Marta Bortoletto) Date: Mon, 16 Feb 2015 14:09:00 +0000 (UTC) Subject: [FieldTrip] Negative values of debiased wPLI Message-ID: <1260984826.7627092.1424095740727.JavaMail.yahoo@mail.yahoo.com> Dear Community,I am using the debiased wPLI to estimate connectivity between 70 EEG electrodes. I have about 150 trials for each subject. I noticed that some values of my 70x70 dwPLI matrix are negative. My understanding is that all values should be between 0 and 1, but for some reason I can get negative values from the debiasing process. My question is: Shall I calculate the absolute value of these negative values? Otherwise what shall I do with them? Thank you in advance for your help.Marta -------------- next part -------------- An HTML attachment was scrubbed... URL: From miano at lsbu.ac.uk Mon Feb 16 16:38:43 2015 From: miano at lsbu.ac.uk (Mian, Omar) Date: Mon, 16 Feb 2015 15:38:43 +0000 Subject: [FieldTrip] eeglab2fieldtrip - Fieldtrip vs EEGLAB version Message-ID: Hello, There seem to be differences between the eeglab2fieldtrip.m when the Fieldtrip and EEGLAB versions are compared. Is this an oversight? Which one is "better" ? data.cfg.version.id contains a later date in the Fieldtrip version, but the file properties modified date is later in the EEGLAB version. The versions I am comparing are: \fieldtrip-20150109\external\eeglab\eeglab2fieldtrip.m \eeglab13_4_4b\plugins\dipfit2.3\eeglab2fieldtrip.m Thanks Omar --------------------------- Omar Mian, Phd Research Fellow School of Applied Sciences London South Bank University 103 Borough Road London SE1 0AA Copyright in this email and in any attachments belongs to London South Bank University. This email, and its attachments if any, may be confidential or legally privileged and is intended to be seen only by the person to whom it is addressed. If you are not the intended recipient, please note the following: (1) You should take immediate action to notify the sender and delete the original email and all copies from your computer systems; (2) You should not read copy or use the contents of the email nor disclose it or its existence to anyone else. The views expressed herein are those of the author(s) and should not be taken as those of London South Bank University, unless this is specifically stated. London South Bank University is a company limited by guarantee registered in England and Wales. The following details apply to London South Bank University: Company number - 00986761; Registered office and trading address - 103 Borough Road London SE1 0AA; VAT number - 778 1116 17 Email address - LSBUinfo at lsbu.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Feb 16 16:47:11 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 16 Feb 2015 15:47:11 +0000 Subject: [FieldTrip] More: lead field Cholesky.... Message-ID: I solved this problem on my windows computers. Now when I run the same program on a Linux machine, I get the same output. I note that with the windows computer I had to add the MS Visual C++ 2008 redistributable and the Intel Visual Fortran redistributable libraries. I found in another post that someone said these libraries are unnecessary on Linux, I presume that means either these libraries exist on Linux already, or that they use a different library for these functions. My linux is Red Hat 7, MATLAB is the 2014a, FT is the 2/14/15 download. I realize this may be a question for the simbio development group, if so would you let me know and I will try to contact that group. By the way the models are a five segmented head (wm, gm, csf, skull, scalp) or fully segmented head (the former + eyes, nasal cavity, head-muscle, ….); the electrodes are co-registered with the MRI outside of FT so they fit correctly on the scalp; Thanks, John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu ************************************************* [cid:75EDAFDB-FCB8-4E5C-A9A4-4A2E0A1B56B7] From: , John Richards > Date: Monday, February 16, 2015 at 8:37 AM To: "fieldtrip at science.ru.nl" > Subject: Re: lead field Cholesky.... Update on this. I may have solved my own problem. I had “nasal cavity” with an assigned conductivity of 0. I changed this to a very small value, and it passed this step at least once. I will let you know if this happens again. Thanks in advance for your consideration. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** From: , John Richards > Date: Sunday, February 15, 2015 at 12:26 AM To: "fieldtrip at science.ru.nl" > Subject: lead field Cholesky.... I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0E9D0CE7-F37D-4858-BC01-79FD2F2554B1[1].png Type: image/png Size: 30144 bytes Desc: 0E9D0CE7-F37D-4858-BC01-79FD2F2554B1[1].png URL: From ktyler at swin.edu.au Tue Feb 17 06:23:57 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Tue, 17 Feb 2015 05:23:57 +0000 Subject: [FieldTrip] centre of head bias Message-ID: Hi all, A question about the centre head bias. Does computing a contrast of conditions remove the issue of the centre head bias? Read below. The Localizing oscillatory sources tutorial talks about the possibility of a beamformer over estimating power in the centre of the head, and suggests several methods of counteracting this. After suggestion use of the NAI to counter this bias, the tutorial goes on to show this beamformer method using contrasting conditions and says that using this approach we can "assume that the noise bias is the same for the pre- and post-stimulus interval and it will thus be removed." The tutorial uses the following code to do this: sourceDiff = sourcePost_con; sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; My question again: Does using this approach and computing the contrast condition remove the centre of head bias for this contrasted condition? Thanks! Kaelasha PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Feb 17 07:47:43 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 17 Feb 2015 07:47:43 +0100 Subject: [FieldTrip] centre of head bias In-Reply-To: References: Message-ID: Hi Kaelasha, The center-of-head bias is due to noise. Since you can assume the noise to be uncorrelated across experimental conditions, you can assume this bias will not be present in a contrast. To verify this for yourself, simply plot the beamforming results for two conditions separately; you will see a strong center-of-head bias. Subtract one big blob from another equally big blob and they should disappear :) So, plot the (normalized) difference, and you will likely notice less center-of-head bias. Best, Eelke On 17 February 2015 at 06:23, Kaelasha Tyler wrote: > Hi all, > > A question about the centre head bias. > > Does computing a contrast of conditions remove the issue of the centre head > bias? Read below. > > The Localizing oscillatory sources tutorial talks about the possibility of a > beamformer over estimating power in the centre of the head, and suggests > several methods of counteracting this. > > After suggestion use of the NAI to counter this bias, the tutorial goes on > to show this beamformer method using contrasting conditions and says that > using this approach we can "assume that the noise bias is the same for the > pre- and post-stimulus interval and it will thus be removed." > > The tutorial uses the following code to do this: > > sourceDiff = sourcePost_con; > sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ > sourcePre_con.avg.pow; > > My question again: Does using this approach and computing the contrast > condition remove the centre of head bias for this contrasted condition? > > Thanks! > Kaelasha > > PhD Candidate > > Brain and Psychological Sciences Research Centre > > Swinburne University of Technology > > Melbourne > > Australia From jan.schoffelen at donders.ru.nl Tue Feb 17 07:48:58 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 17 Feb 2015 06:48:58 +0000 Subject: [FieldTrip] centre of head bias In-Reply-To: References: Message-ID: <4BD7A3E7-2A26-47AF-ABCE-F2AC43019ACD@fcdonders.ru.nl> Hi Kaelasha, What’s the question behind this question? In principle the normalization step described should largely alleviate the depth bias. Whether or not the remaining estimated activity near the centre of the head is to be trusted, is another story. Best, Jan-Mathijs On Feb 17, 2015, at 6:23 AM, Kaelasha Tyler > wrote: Hi all, A question about the centre head bias. Does computing a contrast of conditions remove the issue of the centre head bias? Read below. The Localizing oscillatory sources tutorial talks about the possibility of a beamformer over estimating power in the centre of the head, and suggests several methods of counteracting this. After suggestion use of the NAI to counter this bias, the tutorial goes on to show this beamformer method using contrasting conditions and says that using this approach we can "assume that the noise bias is the same for the pre- and post-stimulus interval and it will thus be removed." The tutorial uses the following code to do this: sourceDiff = sourcePost_con; sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; My question again: Does using this approach and computing the contrast condition remove the centre of head bias for this contrasted condition? Thanks! Kaelasha PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From munsif.jatoi at gmail.com Tue Feb 17 09:31:03 2015 From: munsif.jatoi at gmail.com (Munsif Jatoi) Date: Tue, 17 Feb 2015 16:31:03 +0800 Subject: [FieldTrip] Fwd: FEM implementation problem. In-Reply-To: References: Message-ID: Dear Sir/Madam, I hope you are fine. I am using FEM and BEM head modelling for solution of EEG inverse problem related to my doctoral work. For this, I gone through the tutorial provided at http://fieldtrip.fcdonders.nl/development/project/example_fem which suggests the MATLAB implementation of FEM. when I applied on an sMRI image by using segmentedmri = ft_volumesegment(cfg,mri); it give option as: the input is volume data with dimensions [177 240 256] The axes are 150 mm long in each direction The diameter of the sphere at the origin is 10 mm Do you want to change the anatomical labels for the axes [Y, n]? Y What is the anatomical label for the positive X-axis [r, l, a, p, s, i]? I don't know what to supply for these values? Can you please guide me about the values to be supplied? Many Thanks, Munsif -- Munsif Ali H.Jatoi, Ph D Scholar, Centre for Intelligent Signals and Imaging Research, Universiti Teknologi PETRONAS, Malaysia. http://scholar.google.com.my/citations?user=Y6g6jOAAAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 10:06:04 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 10:06:04 +0100 Subject: [FieldTrip] calculating behavioural-power correlation Message-ID: Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 10:18:13 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 09:18:13 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 10:33:07 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 10:33:07 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) wrote: > Hi Hweeling, > > Have a look at the help of ft_statfun_correlationT, which might be the > function you're looking for. This function calculates correlations between > two variables (e.g. subjects' behaviors and brain activities) and converts > the resulting correlation coefficients to t-statistics. > > Best, > arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 10:06 AM > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] calculating behavioural-power correlation > > > Dear all, > > I read on the "walkthrough" that it is possible to calculate > behavioural-power correlation across subjects. However, I was not sure what > type of descriptive statistics (i.e. cfg.statistics) I should use when > performing correlation cluster statistics. > > Would someone please enlighten me which type of statistics I should > input for cfg.statistics? > > Thanks! > > Best regards, > Hweeling > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 11:23:32 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 10:23:32 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: , Message-ID: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 11:34:48 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 11:34:48 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) wrote: > Hey Hweeling, > > It seems you're only inserting one input variable into the statistics > function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, > sub_LF_c200{:});" > > Could you try something along this line: ft_freqstatistics(cfg, freq1, > freq2) > > where freq1 is the original freq data, and freq2 is a copy of freq but > with the relevant values (say, in powspctrm) replaced with behavior values > (ensure this behavior matrix is matched in terms of size and dimensions to > the original freq values). > > Hope this helps, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > > ------------------------------ > *From:* Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 10:33 AM > *To:* Stolk, A. (Arjen) > *Cc:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation > > Dear Arjen, > > Thanks for the prompt reply. I keep getting an error message when I set > up my correlation cluster statistics, and I'm not sure what I could have > done wrong. Here's my script: > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.neighbours = neighbours; > cfg.channel = 'all'; > cfg.latency = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistics = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 1000; > cfg.ivar = 1; > cfg.uvar = 1; > > % design matrices > clear design; > % change in MMSE score relative to baseline > design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 > -0.157894737 0.117647059]; > design(2,:) = 1:6; > cfg.design = design; > > % for delta band > cfg.frequency = [2 4]; > [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); > [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); > > Here's the output from Matlab: > > computing statistic over the frequency range [2.000 4.000] > the call to "ft_appendfreq" took 0 seconds > the call to "ft_selectdata" took 0 seconds > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_correlationT" for the single-sample statistics > constructing randomized design > total number of measurements = 6 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 6 levels > number of repeated measurements in each level is 1 1 1 1 1 1 > computing a parametric threshold for clustering > Error using ft_statfun_correlationT (line 90) > Invalid specification of the design array. > Error using ft_statistics_montecarlo (line 254) > could not determine the parametric critical value > for clustering > > Error in ft_freqstatistics (line 319) > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Would you please tell what I have done wrong in this case? > > Thanks! > > Cheers, > Hweeling > > > On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: > >> Hi Hweeling, >> >> Have a look at the help of ft_statfun_correlationT, which might be the >> function you're looking for. This function calculates correlations between >> two variables (e.g. subjects' behaviors and brain activities) and converts >> the resulting correlation coefficients to t-statistics. >> >> Best, >> arjen >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> >> ------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 10:06 AM >> *To:* FieldTrip discussion list >> *Subject:* [FieldTrip] calculating behavioural-power correlation >> >> >> Dear all, >> >> I read on the "walkthrough" that it is possible to calculate >> behavioural-power correlation across subjects. However, I was not sure what >> type of descriptive statistics (i.e. cfg.statistics) I should use when >> performing correlation cluster statistics. >> >> Would someone please enlighten me which type of statistics I should >> input for cfg.statistics? >> >> Thanks! >> >> Best regards, >> Hweeling >> >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 11:45:33 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 10:45:33 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: , Message-ID: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 15:18:11 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 15:18:11 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) wrote: > Hey Hweeling, > > "Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency?" > > indeed > > "What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect?" > > the walkthough may refer to a GLM-based statistical implementation, for > which the FT implementation differs from the correlationT statfun. Namely, > the former uses the behavioral measure as a regressor in a data model > whereas the latter uses the behavioral measure as a datapoint series for > correlation with another datapoint series (and then converts to a T value). > The correlationT statfun is relatively 'new', hence not yet addressed in > the walkthrough. > > Yours, > arjen > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 11:34 AM > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation > > Dear Arjen, > > Thanks for the prompt reply again! > > Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency? > > What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect? > > Cheers, > Hweeling > > > On 17 February 2015 at 11:23, Stolk, A. (Arjen) > wrote: > >> Hey Hweeling, >> >> It seems you're only inserting one input variable into the statistics >> function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, >> sub_LF_c200{:});" >> >> Could you try something along this line: ft_freqstatistics(cfg, freq1, >> freq2) >> >> where freq1 is the original freq data, and freq2 is a copy of freq but >> with the relevant values (say, in powspctrm) replaced with behavior values >> (ensure this behavior matrix is matched in terms of size and dimensions to >> the original freq values). >> >> Hope this helps, >> Arjen >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> >> ------------------------------ >> *From:* Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 10:33 AM >> *To:* Stolk, A. (Arjen) >> *Cc:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >> >> Dear Arjen, >> >> Thanks for the prompt reply. I keep getting an error message when I set >> up my correlation cluster statistics, and I'm not sure what I could have >> done wrong. Here's my script: >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.neighbours = neighbours; >> cfg.channel = 'all'; >> cfg.latency = 'all'; >> cfg.avgovertime = 'no'; >> cfg.avgoverchan = 'no'; >> cfg.avgoverfreq = 'yes'; >> cfg.parameter = 'powspctrm'; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'ft_statfun_correlationT'; >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistics = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; >> cfg.numrandomization = 1000; >> cfg.ivar = 1; >> cfg.uvar = 1; >> >> % design matrices >> clear design; >> % change in MMSE score relative to baseline >> design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 >> -0.157894737 0.117647059]; >> design(2,:) = 1:6; >> cfg.design = design; >> >> % for delta band >> cfg.frequency = [2 4]; >> [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); >> [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); >> >> Here's the output from Matlab: >> >> computing statistic over the frequency range [2.000 4.000] >> the call to "ft_appendfreq" took 0 seconds >> the call to "ft_selectdata" took 0 seconds >> using "ft_statistics_montecarlo" for the statistical testing >> using "ft_statfun_correlationT" for the single-sample statistics >> constructing randomized design >> total number of measurements = 6 >> total number of variables = 2 >> number of independent variables = 1 >> number of unit variables = 1 >> number of within-cell variables = 0 >> number of control variables = 0 >> using a permutation resampling approach >> repeated measurement in variable 1 over 6 levels >> number of repeated measurements in each level is 1 1 1 1 1 1 >> computing a parametric threshold for clustering >> Error using ft_statfun_correlationT (line 90) >> Invalid specification of the design array. >> Error using ft_statistics_montecarlo (line 254) >> could not determine the parametric critical value >> for clustering >> >> Error in ft_freqstatistics (line 319) >> [stat, cfg] = statmethod(cfg, dat, cfg.design); >> >> Would you please tell what I have done wrong in this case? >> >> Thanks! >> >> Cheers, >> Hweeling >> >> >> On 17 February 2015 at 10:18, Stolk, A. (Arjen) >> wrote: >> >>> Hi Hweeling, >>> >>> Have a look at the help of ft_statfun_correlationT, which might be the >>> function you're looking for. This function calculates correlations between >>> two variables (e.g. subjects' behaviors and brain activities) and converts >>> the resulting correlation coefficients to t-statistics. >>> >>> Best, >>> arjen >>> >>> -- >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> >>> Email: a.stolk at donders.ru.nl >>> >>> Phone: +31(0)243 68294 >>> Web: www.arjenstolk.nl >>> >>> ------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >>> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >>> *Sent:* Tuesday, February 17, 2015 10:06 AM >>> *To:* FieldTrip discussion list >>> *Subject:* [FieldTrip] calculating behavioural-power correlation >>> >>> >>> Dear all, >>> >>> I read on the "walkthrough" that it is possible to calculate >>> behavioural-power correlation across subjects. However, I was not sure what >>> type of descriptive statistics (i.e. cfg.statistics) I should use when >>> performing correlation cluster statistics. >>> >>> Would someone please enlighten me which type of statistics I should >>> input for cfg.statistics? >>> >>> Thanks! >>> >>> Best regards, >>> Hweeling >>> >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Feb 17 16:44:45 2015 From: a.stolk8 at gmail.com (arjen stolk) Date: Tue, 17 Feb 2015 16:44:45 +0100 Subject: [FieldTrip] calculating behavioural-power correlation Message-ID: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee Datum: Aan: "Stolk, A. (Arjen)" Cc: FieldTrip discussion list Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen   From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email:  a.stolk at donders.ru.nl Phone:  +31(0)243 68294 Web:    www.arjenstolk.nl From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements     = 6 total number of variables        = 2 number of independent variables  = 1 number of unit variables         = 1 number of within-cell variables  = 0 number of control variables      = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1  computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319)   [stat, cfg] = statmethod(cfg, dat, cfg.design);   Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email:  a.stolk at donders.ru.nl Phone:  +31(0)243 68294 Web:    www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 17:39:29 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 17:39:29 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk wrote: > Yes it does. ;) > Arjen > > > > -------- Oorspronkelijk bericht -------- > Van: Hwee Ling Lee > Datum: > Aan: "Stolk, A. (Arjen)" > Cc: FieldTrip discussion list > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation > > > Dear Arjen, > > Thanks! It works well now. > > I plotted the results using ft_clusterplot, and it only shows the > significant clusters that show significant correlation of power and > behavioural measure, right? Or is there a better way I can display the > results? > > Thanks again. > > Cheers, > Hweeling > > > > On 17 February 2015 at 11:45, Stolk, A. (Arjen) > wrote: > >> Hey Hweeling, >> >> "Just to ensure that I get this right, I should create a variable for the >> behavioural measure such that the variable contains a powspctrm field with >> the behavioural information for every frequency?" >> > indeed >> >> "What I'm confused is that in the walkthrough website, under the >> subsection on correlation, it is suggested to create the cfg.design with >> the behavioural measure that one wants to correlate. So is this information >> in the walkthrough website incorrect?" >> > the walkthough may refer to a GLM-based statistical implementation, for >> which the FT implementation differs from the correlationT statfun. Namely, >> the former uses the behavioral measure as a regressor in a data model >> whereas the latter uses the behavioral measure as a datapoint series for >> correlation with another datapoint series (and then converts to a T value). >> The correlationT statfun is relatively 'new', hence not yet addressed in >> the walkthrough. >> >> Yours, >> arjen >> >> ------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 11:34 AM >> *To:* FieldTrip discussion list >> >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >> >> Dear Arjen, >> >> Thanks for the prompt reply again! >> >> Just to ensure that I get this right, I should create a variable for >> the behavioural measure such that the variable contains a powspctrm field >> with the behavioural information for every frequency? >> >> What I'm confused is that in the walkthrough website, under the >> subsection on correlation, it is suggested to create the cfg.design with >> the behavioural measure that one wants to correlate. So is this information >> in the walkthrough website incorrect? >> >> Cheers, >> Hweeling >> >> >> On 17 February 2015 at 11:23, Stolk, A. (Arjen) >> wrote: >> >>> Hey Hweeling, >>> >>> It seems you're only inserting one input variable into the statistics >>> function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, >>> sub_LF_c200{:});" >>> >>> Could you try something along this line: ft_freqstatistics(cfg, freq1, >>> freq2) >>> >>> where freq1 is the original freq data, and freq2 is a copy of freq but >>> with the relevant values (say, in powspctrm) replaced with behavior values >>> (ensure this behavior matrix is matched in terms of size and dimensions to >>> the original freq values). >>> >>> Hope this helps, >>> Arjen >>> >>> -- >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> >>> Email: a.stolk at donders.ru.nl >>> >>> Phone: +31(0)243 68294 >>> Web: www.arjenstolk.nl >>> >>> ------------------------------ >>> *From:* Hwee Ling Lee [hweeling.lee at gmail.com] >>> *Sent:* Tuesday, February 17, 2015 10:33 AM >>> *To:* Stolk, A. (Arjen) >>> *Cc:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >>> >>> Dear Arjen, >>> >>> Thanks for the prompt reply. I keep getting an error message when I >>> set up my correlation cluster statistics, and I'm not sure what I could >>> have done wrong. Here's my script: >>> >>> cfg = []; >>> cfg.layout = 'EEG1010.lay'; >>> cfg.neighbours = neighbours; >>> cfg.channel = 'all'; >>> cfg.latency = 'all'; >>> cfg.avgovertime = 'no'; >>> cfg.avgoverchan = 'no'; >>> cfg.avgoverfreq = 'yes'; >>> cfg.parameter = 'powspctrm'; >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'ft_statfun_correlationT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistics = 'maxsum'; >>> cfg.minnbchan = 2; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.025; >>> cfg.numrandomization = 1000; >>> cfg.ivar = 1; >>> cfg.uvar = 1; >>> >>> % design matrices >>> clear design; >>> % change in MMSE score relative to baseline >>> design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 >>> -0.157894737 0.117647059]; >>> design(2,:) = 1:6; >>> cfg.design = design; >>> >>> % for delta band >>> cfg.frequency = [2 4]; >>> [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); >>> [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); >>> >>> Here's the output from Matlab: >>> >>> computing statistic over the frequency range [2.000 4.000] >>> the call to "ft_appendfreq" took 0 seconds >>> the call to "ft_selectdata" took 0 seconds >>> using "ft_statistics_montecarlo" for the statistical testing >>> using "ft_statfun_correlationT" for the single-sample statistics >>> constructing randomized design >>> total number of measurements = 6 >>> total number of variables = 2 >>> number of independent variables = 1 >>> number of unit variables = 1 >>> number of within-cell variables = 0 >>> number of control variables = 0 >>> using a permutation resampling approach >>> repeated measurement in variable 1 over 6 levels >>> number of repeated measurements in each level is 1 1 1 1 1 1 >>> computing a parametric threshold for clustering >>> Error using ft_statfun_correlationT (line 90) >>> Invalid specification of the design array. >>> Error using ft_statistics_montecarlo (line 254) >>> could not determine the parametric critical value >>> for clustering >>> >>> Error in ft_freqstatistics (line 319) >>> [stat, cfg] = statmethod(cfg, dat, cfg.design); >>> >>> Would you please tell what I have done wrong in this case? >>> >>> Thanks! >>> >>> Cheers, >>> Hweeling >>> >>> >>> On 17 February 2015 at 10:18, Stolk, A. (Arjen) >>> wrote: >>> >>>> Hi Hweeling, >>>> >>>> Have a look at the help of ft_statfun_correlationT, which might be the >>>> function you're looking for. This function calculates correlations between >>>> two variables (e.g. subjects' behaviors and brain activities) and converts >>>> the resulting correlation coefficients to t-statistics. >>>> >>>> Best, >>>> arjen >>>> >>>> -- >>>> Donders Institute for Brain, Cognition and Behaviour >>>> Centre for Cognitive Neuroimaging >>>> Radboud University Nijmegen >>>> >>>> Email: a.stolk at donders.ru.nl >>>> >>>> Phone: +31(0)243 68294 >>>> Web: www.arjenstolk.nl >>>> >>>> ------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl [ >>>> fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [ >>>> hweeling.lee at gmail.com] >>>> *Sent:* Tuesday, February 17, 2015 10:06 AM >>>> *To:* FieldTrip discussion list >>>> *Subject:* [FieldTrip] calculating behavioural-power correlation >>>> >>>> >>>> Dear all, >>>> >>>> I read on the "walkthrough" that it is possible to calculate >>>> behavioural-power correlation across subjects. However, I was not sure what >>>> type of descriptive statistics (i.e. cfg.statistics) I should use when >>>> performing correlation cluster statistics. >>>> >>>> Would someone please enlighten me which type of statistics I should >>>> input for cfg.statistics? >>>> >>>> Thanks! >>>> >>>> Best regards, >>>> Hweeling >>>> >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Feb 17 18:03:09 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 17 Feb 2015 18:03:09 +0100 (CET) Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: Message-ID: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "arjen stolk" Cc: "FieldTrip discussion list" Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Wed Feb 18 08:58:51 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 18 Feb 2015 08:58:51 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Message-ID: Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux wrote: > Dear Arjen, dear Hweeling, > > I would be interested in trying this method as well. > > May I ask you how to specify the design matrix? > > For instance if I want to measure the correlation between a TFR-matrix > and some behavioral measure (Y) across participants would something like > this make sense: > > AVG = > powspctrm:[4-D double] > label:{186x1 cell} > freq:[1x49 double] > time:[1x121 double] > dimord: 'subj_chan_freq_time' > cfg:[1x1 stuct] > > > dum = AVG; > dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) > size(AVG.powspctrm,4)]); > %here Y is a vector with the behavioral measure > > cfg = []; > cfg.method = 'montecarlo'; > cfg.parameter = 'powspctrm'; > cfg.statistic = 'ft_statfun_correlationT'; > etc > > cfg.design = []; > cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; > cfg.design(2,:) = [1:length(Y) 1:length(Y)]; > > freq_stat = ft_freqstatistica(cfg,AVG,dum); > > > This, however, results in extremely long computing times, which makes me > doubt that this is the correct way. > > Best, > > Fred > > Frédéric Roux > > ----- Original Message ----- > From: "Hwee Ling Lee" > To: "arjen stolk" > Cc: "FieldTrip discussion list" > Sent: Tuesday, February 17, 2015 5:39:29 PM > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > Thanks! One last question, just to be sure, what is the reference for this > correlation method? I tried to search for your publications but not sure > which one to cite. > > > Cheers, > Hweeling > > > On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: > > > > > > Yes it does. ;) > Arjen > > > -------- Oorspronkelijk bericht -------- > Van: Hwee Ling Lee < hweeling.lee at gmail.com > > Datum: > Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation > > > > Dear Arjen, > > > Thanks! It works well now. > > > I plotted the results using ft_clusterplot, and it only shows the > significant clusters that show significant correlation of power and > behavioural measure, right? Or is there a better way I can display the > results? > > > Thanks again. > > > Cheers, > Hweeling > > > > > > > On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hey Hweeling, > > "Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency?" > > indeed > > "What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect?" > > the walkthough may refer to a GLM-based statistical implementation, for > which the FT implementation differs from the correlationT statfun. Namely, > the former uses the behavioral measure as a regressor in a data model > whereas the latter uses the behavioral measure as a datapoint series for > correlation with another datapoint series (and then converts to a T value). > The correlationT statfun is relatively 'new', hence not yet addressed in > the walkthrough. > > Yours, > arjen > > > > > From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] > on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 11:34 AM > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > > > > Dear Arjen, > > > Thanks for the prompt reply again! > > > Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency? > > > What I'm confused is that in the walkthrough website, under the subsection > on correlation, it is suggested to create the cfg.design with the > behavioural measure that one wants to correlate. So is this information in > the walkthrough website incorrect? > > > Cheers, > Hweeling > > > > > On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hey Hweeling, > > It seems you're only inserting one input variable into the statistics > function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, > sub_LF_c200{:});" > > Could you try something along this line: ft_freqstatistics(cfg, freq1, > freq2) > > where freq1 is the original freq data, and freq2 is a copy of freq but > with the relevant values (say, in powspctrm) replaced with behavior values > (ensure this behavior matrix is matched in terms of size and dimensions to > the original freq values). > > Hope this helps, > Arjen > > > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31 (0)243 68294 > Web: www.arjenstolk.nl > > > From: Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 10:33 AM > To: Stolk, A. (Arjen) > Cc: FieldTrip discussion list > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > > > > Dear Arjen, > > > Thanks for the prompt reply. I keep getting an error message when I set up > my correlation cluster statistics, and I'm not sure what I could have done > wrong. Here's my script: > > > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.neighbours = neighbours; > cfg.channel = 'all'; > cfg.latency = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistics = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 1000; > cfg.ivar = 1; > cfg.uvar = 1; > > > % design matrices > clear design; > % change in MMSE score relative to baseline > design(1,:) = [0.095238095 -0. 045454545 - 0.533333333 0.238095238 > -0.157894737 0.117647059]; > design(2,:) = 1:6; > cfg.design = design; > > > % for delta band > cfg.frequency = [2 4]; > [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); > [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); > > > Here's the output from Matlab: > > > > computing statistic over the frequency range [2.000 4.000] > the call to "ft_appendfreq" took 0 seconds > the call to "ft_selectdata" took 0 seconds > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_correlationT" for the single-sample statistics > constructing randomized design > total number of measurements = 6 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 6 levels > number of repeated measurements in each level is 1 1 1 1 1 1 > computing a parametric threshold for clustering > Error using ft_statfun_correlationT (line 90) > Invalid specification of the design array. > Error using ft_statistics_montecarlo (line 254) > could not determine the parametric critical value > for clustering > > > Error in ft_freqstatistics (line 319) > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Would you please tell what I have done wrong in this case? > > > Thanks! > > > Cheers, > Hweeling > > > > > On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hi Hweeling, > > Have a look at the help of ft_statfun_correlationT, which might be the > function you're looking for. This function calculates correlations between > two variables (e.g. subjects' behaviors and brain activities) and converts > the resulting correlation coefficients to t-statistics. > > Best, > arjen > > > > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31 (0)243 68294 > Web: www.arjenstolk.nl > > > From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] > on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 10:06 AM > To: FieldTrip discussion list > Subject: [FieldTrip] calculating behavioural-power correlation > > > > > > > > > Dear all, > > > I read on the "walkthrough" that it is possible to calculate > behavioural-power correlation across subjects. However, I was not sure what > type of descriptive statistics (i.e. cfg.statistics) I should use when > performing correlation cluster statistics. > > > Would someone please enlighten me which type of statistics I should input > for cfg.statistics? > > > Thanks! > > > Best regards, > Hweeling > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.lee dzne.de > Email 2: hweeling.lee gmail.com > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > > > > -- > > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.lee dzne.de > Email 2: hweeling.lee gmail.com > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Wed Feb 18 10:15:57 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Wed, 18 Feb 2015 10:15:57 +0100 (CET) Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: Message-ID: <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> Hello Hweeling, thanks for sharing these very helpful comments! Cheers, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "Frédéric Roux" Cc: "FieldTrip discussion list" , "arjen stolk" Sent: Wednesday, February 18, 2015 8:58:51 AM Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux < f.roux at bcbl.eu > wrote: Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" < hweeling.lee at gmail.com > To: "arjen stolk" < arjen.stolk at donders.ru.nl > Cc: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0 .533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= From nathanweisz at mac.com Wed Feb 18 23:21:53 2015 From: nathanweisz at mac.com (Nathan Weisz) Date: Wed, 18 Feb 2015 23:21:53 +0100 Subject: [FieldTrip] phd and postdoc opportunities Message-ID: <2F5AAF31-006C-47EF-BA69-B0948C008821@mac.com> FYI. please contact jens blechert directly in case of interest / questions. best, nathan -------------- next part -------------- A non-text attachment was scrubbed... Name: ERCundFWFProjekt.pdf Type: application/pdf Size: 215254 bytes Desc: not available URL: From m.stoica at uke.de Thu Feb 19 11:17:26 2015 From: m.stoica at uke.de (Stoica, Mircea) Date: Thu, 19 Feb 2015 10:17:26 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> References: , <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, you should take a look at ft_statfun_indepsamplesregrT which more often than not gives the same results but with much lower computation times. Best, Mircea Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Frédéric Roux [f.roux at bcbl.eu] Sent: Wednesday, February 18, 2015 10:15 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Hello Hweeling, thanks for sharing these very helpful comments! Cheers, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "Frédéric Roux" Cc: "FieldTrip discussion list" , "arjen stolk" Sent: Wednesday, February 18, 2015 8:58:51 AM Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux < f.roux at bcbl.eu > wrote: Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" < hweeling.lee at gmail.com > To: "arjen stolk" < arjen.stolk at donders.ru.nl > Cc: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0 .533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From stefanwiens at gmail.com Fri Feb 20 16:03:37 2015 From: stefanwiens at gmail.com (Stefan Wiens) Date: Fri, 20 Feb 2015 16:03:37 +0100 Subject: [FieldTrip] ft_topoplotER Message-ID: Hi! I use ft_topoplotER with the following cfg: cfg.highlightcolor = [1 1 1]; The markers are now white on the screen, but when I save the figure as tiff (or any other format), the markers are black. Is this is Matlab 2014b issue? Also, is there a way to fill the markers with a particular color? I think this would be easier to see. Cheers Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Feb 23 04:20:28 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 23 Feb 2015 03:20:28 +0000 Subject: [FieldTrip] Problem with mvaranalysis Message-ID: <1424661627824.86346@flinders.edu.au> Hello fieldtrip, I have come across something that is either a bug or something I am doing wrong, however I am unsure. The error message is as following: Error using .* Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 479) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 385) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in fieldtrip_peak_connectivity (line 164) mdata = ft_mvaranalysis( cfg, data); I had a closer look and it appears as though the tap variable is size 1x501 and tmpdata.trial is [85x500 double]. So on line 479 in catnan, when it asks to multiply a 85x500 matrix by 85x501, it crashes. Apparently I tried submitting this bug before (Bug 2784), but it was rejected. However, I still dont know what Im doing wrong. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66125 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Feb 23 09:00:26 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 23 Feb 2015 08:00:26 +0000 Subject: [FieldTrip] Problem with mvaranalysis In-Reply-To: <1424661627824.86346@flinders.edu.au> References: <1424661627824.86346@flinders.edu.au> Message-ID: <3A384D09-DDB9-4E00-AFDC-4812F326C828@fcdonders.ru.nl> Tyler, Please follow up on this in bug 2784 on bugzilla. This particular bug was ‘rejected’ due to insufficient input from your side. We require your feedback in order to get things solved for you (and just dumping the error message is usually not going to solve it :-) ). It seems you are running into problems regarding this function, and the only one reporting it, so it’s crucial that we get the right intel. Note that I suspect your data structure to contain data epochs that have slightly variable size in the second dimension, i.e. vary in time-length on the order of one sample less or more. The function apparently expects or assumes the epochs to be of equal length, and it initializes some variables based on the length of the first epoch. If this happens to have a length of 501 samples, the code chokes on the next epoch, which has 500 samples. Could you upload (into the bug) a small data structure and a cfg in order for us to reproduce your problem? Jan-Mathijs On Feb 23, 2015, at 4:20 AM, Tyler Grummett > wrote: Hello fieldtrip, I have come across something that is either a bug or something I am doing wrong, however I am unsure. The error message is as following: Error using .* Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 479) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 385) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in fieldtrip_peak_connectivity (line 164) mdata = ft_mvaranalysis( cfg, data); I had a closer look and it appears as though the tap variable is size 1x501 and tmpdata.trial is [85x500 double]. So on line 479 in catnan, when it asks to multiply a 85x500 matrix by 85x501, it crashes. Apparently I tried submitting this bug before (Bug 2784), but it was rejected. However, I still dont know what Im doing wrong. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66125 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Mon Feb 23 11:50:13 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Mon, 23 Feb 2015 11:50:13 +0100 Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence Message-ID: <44fc-54eb0600-5-346af640@146761187> Dear Fieldtrippers Here the introduction to my problem (I hope I can make myself clear): I am doing a connectivity analysis (partial directed coherence) and obtain as a result following array: connectivity = label:{51x1} dimord: 'chan_chan_freq' pdcspctrm: [51x51x101] freq: [1x101 double] cfg: [1x1 struct] I have 51 channels in my analysis. I want to find out the outflow from frontal to parietal regions. So what I did next was defining which channels belong to frontal and which to parietal regions (note: the sensor layout of the sensor net is really random), e.g.: Frontal = { 'E5' 'E6' 'E197' 'E198'} Parietal = { 'E77' 'E78' 'E89' 'E163'} Next step: find outflow from each Frontal to each Parietal channels In order to do this I need to look in "connectivity.pdspctrm" for the pdc value: find all the channels in "Frontal" and "Parietal" in the original "connectivity" in order to find there the corresponding pdc values: "frontal" is a vector with indices of the channels in the connectivity.label channel list (same with "parietal") frontal = zeros(4,1) for l=1:4 channelposition = find(ismember(connectivity.label, Frontal{l}) == 1); if isfinite(channelposition); if isfinite (ismember(connectivity.label, Frontal{l}) == 1, frontal (l,1) = find(ismember(connectivity.label, Frontal{l}) ==1); else frontal(l,1) = NaN; end else end end I get: frontal = 1 2 10 11 parietal = zeros(4,1) for l=1:4 channelposition = find(ismember(connectivity.label, Parietal {l}) == 1); if isfinite(channelposition); if isfinite (ismember(connectivity.label, Parietal{l}) == 1, parietal (l,1) = find(ismember(connectivity.label, Parietal{l}) ==1); else parietal(l,1) = NaN; end else end end I get: parietal = 9 14 20 31 If I want to know now the outflow from E5 to E77 i would have to enter this as follows: Outflow = connectivity.pdcsptrm(1,9,5) %5 is here just an example for the frequency of interest and I would get a value, e.g. ans = 0.567 (This worked totally fine!) >>>>>>>>>>>>>Now my Problem: <<<<<<<<<<<<<< I don't want to know the outflow from a single electrode to another, but the average outflow from frontal to parietal for the whole Alpha frequencyband: So my line of code would look like this: Outflow = connectivity.pdcspctrm(frontal',parietal',5:16) I tried eval (eventhough it is not elegant, but it's the only thing I could think about that might work): Outflow = eval ([ 'mean(mean(mean(connectivity.pdcspctrm(' num2str(frontal') ',' num2str(parietal'), 5:16))))' ]) When I enter it as follows: Outflow = mean(mean(mean(connectivity.pdcspctrm([1 2 10 11], [9 14 20 31], 5:16)))) it works fine. But the vectors frontal and parietal will contain upt to 30 indices each, so typing them is not an option. I tried everything else I could think of (different parethesis etc.). Maybe someone can help me out here?? Thanks a lot!! From jorn at artinis.com Mon Feb 23 12:06:25 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 23 Feb 2015 12:06:25 +0100 Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence In-Reply-To: <44fc-54eb0600-5-346af640@146761187> References: <44fc-54eb0600-5-346af640@146761187> Message-ID: <002501d04f58$c4fa03a0$4eee0ae0$@artinis.com> HI Barbara, I hope I followed all of your mail. I think this should work: >> mean(mean(mean(connectivity.pdcspctrm(frontal(:), parietal(:), 5:16), 1), 2), 3) This first averages over the frontal channels, then over the parietal channels, then over frequencies. You get into troubles with your nana solution though, so you might need to use something like frontal(~isnan(frontal(:, 1)), :) = []; to get rid of these. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems  |  +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Barbara Schorr > Sent: Monday, February 23, 2015 11:50 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence > > Dear Fieldtrippers > > > > Here the introduction to my problem (I hope I can make myself clear): > > I am doing a connectivity analysis (partial directed coherence) and obtain as a > result following array: > > > > connectivity = > > label:{51x1} > dimord: 'chan_chan_freq' > pdcspctrm: [51x51x101] > freq: [1x101 double] > cfg: [1x1 struct] > > > > > I have 51 channels in my analysis. I want to find out the outflow from frontal > to parietal regions. > So what I did next was defining which channels belong to frontal and which > to parietal regions (note: the sensor layout of the sensor net is really > random), e.g.: > > > > Frontal = { 'E5' 'E6' 'E197' 'E198'} > Parietal = { 'E77' 'E78' 'E89' 'E163'} > > > > > Next step: find outflow from each Frontal to each Parietal channels > > > In order to do this I need to look in "connectivity.pdspctrm" for the pdc > value: > > find all the channels in "Frontal" and "Parietal" in the original "connectivity" in > order to find there the corresponding pdc values: > > > "frontal" is a vector with indices of the channels in the connectivity.label > channel list (same with "parietal") > > frontal = zeros(4,1) > > for l=1:4 > channelposition = find(ismember(connectivity.label, Frontal{l}) == 1); > if isfinite(channelposition); > > if isfinite (ismember(connectivity.label, Frontal{l}) == 1, frontal (l,1) = > find(ismember(connectivity.label, Frontal{l}) ==1); else frontal(l,1) = NaN; > end > > else > end > end > > > > I get: frontal = > > 1 > 2 > 10 > 11 > > parietal = zeros(4,1) > > for l=1:4 > channelposition = find(ismember(connectivity.label, Parietal {l}) == 1); > if isfinite(channelposition); > > if isfinite (ismember(connectivity.label, Parietal{l}) == 1, parietal (l,1) = > find(ismember(connectivity.label, Parietal{l}) ==1); else parietal(l,1) = NaN; > end > > else > end > end > > > > I get: parietal = > > 9 > 14 > 20 > 31 > > > If I want to know now the outflow from E5 to E77 i would have to enter this > as follows: > > Outflow = connectivity.pdcsptrm(1,9,5) %5 is here just an example for the > frequency of interest > > and I would get a value, e.g. > > ans = 0.567 > > (This worked totally fine!) > > > > > >>>>>>>>>>>>>Now my Problem: <<<<<<<<<<<<<< > > I don't want to know the outflow from a single electrode to another, but the > average outflow from frontal to parietal for the whole Alpha frequencyband: > > So my line of code would look like this: > > > Outflow = connectivity.pdcspctrm(frontal',parietal',5:16) > > > > I tried eval (eventhough it is not elegant, but it's the only thing I could think > about that might work): > > > > Outflow = eval ([ 'mean(mean(mean(connectivity.pdcspctrm(' > num2str(frontal') ',' num2str(parietal'), 5:16))))' ]) > > > When I enter it as follows: > > Outflow = mean(mean(mean(connectivity.pdcspctrm([1 2 10 11], [9 14 20 > 31], 5:16)))) > > it works fine. > > > > But the vectors frontal and parietal will contain upt to 30 indices each, so > typing them is not an option. > > I tried everything else I could think of (different parethesis etc.). > > Maybe someone can help me out here?? > > Thanks a lot!! > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m_wink10 at uni-muenster.de Mon Feb 23 17:00:48 2015 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Mon, 23 Feb 2015 17:00:48 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS Message-ID: Dear Fieldtrippers, we encountered a problem during our DICS Beamformer-Statistics. After calculating a beamformer (DICS), normalisation and building grandaverages across subjects (here exemplarily 3 subjects) we try to calculate cluster based permutation statistic (in this study: between groups - one condition). The code we used is as follows: cfg = []; cfg.method = 'montecarlo'; %cfg.statistic = 'depsamplesT'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; %ft default 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; %ft hat hier 0,025 cfg.parameter = 'pow'; cfg.dim = grandavgA.dim; cfg.numrandomization = 1; % number of draws from the permutation distribution design(1,:) = [1 1 1 2 2 2]; design(2,:) = [1 1 1 1 1 1]; cfg.design = design; cfg.ivar = 1; stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); The input data structure (grandavgA, grandavgB) is as follows: grandavgA = pow: [3x116380 double] dim: [46 55 46] inside: [116380x1 logical] pos: [116380x3 double] cfg: [1x1 struct] grandavgB = pow: [3x116380 double] dim: [46 55 46] inside: [116380x1 logical] pos: [116380x3 double] cfg: [1x1 struct] Fieldtrip version: current (02/23/2015) Thanks, Martin -- M.Sc. Martin Winkels Universitätsklinikum Münster Institut für Biomagnetismus & Biosignalanalyse Malmedyweg 15 48149 Münster GERMANY Telefon: +49 251 83 56 846 Web: http://biomag.uni-muenster.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Mon Feb 23 17:14:48 2015 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 23 Feb 2015 17:14:48 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS In-Reply-To: References: Message-ID: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> Dear Martin, what kind of machine are you using? Did you interpolate your data to an MRI? What is your grid resolution? You have quite a high number of grid points that you want to compare. So in case you run out of memory, I'd suggest not interpolating to an MRI (in case you have done this) but to stay on the grid-point level for your stats. Otherwise, you could use a less dense grid which obviously results in smaller data structures. Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 23.02.2015 um 17:00 schrieb Martin Winkels: > Dear Fieldtrippers, > > we encountered a problem during our DICS Beamformer-Statistics. > > After calculating a beamformer (DICS), normalisation and building grandaverages across subjects (here exemplarily 3 subjects) we try to calculate cluster based permutation statistic (in this study: between groups - one condition). > > The code we used is as follows: > > cfg = []; > > cfg.method = 'montecarlo'; > %cfg.statistic = 'depsamplesT'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; %ft default 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; %ft hat hier 0,025 > > cfg.parameter = 'pow'; > cfg.dim = grandavgA.dim; > > cfg.numrandomization = 1; % number of draws from the permutation distribution > > design(1,:) = [1 1 1 2 2 2]; > design(2,:) = [1 1 1 1 1 1]; > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); > > > > The input data structure (grandavgA, grandavgB) is as follows: > > grandavgA = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > grandavgB = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > > Fieldtrip version: current (02/23/2015) > > > Thanks, Martin > > -- > > M.Sc. Martin Winkels > > Universitätsklinikum Münster > > Institut für Biomagnetismus & Biosignalanalyse > > Malmedyweg 15 > > 48149 Münster > > GERMANY > > > Telefon: +49 251 83 56 846 > > Web: http://biomag.uni-muenster.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From lysne at unm.edu Mon Feb 23 18:37:04 2015 From: lysne at unm.edu (Per Arnold Lysne) Date: Mon, 23 Feb 2015 17:37:04 +0000 Subject: [FieldTrip] ft_megrealign with source localization? Message-ID: <1424713017019.6820@unm.edu> Hello All, Apologies for reintroducing a question which has previously been covered: that of using ft_megrealign on data which is intended for use in MEG source localization. My understanding is that this algorithm changes the covariance structure between the channels in such a way that localizations may be unstable afterwards (http://mailman.science.ru.nl/pipermail/fieldtrip/2012-May/005231.html). Additionally, the handful of published works using ft_megrealign appear to all be sensor-level analyses (5-6 unique results for "ft_megrealign" from google scholar). Nonetheless, I am trying to develop a group procedure for the tf_mixed_norm sparse localization algorithm in MNE-Python (Gramfort et al. 2013) , and it would be enormously beneficial to have the subjects "virtualized" onto a common head position (and shape, but this problem might also be solved separately) so that their sensor-level measurement data could be combined into a grand average prior to localization. So my questions are, how detrimental might the ft_megrealign algorithm be expected to be to source localization, particularly a sparse localization such as the one I am using? In my application a minor loss of precision would be acceptable, but the localizations need to remain generally correct. Does anyone know of an alternative way to achieve "virtualized" data in a common head position that might be more suitable? (I also need to avoid the assumption of temporal stationarity.) Thank you for your help, Per Lysne University of New Mexico -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Mon Feb 23 20:52:10 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Mon, 23 Feb 2015 21:52:10 +0200 Subject: [FieldTrip] problems with ft_read_data Message-ID: Hello Fieldtrippers, I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. While running ft_read_data on an mff, I've encounter following bug index exceeds matrix dimensions. Error in ft_read_data (line 787) dat{end} = dat{end}(:,begsel:endsel); Data sampling is 1000 hz. Would appreciate your help. If any further information is needed, please ask me. Thanks, -- Shlomit Beker, PhD Postdoctoral fellow, Nir lab Sackler Faculty of Medicine Tel Aviv University -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Mon Feb 23 21:09:15 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Mon, 23 Feb 2015 15:09:15 -0500 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: References: Message-ID: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> Hi Shlomit, I have a feeling that your file ends before your post sample. For example, if your trial definition has .2 ms pre and 1.0 post, you don't have 1000 samples after your last event. You can use ft_read_event to confirm. Best, Raquel Sent from my iPhone > On Feb 23, 2015, at 2:52 PM, shlomit beker wrote: > > Hello Fieldtrippers, > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. > > While running ft_read_data on an mff, I've encounter following bug > > index exceeds matrix dimensions. > > Error in ft_read_data (line 787) > dat{end} = dat{end}(:,begsel:endsel); > > Data sampling is 1000 hz. > Would appreciate your help. If any further information is needed, please ask me. > > Thanks, > > -- > Shlomit Beker, PhD > Postdoctoral fellow, Nir lab > Sackler Faculty of Medicine > Tel Aviv University > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Mon Feb 23 22:00:33 2015 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Mon, 23 Feb 2015 23:00:33 +0200 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> References: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> Message-ID: <4077A3AD-A067-436A-BA49-1F3008DF7F42@gmail.com> Hi Raquel, Thanks for the response. I run ft_read_data before and segmentation to trials. I just want to read the raw data in a matrix. Do you have any other ideas? Thanks! Shlomit ‫ב-23 בפבר 2015, בשעה 22:09, ‏Raquel Bibi כתב/ה:‬ > Hi Shlomit, > I have a feeling that your file ends before your post sample. For example, if your trial definition has .2 ms pre and 1.0 post, you don't have 1000 samples after your last event. You can use ft_read_event to confirm. > > Best, > > Raquel > > Sent from my iPhone > >> On Feb 23, 2015, at 2:52 PM, shlomit beker wrote: >> >> Hello Fieldtrippers, >> >> I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. >> >> While running ft_read_data on an mff, I've encounter following bug >> >> index exceeds matrix dimensions. >> >> Error in ft_read_data (line 787) >> dat{end} = dat{end}(:,begsel:endsel); >> >> Data sampling is 1000 hz. >> Would appreciate your help. If any further information is needed, please ask me. >> >> Thanks, >> >> -- >> Shlomit Beker, PhD >> Postdoctoral fellow, Nir lab >> Sackler Faculty of Medicine >> Tel Aviv University >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From kumar at cbs.mpg.de Tue Feb 24 15:33:15 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Tue, 24 Feb 2015 15:33:15 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> Hello fieldtrippers, I have a question which I could not find has been answered. I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) I am using mne to localize the source. The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. Code: %% load MRI data %%%%%%%% mri = ft_read_mri('Subject01.mri'); % convert the coordinate system mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni mri.coordsys = 'mni'; %% Volume segmentation %%%%%%%% cfg = []; cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); % it takes some time. %% creating the head model %%%%%%%% cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, seg); %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% %load elec_new cfg = []; cfg.method = 'interactive'; cfg.elec = elec_new; cfg.headshape = vol.bnd(3); elec_aligned = ft_electroderealign(cfg); %% make grid %%%%%%%% cfg = []; cfg.vol = vol; cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution cfg.grid.unit = 'cm'; grid = ft_prepare_leadfield(cfg); % %%%%%%%% Check the full model %%%%%%% % grid.pos = grid.pos * 10; % elec_aligned.chanpos = elec_aligned.chanpos*100; % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% source analysis %%%%%%%% cfg = []; cfg.method = 'mne'; cfg.vol = vol; cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; cfg.grid = grid; cfg.mne.lambda = 3; cfg.mne.prewhiten = 'yes'; cfg.mne.scalesourcecov = 'yes'; source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data %% Interpolation of the localized source with the mri %%%%%%%% mri_reslice = ft_volumereslice([],mri); cfg=[]; cfg.parameter = 'pow'; source_int = ft_sourceinterpolate(cfg, source, mri_reslice); %% Visualization (Orthogonal plot) %%%%%%%% cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'pow'; cfg.funcolormap = 'jet'; cfg.maskparameter = cfg.funparameter; ft_sourceplot(cfg, source_int_admit); % (figure attached) ---------------------------------------------------- Thanks for your time, Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig -------------- next part -------------- A non-text attachment was scrubbed... Name: 03 PM.jpg Type: image/jpeg Size: 228015 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Tue Feb 24 15:41:30 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 24 Feb 2015 15:41:30 +0100 Subject: [FieldTrip] source localization only at the edges In-Reply-To: References: Message-ID: Dear Saurabh, Without having gone through the details of your code, my hunch is that this has something to do with the units (m/cm/mm) of your geometrical objects (electrode/gradiometer description, volume conduction model, source model). You could explicitly convert them all to the same using ft_convert_units([data.grad|vol|source], 'm') and then try again, perhaps that helps? Best, Eelke On 24 February 2015 at 15:33, Saurabh Kumar wrote: > Hello fieldtrippers, > > I have a question which I could not find has been answered. > I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) > > I am using mne to localize the source. > The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. > > Code: > > %% load MRI data %%%%%%%% > mri = ft_read_mri('Subject01.mri'); > % convert the coordinate system > mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni > mri.coordsys = 'mni'; > > > %% Volume segmentation %%%%%%%% > cfg = []; > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); % it takes some time. > > > %% creating the head model %%%%%%%% > cfg = []; > cfg.method ='bemcp'; > vol = ft_prepare_headmodel(cfg, seg); > > > %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% > %load elec_new > cfg = []; > cfg.method = 'interactive'; > cfg.elec = elec_new; > cfg.headshape = vol.bnd(3); > elec_aligned = ft_electroderealign(cfg); > > %% make grid %%%%%%%% > cfg = []; > cfg.vol = vol; > cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; > cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution > cfg.grid.unit = 'cm'; > grid = ft_prepare_leadfield(cfg); > > > > % %%%%%%%% Check the full model %%%%%%% > % grid.pos = grid.pos * 10; > % elec_aligned.chanpos = elec_aligned.chanpos*100; > % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); > % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > > %% source analysis %%%%%%%% > cfg = []; > cfg.method = 'mne'; > cfg.vol = vol; > cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; > cfg.grid = grid; > cfg.mne.lambda = 3; > cfg.mne.prewhiten = 'yes'; > cfg.mne.scalesourcecov = 'yes'; > source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data > > %% Interpolation of the localized source with the mri %%%%%%%% > mri_reslice = ft_volumereslice([],mri); > cfg=[]; > cfg.parameter = 'pow'; > source_int = ft_sourceinterpolate(cfg, source, mri_reslice); > > %% Visualization (Orthogonal plot) %%%%%%%% > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'pow'; > cfg.funcolormap = 'jet'; > cfg.maskparameter = cfg.funparameter; > ft_sourceplot(cfg, source_int_admit); % (figure attached) > > > > > ---------------------------------------------------- > Thanks for your time, > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig From kumar at cbs.mpg.de Tue Feb 24 16:13:10 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Tue, 24 Feb 2015 16:13:10 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <1761066429.1447014.1424790790305.JavaMail.zimbra@cbs.mpg.de> Dear Eelke I checked again the units of mri, leadfield, electrode positions and the volume and all seem to be in harmony. I also think that even though you dont specify them explicitely they are adjusted to a common one as the results remain exactly the same as I just checked. Do you have any idea what else could be the problem? ---------------------------------------------------- Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig From m_wink10 at uni-muenster.de Tue Feb 24 22:57:00 2015 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Tue, 24 Feb 2015 22:57:00 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS In-Reply-To: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> References: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> Message-ID: Hey Julian, thanks for the answer. We are using some sort of an Intel iCore i7 with 16 GB of RAM as well as 40 GB of swap and Fedora 16. We do interpolate the data on an MRI. In fact I'm not sure if that is the source of the problem. We downsampled the data and it did not change anything. The problem seems to be that there is a number generated that is too big for MATLAB to process it with the zeros(x) instruction. Around 1-2 years ago I did nearly the same thing in fieldtrip but including an LCMV-Beamformer, the resulting data structures where much bigger and it worked without a problem. Thanks, Martin On Mon, Feb 23, 2015 at 5:14 PM, Julian Keil wrote: > Dear Martin, > > what kind of machine are you using? > Did you interpolate your data to an MRI? > What is your grid resolution? > > You have quite a high number of grid points that you want to compare. > So in case you run out of memory, I'd suggest not interpolating to an MRI > (in case you have done this) but to stay on the grid-point level for your > stats. Otherwise, you could use a less dense grid which obviously results > in smaller data structures. > > Good luck, > > Julian > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 23.02.2015 um 17:00 schrieb Martin Winkels: > > Dear Fieldtrippers, > > we encountered a problem during our DICS Beamformer-Statistics. > > After calculating a beamformer (DICS), normalisation and building > grandaverages across subjects (here exemplarily 3 subjects) we try to > calculate cluster based permutation statistic (in this study: between > groups - one condition). > > The code we used is as follows: > > cfg = []; > > cfg.method = 'montecarlo'; > %cfg.statistic = 'depsamplesT'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; %ft default 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; %ft hat hier 0,025 > > cfg.parameter = 'pow'; > cfg.dim = grandavgA.dim; > > cfg.numrandomization = 1; % number of draws from the > permutation distribution > > design(1,:) = [1 1 1 2 2 2]; > design(2,:) = [1 1 1 1 1 1]; > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); > > > > The input data structure (grandavgA, grandavgB) is as follows: > > grandavgA = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > grandavgB = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > > Fieldtrip version: current (02/23/2015) > > > Thanks, Martin > > -- > > M.Sc. Martin Winkels > > Universitätsklinikum Münster > > Institut für Biomagnetismus & Biosignalanalyse > > Malmedyweg 15 > > 48149 Münster > > GERMANY > > > Telefon: +49 251 83 56 846 > Web: http://biomag.uni-muenster.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Wed Feb 25 14:22:30 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 25 Feb 2015 13:22:30 +0000 Subject: [FieldTrip] source localization only at the edges Message-ID: I would like to see an answer to this also. I am in the middle of Œbeginning¹ to use FT for mne and eloreta. I had the same issue, and then used ³depth normalization², since mne tends to have only surface results. I read on the www (google mne depth normalization) that this might be an issue, and tried: cfg.normalizeparam=5; cfg.normalize='yes'; I got Œdepth¹ results to my mne¹s and eloreta solutions, though I am not sure if I have accurate results. I can¹t find any use of these in the examples. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** On 2/25/15, 6:00 AM, "fieldtrip-request at science.ru.nl" wrote: >Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > >To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > >You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of fieldtrip digest..." > > >Today's Topics: > > 1. Re: source localization only at the edges (Eelke Spaak) > 2. source localization only at the edges (Saurabh Kumar) > 3. Re: ft_clusterstat OUT OF MEMORY - DICS (Martin Winkels) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Tue, 24 Feb 2015 15:41:30 +0100 >From: Eelke Spaak >To: FieldTrip discussion list >Subject: Re: [FieldTrip] source localization only at the edges >Message-ID: > >Content-Type: text/plain; charset=UTF-8 > >Dear Saurabh, > >Without having gone through the details of your code, my hunch is that >this has something to do with the units (m/cm/mm) of your geometrical >objects (electrode/gradiometer description, volume conduction model, >source model). You could explicitly convert them all to the same using >ft_convert_units([data.grad|vol|source], 'm') and then try again, >perhaps that helps? > >Best, >Eelke > >On 24 February 2015 at 15:33, Saurabh Kumar wrote: >> Hello fieldtrippers, >> >> I have a question which I could not find has been answered. >> I am doing source localization for my data and the problem is that no >>matter the data, (even random numbers) the source always comes out at >>the edges of the mri. (Figure attached) >> >> I am using mne to localize the source. >> The code in short is attached below which I use. Please have a look and >>lemme know if you find something that can be changed. >> >> Code: >> >> %% load MRI data %%%%%%%% >> mri = ft_read_mri('Subject01.mri'); >> % convert the coordinate system >> mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system >>from the ctf into the mni >> mri.coordsys = 'mni'; >> >> >> %% Volume segmentation %%%%%%%% >> cfg = []; >> cfg.output = {'brain','skull','scalp'}; >> seg = ft_volumesegment(cfg, mri); % it takes some time. >> >> >> %% creating the head model %%%%%%%% >> cfg = []; >> cfg.method ='bemcp'; >> vol = ft_prepare_headmodel(cfg, seg); >> >> >> %% setting the electrodes (have checked the electrodes are in correct >>positions) %%%%%%%% >> %load elec_new >> cfg = []; >> cfg.method = 'interactive'; >> cfg.elec = elec_new; >> cfg.headshape = vol.bnd(3); >> elec_aligned = ft_electroderealign(cfg); >> >> %% make grid %%%%%%%% >> cfg = []; >> cfg.vol = vol; >> cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; >> cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution >> cfg.grid.unit = 'cm'; >> grid = ft_prepare_leadfield(cfg); >> >> >> >> % %%%%%%%% Check the full model %%%%%%% >> % grid.pos = grid.pos * 10; >> % elec_aligned.chanpos = elec_aligned.chanpos*100; >> % ft_plot_mesh(grid.pos(grid.inside,:));hold >>on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold >>on; ft_plot_sens(elec_aligned); >> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> >> >> >> >> %% source analysis %%%%%%%% >> cfg = []; >> cfg.method = 'mne'; >> cfg.vol = vol; >> cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; >> cfg.grid = grid; >> cfg.mne.lambda = 3; >> cfg.mne.prewhiten = 'yes'; >> cfg.mne.scalesourcecov = 'yes'; >> source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data >> >> %% Interpolation of the localized source with the mri %%%%%%%% >> mri_reslice = ft_volumereslice([],mri); >> cfg=[]; >> cfg.parameter = 'pow'; >> source_int = ft_sourceinterpolate(cfg, source, mri_reslice); >> >> %% Visualization (Orthogonal plot) %%%%%%%% >> cfg = []; >> cfg.method = 'ortho'; >> cfg.funparameter = 'pow'; >> cfg.funcolormap = 'jet'; >> cfg.maskparameter = cfg.funparameter; >> ft_sourceplot(cfg, source_int_admit); % (figure attached) >> >> >> >> >> ---------------------------------------------------- >> Thanks for your time, >> Saurabh Kumar >> >> Cognitive Neurology >> Max Planck Institute >> for Human Cognitive and Brain Sciences >> Stephanstr. 1a >> 04103 Leipzig > > >------------------------------ > >Message: 2 >Date: Tue, 24 Feb 2015 16:13:10 +0100 (CET) >From: Saurabh Kumar >To: fieldtrip >Subject: [FieldTrip] source localization only at the edges >Message-ID: > <1761066429.1447014.1424790790305.JavaMail.zimbra at cbs.mpg.de> >Content-Type: text/plain; charset=utf-8 > >Dear Eelke > >I checked again the units of mri, leadfield, electrode positions and the >volume and all seem to be in harmony. >I also think that even though you dont specify them explicitely they are >adjusted to a common one as the results remain exactly the same as I just >checked. > >Do you have any idea what else could be the problem? > >---------------------------------------------------- >Saurabh Kumar > >Cognitive Neurology >Max Planck Institute >for Human Cognitive and Brain Sciences >Stephanstr. 1a >04103 Leipzig > > >------------------------------ > >Message: 3 >Date: Tue, 24 Feb 2015 22:57:00 +0100 >From: Martin Winkels >To: FieldTrip discussion list >Subject: Re: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Hey Julian, > >thanks for the answer. > >We are using some sort of an Intel iCore i7 with 16 GB of RAM as well as >40 >GB of swap and Fedora 16. > >We do interpolate the data on an MRI. In fact I'm not sure if that is the >source of the problem. We downsampled the data and it did not change >anything. The problem seems to be that there is a number generated that is >too big for MATLAB to process it with the zeros(x) instruction. > >Around 1-2 years ago I did nearly the same thing in fieldtrip but >including >an LCMV-Beamformer, the resulting data structures where much bigger and it >worked without a problem. > >Thanks, Martin > >On Mon, Feb 23, 2015 at 5:14 PM, Julian Keil >wrote: > >> Dear Martin, >> >> what kind of machine are you using? >> Did you interpolate your data to an MRI? >> What is your grid resolution? >> >> You have quite a high number of grid points that you want to compare. >> So in case you run out of memory, I'd suggest not interpolating to an >>MRI >> (in case you have done this) but to stay on the grid-point level for >>your >> stats. Otherwise, you could use a less dense grid which obviously >>results >> in smaller data structures. >> >> Good luck, >> >> Julian >> >> ******************** >> *Dr. Julian Keil* >> >> AG Multisensorische Integration >> Psychiatrische Universit?tsklinik >> der Charit? im St. Hedwig-Krankenhaus >> Gro?e Hamburger Stra?e 5-11, Raum E 307 >> 10115 Berlin >> >> Telefon: +49-30-2311-1879 >> Fax: +49-30-2311-2209 >> >> >>http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integr >>ation >> >> Am 23.02.2015 um 17:00 schrieb Martin Winkels: >> >> Dear Fieldtrippers, >> >> we encountered a problem during our DICS Beamformer-Statistics. >> >> After calculating a beamformer (DICS), normalisation and building >> grandaverages across subjects (here exemplarily 3 subjects) we try to >> calculate cluster based permutation statistic (in this study: between >> groups - one condition). >> >> The code we used is as follows: >> >> cfg = []; >> >> cfg.method = 'montecarlo'; >> %cfg.statistic = 'depsamplesT'; >> cfg.statistic = 'ft_statfun_indepsamplesT'; >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; %ft default 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; %ft hat hier 0,025 >> >> cfg.parameter = 'pow'; >> cfg.dim = grandavgA.dim; >> >> cfg.numrandomization = 1; % number of draws from the >> permutation distribution >> >> design(1,:) = [1 1 1 2 2 2]; >> design(2,:) = [1 1 1 1 1 1]; >> >> cfg.design = design; >> cfg.ivar = 1; >> >> stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); >> >> >> >> The input data structure (grandavgA, grandavgB) is as follows: >> >> grandavgA = >> >> pow: [3x116380 double] >> dim: [46 55 46] >> inside: [116380x1 logical] >> pos: [116380x3 double] >> cfg: [1x1 struct] >> >> grandavgB = >> >> pow: [3x116380 double] >> dim: [46 55 46] >> inside: [116380x1 logical] >> pos: [116380x3 double] >> cfg: [1x1 struct] >> >> >> Fieldtrip version: current (02/23/2015) >> >> >> Thanks, Martin >> >> -- >> >> M.Sc. Martin Winkels >> >> Universit?tsklinikum M?nster >> >> Institut f?r Biomagnetismus & Biosignalanalyse >> >> Malmedyweg 15 >> >> 48149 M?nster >> >> GERMANY >> >> >> Telefon: +49 251 83 56 846 >> Web: http://biomag.uni-muenster.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >a249f/attachment-0001.html> > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 51, Issue 24 >***************************************** From r.oostenveld at donders.ru.nl Wed Feb 25 17:57:43 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 25 Feb 2015 17:57:43 +0100 Subject: [FieldTrip] job opportunities at NeuroSpin, France References: Message-ID: Dear FieldTrip users On behalf of Aaron Schurger, please find below a number of opportunities for MSc, PhD and PostDoc positions at NeuroSpin. best regards, Robert Contact information: Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ ----------------------------------------------------------------------------- Masters and PhD positions in cognitive neuroscience Neural antecedents of spontaneous self-initiated movement in humans and the perception of personal causation Starting date: Fall 2015 or Spring 2016 Duration: 3 years for PhD, 1 or 2 years for masters The French Institute of Health and Medical Research (INSERM) invites applications for masters and PhD positions in the Cognitive Neuroimaging Group, at the NeuroSpin Research Center near Paris, France, as part of the research team of Dr. Aaron Schurger. The Schurger lab focuses on understanding how decisions are made and actions initiated spontaneously, without an external sensory cue, and how the relevant causal processes in the brain are related to the subjective perception of personal causation and societal concepts of personal responsibility. We pursue this research using a combination of behavioral experiments, neuroimaging, computational modeling, and machine learning techniques. There are no specific requirements other than a bachelors degree (for masters applicants) and a masters degree (for PhD applicants) in a relevant discipline. Previous research experience is a plus. Skills used in the lab include: computer programming (MatLab, Python, C, C++), statistics, signal processing, computational and neural network modeling, neuroimaging techniques (EEG, MEG, fMRI) and data-analysis software tools, behavioral psychophysics. Resources available at NeuroSpin include Siemens 3T and 7T MRI scanners; high-density EEG (EGI Inc.); Elekta NeuroMag 306-channel MEG (allowing for the simultaneous recording of EEG); eye tracking (available for MRI, MEG, and behavioral experiments); an in-house team of experts in signal processing and statistical learning; a dedicated staff handling subject recruitment, scheduling, and payment; various Nespresso devices; and proximity to Paris. The salary is highly competitive. Applicants should send a CV, letter of motivation (max 2 pages), and three letters of recommendation via e-mail to aaron.schurger at gmail.com. Review of applicants will begin on the 1st of April, 2015, and will continue until the positions are filled. The NeuroSpin Research Center is located on the campus of the CEA-Saclay, near Orsay, about 18 km southwest of Paris. For more information on the NeuroSpin Research Center and the Cognitive Neuroimaging Group: http://www-centre-saclay.cea.fr/fr/Visite-guidee-de-NeuroSpin http://meg-france.in2p3.fr/_lesCentres/Neurospin_en.php http://www-dsv.cea.fr/en/institutes/institute-of-biomedical-imaging-i2bm/departments/neurospin-neurospin http://www.unicog.org/pm/pmwiki.php ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Post-doctoral position in cognitive neuroscience Neural antecedents of spontaneous self-initiated movement in humans and the perception of personal causation Starting date: Fall 2015 or Spring 2016 Duration: 2 years (renewable for one additional year) The French Institute of Health and Medical Research (INSERM) invites applications for a post-doctoral position in the Cognitive Neuroimaging Group, at the NeuroSpin Research Center near Paris, France, as part of the research team of Dr. Aaron Schurger. The Schurger lab focuses on understanding how decisions are made and actions initiated spontaneously, without an external sensory cue, and how the relevant causal processes in the brain are related to the subjective perception of personal causation and societal concepts of personal responsibility. We pursue this research using a combination of behavioral experiments, neuroimaging, computational modeling, and machine learning techniques. Applicants should have a obtained a PhD in a relevant discipline prior to the starting date, and should have strong skills in at least some of the following areas: computer programming (MatLab, Python, C, C++), statistics, signal processing, computational and neural network modeling, neuroimaging techniques (EEG, MEG, fMRI) and data-analysis tools, behavioral psychophysics. Resources available at NeuroSpin include Siemens 3T and 7T MRI scanners; high-density EEG (EGI Inc.); Elekta NeuroMag 306-channel MEG (allowing for the simultaneous recording of EEG); eye tracking (available for MRI, MEG, and behavioral experiments); an in-house team of experts in signal processing and statistical learning; a dedicated staff handling subject recruitment, scheduling, and payment; various Nespresso devices; and proximity to Paris. The salary is highly competitive, being aligned with that offered by Marie Curie fellowships. Applicants should send a CV, letter of motivation (max 2 pages), and three letters of recommendation via e-mail to aaron.schurger at gmail.com. Review of applicants will begin on April 1, 2015, and will continue until the positions are filled. The NeuroSpin Research Center is located on the campus of the CEA-Saclay, near Orsay, about 18 km southwest of Paris. For more information on the NeuroSpin Research Center and the Cognitive Neuroimaging Group: http://www-centre-saclay.cea.fr/fr/Visite-guidee-de-NeuroSpin http://meg-france.in2p3.fr/_lesCentres/Neurospin_en.php http://www-dsv.cea.fr/en/institutes/institute-of-biomedical-imaging-i2bm/departments/neurospin-neurospin http://www.unicog.org/pm/pmwiki.php ----------------------------------------------------------------------------- From jim.mckay at candoosys.com Wed Feb 25 22:40:23 2015 From: jim.mckay at candoosys.com (Jim McKay) Date: Wed, 25 Feb 2015 13:40:23 -0800 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit Message-ID: <54EE4147.9090408@candoosys.com> Hello Fieldtrippers, I am consulting with the Sandia Labs on development of an atomic magnetometer based MEG system prototype. One of the areas I am working on is head localization, so I was looking at the code for the realtime head localization in Fieldtrip. I was surprised to see that although the comments talk about using a magnetic dipole forward solution, it actually used the FT dipolefit code which is based on an equivalent current dipole, as far as I can tell. There should be a significant difference in the forward solutions between MD and ECD, so how does this work? Or am I just missing something? Cheers, Jim -- Jim McKay Candoo Systems Inc. - Magnetic field sensors, systems, and site surveys Tel. 778-840-0361 jim.mckay at candoosys.com www.candoosys.com From tyler.grummett at flinders.edu.au Thu Feb 26 00:40:29 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 25 Feb 2015 23:40:29 +0000 Subject: [FieldTrip] source localization only at the edges In-Reply-To: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> References: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> Message-ID: Hello :) I've come across this issue myself a while back and for me it was because there were dipoles located outside the brain, but the code was telling me they were inside. Could this be happening to you? Tyler Sent from my iPhone > On 25 Feb 2015, at 1:06 am, Saurabh Kumar wrote: > > Hello fieldtrippers, > > I have a question which I could not find has been answered. > I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) > > I am using mne to localize the source. > The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. > > Code: > > %% load MRI data %%%%%%%% > mri = ft_read_mri('Subject01.mri'); > % convert the coordinate system > mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni > mri.coordsys = 'mni'; > > > %% Volume segmentation %%%%%%%% > cfg = []; > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); % it takes some time. > > > %% creating the head model %%%%%%%% > cfg = []; > cfg.method ='bemcp'; > vol = ft_prepare_headmodel(cfg, seg); > > > %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% > %load elec_new > cfg = []; > cfg.method = 'interactive'; > cfg.elec = elec_new; > cfg.headshape = vol.bnd(3); > elec_aligned = ft_electroderealign(cfg); > > %% make grid %%%%%%%% > cfg = []; > cfg.vol = vol; > cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; > cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution > cfg.grid.unit = 'cm'; > grid = ft_prepare_leadfield(cfg); > > > > % %%%%%%%% Check the full model %%%%%%% > % grid.pos = grid.pos * 10; > % elec_aligned.chanpos = elec_aligned.chanpos*100; > % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); > % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > > %% source analysis %%%%%%%% > cfg = []; > cfg.method = 'mne'; > cfg.vol = vol; > cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; > cfg.grid = grid; > cfg.mne.lambda = 3; > cfg.mne.prewhiten = 'yes'; > cfg.mne.scalesourcecov = 'yes'; > source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data > > %% Interpolation of the localized source with the mri %%%%%%%% > mri_reslice = ft_volumereslice([],mri); > cfg=[]; > cfg.parameter = 'pow'; > source_int = ft_sourceinterpolate(cfg, source, mri_reslice); > > %% Visualization (Orthogonal plot) %%%%%%%% > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'pow'; > cfg.funcolormap = 'jet'; > cfg.maskparameter = cfg.funparameter; > ft_sourceplot(cfg, source_int_admit); % (figure attached) > > > > > ---------------------------------------------------- > Thanks for your time, > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig > <03 PM.jpg> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From kumar at cbs.mpg.de Thu Feb 26 12:11:15 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Thu, 26 Feb 2015 12:11:15 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> Hello all, The problem may be because of the 'mne' that is used because I have changed the method to 'music' and now I have been able to obtain the sources in the inner parts of the brain too. This may give rise to another question as to which methos to use and I am still pondering on this. So, in short if you are stuck like me knowing that your headmodel is working fine and everything including the units and the electrode positions are fine then just change the method. ---------------------------------------------------- Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig From ayobimpe2004 at hotmail.com Thu Feb 26 12:30:25 2015 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Thu, 26 Feb 2015 12:30:25 +0100 Subject: [FieldTrip] source localization only at the edges In-Reply-To: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> References: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> Message-ID: I may be wrong but I disagree with changing method will locate sources inside the brain. The main problem has to come from head modeling ( lead fields, segmentation, conductivity assignment etc)if the head modeling or forward problem is done right, whatever method you use for inverse problem, it will be similar to one another. please check the forward problem againAzeez > Date: Thu, 26 Feb 2015 12:11:15 +0100 > From: kumar at cbs.mpg.de > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] source localization only at the edges > > Hello all, > > The problem may be because of the 'mne' that is used because I have changed the method to 'music' and now I have been able to obtain the sources in the inner parts of the brain too. > This may give rise to another question as to which methos to use and I am still pondering on this. > > So, in short if you are stuck like me knowing that your headmodel is working fine and everything including the units and the electrode positions are fine then just change the method. > > > ---------------------------------------------------- > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.wollbrink at wwu.de Thu Feb 26 15:05:23 2015 From: a.wollbrink at wwu.de (Andreas Wollbrink) Date: Thu, 26 Feb 2015 15:05:23 +0100 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: References: Message-ID: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> Hi Shlomit, I guess your problem is related to the fact the data storage format of EGI data recorded with Netstation 4.5.4 contains time scale values in nano seconds instead of micro seconds. A sanity check for that was missing in the ft_read_header function (after reporting this bug it is supposed to be fixed in the new fieldtrip version by tomorrow). You might give it a try to run your analysis again. At least for me it worked out after the 'bug' was fixed. Thanks, Andreas On Mon, 2015-02-23 at 21:52 +0200, shlomit beker wrote: > Hello Fieldtrippers, > > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use > fieldtrip functions on the mff format. > > > While running ft_read_data on an mff, I've encounter following bug > > > index exceeds matrix dimensions. > > Error in ft_read_data (line 787) > dat{end} = dat{end}(:,begsel:endsel); > > > > Data sampling is 1000 hz. > Would appreciate your help. If any further information is needed, > please ask me. > > > > Thanks, > > > -- > Shlomit Beker, PhD > Postdoctoral fellow, Nir lab > Sackler Faculty of Medicine > Tel Aviv University > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ############################################# Andreas Wollbrink, Dipl.-Ing. Biomedical Engineer MEG / EEG Lab Manager Institute for Biomagnetism and Biosignalanalysis University Hospital, University of Muenster address: Malmedyweg 15, 48149 Muenster, Germany office: +49-251-83-52546 email: a.wollbrink at wwu.de website: http://biomag.uni-muenster.de From shlomitbeker at gmail.com Thu Feb 26 15:09:32 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Thu, 26 Feb 2015 16:09:32 +0200 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> References: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> Message-ID: Thanks Andreas, I will give it a try with the new FT version. Shlomit On Thu, Feb 26, 2015 at 4:05 PM, Andreas Wollbrink wrote: > Hi Shlomit, > > I guess your problem is related to the fact the data storage format of > EGI data recorded with Netstation 4.5.4 contains time scale values in > nano seconds instead of micro seconds. > > A sanity check for that was missing in the ft_read_header function > (after reporting this bug it is supposed to be fixed in the new > fieldtrip version by tomorrow). > > You might give it a try to run your analysis again. > At least for me it worked out after the 'bug' was fixed. > > Thanks, > Andreas > > > > > On Mon, 2015-02-23 at 21:52 +0200, shlomit beker wrote: > > Hello Fieldtrippers, > > > > > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use > > fieldtrip functions on the mff format. > > > > > > While running ft_read_data on an mff, I've encounter following bug > > > > > > index exceeds matrix dimensions. > > > > Error in ft_read_data (line 787) > > dat{end} = dat{end}(:,begsel:endsel); > > > > > > > > Data sampling is 1000 hz. > > Would appreciate your help. If any further information is needed, > > please ask me. > > > > > > > > Thanks, > > > > > > -- > > Shlomit Beker, PhD > > Postdoctoral fellow, Nir lab > > Sackler Faculty of Medicine > > Tel Aviv University > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > ############################################# > > Andreas Wollbrink, Dipl.-Ing. > Biomedical Engineer > > MEG / EEG Lab Manager > > Institute for Biomagnetism and Biosignalanalysis > University Hospital, University of Muenster > > address: Malmedyweg 15, 48149 Muenster, Germany > > office: +49-251-83-52546 > > email: a.wollbrink at wwu.de > website: http://biomag.uni-muenster.de > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Shlomit Beker, PhD Postdoctoral fellow, Nir lab Sackler Faculty of Medicine Tel Aviv University -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Thu Feb 26 15:13:51 2015 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Thu, 26 Feb 2015 15:13:51 +0100 Subject: [FieldTrip] Conditional trial definition Message-ID: Dear fieldtrippers, I would like to evaluate a reaction time experiment. Hence for me two types of trigger are of interest: the onset of the stimulus and the reaction to it. I found this function at the fieldtrip homepage: function [trl, event] = mytestfunction(cfg); hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); value = [event(find(strcmp('trigger', {event.type}))).value]'; sample = [event(find(strcmp('trigger', {event.type}))).sample]'; pretrig = -round(cfg.trialdef.pre * hdr.Fs); posttrig = round(cfg.trialdef.post * hdr.Fs); trl = []; for j = 1:(length(value)-1) trl1 = value(j); trl2 = value(j+1); if trl1==3 && trl2==5 trlbegin =sample(j) + pretrig; trlend = sample(j) + posttrig; offset =pretrig; newtrl = [trlbegin trlend offset]; trl = [trl; newtrl]; end end Creating the sample-matrix I get a long string (all values in one field without delimiter). I think it’s because my values are in string format (‘DI11’, ‘DIN1’, …). Does anyone have an idea, for example how to convert the string values to numbers in this case? Or an other advise for a solution of this problem. Looking forward to support! Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gugale at pop.com.br Thu Feb 26 15:27:42 2015 From: gugale at pop.com.br (gugale at pop.com.br) Date: Thu, 26 Feb 2015 11:27:42 -0300 Subject: [FieldTrip] Hemispheric comparison Message-ID: <20150226112742.Horde.xOOb_dns-7f73dqSoqH7zg6@webmail.pop.com.br> Hello, I am new in FieldTrip but I have learnt a lot in the mlast months! I would like to make an estatistical analysis in differences inter hemispheric. It means, compare the differences in ERP between left and right hemispheres, as also between anterior and posterior regiosn. I already have my timelockanalysis data. How should I do that in FieldTrip? Thank you very much for this toolbox and for your attention! Best regard, Gustavo L.E. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sapttrs at gmail.com Fri Feb 27 03:53:25 2015 From: sapttrs at gmail.com (Steve Patterson) Date: Thu, 26 Feb 2015 22:53:25 -0400 Subject: [FieldTrip] inconsistent chanunit for Neuromag data Message-ID: Hello, I noticed that fieldtrip produces inconsistent channel units when I read in Neuromag (vectorview) data. For example: %%%%%%%%%%%%%%%%%%%%%%%% cfg = []; cfg.dataset = 'example.fif'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'STI101'; cfg.trialdef.eventvalue = [17 18 20]; cfg.trialdef.prestim = 0.500; cfg.trialdef.poststim = 1.000; cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); disp(data.hdr.chanunit(1:6)); 'T/m' 'T/m' 'T' 'T/m' 'T/m' 'T' disp(data.grad.chanunit(1:6)); 'T' 'T' 'T' 'T' 'T' 'T' %%%%%%%%%%%%%%%%%%%%%%%% data.hdr.chanunit is correct and data.grad.chanunit is wrong. data.grad.chanunit must take precedence in further analysis, because I've noticed this causes problems downstream. For example, when using ft_dipolesimulation, the simulated data on the gradiometer channels is too small in amplitude by a factor of 1/(16.8E-3) (the distance between the gradiometer coil pair in meters). This is reflected in the grad.tra matrix, whose non-zero values are all 1's and -1's, whereas they should be 1's (magnetometers), and +/- 1/16.8E-3 (gradiometers). If you could fix this, it would be much appreciated! thanks, Steve From dboratyn at u.northwestern.edu Sat Feb 28 02:20:11 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Fri, 27 Feb 2015 19:20:11 -0600 Subject: [FieldTrip] ft_connectivityplot axis lables Message-ID: New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I’d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. Thank you! Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plotex.tiff Type: image/tiff Size: 18948 bytes Desc: not available URL: From f.roux at bcbl.eu Sun Feb 1 16:03:57 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Sun, 1 Feb 2015 16:03:57 +0100 (CET) Subject: [FieldTrip] problem with copyfields and removefields after fieldtrip update during call to ft_freqanalysis and ft_topoplotTFR Message-ID: <1739525902.373403.1422803037589.JavaMail.root@bcbl.eu> Dear all, I've updated my ft version to 20150115 but now I am having problems with two functions that ft is calling and which are not in my Matlab path. While calling ft_freqanalysis and ft_topoplotTFR I received error messages related to "copyfields" and "removefields". If I am not mistaken, these functions are not native Matlab functions, so I suppose that these are ft-specifc and that they are located in a subfolder somewhere in the main ft folder but that my Matlab path does not include them. I've commented out the lines in the ft-code where these functions are called to avoid the problem but I am not sure whether there could be any other problems arising from the fact that my ft-path seems not to be set correctly. I usually add ft to my Matlab path through: addpath('/home/user/fieldtrip-20150115/'); ft_defaults; and have never experienced any problems so far. Has anybody experienced a similar problem after updating their ft-version and can anyone tell me how to fix this? Best, Fred --------------------------------------------------------------------------- From ktyler at swin.edu.au Mon Feb 2 02:26:11 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 2 Feb 2015 01:26:11 +0000 Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial Message-ID: Hi all, Just a question: I was running through the 'Beamforming oscillatory responses in MEG and EEG data' tutorial, and at one plot, the strongest motor response is located in the center of the head. The tutorial asks "Can you explain this finding?" Has anyone else done this tutorial? Because I am not at all sure why a motor response would show up in the centre of the head. Can anyone enlighten me? When I have been getting results that look like this, I kept feeling there was an error or some artefact going on. Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Feb 2 05:13:17 2015 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 2 Feb 2015 04:13:17 +0000 Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial In-Reply-To: References: Message-ID: Hi Kaelasha, Take a look at http://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_biashttp://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_biashttp://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_bias This should help clarify what's going on. Peter __________________________ Peter Goodin, BSc (Hons), Ph.D Candidate. Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 http://www.swinburne.edu.au/swinburneresearchers/index.php?fuseaction=profile&pid=4149 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Kaelasha Tyler [ktyler at swin.edu.au] Sent: Monday, 2 February 2015 12:26 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial Hi all, Just a question: I was running through the 'Beamforming oscillatory responses in MEG and EEG data' tutorial, and at one plot, the strongest motor response is located in the center of the head. The tutorial asks "Can you explain this finding?" Has anyone else done this tutorial? Because I am not at all sure why a motor response would show up in the centre of the head. Can anyone enlighten me? When I have been getting results that look like this, I kept feeling there was an error or some artefact going on. Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Feb 2 09:24:40 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 2 Feb 2015 09:24:40 +0100 Subject: [FieldTrip] basic question Message-ID: Dear all, I've got a basic question regarding spectral analysis. In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Feb 2 09:25:23 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 2 Feb 2015 09:25:23 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <000001d03cab$039169c0$0ab43d40$@de> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> <000001d03cab$039169c0$0ab43d40$@de> Message-ID: <002f01d03ec1$ca3e86d0$5ebb9470$@artinis.com> Hi Todor, you are right that in saying that only one taper shows distinct peaks in all three frequency bands. I dare to say that you chose a rather long signal (something of several seconds), hence the broad frequency smoothing when adding a single taper. As you also indicated, the purpose of using multitapering is not to represent the PSD as 'clean' as possible - then you would need as little smoothing in the frequency domain as possible and therefore use a boxcar taper. In real life, we have noisy signals unfortunately, and most importantly, neurophysiological signals (of higher frequency) are of wide bandwidth, center frequencies of neurophysiological signals vary strongly across participants, etc. All these make your signal imperfect, and are probably properties that you did not simulate. You can calculate the amount of 'smoothing'/smearing in the frequency domain yourself a priori (2*length of your signal * frequency smoothing = # tapers). The choice of tapering depends thus a lot on what you want. If you want to increase statistical power across observations, where you expect activity in a certain, frequency band, slightly different across observations, possibly contaminated by noise, then multitapers might be the way to go. The advantage is that you have very good control over the bandwidth of your decomposition, and the frequency response is pretty amazing (as you probably saw in the script, additional tapers increase the magnitude of the main lobe while roughly maintaining the magnitude of the side lobes). It all depends on what you want though. We are dealing with tricky signals anyway due to their neurophysiological origin (imperfect sinusoids, lots of noise of different sources, etc.), so we need to choose a method that best suits our needs. Multitapers are one of those that I wouldn't want to miss (in practice mostly when dealing with gamma band responses due to their wide bandwidth). There are more than enough cases where multitapering can also be a pretty bad choice (e.g. when analyzing lower frequencies in shorter trials). Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of tjordanov at besa.de > Sent: Friday, January 30, 2015 5:37 PM > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Eelke, hi Jörn, > > thank you for your elaborate answers and for the script - it is very > informative and useful. > I am in some extent familiar with the theory behind multitapering and I am > also convinced that it has very good theoretical properties. However, let us > take a look at the application. I simulated 200 trials data with jitter in the > frequency. You can find the frequency profile of the trials as attachment > ("FrequenciesForSimulation.png"). There are 67 trials with central frequency > 34 Hz (variation between 32 and 36 Hz), 67 trials with central frequency 50 Hz > (48 to 52 Hz) and 66 trials with central frequency 66 Hz (64 to 68 Hz). I > performed multitaper analysis with 1, 2 and 3 tapers (see results > "Multitaper1taper.png", "Multitaper2tapers.png", "Multitaper3tapers.png"). > As we can see from the results only the decomposition with one taper > detected correctly the three frequencies, all other two methods (with 2 and > 3 tapers) just distorted (smoothed) the first result. I can see that such kind of > smoothing is good for the statistical power between subjects but it does not > prove the advantage of using multiple tapers compared to using just single > taper. What do you think? > > Best, > Todor > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Jörn M. Horschig > Sent: Freitag, 30. Januar 2015 13:34 > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > maybe this matlab function helps illustrating what dpss multitapers are, and > will thus clarify what makes them so powerful compared to other > techniques: > https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 > (go to example 5) > > Best, > Jörn > > > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Friday, January 30, 2015 11:52 AM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Todor, > > > > Although your procedure would also yield smoothing in the frequency > > domain which is independent from that in the time domain, it is not at > > all equivalent to using multitapers! > > > > The tapers in the discrete prolate spheroidal sequence (dpss, == > > multitaper in fieldtrip) are pairwise orthogonal, hence their > > estimates are independent from one another. This will result in there > > being more information extracted from the signal than if you used a > > single taper and then apply Gaussian smoothing over frequencies. You > > could have a look at https://en.wikipedia.org/wiki/Multitaper which > > gives quite a decent overview of multitapering. Or for the full > > details, refer to the original paper by David Thompson: > > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > > > Best. > > Eelke > > > > On 30 January 2015 at 11:10, tjordanov at besa.de > > wrote: > > > Hi Eelke, > > > > > > I found your answer very interesting. If I understand you correctly, > > > the > > advantage of the multitaper method is that it smoothes in the > > frequency domain independently of the smoothing in the time domain. > > Then it should be equivalent (or similar) with the following procedure: > > > 1) Calculate single trial single taper decomposition of the signal. > > > 2) Choose an appropriate 1D Gauss function (note that it is > > > important to be 1D else it would smooth in both - time and > > > frequency) > > > 3) Apply the selected Gauss function on the decomposed signal only > > > in the > > frequency direction (not in time in order to avoid temporal smearing). > > Do this for all trials and all time points. > > > 4) Calculate the average over the trials. > > > In this procedure the choice of the Gaussian would determine the > > > amount > > of smearing in the frequency domain. > > > > > > Is this so, or I misunderstood something? > > > > > > Best, > > > Todor > > > > > > > > > -----Original Message----- > > > From: fieldtrip-bounces at science.ru.nl > > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > > Sent: Mittwoch, 28. Januar 2015 12:24 > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > > > Hi Nico, > > > > > > As for question (2), you probably first need to think about what > > > constitutes > > a "better" result. Using more tapers with dpss will always result in > > more frequency smoothing. If your source signal is primarily composed > > of pure sinusoids, and you interpret a spectrum as "better" > > > if it shows clearer peaks, then you will always get the "best" > > > result for the > > single-taper case. > > > > > > Multitapering allows optimal control over the amount of smoothing > > > you > > obtain in the frequency domain, which is more or less independent of > > the amount of smoothing you obtain in the time domain (as opposed to > e.g. > > wavelets, where these are fundamentally linked). When dealing with > > brain signals, you will often find that a certain stimulus might > > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > > while in another subject or another trial the same stimulus might > > induce a 50-60 Hz response or so. Of course, in the average over > > trials (and subjects), this heterogeneity (i.e., > > noise) will wash out, but it will severely damage your statistical sensitivity. > > Therefore, using multitapers to add smoothing can produce a much more > > consistent result and therefore be "better" in the sense of actually > > understanding the brain. > > > > > > As for your simulation, perhaps using filtered noise would be better > > > than > > sinusoids. Also, since multitapering benefits you most strongly when > > taking variation over observations into account, you could consider > > simulating different observations, each consisting of noise filtered > > in a slightly different randomly chosen bandwidth, and inspecting the > > resulting variation over observations in the spectra. > > > > > > Best, > > > Eelke > > > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > > >> Hi Nico, > > >> > > >> I'm not sure about the second question, but as for the first > > >> question, you can manually set the scales for ft_singleplotTFR > > >> using > > cfg.zlim. > > >> > > >> Hope that helps, > > >> > > >> Max > > >> > > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > >> > > >> wrote: > > >>> > > >>> Hello FieldTrip community, > > >>> > > >>> > > >>> > > >>> I am new to FieldTrip and I try to simulate data to compare the > > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > >>> > > >>> Therefore I simulate Data manually using different latency, > > >>> amplitude and frequency combinations using the following equation: > > >>> > > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > >>> > > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > >>> > > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > >>> > > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > >>> > > >>> sig = sig1+sig2+sig3+sig4; > > >>> > > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > > >>> > > >>> > > >>> After using ft_frequanalysis (see the following cfgs) > > >>> > > >>> > > >>> Cfg Wavelet: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'wavelet'; > > >>> > > >>> cfg.width = 7; > > >>> > > >>> cfg.gwidth = 3; > > >>> > > >>> cfg.foilim = [1 70]; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> Cfg Hanning / Multitaper: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'mtmconvol' > > >>> > > >>> cfg.foi = 1:1:70 > > >>> > > >>> cfg.tapsmofrq = 0.2*cfg.foi; > > >>> > > >>> cfg.taper = 'dpss' / ‘hanning’; > > >>> > > >>> cfg.t_ftimwin = 4./cfg.foi; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> > > >>> the data is plotted with ft_singleplotTFR (see cfg below) > > >>> > > >>> > > >>> cfg singleplot: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.maskstyle = 'saturation'; > > >>> > > >>> cfg.colorbar = 'yes'; > > >>> > > >>> cfg.layout = 'AC_Osc.lay'; > > >>> > > >>> ft_singleplotTFR(cfg, TFRwave); > > >>> > > >>> > > >>> Two problems occur. First, the power scale of wavelet and > > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > > ~15*10^4). > > >>> > > >>> 1. How can I get the scale of all methods equal, or do I have to > > >>> change the Wavelet settings to get the right scale of the values? > > >>> > > >>> Second, the best result of Multitaper analysis is performed using > > >>> only one Taper. The goal was to get a result, where the advantages > > >>> and disadvantages of Multitaper analysis compared to the other > > methods can be seen. > > >>> > > >>> 2. How can I change the simulation so that more tapers show better > > >>> results than a single taper does? > > >>> > > >>> > > >>> Thank you for your time and help. > > >>> > > >>> > > >>> Regards, > > >>> > > >>> > > >>> > > >>> Nicolas Weeger > > >>> > > >>> Student of Master-Program Appied Research, > > >>> > > >>> University Ansbach, > > >>> > > >>> Germany > > >>> > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> > > >> > > >> > > >> -- > > >> Max Cantor > > >> Lab Manager > > >> Computational Neurolinguistics Lab > > >> University of Michigan > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From behinger at uos.de Mon Feb 2 10:12:50 2015 From: behinger at uos.de (Benedikt Ehinger) Date: Mon, 02 Feb 2015 10:12:50 +0100 Subject: [FieldTrip] basic question In-Reply-To: References: Message-ID: <54CF3F92.2050202@uos.de> Dear Hweeling, we use the following code: % Make 23 logarithmical spaced .25-octave frequencies cfg.foi = logspace(log10(4),log10(181),23); cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz % The windows should have 3/4 octave smoothing in frequency domain cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq % The timewindow should be so, that for freqs below 16, it results in n=1 % Taper used, but for frequencies higher, it should be a constant 250ms. % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1) cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)))]; I guess the first line is the answer to your question. I hope this bit of code helps. Best, Benedikt Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee: > Dear all, > > I've got a basic question regarding spectral analysis. > > In Hipp's neuron paper, it was mentioned that "spectral estimates were > computed across 23 logarithmically scaled frequencies from 4 - 181 Hz > (0.25 octave steps)". May I know how can one implement this using > Fieldtrip? > > Thanks. > > Best regards, > Hweeling > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Feb 2 11:47:52 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 2 Feb 2015 11:47:52 +0100 Subject: [FieldTrip] basic question In-Reply-To: <54CF3F92.2050202@uos.de> References: <54CF3F92.2050202@uos.de> Message-ID: <005401d03ed5$b1db9ba0$1592d2e0$@artinis.com> Hi Benedikt and Hweeling, note that the rounding step is not necessary, because FieldTrip will round to steps according to your frequency resolution. Actual frequencies of interest (foi) are subject to the time window of your trials defining the Raleigh frequency (i.e. frequency resolution). With trials of 2s you have a frequency resolution of 0.5 Hz, so you can only get estimates at 4 Hz, 4.5 Hz, 5 Hz etc. With the code you sent around, you request frequency at 4.0000 4.7568 5.6568 6.7271 will thus effectively 4, 5, 6 and 7 Hz will be computed (due to the rounding to the next step of the 0.5 Hz resolution). I do not know the length of your trials, but I thought I drop this here to avoid future questions on ‘why this didn’t work as expected’ ;) Best, Jörn Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Benedikt Ehinger Sent: Monday, February 2, 2015 10:13 AM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] basic question Dear Hweeling, we use the following code: % Make 23 logarithmical spaced .25-octave frequencies cfg.foi = logspace(log10(4),log10(181),23); cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz % The windows should have 3/4 octave smoothing in frequency domain cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq % The timewindow should be so, that for freqs below 16, it results in n=1 % Taper used, but for frequencies higher, it should be a constant 250ms. % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1) cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)) )]; I guess the first line is the answer to your question. I hope this bit of code helps. Best, Benedikt Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee: Dear all, I've got a basic question regarding spectral analysis. In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip? Thanks. Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _____ Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Feb 2 17:46:00 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 2 Feb 2015 17:46:00 +0100 Subject: [FieldTrip] Fwd: help with topoplot_TFR References: Message-ID: <4473FF08-8792-476C-A525-994186956989@uni-konstanz.de> Hi Payashi, I’m forwarding your message to the list again. > > Dear Tzvetan, > > Thank you, that works perfectly. Many apologies, this is the last question. Is it possible to topographically represent the change in alpha/delta ratio (i.e. one epoch in time from another) ? I have calculated this by selecting two epochs of time from my 'ADR' matrix and subtracting them. However, I get the following error message when I put this into topoplot ER I suspect you should check whether you did the subtraction properly. Regarding to this you should check the functionality of ft_selectdata (select the epochs) and ft_math(subtract them). I suggest you try these first and see whether the input to ft_topoplotER is properly organized. best tzvetan > > Index exceeds matrix dimensions. > > Error in topoplot_common (line 556) > dat = dat(sellab, xmin:xmax); > > Error in ft_topoplotER (line 192) > cfg = topoplot_common(cfg, varargin{:}); > > Many thanks > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > On 29 Jan 2015, at 18:31, Tzvetan Popov wrote: > >> >> Hi Payashi, >> >>> I have computed the ratio per sample and called it ADR. It is a 14x1x480 matrix (channels x freq x time). >> good, so now you squeeze(ADR) in order to get the actual ‘chan_time’ representation. Then you introduce a new variable say tlk_ADR: >> tlk_ADR.avg =ADR; >> tlk_ADR.label = freq_ADR.label; >> tlk_ADR.dimord = freq_ADR.dimord; >> tlk_ADR.time = freq_ADR.time; >> tlk_ADR.elec = freq_ADR.elec; >> >> then you call all plotting functions that deal with time domain signals such as ft_multiplotER, ft_singleplotER and ft_topoplotER. Not …TFR. >> So your code would look like; >>> cfg=[]; >>> cfg.xlim = [3000 3200]; >>> cfg.colorbar = 'yes'; >>> figure >>> ft_topoplotER(cfg, tlk_ADR); >> >> good luck >> tzvetan >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabra005 at odu.edu Wed Feb 4 17:08:05 2015 From: nabra005 at odu.edu (NIJO ABRAHAM) Date: Wed, 4 Feb 2015 11:08:05 -0500 Subject: [FieldTrip] ft_rejectartifact error with "interactive=yes" following 2014b Matlab upgrade Message-ID: Hi FTs, Recently I updated to Fieldtrip version 20150115 (was using 2014 Septemper version earlier) which resulted in a GUI error in the Matlab command window when any buttons in the interactive window were clicked. The GUI which I activated was cfg.artfctdefvalue.zvalue.interactive = 'yes'; I believe this error arises only on the Matlab2014b version since the error was not reproduced in Matlab2014a version. Given below is the error that was displayed: MATLAB COMMAND WINDOW showing trial 1, channel Cz No appropriate method, property, or field Key for class matlab.ui.eventdata.ActionData. Error in ft_artifact_zvalue>parseKeyboardEvent (line 1079) key = eventdata.Key; Error in ft_artifact_zvalue>keyboard_cb (line 680) key = parseKeyboardEvent(eventdata); Error using waitfor Error while evaluating UIControl Callback SAMPLE OF THE CODE: cfg=[]; cfg.continuous = 'yes'; cfg.trl = trl_2; cfg.artfctdef.zvalue.channel = data.label{jj}; cfg.artfctdef.zvalue.cutoff = 8; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.05; cfg.artfctdef.zvalue.fltpadding = 0; cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; cfg.artfctdef.zvalue.interactive = 'yes'; %%%%%% P.S. - I was aware of Bug2461 and that is why I upgraded to the latest FT version since a post dated this month states that FT had partially resolved the issues from Handle graphics 2. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Holger.Krause at med.uni-duesseldorf.de Wed Feb 4 17:24:15 2015 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Wed, 4 Feb 2015 17:24:15 +0100 Subject: [FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica' Message-ID: Dear all, documentation of FT_COMPONENTANALYSIS states: > You may specify a particular seed for random numbers called by > rand/randn/randi, or the random state used by a previous call to this > function to replicate results. For example: > cfg.randomseed = integer seed value of user's choice > cfg.randomseed = comp.cfg.callinfo.randomseed (from previous call) Aiming at reproducing independent components, I would expect cfg.method = 'runica'; cfg.randomseed = 5; comp = ft_componentanalysis(cfg, some_preprocessed_data); to yield the same results as cfg.method = 'runica'; cfg.randomseed = 5; comp = ft_componentanalysis(cfg, some_preprocessed_data); Unfortunately, this is not (always) the case. As far as I can see, all the FT functions seem to handle the 'randomseed' option properly. It is 'external/eeglab/runica.m', which is nasty, and sets the state of the prng to a value depending on system time (line 812): > rand('state',sum(100*clock)); % set the random number generator state to > % a position dependent on the system clock I'm not sure, what's FT's policy regarding making changes to external toolboxes. In this case, I would recommend to delete the aforementioned line, as it effectively renders fieldtrip's aims to have reproducible pseudo random numbers void. And, without this line, two consecutive calls of ft_componentanalysis() seem to produce identical results (checked by eye in ft_databrowser()). Could some FT developer please comment on this? Cheers, Holger -- Dr. rer. nat. Holger Krause MEG-Labor, Raum 13.54.-1.84 Telefon: +49 211 81-19031 Institut für klinische Neurowissenschaften http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik Düsseldorf From johanna.zumer at gmail.com Wed Feb 4 17:39:23 2015 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Wed, 4 Feb 2015 16:39:23 +0000 Subject: [FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica' In-Reply-To: References: Message-ID: Dear Holger, Please see the discussion on this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2585 in which it is a known bug, but still an open discussion as to solution. Sorry for the problem, but perhaps your email will help spur a solution... Cheers, Johanna 2015-02-04 16:24 GMT+00:00 Holger Krause < Holger.Krause at med.uni-duesseldorf.de>: > Dear all, > > documentation of FT_COMPONENTANALYSIS states: > > > You may specify a particular seed for random numbers called by > > rand/randn/randi, or the random state used by a previous call to this > > function to replicate results. For example: > > cfg.randomseed = integer seed value of user's choice > > cfg.randomseed = comp.cfg.callinfo.randomseed (from previous call) > > Aiming at reproducing independent components, I would expect > > cfg.method = 'runica'; > cfg.randomseed = 5; > comp = ft_componentanalysis(cfg, some_preprocessed_data); > > to yield the same results as > > cfg.method = 'runica'; > cfg.randomseed = 5; > comp = ft_componentanalysis(cfg, some_preprocessed_data); > > Unfortunately, this is not (always) the case. As far as I can see, all the > FT > functions seem to handle the 'randomseed' option properly. It is > 'external/eeglab/runica.m', which is nasty, and sets the state of the prng > to > a value depending on system time (line 812): > > > rand('state',sum(100*clock)); % set the random number generator > state to > > % a position dependent on the system clock > > I'm not sure, what's FT's policy regarding making changes to external > toolboxes. In this case, I would recommend to delete the aforementioned > line, > as it effectively renders fieldtrip's aims to have reproducible pseudo > random > numbers void. And, without this line, two consecutive calls of > ft_componentanalysis() seem to produce identical results (checked by eye in > ft_databrowser()). > > Could some FT developer please comment on this? > > Cheers, > > Holger > > -- > Dr. rer. nat. Holger Krause MEG-Labor, Raum > 13.54.-1.84 > Telefon: +49 211 81-19031 Institut für klinische > Neurowissenschaften > http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik > Düsseldorf > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Feb 5 11:39:28 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 5 Feb 2015 10:39:28 +0000 Subject: [FieldTrip] MNI coordinate to Anatomy Message-ID: ?Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Thu Feb 5 11:49:42 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Thu, 5 Feb 2015 10:49:42 +0000 Subject: [FieldTrip] MNI coordinate to Anatomy In-Reply-To: References: Message-ID: Hi Rabat, The function that jumps to my mind is ft_volumelookup. However, this quickly, I could only find the following page that might be relevant to you: http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source Hope it helps, arjen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Rajat Thomas [r.thomas at nin.knaw.nl] Sent: Thursday, February 05, 2015 11:39 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] MNI coordinate to Anatomy ​Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Feb 5 11:52:27 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 5 Feb 2015 11:52:27 +0100 Subject: [FieldTrip] MNI coordinate to Anatomy In-Reply-To: References: Message-ID: <002b01d04131$d53975a0$7fac60e0$@artinis.com> Dear Rajat, you can use ft_volumelookup in Fieldtrip (ahja, Arjen beat me to it!). You can also specify an atlas in your cfg when using ft_sourceplot, which will show the anatomical label according to that atlas. You need to specify an atlas which is in the same coordinate system, see http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#plotting_sources_of_oscillatory_gamma-band_activity (scroll down to the exercise. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Rajat Thomas Sent: Thursday, February 5, 2015 11:39 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] MNI coordinate to Anatomy ​Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From vahidgerami.mse at gmail.com Thu Feb 5 15:16:37 2015 From: vahidgerami.mse at gmail.com (vahid gerami) Date: Thu, 5 Feb 2015 17:46:37 +0330 Subject: [FieldTrip] real time EEG Message-ID: hello im new at fieldtrip. i want to record EEG signals as realtime using my own BCI interface connected to a laptob via RS232.ive found ft_realtime_oddball(cfg) for real time signal acquisition. i have problem configuring the function. i dont know the correct configuration. please help me about the cfg parameters. my bci send continues data at 9220 byte and 115200 baudrate 8 bit no parity. regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.uni-hamburg.de Thu Feb 5 15:39:00 2015 From: p.taesler at uke.uni-hamburg.de (Philipp Taesler) Date: Thu, 5 Feb 2015 15:39:00 +0100 Subject: [FieldTrip] real time EEG In-Reply-To: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> References: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> Message-ID: <54D38084.7010904@uke.uni-hamburg.de> Hello Vahid, I have not worked with real-time much, also I've never read EEG data over RS232, but you might want to look at the ft_realtime_signalproxy.m function. Apparently it is just generating random data, you can see this in line 114. Here you would have to splice in your RS232 data somehow, maybe you can get a hint getting started here http://de.mathworks.com/help/matlab/matlab_external/getting-started-with-serial-i-o.html Maybe you will also get some more help from someone who has actually worked with something closer to your setup. Best regards and happy hacking, Phil Am 05.02.2015 um 15:16 schrieb vahid gerami: > hello > im new at fieldtrip. i want to record EEG signals as realtime using my > own BCI interface connected to a laptob via RS232.ive > found ft_realtime_oddball(cfg) for real time signal acquisition. i have > problem configuring the function. i dont know the correct configuration. > please help me about the cfg parameters. my bci send continues data at > 9220 byte and 115200 baudrate 8 bit no parity. > regards > > ------------------------------------------------------------------------ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. > Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > > ------------------------------------------------------------------------ > > SAVE PAPER - THINK BEFORE PRINTING > -- Philipp Taesler, MSc. Department of Systems Neuroscience University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 Hamburg, Germany Phone: +49-40-7410-59902 Fax: +49-40-7410-59955 Email: p.taesler at uke.uni-hamburg.de -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From constantino.mendezbertolo at ctb.upm.es Thu Feb 5 15:56:24 2015 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 5 Feb 2015 15:56:24 +0100 Subject: [FieldTrip] Component analysis: search for the explained variance Message-ID: tl;dr: anybody knows whether this info is stored (or not) and where? thx Queridos fieldtrippers, I am trying to find where the info about the amount of variance that each component explains is stored (if it is) after running ft_componentanalysis (method='pca') I know the interesting data is in two fields: topo + unmixing. May it happen that I am supposed to derive the variance explained by each component using some kind of mathematical sorcery and this values. If my question is too naive, I apologize, I think that the channels (actually 'components') of the output structure are sorted in descending order of variance explained during the call to the function, I searched there and in ft_databrowser unfructiosly. Also parsed the mailing list (there are two other answered questions [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html] [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html] Peace, -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Feb 5 16:43:47 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 5 Feb 2015 16:43:47 +0100 Subject: [FieldTrip] real time EEG In-Reply-To: <54D38084.7010904@uke.uni-hamburg.de> References: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> <54D38084.7010904@uke.uni-hamburg.de> Message-ID: <005a01d0415a$882f07b0$988d1710$@artinis.com> Dear Vahid, Generally, I would propose that you start by reading on the wiki about the different implementations: http://fieldtrip.fcdonders.nl/development/realtime/buffer_overview most relevant by this this site: http://fieldtrip.fcdonders.nl/development/realtime/implementation What FieldTrip provides is basically an interface for streaming data. You need to set up a shared memory segment that your data acquisition software writes to and that some other client accesses. That other client opens an IP socket, and you can get access from any programme, e.g. Matlab, to the streamed data. That other client (or interface as called in the wiki) probably needs to be tailored to your acquisition software, or in your case it should read out the data coming in at the serial port. You might need to write this interface yourself. Good luck! Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Philipp Taesler > Sent: Thursday, February 5, 2015 3:39 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] real time EEG > > Hello Vahid, > > I have not worked with real-time much, also I've never read EEG data over > RS232, but you might want to look at the > > ft_realtime_signalproxy.m > > function. Apparently it is just generating random data, you can see this in line > 114. Here you would have to splice in your RS232 data somehow, maybe you > can get a hint getting started here > > http://de.mathworks.com/help/matlab/matlab_external/getting-started- > with-serial-i-o.html > > Maybe you will also get some more help from someone who has actually > worked with something closer to your setup. > > Best regards and happy hacking, > Phil > > > > Am 05.02.2015 um 15:16 schrieb vahid gerami: > > hello > > im new at fieldtrip. i want to record EEG signals as realtime using my > > own BCI interface connected to a laptob via RS232.ive found > > ft_realtime_oddball(cfg) for real time signal acquisition. i have > > problem configuring the function. i dont know the correct configuration. > > please help me about the cfg parameters. my bci send continues data at > > 9220 byte and 115200 baudrate 8 bit no parity. > > regards > > > > ---------------------------------------------------------------------- > > -- > > > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > > Rechts; Gerichtsstand: Hamburg | www.uke.de > > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. > > Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > > > > ---------------------------------------------------------------------- > > -- > > > > SAVE PAPER - THINK BEFORE PRINTING > > > > -- > Philipp Taesler, MSc. > Department of Systems Neuroscience > University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 > Hamburg, Germany > > Phone: +49-40-7410-59902 > Fax: +49-40-7410-59955 > Email: p.taesler at uke.uni-hamburg.de > -- > > __________________________________________________________ > ___________ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. > Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > __________________________________________________________ > ___________ > > SAVE PAPER - THINK BEFORE PRINTING > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From constantino.mendezbertolo at ctb.upm.es Thu Feb 5 18:34:26 2015 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 5 Feb 2015 18:34:26 +0100 Subject: [FieldTrip] Component analysis: search for the explained variance In-Reply-To: References: Message-ID: Dear all, here is a snippet from the ft_componentanalysis code which may prove useful to anybody facing this situation [from ft_componentanalysis) % compute data cross-covariance matrix > C = (dat*dat')./(size(dat,2)-1); > > % eigenvalue decomposition (EVD) > [E,D] = eig(C); > > % sort eigenvectors in descending order of eigenvalues > d = cat(2,(Nchan)',diag(D)); > d = sortrows(d,[-2]); > one could then use something like this to obtain the percentage of explained variance for each component.. > varianza=d(Nchan,2)/sum(diag(C));] paz! 2015-02-05 15:56 GMT+01:00 Constantino Méndez Bértolo < constantino.mendezbertolo at ctb.upm.es>: > tl;dr: anybody knows whether this info is stored (or not) and where? thx > > Queridos fieldtrippers, > > I am trying to find where the info about the amount of variance that each > component explains is stored (if it is) after running ft_componentanalysis > (method='pca') > > I know the interesting data is in two fields: topo + unmixing. May it > happen that I am supposed to derive the variance explained by each > component using some kind of mathematical sorcery and this values. > > If my question is too naive, I apologize, I think that the channels > (actually 'components') of the output structure are sorted in descending > order of variance explained during the call to the function, I searched > there and in ft_databrowser unfructiosly. Also parsed the mailing list > (there are two other answered questions > [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html] > [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html > ] > > Peace, > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuria.donamayor at neuro.uni-luebeck.de Fri Feb 6 13:57:53 2015 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Fri, 6 Feb 2015 13:57:53 +0100 Subject: [FieldTrip] =?iso-8859-1?q?PhD_position_-_University_of_L=FCbeck?= =?iso-8859-1?q?=2C_Germany?= In-Reply-To: <2DBCAEA0-13BA-42A8-A889-F05AE7253174@neuro.uni-luebeck.de> References: <2DBCAEA0-13BA-42A8-A889-F05AE7253174@neuro.uni-luebeck.de> Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E7CA30ACEBC@solaris.neuro.uni-luebeck.de> Dear fieldtrippers, a colleague of mine, Dr. Jörg Bahlmann, currently has an opening for a PhD student. Could you please circulate the attached pdf to anyone who might me interested? Thanks, Nuria -------------------------------------------------- An der Universität zu Lübeck, Klinik für Neurologie ist eine Stelle als Doktorand/Doktorandin zu besetzen. Die Stelle beinhaltet die Durchführung, Auswertung und Interpretation von neurokognitiven Experimenten. Speziell handelt es sich um Untersuchungen zur Interaktion von Motivation und kognitiver Kontrolle bei Parkinson-Patienten und gesunden Probanden. Hierbei kommen die Methoden der funktionellen Kernspintomographie (fMRT) und Transkranielle Magnetstimulation (TMS) zur Anwendung. Das Projekt ist in den Forschungsschwerpunkt der Arbeitsgruppe Kognitive Neurologie eingebettet. Die Arbeitsgruppe ist multidisziplinär und kombiniert eine Vielzahl von neurowissenschaftlichen Methoden. Sie ist im Center of Brain, Behavior, and Metabolism (CBBM) integriert, welches Neurowissenschaftlern ein exzellentes Forschungsumfeld bietet. Für die Forschung stehen ein 3T-MRT-Scanner, mehrere EEG-Labore, TMS-Geräte und ein NIRS-Gerät zur Verfügung. Die Kandidatin/der Kandidat sollte einen Master of Science oder ein Diplom in Psychologie oder anderen einschlägigen Fächern vorweisen können und großes Interesse an Themen und Methoden der kognitiven Neurowissenschaften mitbringen. Vorerfahrung mit fMRT oder TMS und Programmiererfahrung (Matlab, Python, Presentation®) sind von Vorteil, aber nicht Einstellungsvoraussetzung. Die Stelle ist zum nächstmöglichen Zeitpunkt zu besetzen. Sie ist zunächst für zwei Jahre befristet und wird nach Entgeltgruppe 13 TV-L, 65% vergütet. Die Universität Lübeck strebt eine Erhöhung des Anteils von Frauen in der Wissenschaft an und fordert entsprechend qualifizierte Frauen ausdrücklich zur Bewerbung auf. Bewerbungen von Schwerbehinderten werden bei gleicher Eignung und Befähigung bevorzugt berücksichtigt. Bei inhaltlichen Fragen zur ausgeschriebenen Stelle wenden Sie sich bitte an Herrn PD Dr. Jörg Bahlmann (Tel.: 0451-317931-313, E-Mail: joerg.bahlmann at neuro.uni-luebeck.de). Ihre vollständige Bewerbung (Anschreiben, Lebenslauf, Zeugnisse zusammengefasst in einer pdf-Datei) senden Sie bitte bis zum 15. März 2015 an joerg.bahlmann at neuro.uni-luebeck.de -------------- next part -------------- A non-text attachment was scrubbed... Name: Ausschreibung_Doktorandin.pdf Type: application/pdf Size: 110356 bytes Desc: Ausschreibung_Doktorandin.pdf URL: From r.oostenveld at donders.ru.nl Fri Feb 6 14:25:12 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 6 Feb 2015 14:25:12 +0100 Subject: [FieldTrip] MEG/EEG FieldTrip toolkit course in Nijmegen: pre-registration now open Message-ID: Dear All, — Please disseminate to PhD students and postdoctoral researchers working with MEG, EEG and ECoG data analysis. --- On April 20-23, 2015 we will host the "Toolkit of Cognitive Neuroscience: advanced data analysis and source modelling of EEG and MEG data" at the Donders Institute in Nijmegen. This intense 4-day toolkit course will teach you advanced MEG and EEG data analysis skills. Preprocessing, frequency analysis, source reconstruction, connectivity and various statistical methods will be covered. The toolkit will consist of a number of lectures, followed by hands-on sessions in which you will be tutored through the complete analysis of a MEG data set using the FieldTrip toolbox. The lectures and tutoring will be provided by the core FieldTrip development team, and there will also be plenty of opportunity to interact and ask questions to us about your research and data. On the final day you will have the opportunity to work on your own dataset under supervision of the tutors. We can host 40 participants for this toolkit. From past experience we expect the course to be oversubscribed, hence we will start with pre-registration. The final selection of the participants will be based on the motivation, background experience and research interests that are provided in the registration form. The deadline for pre-registration is March 13, 2015. More information, including a preliminary program, can be found at https://www.ru.nl/donders/course-information/courses/toolkit-eeg-meg/ Looking forward to welcoming you in Nijmegen, Robert Oostenveld and Jan-Mathijs Schoffelen. ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Feb 6 15:19:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 6 Feb 2015 15:19:59 +0100 Subject: [FieldTrip] ANNOUNCEMENT: change of source data structure, source.inside now logical rather than indices Message-ID: <5F1DDBF3-8937-43F7-A09E-586FD17992F5@donders.ru.nl> Dear FieldTrip users, For a long time we have been planning to make some changes in the representation of source-reconstructed data. These changes should facilitate the maintenance of the code, the reuse of functionality and accomodate future extensions. Over the last few days I have been working on a first set of changes to the code that affect how the source positions inside the brain are represented. It used to be the case that source.inside and source.outside could be two vectors, containing the indices (i.e. 1, 2, 3, …) of source positions that are inside or outside the brain, respectively. I.e. the combined length of both vectors was equal to size(source.pos.1). In some cases however, the source.inside was represented as a boolean/logical vector with a true or false (a 1 or 0) value for each source position. With this logical representation, there is no need for source.outside. To improve consistency between the source and the volume representation, and to facilitate working with parcellated brain atlases, we have decided to move to a consistent implementation throughout FieldTrip that always uses the boolean/logical representation. So all FieldTrip functions will from now on return source.inside as a boolean vector. The consequence is that the code in your scripts such as for i=1:length(source.inside) select = source.inside(i); % do something with the selected source end will fail, since source.inside will only contain 0 or 1 values. If the source.inside vector has a 0 (i.e. not inside the brain), it will fail, since 0 is not a valid index. This is something you will notice, as MATLAB will give an error. If all values in source.inside vector are 1 (i.e. all inside the brain), MATLAB might not give an error immediately, but the result of the computation is not what it should be, since the computation is repeated over and over for source position 1 rather than all source positions. To get the original behavour with the indices, please use some code like this insideindx = find(source.inside) and then loop over all elements of insideindx. Appologies for the inconvenience this might cause. best regards, Robert PS another upcoming change will be that in the near future we will also deprecate the source.avg and the source.trial sub-structures. Instead of these sub-structures, the results of the source reconstruction will be represented at the top-level of the source structure, as is the case with all other data representations. Please see the ft_datatype_source function (or http://fieldtrip.fcdonders.nl/reference/ft_datatype_source) for an example of the new representation with source.pow rather than source.avg.pow. From Johanna.Fiess at uni-konstanz.de Fri Feb 6 17:23:25 2015 From: Johanna.Fiess at uni-konstanz.de (Johanna Fiess) Date: Fri, 06 Feb 2015 17:23:25 +0100 Subject: [FieldTrip] =?utf-8?q?ANNOUNCEMENT=3A_change_of_source_data_struc?= =?utf-8?q?ture=2C=09source=2Einside_now_logical_rather_than_indice?= =?utf-8?q?s?= In-Reply-To: <5F1DDBF3-8937-43F7-A09E-586FD17992F5@donders.ru.nl> Message-ID: <79edc59a9c2f41fe.54d4ea7e@limbe.rz.uni-konstanz.de> Hallo Christian, ich weiß nicht, ob Du auch auf dem Verteiler bist - und ob diese Änderung für Dich von Interesse ist. Schicke es Dir einfach mal weiter. Viele Grüße und ein schönes WE Hanna Am Freitag, 06. Februar 2015 15:19 CET, Robert Oostenveld schrieb: > Dear FieldTrip users, > > For a long time we have been planning to make some changes in the representation of source-reconstructed data. These changes should facilitate the maintenance of the code, the reuse of functionality and accomodate future extensions. Over the last few days I have been working on a first set of changes to the code that affect how the source positions inside the brain are represented. > It used to be the case that source.inside and source.outside could be two vectors, containing the indices (i.e. 1, 2, 3, …) of source positions that are inside or outside the brain, respectively. I.e. the combined length of both vectors was equal to size(source.pos.1). In some cases however, the source.inside was represented as a boolean/logical vector with a true or false (a 1 or 0) value for each source position. With this logical representation, there is no need for source.outside. > > To improve consistency between the source and the volume representation, and to facilitate working with parcellated brain atlases, we have decided to move to a consistent implementation throughout FieldTrip that always uses the boolean/logical representation. So all FieldTrip functions will from now on return source.inside as a boolean vector. > > The consequence is that the code in your scripts such as > > for i=1:length(source.inside) > select = source.inside(i); > % do something with the selected source end > > will fail, since source.inside will only contain 0 or 1 values. If the source.inside vector has a 0 (i.e. not inside the brain), it will fail, since 0 is not a valid index. This is something you will notice, as MATLAB will give an error. If all values in source.inside vector are 1 (i.e. all inside the brain), MATLAB might not give an error immediately, but the result of the computation is not what it should be, since the computation is repeated over and over for source position 1 rather than all source positions. > > To get the original behavour with the indices, please use some code like this > insideindx = find(source.inside) > and then loop over all elements of insideindx. > > > Appologies for the inconvenience this might cause. > > best regards, > Robert > > > PS another upcoming change will be that in the near future we will also deprecate the source.avg and the source.trial sub-structures. Instead of these sub-structures, the results of the source reconstruction will be represented at the top-level of the source structure, as is the case with all other data representations. Please see the ft_datatype_source function (or http://fieldtrip.fcdonders.nl/reference/ft_datatype_source) for an example of the new representation with source.pow rather than source.avg.pow. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dipl.-Psych. Johanna Fiess Fachbereich Psychologie Universität Konstanz Postfach 905 78457 Konstanz Telefon: +49-(0)7531-88-4604 Fax: +49-(0)7531-88-4601 From berdakho at gmail.com Sat Feb 7 19:32:30 2015 From: berdakho at gmail.com (Berdakh Abibullaev) Date: Sat, 7 Feb 2015 12:32:30 -0600 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes Message-ID: Hi there, Is there any way to "Import anatomy folder" generated by FSL into the FieldTrip ? We are trying to work with infant MRI data pre-processed by FSL for infant EEG source estimation. The data description is available here: http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html And, I am copying it below: Description. The database consists of MRI average templates for a number of ages; in 1-3 month increments through 18 months; then half-year increments through 19-5 years; then 5 year increments through 89 years. The templates were done separately for brain and head. Also included are segmentation PVE volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for infants. Access to the dataset is separated by ages (infants; 0-12 mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 through 17-5 yrs; adults 20-89 years). The segment data for ages 15-months and older consists of GM, WM, CSF, and T2W-derived CSF. The best combination of segments would be the image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. For 3 through 12 months, the best combination of segments would be the nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other Matter") and does not reflect actual CSF. The T2W-derived CSF is identified as bright voxels in the T2W scan and represent actual CSF in the brain or head. There is an atlas derived from FSL "Harvard-Oxford" cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old templates. Overview: ANTS....brain.nii.gz: Average MRI template derived from extracted brain ANTS....head.nii.gz: Average MRI template derived from whole head ANTS....brain-head: brain extracted from head template ANTS....T2W_brain: MRI template separate for extracted brain T2W ANTS....T2W_head: MRI template separate for whole head T2W Segments AVG...T2W_brain...: T2W for individual participants, warped to template, averaged AVG...image_seg_...: Image-based segment averages AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a posteriori FAST AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter AVG....seg_csf: "Other matter" in 3-class segmentation AVG....seg_t2wcsf: T2W-derived CSF Atlas: ANTS...brain...brainstem: The individual files have the brain areas ANTS...brain_atlas: Segmented atlas for all brain areas Please help. Thanks, Berdakh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Feb 8 10:08:07 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 8 Feb 2015 09:08:07 +0000 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes In-Reply-To: References: Message-ID: Hi Berdakh, What do you mean with ‘import anatomy folder’? Please check out the links below in order to formulate your question more constructively. http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 Note that FieldTrip’s low-level fileio functions know how to deal with compressed nifti files, so if your question means ‘can I use FieldTrip to load in images that have been constructed with FSL’, the answer would be yes. For information about supported dataformats, see: http://fieldtrip.fcdonders.nl/dataformat Best wishes, Jan-Mathijs On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev > wrote: Hi there, Is there any way to "Import anatomy folder" generated by FSL into the FieldTrip ? We are trying to work with infant MRI data pre-processed by FSL for infant EEG source estimation. The data description is available here: http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html And, I am copying it below: Description. The database consists of MRI average templates for a number of ages; in 1-3 month increments through 18 months; then half-year increments through 19-5 years; then 5 year increments through 89 years. The templates were done separately for brain and head. Also included are segmentation PVE volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for infants. Access to the dataset is separated by ages (infants; 0-12 mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 through 17-5 yrs; adults 20-89 years). The segment data for ages 15-months and older consists of GM, WM, CSF, and T2W-derived CSF. The best combination of segments would be the image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. For 3 through 12 months, the best combination of segments would be the nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other Matter") and does not reflect actual CSF. The T2W-derived CSF is identified as bright voxels in the T2W scan and represent actual CSF in the brain or head. There is an atlas derived from FSL "Harvard-Oxford" cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old templates. Overview: ANTS....brain.nii.gz: Average MRI template derived from extracted brain ANTS....head.nii.gz: Average MRI template derived from whole head ANTS....brain-head: brain extracted from head template ANTS....T2W_brain: MRI template separate for extracted brain T2W ANTS....T2W_head: MRI template separate for whole head T2W Segments AVG...T2W_brain...: T2W for individual participants, warped to template, averaged AVG...image_seg_...: Image-based segment averages AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a posteriori FAST AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter AVG....seg_csf: "Other matter" in 3-class segmentation AVG....seg_t2wcsf: T2W-derived CSF Atlas: ANTS...brain...brainstem: The individual files have the brain areas ANTS...brain_atlas: Segmented atlas for all brain areas Please help. Thanks, Berdakh. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 16:52:06 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 10:52:06 -0500 Subject: [FieldTrip] cfg.trl matrix Message-ID: I've imported a cnt file that contains TTL trigger events. I defined a prestim time of 1 second and poststim time of 0.5 seconds. However, when I checked the cfg.trl matrix the offset shows "-5000". Can someone explain why? -AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Feb 8 17:34:11 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sun, 8 Feb 2015 17:34:11 +0100 Subject: [FieldTrip] cfg.trl matrix In-Reply-To: References: Message-ID: Hi asauf, is your samplefreq 5000? The offset is the sample amount between the first sample of the trial and the sample corresponding to t=0 in that trial. Best, arjen Op 8 feb. 2015 16:52 schreef "Ausaf Bari" het volgende: > I've imported a cnt file that contains TTL trigger events. I defined a > prestim time of 1 second and poststim time of 0.5 seconds. However, when I > checked the cfg.trl matrix the offset shows "-5000". Can someone explain > why? > > -AB > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berdakho at gmail.com Sun Feb 8 17:43:47 2015 From: berdakho at gmail.com (Berdakh Abibullaev) Date: Sun, 8 Feb 2015 10:43:47 -0600 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes In-Reply-To: References: Message-ID: Hello Jan-Mathijs, My apologies for not being constructive in posing my question. By anatomy folder I meant the MRI segmentation results (scalp, outer skull, inner skull (CSF) and brain) generated by FSL. *Can I use the FieldTrip to load those segmentation results to generate meshes and model BEM for source estimation? * As you know that extracting cortical matters from infant MRI is an extremely difficult task as most MRI segmentation tools are developed using adult brain parameters. And, I presume that "ft_volumesegment" cannot handle infant MRI segmentation. Thanks again, Berdakh. On Sun, Feb 8, 2015 at 3:08 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Berdakh, > > What do you mean with 'import anatomy folder'? Please check out the links > below in order to formulate your question more constructively. > > > http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community > > > http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 > > Note that FieldTrip's low-level fileio functions know how to deal with > compressed nifti files, so if your question means 'can I use FieldTrip to > load in images that have been constructed with FSL', the answer would be > yes. > For information about supported dataformats, see: > http://fieldtrip.fcdonders.nl/dataformat > > Best wishes, > > Jan-Mathijs > > On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev > wrote: > > Hi there, > > Is there any way to "Import anatomy folder" generated by FSL into the > FieldTrip > ? > > We are trying to work with infant MRI data pre-processed by FSL for infant > EEG source estimation. > > > The data description is available here: > http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html > And, I am copying it below: > > Description. > > The database consists of MRI average templates for a number of ages; in > 1-3 month increments through 18 months; then half-year increments through > 19-5 years; then 5 year increments through 89 years. The templates were > done separately for brain and head. Also included are segmentation PVE > volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for > infants. Access to the dataset is separated by ages (infants; 0-12 mo; > preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; > adolescents 11-0 through 17-5 yrs; adults 20-89 years). > > The segment data for ages 15-months and older consists of GM, WM, CSF, and > T2W-derived CSF. The best combination of segments would be the > image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. > For 3 through 12 months, the best combination of segments would be the > nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE > segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other > Matter") and does not reflect actual CSF. The T2W-derived CSF is identified > as bright voxels in the T2W scan and represent actual CSF in the brain or > head. There is an atlas derived from FSL "Harvard-Oxford" cortical and > subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old > templates. > > Overview: > > ANTS....brain.nii.gz: Average MRI template derived from extracted brain > ANTS....head.nii.gz: Average MRI template derived from whole head > ANTS....brain-head: brain extracted from head template > ANTS....T2W_brain: MRI template separate for extracted brain T2W > ANTS....T2W_head: MRI template separate for whole head T2W > > Segments > AVG...T2W_brain...: T2W for individual participants, warped to template, > averaged > AVG...image_seg_...: Image-based segment averages > AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST > AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a > posteriori FAST > AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter > AVG....seg_csf: "Other matter" in 3-class segmentation > AVG....seg_t2wcsf: T2W-derived CSF > > Atlas: > ANTS...brain...brainstem: The individual files have the brain areas > ANTS...brain_atlas: Segmented atlas for all brain areas > > Please help. > > Thanks, > Berdakh. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 17:46:24 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 11:46:24 -0500 Subject: [FieldTrip] cfg.trl matrix In-Reply-To: References: Message-ID: Thanks Arjen. It makes sense now. Yes my sample frequency is 5000. -AB On Sun, Feb 8, 2015 at 11:34 AM, Arjen Stolk wrote: > Hi asauf, is your samplefreq 5000? The offset is the sample amount between > the first sample of the trial and the sample corresponding to t=0 in that > trial. Best, arjen > Op 8 feb. 2015 16:52 schreef "Ausaf Bari" het volgende: > >> I've imported a cnt file that contains TTL trigger events. I defined a >> prestim time of 1 second and poststim time of 0.5 seconds. However, when I >> checked the cfg.trl matrix the offset shows "-5000". Can someone explain >> why? >> >> -AB >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Ausaf A. Bari MD PhD Clinical Fellow Functional Neurosurgery Toronto Western Hospital University of Toronto Phone: 647-624-1929 Email: ausafb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 17:52:24 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 11:52:24 -0500 Subject: [FieldTrip] Problem with ft_databrowser Message-ID: I have 122 trials (equal trial lengths) with 14 channels. I tried to use this: cfg = ft_databrowser(cfg,data); *I'm getting this error:* Warning: The field cfg.demean is deprecated, please specify it as cfg.preproc.demean instead of cfg. > In ft_checkconfig at 461 In ft_databrowser at 157 the input is raw data with 0 channels and 122 trials Error using ft_datatype_raw (line 88) inconsistent number of channels in trial 1 Error in ft_checkdata (line 222) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_databrowser (line 261) data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'yes', 'hassampleinfo', 'yes'); Can someone help? -AB My cfg array looks like this: cfg = dataset: '/Users/user/Desktop/test.cnt' trialfun: @ft_trialfun_general trialdef: [1x1 struct] callinfo: [1x1 struct] version: [1x1 struct] trackconfig: 'off' checkconfig: 'loose' checksize: 100000 showcallinfo: 'yes' debug: 'no' trackcallinfo: 'yes' trackdatainfo: 'no' trackparaminfo: 'no' dataformat: 'ns_cnt' headerformat: 'ns_cnt' event: [1x488 struct] trl: [122x4 double] channel: [] continuous: 'no' demean: 'yes' viewmode: 'vertical' My data array look like this: data = hdr: [1x1 struct] label: {} time: {1x122 cell} trial: {1x122 cell} fsample: 5000 sampleinfo: [122x2 double] trialinfo: [122x1 double] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Sun Feb 8 20:23:24 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Sun, 08 Feb 2015 20:23:24 +0100 Subject: [FieldTrip] Connectivity - Partial directed coherence Message-ID: <54D7B7AC.6040600@uni-ulm.de> Dear Fieldtrippers, I am doing connectivity analysis, more precisely a partial directed coherence. As I understand the output (chan x chan x freq) contains both input (what is the information input from electrode X to electrode Y) and output info (what is the information output from electrode X to Y). How do I have to read the Matrix? For example: I want to know how much information electrode 1 gets from electrode 10 (and vice versa). Thank you a lot! Barbara -- Barbara Schorr, MSc Clinical and Biological Psychology University of Ulm Albert-Einstein-Allee 47 89069 Ulm Therapiezentrum Burgau Kapuzinerstraße 34 89331 Burgau From RICHARDS at mailbox.sc.edu Sun Feb 8 21:09:39 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 8 Feb 2015 20:09:39 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 51, Issue 6 In-Reply-To: References: Message-ID: The answer to the question about the ³Neurodevelopmental MRI database², is yes you can import these files. They are nifti.nii.gz files, and I have used field trip to import them. I also have gone through the field trip procedure to make source models, BEM and FEM head models from these data (though that work is not available on the www site). I have used these head models in EMSE, BESA, CURRY, Fieldtrip. FYI others on this list. Each age has the complete information to make head models for source analysis. This includes: Average MRI template GM, WM, T2WCSF segmented priors Fully segmented BEM-3, 4, or 5 compartment MRI volume Fully segmented head volume for FEM model (e.g., gm, wm, csf, skull, skin, eyes, muscle..) 10-10 electrode positions already co-registered on the head MRI volume (created on the head as Virtual-10-10 electrodes) EGI-GSN-128 and HGSN-128 electrode positions based on average electrodes from individual participants. See Richards, J.E. & Xie, W. (2015) Brains for all the ages: Structural neurodevelopment in infants and children from a life-span perspective. In J. Benson (Ed.), Advances in Child Development and Behavior (Volume 48, chapter 7). Philadephia, PA: Elsevier. DOI:10.1016/bs.acdb.2014.11.001 Richards, J.E. Boswell, C., Stevens, M., & Vendemia, J.M.C. (2015). Evaluating methods for constructing average high-density electrode positions. Brain Topography, 28, 70-86, doi 10.1007/s01548-014-0400-8(pdf ) I am working on a paper describing the child and adolescent electrode positions. John > >Message: 1 >Date: Sat, 7 Feb 2015 12:32:30 -0600 >From: Berdakh Abibullaev >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes >Message-ID: > >Content-Type: text/plain; charset="iso-8859-1" > >Hi there, > >Is there any way to "Import anatomy folder" generated by FSL into the >FieldTrip >? > >We are trying to work with infant MRI data pre-processed by FSL for infant >EEG source estimation. > > > >The data description is available here: > >http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html >And, I am copying it below: > >Description. > >The database consists of MRI average templates for a number of ages; in >1-3 >month increments through 18 months; then half-year increments through 19-5 >years; then 5 year increments through 89 years. The templates were done >separately for brain and head. Also included are segmentation PVE volumes >for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for >infants. >Access to the dataset is separated by ages (infants; 0-12 mo; preschool, >15 >mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 >through 17-5 yrs; adults 20-89 years). > >The segment data for ages 15-months and older consists of GM, WM, CSF, and >T2W-derived CSF. The best combination of segments would be the >image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. >For 3 through 12 months, the best combination of segments would be the >nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE >segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other >Matter") and does not reflect actual CSF. The T2W-derived CSF is >identified >as bright voxels in the T2W scan and represent actual CSF in the brain or >head. There is an atlas derived from FSL "Harvard-Oxford" cortical and >subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old >templates. > >Overview: > >ANTS....brain.nii.gz: Average MRI template derived from extracted brain >ANTS....head.nii.gz: Average MRI template derived from whole head >ANTS....brain-head: brain extracted from head template >ANTS....T2W_brain: MRI template separate for extracted brain T2W >ANTS....T2W_head: MRI template separate for whole head T2W > >Segments >AVG...T2W_brain...: T2W for individual participants, warped to template, >averaged >AVG...image_seg_...: Image-based segment averages >AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori >FAST >AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a >posteriori FAST >AVG...nma_seg_: For infants, non-myelinated axons separate from gray >matter >AVG....seg_csf: "Other matter" in 3-class segmentation >AVG....seg_t2wcsf: T2W-derived CSF > >Atlas: >ANTS...brain...brainstem: The individual files have the brain areas >ANTS...brain_atlas: Segmented atlas for all brain areas > > > >Please help. > >Thanks, >Berdakh. >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >0f1d6/attachment-0001.html> > >------------------------------ > >Message: 2 >Date: Sun, 8 Feb 2015 09:08:07 +0000 >From: "Schoffelen, J.M. (Jan Mathijs)" >To: FieldTrip discussion list >Subject: Re: [FieldTrip] Fieldtrip Compatibility with FSL generated > meshes >Message-ID: >Content-Type: text/plain; charset="windows-1252" > >Hi Berdakh, > >What do you mean with ?import anatomy folder?? Please check out the links >below in order to formulate your question more constructively. > >http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_communi >ty > >http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002 >202 > >Note that FieldTrip?s low-level fileio functions know how to deal with >compressed nifti files, so if your question means ?can I use FieldTrip to >load in images that have been constructed with FSL?, the answer would be >yes. >For information about supported dataformats, see: >http://fieldtrip.fcdonders.nl/dataformat > >Best wishes, > >Jan-Mathijs > >On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev >> wrote: > >Hi there, > >Is there any way to "Import anatomy folder" generated by FSL into the >FieldTrip >? > >We are trying to work with infant MRI data pre-processed by FSL for >infant EEG source estimation. > > >The data description is available here: >http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html >And, I am copying it below: > >Description. > >The database consists of MRI average templates for a number of ages; in >1-3 month increments through 18 months; then half-year increments through >19-5 years; then 5 year increments through 89 years. The templates were >done separately for brain and head. Also included are segmentation PVE >volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) >for infants. Access to the dataset is separated by ages (infants; 0-12 >mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; >adolescents 11-0 through 17-5 yrs; adults 20-89 years). > >The segment data for ages 15-months and older consists of GM, WM, CSF, >and T2W-derived CSF. The best combination of segments would be the >image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. >For 3 through 12 months, the best combination of segments would be the >nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE >segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other >Matter") and does not reflect actual CSF. The T2W-derived CSF is >identified as bright voxels in the T2W scan and represent actual CSF in >the brain or head. There is an atlas derived from FSL "Harvard-Oxford" >cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and >20-24 year old templates. > >Overview: > >ANTS....brain.nii.gz: Average MRI template derived from extracted brain >ANTS....head.nii.gz: Average MRI template derived from whole head >ANTS....brain-head: brain extracted from head template >ANTS....T2W_brain: MRI template separate for extracted brain T2W >ANTS....T2W_head: MRI template separate for whole head T2W > >Segments >AVG...T2W_brain...: T2W for individual participants, warped to template, >averaged >AVG...image_seg_...: Image-based segment averages >AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori >FAST >AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a >posteriori FAST >AVG...nma_seg_: For infants, non-myelinated axons separate from gray >matter >AVG....seg_csf: "Other matter" in 3-class segmentation >AVG....seg_t2wcsf: T2W-derived CSF > >Atlas: >ANTS...brain...brainstem: The individual files have the brain areas >ANTS...brain_atlas: Segmented atlas for all brain areas > >Please help. > >Thanks, >Berdakh. > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >b4262/attachment-0001.html> > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 51, Issue 6 >**************************************** From n.lam at donders.ru.nl Sun Feb 8 22:49:24 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Sun, 8 Feb 2015 21:49:24 +0000 Subject: [FieldTrip] Problem with ft_databrowser In-Reply-To: References: Message-ID: Hi Ausaf, I believe (as is noted in the error message) that you need to change your cfg structure: cfg.demean = 'yes'; should be 'cfg.preproc.demean' = 'yes'; Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Ausaf Bari [ausafb at gmail.com] Sent: 08 February 2015 17:52 To: FieldTrip discussion list Subject: [FieldTrip] Problem with ft_databrowser I have 122 trials (equal trial lengths) with 14 channels. I tried to use this: cfg = ft_databrowser(cfg,data); I'm getting this error: Warning: The field cfg.demean is deprecated, please specify it as cfg.preproc.demean instead of cfg. > In ft_checkconfig at 461 In ft_databrowser at 157 the input is raw data with 0 channels and 122 trials Error using ft_datatype_raw (line 88) inconsistent number of channels in trial 1 Error in ft_checkdata (line 222) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_databrowser (line 261) data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'yes', 'hassampleinfo', 'yes'); Can someone help? -AB My cfg array looks like this: cfg = dataset: '/Users/user/Desktop/test.cnt' trialfun: @ft_trialfun_general trialdef: [1x1 struct] callinfo: [1x1 struct] version: [1x1 struct] trackconfig: 'off' checkconfig: 'loose' checksize: 100000 showcallinfo: 'yes' debug: 'no' trackcallinfo: 'yes' trackdatainfo: 'no' trackparaminfo: 'no' dataformat: 'ns_cnt' headerformat: 'ns_cnt' event: [1x488 struct] trl: [122x4 double] channel: [] continuous: 'no' demean: 'yes' viewmode: 'vertical' My data array look like this: data = hdr: [1x1 struct] label: {} time: {1x122 cell} trial: {1x122 cell} fsample: 5000 sampleinfo: [122x2 double] trialinfo: [122x1 double] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Tue Feb 10 06:10:44 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Tue, 10 Feb 2015 00:10:44 -0500 Subject: [FieldTrip] Selecting Trials from Blocks Message-ID: I have large .cnt (neuroscan) files with trials under different conditions. The trials are marked by triggers but the conditions are not marked. I have my own record of timestamps for the start of each condition block. How do cut out a block (e.g. 30 minute block) and then subsequently break that into trials based on triggers? I know you can use ft_redefinetrial to choose a section based on a begsample and endsample but I'm having trouble using the resulting data structure as an input to ft_definetrial. -AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Tue Feb 10 08:43:41 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Tue, 10 Feb 2015 02:43:41 -0500 Subject: [FieldTrip] Selecting Trials from Blocks In-Reply-To: References: Message-ID: Hi Ausaf, Have you tried to read all EEG events as usual? You then can compare the tri or trialinfo sample value to your condition values. This information could then be stored in a new column of data in the data.trl structure. Best, Raquel On Tue, Feb 10, 2015 at 12:10 AM, Ausaf Bari wrote: > I have large .cnt (neuroscan) files with trials under different > conditions. The trials are marked by triggers but the conditions are not > marked. I have my own record of timestamps for the start of each condition > block. How do cut out a block (e.g. 30 minute block) and then subsequently > break that into trials based on triggers? > > I know you can use ft_redefinetrial to choose a section based on a > begsample and endsample but I'm having trouble using the resulting data > structure as an input to ft_definetrial. > > -AB > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Tue Feb 10 13:54:16 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Tue, 10 Feb 2015 07:54:16 -0500 Subject: [FieldTrip] Selecting Trials from Blocks In-Reply-To: References: Message-ID: Thanks Raquel. I didn't realize I could recode by adding that column. I'll try it. Thanks! On Tuesday, February 10, 2015, Raquel Bibi wrote: > Hi Ausaf, > Have you tried to read all EEG events as usual? You then can compare the > tri or trialinfo sample value to your condition values. This information > could then be stored in a new column of data in the data.trl structure. > Best, > > Raquel > > On Tue, Feb 10, 2015 at 12:10 AM, Ausaf Bari > wrote: > >> I have large .cnt (neuroscan) files with trials under different >> conditions. The trials are marked by triggers but the conditions are not >> marked. I have my own record of timestamps for the start of each condition >> block. How do cut out a block (e.g. 30 minute block) and then subsequently >> break that into trials based on triggers? >> >> I know you can use ft_redefinetrial to choose a section based on a >> begsample and endsample but I'm having trouble using the resulting data >> structure as an input to ft_definetrial. >> >> -AB >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- Ausaf A. Bari MD PhD Clinical Fellow Functional Neurosurgery Toronto Western Hospital University of Toronto Phone: 647-624-1929 Email: ausafb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgio.arcara at gmail.com Wed Feb 11 10:46:57 2015 From: giorgio.arcara at gmail.com (Giorgio Arcara) Date: Wed, 11 Feb 2015 10:46:57 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA Message-ID: Dear Fieldtrip users, I recorded some MEG data in two separate recordings. The recordings were one immediately after the other, with a short pause (of few seconds) in the middle. In my recording I stored the head position continuously (CTF-system). My aim is to combine the data from the two recordings to run a single ICA, with the aim of identifying artifacts. After the preprocessing and after using ft_appenddata I receive I warning because there is an inconsistency in sensor positions stored in the data structure. The appending works but I lose all sensor information. (to draw some figures I solved retrieving the sensor information from some previous data objects). I'm just using this data for an ERF analysis, but I'd like to perform also source analysis later. My questions are: how to deal with this issue? Do you think it is reasonable (as I think) to perform an ICA on the overall data even if from different files? Could this issue affect a following source analysis? Thanks! -- *Giorgio Arcara* Post-doc research fellow Department of Neuroscience, University of Padua Via Giustiniani, 2 35128, Padua, Italy https://sites.google.com/site/giorgioarcara/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Feb 11 12:16:37 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 11 Feb 2015 12:16:37 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA In-Reply-To: References: Message-ID: Dear Giorgio, FieldTrip kind of 'protects' the users against themselves when appending different data sets, because if sensor positions are substantially different then this could be a serious problem. However, if you are certain the sensor positions are highly comparable (e.g. if you've used interactive realignment during the recording session) you can simply take the .grad field (which contains the sensor positions) of one of the datasets (best to use the first one, if that's the one you aligned to) and put it in the combined data structure. Best, Eleke On 11 February 2015 at 10:46, Giorgio Arcara wrote: > Dear Fieldtrip users, > > I recorded some MEG data in two separate recordings. The recordings were one > immediately after the other, with a short pause (of few seconds) in the > middle. In my recording I stored the head position continuously > (CTF-system). > > My aim is to combine the data from the two recordings to run a single ICA, > with the aim of identifying artifacts. > > After the preprocessing and after using ft_appenddata I receive I warning > because there is an inconsistency in sensor positions stored in the data > structure. > > The appending works but I lose all sensor information. (to draw some figures > I solved retrieving the sensor information from some previous data objects). > > I'm just using this data for an ERF analysis, but I'd like to perform also > source analysis later. > > > My questions are: how to deal with this issue? Do you think it is reasonable > (as I think) to perform an ICA on the overall data even if from different > files? Could this issue affect a following source analysis? > > > > > Thanks! > > > -- > Giorgio Arcara > > Post-doc research fellow > > Department of Neuroscience, University of Padua > Via Giustiniani, 2 > 35128, Padua, Italy > > https://sites.google.com/site/giorgioarcara/ > From jorn at artinis.com Wed Feb 11 14:29:48 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Wed, 11 Feb 2015 14:29:48 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA In-Reply-To: References: Message-ID: <002b01d045fe$d0361780$70a24680$@artinis.com> Hi Giorgio, you could also try to use ft_megrealign, which projects the channels of your data to source space and then projects the activity back to some predefined set of sensors. I have never tested how well this function works, but it was intended for such purposes back then ;) http://fieldtrip.fcdonders.nl/reference/ft_megrealign The documentation states that it's for timelocked data, but I am 100% sure that the code will only work on raw data. Maybe test both, simply copying over the sensor description as Eleke (I like that typo!) suggested and compare it with what ft_megrealign gives you and decide for yourself what you prefer best/seems to give most reliable results. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems  |  +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Wednesday, February 11, 2015 12:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Appending data from two sessions for ICA > > Dear Giorgio, > > FieldTrip kind of 'protects' the users against themselves when appending > different data sets, because if sensor positions are substantially different > then this could be a serious problem. However, if you are certain the sensor > positions are highly comparable (e.g. if you've used interactive realignment > during the recording session) you can simply take the .grad field (which > contains the sensor positions) of one of the datasets (best to use the first > one, if that's the one you aligned to) and put it in the combined data > structure. > > Best, > Eleke > > On 11 February 2015 at 10:46, Giorgio Arcara > wrote: > > Dear Fieldtrip users, > > > > I recorded some MEG data in two separate recordings. The recordings > > were one immediately after the other, with a short pause (of few > > seconds) in the middle. In my recording I stored the head position > > continuously (CTF-system). > > > > My aim is to combine the data from the two recordings to run a single > > ICA, with the aim of identifying artifacts. > > > > After the preprocessing and after using ft_appenddata I receive I > > warning because there is an inconsistency in sensor positions stored > > in the data structure. > > > > The appending works but I lose all sensor information. (to draw some > > figures I solved retrieving the sensor information from some previous data > objects). > > > > I'm just using this data for an ERF analysis, but I'd like to perform > > also source analysis later. > > > > > > My questions are: how to deal with this issue? Do you think it is > > reasonable (as I think) to perform an ICA on the overall data even if > > from different files? Could this issue affect a following source analysis? > > > > > > > > > > Thanks! > > > > > > -- > > Giorgio Arcara > > > > Post-doc research fellow > > > > Department of Neuroscience, University of Padua Via Giustiniani, 2 > > 35128, Padua, Italy > > > > https://sites.google.com/site/giorgioarcara/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Thu Feb 12 11:00:35 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 12 Feb 2015 11:00:35 +0100 Subject: [FieldTrip] Fwd: Postdoc Position Available References: <54DBD62D.1020501@sipi.usc.edu> Message-ID: <164C4977-18F6-4225-B2E1-E373A80A74FD@donders.ru.nl> Post-Doctoral Research Associate Biomedical Imaging Group Signal and Image Processing Institute University of Southern California A Postdoctoral Research Associate position is available immediately to work on brain network analysis with a focus on integrating electrophysiological (MEG, EEG, ECoG, LFP) measures with MR imaging data. This position requires knowledge of the models and methods used for connectivity modeling, and the mathematical and software background to develop and implement novel approaches. This is part of an NIH supported project to develop a multimodal brain connectivity atlas in collaboration with John Mosher and colleagues in the Epilepsy Center at the Cleveland Clinic. Data in the atlas will include spontaneous and evoked invasive and noninvasive electrophysiology and structural, resting and diffusion MRI. The position will also involve working with and contributing to the BrainStorm software (http://neuroimage.usc.edu/brainstorm/). Required Qualifications: PhD in Electrical Engineering, Statistics, Computer Science, Physics, Neuroscience or related fields and publications related to brain mapping. Programming experience, preferably including Matlab, Java, C, C++. The University of Southern California strongly values diversity and is committed to equal opportunity in employment. Women and men, and members of all racial and ethnic groups, are encouraged to apply. Send applications to: Richard M. Leahy, Ph.D. Professor and Director Signal and Image Processing Institute 3740 McClintock Ave, EEB400 University of Southern California Los Angeles, CA 90089 2564 http://neuroimage.usc.edu leahy at sipi.usc.edu -- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PostDoc_2015.pdf Type: application/pdf Size: 10763 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From payashi.garry at seh.ox.ac.uk Thu Feb 12 14:38:31 2015 From: payashi.garry at seh.ox.ac.uk (Payashi Garry) Date: Thu, 12 Feb 2015 13:38:31 +0000 Subject: [FieldTrip] TFR channel average plot Message-ID: Dear FieldTrip discussion list I was wondering if there was a way of displaying the channel average plot in multi plot TFR? I would like to represent my time/frequency plot as an average of all the channels and was wondering if there was a function in multi plot to enable this? Many thanks Payashi **** Dr Payashi Garry MB BChir FRCA Specialty Registrar in Anaesthetics and BRC Research Fellow Nuffield Department of Clinical Neurosciences John Radcliffe Hospital Oxford OX3 9DU Tel: 01865 572878 From tzvetan.popov at uni-konstanz.de Thu Feb 12 15:54:20 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 12 Feb 2015 15:54:20 +0100 Subject: [FieldTrip] TFR channel average plot In-Reply-To: References: Message-ID: <117D696B-CFE9-4A1E-B691-3F492C0C1382@uni-konstanz.de> Dear Payashi, there are two options: 1). During the call to ft_mulitplotTFR you can interactively select all the channels with the mouse cursor. This is allowed by the cfg.interactive = ‘yes’;, which is the default. 2). You call ft_singleplotTFR without specifying cfg.channel = XY. Thus you’ll get an average across all channels in your input structure. best tzvetan > Dear FieldTrip discussion list > > I was wondering if there was a way of displaying the channel average plot in multi plot TFR? I would like to represent my time/frequency plot as an average of all the channels and was wondering if there was a function in multi plot to enable this? > > Many thanks > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.donda at hotmail.com Thu Feb 12 17:26:04 2015 From: a.donda at hotmail.com (A. Donda) Date: Thu, 12 Feb 2015 16:26:04 +0000 Subject: [FieldTrip] "mask" option being ignored when plotting source statistics Message-ID: Hi everybody, when trying to plot the results of the group-level source statistics with the option "mask", it seems that ft_sourceplot ignores the "mask" option and just plots all values of the t-statistic map. I even changed manually the field data.mask (taking logic values 0 / 1) to see whether that affects the plot, but nothing changes. Is there something obvious in the plotting function "ft_sourceplot" that I oversaw? The result of statistics for differences between two source estimates has the following structure: stat = prob: [38x48x41 double] cirange: [38x48x41 double] mask: [38x48x41 logical] stat: [38x48x41 double] ref: [38x48x41 double] dim: [38 48 41] inside: [1x37163 double] outside: [1x37621 double] pos: [74784x3 double] freq: 22.4439 cfg: [1x1 struct] Then I interpolate the stat data to one normalized (to MNI space) mri from one subject cfg = [];cfg.parameter = 'all';statplot = ft_sourceinterpolate(cfg, stat, norm); To plot only significant voxels I use stat.mask (i.e. statplot.mask: values 0 and 1) to mask the data, but it is ignored when plotting: cfg = [];cfg.method = 'ortho';cfg.funparameter = 'stat';cfg.maskparameter = 'mask';cfg.maskstyle = 'saturation';cfg.opacitymap = 'rampup';cfg.opacitylim =[0 1]figureft_sourceplot(cfg, statplot); The plot simply shows all values of the funparameter statplot.stat If I missed sthg, I would be grateful for any feedback. Thanks! A. Donda -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Thu Feb 12 23:13:34 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Thu, 12 Feb 2015 17:13:34 -0500 Subject: [FieldTrip] Error with Precprocessing LFPs Message-ID: Can someone explain what this error means? Reading data ..... Scaling data ..... Reading Event Table... Warning: events imported with a time shift might be innacurate Warning: Matrix is singular to working precision. > In ft_preproc_polyremoval at 76 In fieldtrip-20150212/private/preproc at 315 In ft_preprocessing at 590 Warning: Matrix is singular to working precision. > In ft_preproc_polyremoval at 76 In ft_preproc_baselinecorrect at 49 In fieldtrip-20150212/private/preproc at 348 In ft_preprocessing at 590 The error occurs after "data=ft_preprocessing(cfg)": cfg = []; cfg.dataset = 'file.cnt'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = [11 12 21 22 31 32 41 42 51 52]; cfg.trialdef.prestim = -1; cfg.trialdef.poststim = .5; cfg = ft_definetrial(cfg); cfg.channel={'channel2' 'channel3'}; cfg.demean ='yes'; cfg.reref = 'yes'; cfg.implicitref = []; cfg.refchannel = {'channel3'}; data = ft_preprocessing(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From elam4HCP at gmail.com Sat Feb 14 01:33:59 2015 From: elam4HCP at gmail.com (elam4HCP at gmail.com) Date: Fri, 13 Feb 2015 18:33:59 -0600 Subject: [FieldTrip] Announcing the 2015 HCP Course: "Exploring the Human Connectome" Message-ID: <125601d047ed$ecca8160$c65f8420$@gmail.com> We are pleased to announce the 2015 HCP Course: "Exploring the Human Connectome", to be held June 8-12 at the Marriott Resort Waikiki Beach , in Honolulu, Hawaii, USA. This 5-day intensive course will provide training in the acquisition, analysis and visualization of imaging and behavioral data from the Human Connectome Project (HCP) using methods and informatics tools developed by the WU-Minn HCP consortium plus data made freely available to the neuroscience community. The course is designed for investigators who are interested in: * using data being collected and distributed by HCP * acquiring and analyzing HCP-style imaging and behavioral data at your own institution * processing your own non-HCP imaging data using HCP pipelines and methods * learning to use Connectome Workbench tools and the CIFTI connectivity data format * learning HCP multi-modal neuroimaging analysis methods, including those that combine MEG and MRI data * positioning yourself to capitalize on HCP-style data from forthcoming large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human Disease) Participants will learn how to acquire, analyze, visualize, and interpret data from resting-state and task-evoked magnetoencephalography (MEG), four major MR modalities (structural MR, resting-state fMRI, diffusion imaging, task-evoked fMRI), plus extensive behavioral data. Lectures and labs will provide grounding in neurobiological as well as methodological issues involved in interpreting multimodal data, and will span the range from single-voxel/vertex to brain network analysis approaches. The course is open to graduate students, postdocs, faculty, and industry participants. The course is aimed at both new and existing users of HCP data, methods, and tools, and will cover both basic and advanced topics. Prior experience in human neuroimaging or in computational analysis of brain networks is desirable, preferably including familiarity with FSL and Freesurfer software. For more info and to register visit the HCP Course website . If you would like a flyer to post for interested colleagues, email elam at wustl.edu. We hope to see you in Hawaii! Best, 2015 HCP Course Organizers Jennifer Elam, Ph.D. Outreach Coordinator, Human Connectome Project Washington University School of Medicine Department of Anatomy and Neurobiology, Box 8108 660 South Euclid Avenue St. Louis, MO 63110 314-362-9387 elamj at pcg.wustl.edu www.humanconnectome.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From demiral.007 at gmail.com Sat Feb 14 17:58:21 2015 From: demiral.007 at gmail.com (Baris Demiral) Date: Sat, 14 Feb 2015 11:58:21 -0500 Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? Message-ID: Hi all, I am testing clustering based correction algorithms on a TF power data in a predefined frequent band; theta. I have four conditions. I used F statistic. I defined neighbors moderately so that the number of neighbors is not very small or extremely large. In some analyses I used pairwise t-test statistic to compare between conditions as well. I have a-priory expectations, such that some conditions will increase the centro-frontal theta, and some will increase the posterior theta. I use maxsum and wcm approaches. I heave the following questions: -Why do I observe that very distant electrodes are clustered together? I noticed that FCZ is clustered with occipital electrodes and belong to the same cluster written as in stat.cfg.posclusterlabel (label 1). In some ways I can understand that because my task produces highly posteriorized theta power. The centro-frontal power is weaker. This leads to my next question: "Is there a watershed type of algorithm to separate these activities?" - Are the electrodes I see in the plotting (marked by *,x,+) the peak electrodes in the clusters, or do these electrodes form the significant clusters (with smaller p values < .01, .05 etc)? Because, if the cluster is formed between distant electrodes as mentioned above, I would expect to see the intermediate electrodes (such as CZ etc.) in the cluster electrode list as well. -Can you implement in plotting function where color can represent the cluster number? The *,+,x signs represent thresholds, but I cannot see which electrode belongs to which cluster. If you color code electrodes, it will be very helpful. -Is there a range of weight values for the weighted cluster mass (wcm) approach? I looked at the paper, and seems like 0.45-.055 seems to be the weight parameter. Is this correct? Thanks, -- S. Baris Demiral NIH/NIDCD 10 Center Drive Building 10, 5C410 Bethesda, 20892 MD -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Sun Feb 15 04:53:04 2015 From: pgoodin at swin.edu.au (Peter Goodin) Date: Sun, 15 Feb 2015 03:53:04 +0000 Subject: [FieldTrip] MEG resting state covariance matrix estimate without empty room recording? Message-ID: Hi Fieldtrip list, I'm having a bit of a quandary at the moment regarding resting state data. In order to generate the covariance matrix all the papers I've seen estimate it from an empty room recording on the day of testing which makes sense. The problem I have is that while I have 5+ minutes of resting state data for each participant, there's no empty room recordings to go along with it. So I've been doing some thinking about the "least wrong" method of estimating the covariance (between a "trial by trial" method where covariance is estimated from epoched data) vs. estimation from the entire recording. My conclusions have been less than stellar with the idea that the trial by trial method is a really stupid one due to the non-timelocked nature of resting state analysis while estimation from the entire recording is fraught with problems due to the shifting nature of resting state data leading to a bad estimation of noise to begin with. To further complicate the issue I'm using a neuromag system which removes noise from outside the head sphere as a required method, but I'm not sure if this would be a positive or negative influence on the covariance matrix. Has anyone had to deal with a similar problem / can anyone recommend any literature on the topic? Thanks for any assistance, Peter _____________________ Peter Goodin, BSc (Hons), Ph.D Candidate (submitted). Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 http://www.swinburne.edu.au/swinburneresearchers/index.php?fuseaction=profile&pid=4149 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 From RICHARDS at mailbox.sc.edu Sun Feb 15 06:27:01 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 15 Feb 2015 05:27:01 +0000 Subject: [FieldTrip] lead field Cholesky.... Message-ID: I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Mon Feb 16 06:19:33 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 16 Feb 2015 05:19:33 +0000 Subject: [FieldTrip] ROI for ft_sourcestatistics Message-ID: Hi all, I'm having some difficulty restricting source statistics to a region of interest. I am running the ft_sourcestatistics with the following cfg for ROI: cfg.atlas = ft_read_atlas('~/MATLAB/fieldtrip-20140910/template/atlas/aal/ROI_MNI_V4.nii') cfg.roi ={-5,0,3}; cfg.sphere=3; cfg.inputcoord = 'mni'; This results in the following error: Error using ft_volumelookup (line 131) either specify cfg.sphere or cfg.box Error in statistics_wrapper (line 140) tmp = ft_volumelookup(tmpcfg, varargin{1}); Error in ft_sourcestatistics (line 112) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I had understood that this should have chosen the grid position (-5, 0, 3) and then then selected grid points within a 3cm radius around this point as the ROI. These variables are just for trying it out, and are not what I will be using once I get this code working. Any help much appreciated. P.s. I had thought that the following code would return anatomical labels for this ROI. Instead it just returns a matrix of zeros with the dimensions of source.dim. cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi ={-5,0,3}; cfg.sphere=3; labels = ft_volumelookup( cfg, sourceData) Again, any help will be much appreciated! Regards, Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Mon Feb 16 14:34:45 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Mon, 16 Feb 2015 13:34:45 +0000 Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? In-Reply-To: References: Message-ID: Hi S. Baris Demiral, I have answers some of your questions, see below. Please note that it was difficult to answer all your questions because you didn't provide provide the actual code you used. Although your description is helpful, being able to see the actual parameters you implemented, and the specific function (e.g, did you use ft_freqstatistics, and did you use ft_clusterplot?) make it easier for anyone in the community attempting to answer your questions. Please see the FAQ for more details: http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_communityhttp://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community. I'd like to point out that you can make good use of the search function (both inside FT - on the top right corner, and just on google), and reading the documentation for the functions that you are using, as many of your answers can be found there. Finally, this FAQ should be of interest to you: http://fieldtrip.fcdonders.nl/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Baris Demiral [demiral.007 at gmail.com] Sent: 14 February 2015 17:58 To: FieldTrip discussion list Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? Hi all, I am testing clustering based correction algorithms on a TF power data in a predefined frequent band; theta. I have four conditions. I used F statistic. I defined neighbors moderately so that the number of neighbors is not very small or extremely large. In some analyses I used pairwise t-test statistic to compare between conditions as well. I have a-priory expectations, such that some conditions will increase the centro-frontal theta, and some will increase the posterior theta. I use maxsum and wcm approaches. I heave the following questions: -Why do I observe that very distant electrodes are clustered together? I noticed that FCZ is clustered with occipital electrodes and belong to the same cluster written as in stat.cfg.posclusterlabel (label 1). ==> This could be due to the way your defined your neighbourhood structure. However, I can't make any conclusion from your defnition of "not very small or extremely large". Usually, when the neighbours are defined it specifies the neighbourhood size in the matlab workspace, and it would also help to know what you specific for cfg.method, when calling ft_prepare_neighbours. ==> It is important to note that even if there was a watershed method that it wouldn't answer the question of whether the centro-frontal theta is distinct from the occipital theta. More generally, the use of clustering won't answer this question either. It is better to use a feature in the data e.g., power change, to determine whether the theta differs between (groups of) sensors. In some ways I can understand that because my task produces highly posteriorized theta power. The centro-frontal power is weaker. This leads to my next question: "Is there a watershed type of algorithm to separate these activities?" - Are the electrodes I see in the plotting (marked by *,x,+) the peak electrodes in the clusters, or do these electrodes form the significant clusters (with smaller p values < .01, .05 etc)? ==> I assume you are using ft_clusterplot, and in the documentation of this function it states that the "(default ['*','x','+','o','.'] for p < [0.01 0.05 0.1 0.2 0.3])" ==> Electrodes marked with the same symbol belong the the same cluster (whether they are significant depends on the symbol, or the way you've assigned what the symbols mean). Because, if the cluster is formed between distant electrodes as mentioned above, I would expect to see the intermediate electrodes (such as CZ etc.) in the cluster electrode list as well. -Can you implement in plotting function where color can represent the cluster number? The *,+,x signs represent thresholds, but I cannot see which electrode belongs to which cluster. If you color code electrodes, it will be very helpful. ==> The elements in stat.poscluster/stat.negclusters are sorted according their p-values such that the cluster with the smallest p-value is first. ==> Part of this tutorial also applies to TF data, it should help you with differentiating clusters (and not just using the symbols): http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock The section of interest begins following text "We now briefly discuss the configuration fields that are not specific for ft_timelockstatistics:". ==> I cannot implement this feature, however, if you would like to contribute to FT by adding this functionality, you're welcome to do so, see http://fieldtrip.fcdonders.nl/contribute -Is there a range of weight values for the weighted cluster mass (wcm) approach? I looked at the paper, and seems like 0.45-.055 seems to be the weight parameter. Is this correct? ==> As a user, you need to determine and define a weight that is suitable for your data. The parameter to specify the weight is, cfg.wcm_weight. Thanks, -- S. Baris Demiral NIH/NIDCD 10 Center Drive Building 10, 5C410 Bethesda, 20892 MD -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Feb 16 14:37:47 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 16 Feb 2015 13:37:47 +0000 Subject: [FieldTrip] lead field Cholesky.... In-Reply-To: References: Message-ID: Update on this. I may have solved my own problem. I had “nasal cavity” with an assigned conductivity of 0. I changed this to a very small value, and it passed this step at least once. I will let you know if this happens again. Thanks in advance for your consideration. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** From: , John Richards > Date: Sunday, February 15, 2015 at 12:26 AM To: "fieldtrip at science.ru.nl" > Subject: lead field Cholesky.... I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From marta.bortoletto at cognitiveneuroscience.it Mon Feb 16 15:09:00 2015 From: marta.bortoletto at cognitiveneuroscience.it (Marta Bortoletto) Date: Mon, 16 Feb 2015 14:09:00 +0000 (UTC) Subject: [FieldTrip] Negative values of debiased wPLI Message-ID: <1260984826.7627092.1424095740727.JavaMail.yahoo@mail.yahoo.com> Dear Community,I am using the debiased wPLI to estimate connectivity between 70 EEG electrodes. I have about 150 trials for each subject. I noticed that some values of my 70x70 dwPLI matrix are negative. My understanding is that all values should be between 0 and 1, but for some reason I can get negative values from the debiasing process. My question is: Shall I calculate the absolute value of these negative values? Otherwise what shall I do with them? Thank you in advance for your help.Marta -------------- next part -------------- An HTML attachment was scrubbed... URL: From miano at lsbu.ac.uk Mon Feb 16 16:38:43 2015 From: miano at lsbu.ac.uk (Mian, Omar) Date: Mon, 16 Feb 2015 15:38:43 +0000 Subject: [FieldTrip] eeglab2fieldtrip - Fieldtrip vs EEGLAB version Message-ID: Hello, There seem to be differences between the eeglab2fieldtrip.m when the Fieldtrip and EEGLAB versions are compared. Is this an oversight? Which one is "better" ? data.cfg.version.id contains a later date in the Fieldtrip version, but the file properties modified date is later in the EEGLAB version. The versions I am comparing are: \fieldtrip-20150109\external\eeglab\eeglab2fieldtrip.m \eeglab13_4_4b\plugins\dipfit2.3\eeglab2fieldtrip.m Thanks Omar --------------------------- Omar Mian, Phd Research Fellow School of Applied Sciences London South Bank University 103 Borough Road London SE1 0AA Copyright in this email and in any attachments belongs to London South Bank University. This email, and its attachments if any, may be confidential or legally privileged and is intended to be seen only by the person to whom it is addressed. If you are not the intended recipient, please note the following: (1) You should take immediate action to notify the sender and delete the original email and all copies from your computer systems; (2) You should not read copy or use the contents of the email nor disclose it or its existence to anyone else. The views expressed herein are those of the author(s) and should not be taken as those of London South Bank University, unless this is specifically stated. London South Bank University is a company limited by guarantee registered in England and Wales. The following details apply to London South Bank University: Company number - 00986761; Registered office and trading address - 103 Borough Road London SE1 0AA; VAT number - 778 1116 17 Email address - LSBUinfo at lsbu.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Feb 16 16:47:11 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 16 Feb 2015 15:47:11 +0000 Subject: [FieldTrip] More: lead field Cholesky.... Message-ID: I solved this problem on my windows computers. Now when I run the same program on a Linux machine, I get the same output. I note that with the windows computer I had to add the MS Visual C++ 2008 redistributable and the Intel Visual Fortran redistributable libraries. I found in another post that someone said these libraries are unnecessary on Linux, I presume that means either these libraries exist on Linux already, or that they use a different library for these functions. My linux is Red Hat 7, MATLAB is the 2014a, FT is the 2/14/15 download. I realize this may be a question for the simbio development group, if so would you let me know and I will try to contact that group. By the way the models are a five segmented head (wm, gm, csf, skull, scalp) or fully segmented head (the former + eyes, nasal cavity, head-muscle, ….); the electrodes are co-registered with the MRI outside of FT so they fit correctly on the scalp; Thanks, John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu ************************************************* [cid:75EDAFDB-FCB8-4E5C-A9A4-4A2E0A1B56B7] From: , John Richards > Date: Monday, February 16, 2015 at 8:37 AM To: "fieldtrip at science.ru.nl" > Subject: Re: lead field Cholesky.... Update on this. I may have solved my own problem. I had “nasal cavity” with an assigned conductivity of 0. I changed this to a very small value, and it passed this step at least once. I will let you know if this happens again. Thanks in advance for your consideration. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** From: , John Richards > Date: Sunday, February 15, 2015 at 12:26 AM To: "fieldtrip at science.ru.nl" > Subject: lead field Cholesky.... I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0E9D0CE7-F37D-4858-BC01-79FD2F2554B1[1].png Type: image/png Size: 30144 bytes Desc: 0E9D0CE7-F37D-4858-BC01-79FD2F2554B1[1].png URL: From ktyler at swin.edu.au Tue Feb 17 06:23:57 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Tue, 17 Feb 2015 05:23:57 +0000 Subject: [FieldTrip] centre of head bias Message-ID: Hi all, A question about the centre head bias. Does computing a contrast of conditions remove the issue of the centre head bias? Read below. The Localizing oscillatory sources tutorial talks about the possibility of a beamformer over estimating power in the centre of the head, and suggests several methods of counteracting this. After suggestion use of the NAI to counter this bias, the tutorial goes on to show this beamformer method using contrasting conditions and says that using this approach we can "assume that the noise bias is the same for the pre- and post-stimulus interval and it will thus be removed." The tutorial uses the following code to do this: sourceDiff = sourcePost_con; sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; My question again: Does using this approach and computing the contrast condition remove the centre of head bias for this contrasted condition? Thanks! Kaelasha PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Feb 17 07:47:43 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 17 Feb 2015 07:47:43 +0100 Subject: [FieldTrip] centre of head bias In-Reply-To: References: Message-ID: Hi Kaelasha, The center-of-head bias is due to noise. Since you can assume the noise to be uncorrelated across experimental conditions, you can assume this bias will not be present in a contrast. To verify this for yourself, simply plot the beamforming results for two conditions separately; you will see a strong center-of-head bias. Subtract one big blob from another equally big blob and they should disappear :) So, plot the (normalized) difference, and you will likely notice less center-of-head bias. Best, Eelke On 17 February 2015 at 06:23, Kaelasha Tyler wrote: > Hi all, > > A question about the centre head bias. > > Does computing a contrast of conditions remove the issue of the centre head > bias? Read below. > > The Localizing oscillatory sources tutorial talks about the possibility of a > beamformer over estimating power in the centre of the head, and suggests > several methods of counteracting this. > > After suggestion use of the NAI to counter this bias, the tutorial goes on > to show this beamformer method using contrasting conditions and says that > using this approach we can "assume that the noise bias is the same for the > pre- and post-stimulus interval and it will thus be removed." > > The tutorial uses the following code to do this: > > sourceDiff = sourcePost_con; > sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ > sourcePre_con.avg.pow; > > My question again: Does using this approach and computing the contrast > condition remove the centre of head bias for this contrasted condition? > > Thanks! > Kaelasha > > PhD Candidate > > Brain and Psychological Sciences Research Centre > > Swinburne University of Technology > > Melbourne > > Australia From jan.schoffelen at donders.ru.nl Tue Feb 17 07:48:58 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 17 Feb 2015 06:48:58 +0000 Subject: [FieldTrip] centre of head bias In-Reply-To: References: Message-ID: <4BD7A3E7-2A26-47AF-ABCE-F2AC43019ACD@fcdonders.ru.nl> Hi Kaelasha, What’s the question behind this question? In principle the normalization step described should largely alleviate the depth bias. Whether or not the remaining estimated activity near the centre of the head is to be trusted, is another story. Best, Jan-Mathijs On Feb 17, 2015, at 6:23 AM, Kaelasha Tyler > wrote: Hi all, A question about the centre head bias. Does computing a contrast of conditions remove the issue of the centre head bias? Read below. The Localizing oscillatory sources tutorial talks about the possibility of a beamformer over estimating power in the centre of the head, and suggests several methods of counteracting this. After suggestion use of the NAI to counter this bias, the tutorial goes on to show this beamformer method using contrasting conditions and says that using this approach we can "assume that the noise bias is the same for the pre- and post-stimulus interval and it will thus be removed." The tutorial uses the following code to do this: sourceDiff = sourcePost_con; sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; My question again: Does using this approach and computing the contrast condition remove the centre of head bias for this contrasted condition? Thanks! Kaelasha PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From munsif.jatoi at gmail.com Tue Feb 17 09:31:03 2015 From: munsif.jatoi at gmail.com (Munsif Jatoi) Date: Tue, 17 Feb 2015 16:31:03 +0800 Subject: [FieldTrip] Fwd: FEM implementation problem. In-Reply-To: References: Message-ID: Dear Sir/Madam, I hope you are fine. I am using FEM and BEM head modelling for solution of EEG inverse problem related to my doctoral work. For this, I gone through the tutorial provided at http://fieldtrip.fcdonders.nl/development/project/example_fem which suggests the MATLAB implementation of FEM. when I applied on an sMRI image by using segmentedmri = ft_volumesegment(cfg,mri); it give option as: the input is volume data with dimensions [177 240 256] The axes are 150 mm long in each direction The diameter of the sphere at the origin is 10 mm Do you want to change the anatomical labels for the axes [Y, n]? Y What is the anatomical label for the positive X-axis [r, l, a, p, s, i]? I don't know what to supply for these values? Can you please guide me about the values to be supplied? Many Thanks, Munsif -- Munsif Ali H.Jatoi, Ph D Scholar, Centre for Intelligent Signals and Imaging Research, Universiti Teknologi PETRONAS, Malaysia. http://scholar.google.com.my/citations?user=Y6g6jOAAAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 10:06:04 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 10:06:04 +0100 Subject: [FieldTrip] calculating behavioural-power correlation Message-ID: Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 10:18:13 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 09:18:13 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 10:33:07 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 10:33:07 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) wrote: > Hi Hweeling, > > Have a look at the help of ft_statfun_correlationT, which might be the > function you're looking for. This function calculates correlations between > two variables (e.g. subjects' behaviors and brain activities) and converts > the resulting correlation coefficients to t-statistics. > > Best, > arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 10:06 AM > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] calculating behavioural-power correlation > > > Dear all, > > I read on the "walkthrough" that it is possible to calculate > behavioural-power correlation across subjects. However, I was not sure what > type of descriptive statistics (i.e. cfg.statistics) I should use when > performing correlation cluster statistics. > > Would someone please enlighten me which type of statistics I should > input for cfg.statistics? > > Thanks! > > Best regards, > Hweeling > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 11:23:32 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 10:23:32 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: , Message-ID: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 11:34:48 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 11:34:48 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) wrote: > Hey Hweeling, > > It seems you're only inserting one input variable into the statistics > function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, > sub_LF_c200{:});" > > Could you try something along this line: ft_freqstatistics(cfg, freq1, > freq2) > > where freq1 is the original freq data, and freq2 is a copy of freq but > with the relevant values (say, in powspctrm) replaced with behavior values > (ensure this behavior matrix is matched in terms of size and dimensions to > the original freq values). > > Hope this helps, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > > ------------------------------ > *From:* Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 10:33 AM > *To:* Stolk, A. (Arjen) > *Cc:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation > > Dear Arjen, > > Thanks for the prompt reply. I keep getting an error message when I set > up my correlation cluster statistics, and I'm not sure what I could have > done wrong. Here's my script: > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.neighbours = neighbours; > cfg.channel = 'all'; > cfg.latency = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistics = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 1000; > cfg.ivar = 1; > cfg.uvar = 1; > > % design matrices > clear design; > % change in MMSE score relative to baseline > design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 > -0.157894737 0.117647059]; > design(2,:) = 1:6; > cfg.design = design; > > % for delta band > cfg.frequency = [2 4]; > [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); > [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); > > Here's the output from Matlab: > > computing statistic over the frequency range [2.000 4.000] > the call to "ft_appendfreq" took 0 seconds > the call to "ft_selectdata" took 0 seconds > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_correlationT" for the single-sample statistics > constructing randomized design > total number of measurements = 6 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 6 levels > number of repeated measurements in each level is 1 1 1 1 1 1 > computing a parametric threshold for clustering > Error using ft_statfun_correlationT (line 90) > Invalid specification of the design array. > Error using ft_statistics_montecarlo (line 254) > could not determine the parametric critical value > for clustering > > Error in ft_freqstatistics (line 319) > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Would you please tell what I have done wrong in this case? > > Thanks! > > Cheers, > Hweeling > > > On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: > >> Hi Hweeling, >> >> Have a look at the help of ft_statfun_correlationT, which might be the >> function you're looking for. This function calculates correlations between >> two variables (e.g. subjects' behaviors and brain activities) and converts >> the resulting correlation coefficients to t-statistics. >> >> Best, >> arjen >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> >> ------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 10:06 AM >> *To:* FieldTrip discussion list >> *Subject:* [FieldTrip] calculating behavioural-power correlation >> >> >> Dear all, >> >> I read on the "walkthrough" that it is possible to calculate >> behavioural-power correlation across subjects. However, I was not sure what >> type of descriptive statistics (i.e. cfg.statistics) I should use when >> performing correlation cluster statistics. >> >> Would someone please enlighten me which type of statistics I should >> input for cfg.statistics? >> >> Thanks! >> >> Best regards, >> Hweeling >> >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 11:45:33 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 10:45:33 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: , Message-ID: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 15:18:11 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 15:18:11 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) wrote: > Hey Hweeling, > > "Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency?" > > indeed > > "What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect?" > > the walkthough may refer to a GLM-based statistical implementation, for > which the FT implementation differs from the correlationT statfun. Namely, > the former uses the behavioral measure as a regressor in a data model > whereas the latter uses the behavioral measure as a datapoint series for > correlation with another datapoint series (and then converts to a T value). > The correlationT statfun is relatively 'new', hence not yet addressed in > the walkthrough. > > Yours, > arjen > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 11:34 AM > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation > > Dear Arjen, > > Thanks for the prompt reply again! > > Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency? > > What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect? > > Cheers, > Hweeling > > > On 17 February 2015 at 11:23, Stolk, A. (Arjen) > wrote: > >> Hey Hweeling, >> >> It seems you're only inserting one input variable into the statistics >> function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, >> sub_LF_c200{:});" >> >> Could you try something along this line: ft_freqstatistics(cfg, freq1, >> freq2) >> >> where freq1 is the original freq data, and freq2 is a copy of freq but >> with the relevant values (say, in powspctrm) replaced with behavior values >> (ensure this behavior matrix is matched in terms of size and dimensions to >> the original freq values). >> >> Hope this helps, >> Arjen >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> >> ------------------------------ >> *From:* Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 10:33 AM >> *To:* Stolk, A. (Arjen) >> *Cc:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >> >> Dear Arjen, >> >> Thanks for the prompt reply. I keep getting an error message when I set >> up my correlation cluster statistics, and I'm not sure what I could have >> done wrong. Here's my script: >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.neighbours = neighbours; >> cfg.channel = 'all'; >> cfg.latency = 'all'; >> cfg.avgovertime = 'no'; >> cfg.avgoverchan = 'no'; >> cfg.avgoverfreq = 'yes'; >> cfg.parameter = 'powspctrm'; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'ft_statfun_correlationT'; >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistics = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; >> cfg.numrandomization = 1000; >> cfg.ivar = 1; >> cfg.uvar = 1; >> >> % design matrices >> clear design; >> % change in MMSE score relative to baseline >> design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 >> -0.157894737 0.117647059]; >> design(2,:) = 1:6; >> cfg.design = design; >> >> % for delta band >> cfg.frequency = [2 4]; >> [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); >> [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); >> >> Here's the output from Matlab: >> >> computing statistic over the frequency range [2.000 4.000] >> the call to "ft_appendfreq" took 0 seconds >> the call to "ft_selectdata" took 0 seconds >> using "ft_statistics_montecarlo" for the statistical testing >> using "ft_statfun_correlationT" for the single-sample statistics >> constructing randomized design >> total number of measurements = 6 >> total number of variables = 2 >> number of independent variables = 1 >> number of unit variables = 1 >> number of within-cell variables = 0 >> number of control variables = 0 >> using a permutation resampling approach >> repeated measurement in variable 1 over 6 levels >> number of repeated measurements in each level is 1 1 1 1 1 1 >> computing a parametric threshold for clustering >> Error using ft_statfun_correlationT (line 90) >> Invalid specification of the design array. >> Error using ft_statistics_montecarlo (line 254) >> could not determine the parametric critical value >> for clustering >> >> Error in ft_freqstatistics (line 319) >> [stat, cfg] = statmethod(cfg, dat, cfg.design); >> >> Would you please tell what I have done wrong in this case? >> >> Thanks! >> >> Cheers, >> Hweeling >> >> >> On 17 February 2015 at 10:18, Stolk, A. (Arjen) >> wrote: >> >>> Hi Hweeling, >>> >>> Have a look at the help of ft_statfun_correlationT, which might be the >>> function you're looking for. This function calculates correlations between >>> two variables (e.g. subjects' behaviors and brain activities) and converts >>> the resulting correlation coefficients to t-statistics. >>> >>> Best, >>> arjen >>> >>> -- >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> >>> Email: a.stolk at donders.ru.nl >>> >>> Phone: +31(0)243 68294 >>> Web: www.arjenstolk.nl >>> >>> ------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >>> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >>> *Sent:* Tuesday, February 17, 2015 10:06 AM >>> *To:* FieldTrip discussion list >>> *Subject:* [FieldTrip] calculating behavioural-power correlation >>> >>> >>> Dear all, >>> >>> I read on the "walkthrough" that it is possible to calculate >>> behavioural-power correlation across subjects. However, I was not sure what >>> type of descriptive statistics (i.e. cfg.statistics) I should use when >>> performing correlation cluster statistics. >>> >>> Would someone please enlighten me which type of statistics I should >>> input for cfg.statistics? >>> >>> Thanks! >>> >>> Best regards, >>> Hweeling >>> >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Feb 17 16:44:45 2015 From: a.stolk8 at gmail.com (arjen stolk) Date: Tue, 17 Feb 2015 16:44:45 +0100 Subject: [FieldTrip] calculating behavioural-power correlation Message-ID: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee Datum: Aan: "Stolk, A. (Arjen)" Cc: FieldTrip discussion list Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen   From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email:  a.stolk at donders.ru.nl Phone:  +31(0)243 68294 Web:    www.arjenstolk.nl From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements     = 6 total number of variables        = 2 number of independent variables  = 1 number of unit variables         = 1 number of within-cell variables  = 0 number of control variables      = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1  computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319)   [stat, cfg] = statmethod(cfg, dat, cfg.design);   Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email:  a.stolk at donders.ru.nl Phone:  +31(0)243 68294 Web:    www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 17:39:29 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 17:39:29 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk wrote: > Yes it does. ;) > Arjen > > > > -------- Oorspronkelijk bericht -------- > Van: Hwee Ling Lee > Datum: > Aan: "Stolk, A. (Arjen)" > Cc: FieldTrip discussion list > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation > > > Dear Arjen, > > Thanks! It works well now. > > I plotted the results using ft_clusterplot, and it only shows the > significant clusters that show significant correlation of power and > behavioural measure, right? Or is there a better way I can display the > results? > > Thanks again. > > Cheers, > Hweeling > > > > On 17 February 2015 at 11:45, Stolk, A. (Arjen) > wrote: > >> Hey Hweeling, >> >> "Just to ensure that I get this right, I should create a variable for the >> behavioural measure such that the variable contains a powspctrm field with >> the behavioural information for every frequency?" >> > indeed >> >> "What I'm confused is that in the walkthrough website, under the >> subsection on correlation, it is suggested to create the cfg.design with >> the behavioural measure that one wants to correlate. So is this information >> in the walkthrough website incorrect?" >> > the walkthough may refer to a GLM-based statistical implementation, for >> which the FT implementation differs from the correlationT statfun. Namely, >> the former uses the behavioral measure as a regressor in a data model >> whereas the latter uses the behavioral measure as a datapoint series for >> correlation with another datapoint series (and then converts to a T value). >> The correlationT statfun is relatively 'new', hence not yet addressed in >> the walkthrough. >> >> Yours, >> arjen >> >> ------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 11:34 AM >> *To:* FieldTrip discussion list >> >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >> >> Dear Arjen, >> >> Thanks for the prompt reply again! >> >> Just to ensure that I get this right, I should create a variable for >> the behavioural measure such that the variable contains a powspctrm field >> with the behavioural information for every frequency? >> >> What I'm confused is that in the walkthrough website, under the >> subsection on correlation, it is suggested to create the cfg.design with >> the behavioural measure that one wants to correlate. So is this information >> in the walkthrough website incorrect? >> >> Cheers, >> Hweeling >> >> >> On 17 February 2015 at 11:23, Stolk, A. (Arjen) >> wrote: >> >>> Hey Hweeling, >>> >>> It seems you're only inserting one input variable into the statistics >>> function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, >>> sub_LF_c200{:});" >>> >>> Could you try something along this line: ft_freqstatistics(cfg, freq1, >>> freq2) >>> >>> where freq1 is the original freq data, and freq2 is a copy of freq but >>> with the relevant values (say, in powspctrm) replaced with behavior values >>> (ensure this behavior matrix is matched in terms of size and dimensions to >>> the original freq values). >>> >>> Hope this helps, >>> Arjen >>> >>> -- >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> >>> Email: a.stolk at donders.ru.nl >>> >>> Phone: +31(0)243 68294 >>> Web: www.arjenstolk.nl >>> >>> ------------------------------ >>> *From:* Hwee Ling Lee [hweeling.lee at gmail.com] >>> *Sent:* Tuesday, February 17, 2015 10:33 AM >>> *To:* Stolk, A. (Arjen) >>> *Cc:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >>> >>> Dear Arjen, >>> >>> Thanks for the prompt reply. I keep getting an error message when I >>> set up my correlation cluster statistics, and I'm not sure what I could >>> have done wrong. Here's my script: >>> >>> cfg = []; >>> cfg.layout = 'EEG1010.lay'; >>> cfg.neighbours = neighbours; >>> cfg.channel = 'all'; >>> cfg.latency = 'all'; >>> cfg.avgovertime = 'no'; >>> cfg.avgoverchan = 'no'; >>> cfg.avgoverfreq = 'yes'; >>> cfg.parameter = 'powspctrm'; >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'ft_statfun_correlationT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistics = 'maxsum'; >>> cfg.minnbchan = 2; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.025; >>> cfg.numrandomization = 1000; >>> cfg.ivar = 1; >>> cfg.uvar = 1; >>> >>> % design matrices >>> clear design; >>> % change in MMSE score relative to baseline >>> design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 >>> -0.157894737 0.117647059]; >>> design(2,:) = 1:6; >>> cfg.design = design; >>> >>> % for delta band >>> cfg.frequency = [2 4]; >>> [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); >>> [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); >>> >>> Here's the output from Matlab: >>> >>> computing statistic over the frequency range [2.000 4.000] >>> the call to "ft_appendfreq" took 0 seconds >>> the call to "ft_selectdata" took 0 seconds >>> using "ft_statistics_montecarlo" for the statistical testing >>> using "ft_statfun_correlationT" for the single-sample statistics >>> constructing randomized design >>> total number of measurements = 6 >>> total number of variables = 2 >>> number of independent variables = 1 >>> number of unit variables = 1 >>> number of within-cell variables = 0 >>> number of control variables = 0 >>> using a permutation resampling approach >>> repeated measurement in variable 1 over 6 levels >>> number of repeated measurements in each level is 1 1 1 1 1 1 >>> computing a parametric threshold for clustering >>> Error using ft_statfun_correlationT (line 90) >>> Invalid specification of the design array. >>> Error using ft_statistics_montecarlo (line 254) >>> could not determine the parametric critical value >>> for clustering >>> >>> Error in ft_freqstatistics (line 319) >>> [stat, cfg] = statmethod(cfg, dat, cfg.design); >>> >>> Would you please tell what I have done wrong in this case? >>> >>> Thanks! >>> >>> Cheers, >>> Hweeling >>> >>> >>> On 17 February 2015 at 10:18, Stolk, A. (Arjen) >>> wrote: >>> >>>> Hi Hweeling, >>>> >>>> Have a look at the help of ft_statfun_correlationT, which might be the >>>> function you're looking for. This function calculates correlations between >>>> two variables (e.g. subjects' behaviors and brain activities) and converts >>>> the resulting correlation coefficients to t-statistics. >>>> >>>> Best, >>>> arjen >>>> >>>> -- >>>> Donders Institute for Brain, Cognition and Behaviour >>>> Centre for Cognitive Neuroimaging >>>> Radboud University Nijmegen >>>> >>>> Email: a.stolk at donders.ru.nl >>>> >>>> Phone: +31(0)243 68294 >>>> Web: www.arjenstolk.nl >>>> >>>> ------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl [ >>>> fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [ >>>> hweeling.lee at gmail.com] >>>> *Sent:* Tuesday, February 17, 2015 10:06 AM >>>> *To:* FieldTrip discussion list >>>> *Subject:* [FieldTrip] calculating behavioural-power correlation >>>> >>>> >>>> Dear all, >>>> >>>> I read on the "walkthrough" that it is possible to calculate >>>> behavioural-power correlation across subjects. However, I was not sure what >>>> type of descriptive statistics (i.e. cfg.statistics) I should use when >>>> performing correlation cluster statistics. >>>> >>>> Would someone please enlighten me which type of statistics I should >>>> input for cfg.statistics? >>>> >>>> Thanks! >>>> >>>> Best regards, >>>> Hweeling >>>> >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Feb 17 18:03:09 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 17 Feb 2015 18:03:09 +0100 (CET) Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: Message-ID: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "arjen stolk" Cc: "FieldTrip discussion list" Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Wed Feb 18 08:58:51 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 18 Feb 2015 08:58:51 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Message-ID: Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux wrote: > Dear Arjen, dear Hweeling, > > I would be interested in trying this method as well. > > May I ask you how to specify the design matrix? > > For instance if I want to measure the correlation between a TFR-matrix > and some behavioral measure (Y) across participants would something like > this make sense: > > AVG = > powspctrm:[4-D double] > label:{186x1 cell} > freq:[1x49 double] > time:[1x121 double] > dimord: 'subj_chan_freq_time' > cfg:[1x1 stuct] > > > dum = AVG; > dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) > size(AVG.powspctrm,4)]); > %here Y is a vector with the behavioral measure > > cfg = []; > cfg.method = 'montecarlo'; > cfg.parameter = 'powspctrm'; > cfg.statistic = 'ft_statfun_correlationT'; > etc > > cfg.design = []; > cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; > cfg.design(2,:) = [1:length(Y) 1:length(Y)]; > > freq_stat = ft_freqstatistica(cfg,AVG,dum); > > > This, however, results in extremely long computing times, which makes me > doubt that this is the correct way. > > Best, > > Fred > > Frédéric Roux > > ----- Original Message ----- > From: "Hwee Ling Lee" > To: "arjen stolk" > Cc: "FieldTrip discussion list" > Sent: Tuesday, February 17, 2015 5:39:29 PM > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > Thanks! One last question, just to be sure, what is the reference for this > correlation method? I tried to search for your publications but not sure > which one to cite. > > > Cheers, > Hweeling > > > On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: > > > > > > Yes it does. ;) > Arjen > > > -------- Oorspronkelijk bericht -------- > Van: Hwee Ling Lee < hweeling.lee at gmail.com > > Datum: > Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation > > > > Dear Arjen, > > > Thanks! It works well now. > > > I plotted the results using ft_clusterplot, and it only shows the > significant clusters that show significant correlation of power and > behavioural measure, right? Or is there a better way I can display the > results? > > > Thanks again. > > > Cheers, > Hweeling > > > > > > > On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hey Hweeling, > > "Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency?" > > indeed > > "What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect?" > > the walkthough may refer to a GLM-based statistical implementation, for > which the FT implementation differs from the correlationT statfun. Namely, > the former uses the behavioral measure as a regressor in a data model > whereas the latter uses the behavioral measure as a datapoint series for > correlation with another datapoint series (and then converts to a T value). > The correlationT statfun is relatively 'new', hence not yet addressed in > the walkthrough. > > Yours, > arjen > > > > > From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] > on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 11:34 AM > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > > > > Dear Arjen, > > > Thanks for the prompt reply again! > > > Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency? > > > What I'm confused is that in the walkthrough website, under the subsection > on correlation, it is suggested to create the cfg.design with the > behavioural measure that one wants to correlate. So is this information in > the walkthrough website incorrect? > > > Cheers, > Hweeling > > > > > On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hey Hweeling, > > It seems you're only inserting one input variable into the statistics > function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, > sub_LF_c200{:});" > > Could you try something along this line: ft_freqstatistics(cfg, freq1, > freq2) > > where freq1 is the original freq data, and freq2 is a copy of freq but > with the relevant values (say, in powspctrm) replaced with behavior values > (ensure this behavior matrix is matched in terms of size and dimensions to > the original freq values). > > Hope this helps, > Arjen > > > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31 (0)243 68294 > Web: www.arjenstolk.nl > > > From: Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 10:33 AM > To: Stolk, A. (Arjen) > Cc: FieldTrip discussion list > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > > > > Dear Arjen, > > > Thanks for the prompt reply. I keep getting an error message when I set up > my correlation cluster statistics, and I'm not sure what I could have done > wrong. Here's my script: > > > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.neighbours = neighbours; > cfg.channel = 'all'; > cfg.latency = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistics = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 1000; > cfg.ivar = 1; > cfg.uvar = 1; > > > % design matrices > clear design; > % change in MMSE score relative to baseline > design(1,:) = [0.095238095 -0. 045454545 - 0.533333333 0.238095238 > -0.157894737 0.117647059]; > design(2,:) = 1:6; > cfg.design = design; > > > % for delta band > cfg.frequency = [2 4]; > [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); > [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); > > > Here's the output from Matlab: > > > > computing statistic over the frequency range [2.000 4.000] > the call to "ft_appendfreq" took 0 seconds > the call to "ft_selectdata" took 0 seconds > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_correlationT" for the single-sample statistics > constructing randomized design > total number of measurements = 6 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 6 levels > number of repeated measurements in each level is 1 1 1 1 1 1 > computing a parametric threshold for clustering > Error using ft_statfun_correlationT (line 90) > Invalid specification of the design array. > Error using ft_statistics_montecarlo (line 254) > could not determine the parametric critical value > for clustering > > > Error in ft_freqstatistics (line 319) > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Would you please tell what I have done wrong in this case? > > > Thanks! > > > Cheers, > Hweeling > > > > > On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hi Hweeling, > > Have a look at the help of ft_statfun_correlationT, which might be the > function you're looking for. This function calculates correlations between > two variables (e.g. subjects' behaviors and brain activities) and converts > the resulting correlation coefficients to t-statistics. > > Best, > arjen > > > > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31 (0)243 68294 > Web: www.arjenstolk.nl > > > From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] > on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 10:06 AM > To: FieldTrip discussion list > Subject: [FieldTrip] calculating behavioural-power correlation > > > > > > > > > Dear all, > > > I read on the "walkthrough" that it is possible to calculate > behavioural-power correlation across subjects. However, I was not sure what > type of descriptive statistics (i.e. cfg.statistics) I should use when > performing correlation cluster statistics. > > > Would someone please enlighten me which type of statistics I should input > for cfg.statistics? > > > Thanks! > > > Best regards, > Hweeling > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.lee dzne.de > Email 2: hweeling.lee gmail.com > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > > > > -- > > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.lee dzne.de > Email 2: hweeling.lee gmail.com > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Wed Feb 18 10:15:57 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Wed, 18 Feb 2015 10:15:57 +0100 (CET) Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: Message-ID: <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> Hello Hweeling, thanks for sharing these very helpful comments! Cheers, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "Frédéric Roux" Cc: "FieldTrip discussion list" , "arjen stolk" Sent: Wednesday, February 18, 2015 8:58:51 AM Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux < f.roux at bcbl.eu > wrote: Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" < hweeling.lee at gmail.com > To: "arjen stolk" < arjen.stolk at donders.ru.nl > Cc: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0 .533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= From nathanweisz at mac.com Wed Feb 18 23:21:53 2015 From: nathanweisz at mac.com (Nathan Weisz) Date: Wed, 18 Feb 2015 23:21:53 +0100 Subject: [FieldTrip] phd and postdoc opportunities Message-ID: <2F5AAF31-006C-47EF-BA69-B0948C008821@mac.com> FYI. please contact jens blechert directly in case of interest / questions. best, nathan -------------- next part -------------- A non-text attachment was scrubbed... Name: ERCundFWFProjekt.pdf Type: application/pdf Size: 215254 bytes Desc: not available URL: From m.stoica at uke.de Thu Feb 19 11:17:26 2015 From: m.stoica at uke.de (Stoica, Mircea) Date: Thu, 19 Feb 2015 10:17:26 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> References: , <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, you should take a look at ft_statfun_indepsamplesregrT which more often than not gives the same results but with much lower computation times. Best, Mircea Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Frédéric Roux [f.roux at bcbl.eu] Sent: Wednesday, February 18, 2015 10:15 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Hello Hweeling, thanks for sharing these very helpful comments! Cheers, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "Frédéric Roux" Cc: "FieldTrip discussion list" , "arjen stolk" Sent: Wednesday, February 18, 2015 8:58:51 AM Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux < f.roux at bcbl.eu > wrote: Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" < hweeling.lee at gmail.com > To: "arjen stolk" < arjen.stolk at donders.ru.nl > Cc: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0 .533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From stefanwiens at gmail.com Fri Feb 20 16:03:37 2015 From: stefanwiens at gmail.com (Stefan Wiens) Date: Fri, 20 Feb 2015 16:03:37 +0100 Subject: [FieldTrip] ft_topoplotER Message-ID: Hi! I use ft_topoplotER with the following cfg: cfg.highlightcolor = [1 1 1]; The markers are now white on the screen, but when I save the figure as tiff (or any other format), the markers are black. Is this is Matlab 2014b issue? Also, is there a way to fill the markers with a particular color? I think this would be easier to see. Cheers Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Feb 23 04:20:28 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 23 Feb 2015 03:20:28 +0000 Subject: [FieldTrip] Problem with mvaranalysis Message-ID: <1424661627824.86346@flinders.edu.au> Hello fieldtrip, I have come across something that is either a bug or something I am doing wrong, however I am unsure. The error message is as following: Error using .* Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 479) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 385) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in fieldtrip_peak_connectivity (line 164) mdata = ft_mvaranalysis( cfg, data); I had a closer look and it appears as though the tap variable is size 1x501 and tmpdata.trial is [85x500 double]. So on line 479 in catnan, when it asks to multiply a 85x500 matrix by 85x501, it crashes. Apparently I tried submitting this bug before (Bug 2784), but it was rejected. However, I still dont know what Im doing wrong. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66125 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Feb 23 09:00:26 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 23 Feb 2015 08:00:26 +0000 Subject: [FieldTrip] Problem with mvaranalysis In-Reply-To: <1424661627824.86346@flinders.edu.au> References: <1424661627824.86346@flinders.edu.au> Message-ID: <3A384D09-DDB9-4E00-AFDC-4812F326C828@fcdonders.ru.nl> Tyler, Please follow up on this in bug 2784 on bugzilla. This particular bug was ‘rejected’ due to insufficient input from your side. We require your feedback in order to get things solved for you (and just dumping the error message is usually not going to solve it :-) ). It seems you are running into problems regarding this function, and the only one reporting it, so it’s crucial that we get the right intel. Note that I suspect your data structure to contain data epochs that have slightly variable size in the second dimension, i.e. vary in time-length on the order of one sample less or more. The function apparently expects or assumes the epochs to be of equal length, and it initializes some variables based on the length of the first epoch. If this happens to have a length of 501 samples, the code chokes on the next epoch, which has 500 samples. Could you upload (into the bug) a small data structure and a cfg in order for us to reproduce your problem? Jan-Mathijs On Feb 23, 2015, at 4:20 AM, Tyler Grummett > wrote: Hello fieldtrip, I have come across something that is either a bug or something I am doing wrong, however I am unsure. The error message is as following: Error using .* Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 479) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 385) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in fieldtrip_peak_connectivity (line 164) mdata = ft_mvaranalysis( cfg, data); I had a closer look and it appears as though the tap variable is size 1x501 and tmpdata.trial is [85x500 double]. So on line 479 in catnan, when it asks to multiply a 85x500 matrix by 85x501, it crashes. Apparently I tried submitting this bug before (Bug 2784), but it was rejected. However, I still dont know what Im doing wrong. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66125 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Mon Feb 23 11:50:13 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Mon, 23 Feb 2015 11:50:13 +0100 Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence Message-ID: <44fc-54eb0600-5-346af640@146761187> Dear Fieldtrippers Here the introduction to my problem (I hope I can make myself clear): I am doing a connectivity analysis (partial directed coherence) and obtain as a result following array: connectivity = label:{51x1} dimord: 'chan_chan_freq' pdcspctrm: [51x51x101] freq: [1x101 double] cfg: [1x1 struct] I have 51 channels in my analysis. I want to find out the outflow from frontal to parietal regions. So what I did next was defining which channels belong to frontal and which to parietal regions (note: the sensor layout of the sensor net is really random), e.g.: Frontal = { 'E5' 'E6' 'E197' 'E198'} Parietal = { 'E77' 'E78' 'E89' 'E163'} Next step: find outflow from each Frontal to each Parietal channels In order to do this I need to look in "connectivity.pdspctrm" for the pdc value: find all the channels in "Frontal" and "Parietal" in the original "connectivity" in order to find there the corresponding pdc values: "frontal" is a vector with indices of the channels in the connectivity.label channel list (same with "parietal") frontal = zeros(4,1) for l=1:4 channelposition = find(ismember(connectivity.label, Frontal{l}) == 1); if isfinite(channelposition); if isfinite (ismember(connectivity.label, Frontal{l}) == 1, frontal (l,1) = find(ismember(connectivity.label, Frontal{l}) ==1); else frontal(l,1) = NaN; end else end end I get: frontal = 1 2 10 11 parietal = zeros(4,1) for l=1:4 channelposition = find(ismember(connectivity.label, Parietal {l}) == 1); if isfinite(channelposition); if isfinite (ismember(connectivity.label, Parietal{l}) == 1, parietal (l,1) = find(ismember(connectivity.label, Parietal{l}) ==1); else parietal(l,1) = NaN; end else end end I get: parietal = 9 14 20 31 If I want to know now the outflow from E5 to E77 i would have to enter this as follows: Outflow = connectivity.pdcsptrm(1,9,5) %5 is here just an example for the frequency of interest and I would get a value, e.g. ans = 0.567 (This worked totally fine!) >>>>>>>>>>>>>Now my Problem: <<<<<<<<<<<<<< I don't want to know the outflow from a single electrode to another, but the average outflow from frontal to parietal for the whole Alpha frequencyband: So my line of code would look like this: Outflow = connectivity.pdcspctrm(frontal',parietal',5:16) I tried eval (eventhough it is not elegant, but it's the only thing I could think about that might work): Outflow = eval ([ 'mean(mean(mean(connectivity.pdcspctrm(' num2str(frontal') ',' num2str(parietal'), 5:16))))' ]) When I enter it as follows: Outflow = mean(mean(mean(connectivity.pdcspctrm([1 2 10 11], [9 14 20 31], 5:16)))) it works fine. But the vectors frontal and parietal will contain upt to 30 indices each, so typing them is not an option. I tried everything else I could think of (different parethesis etc.). Maybe someone can help me out here?? Thanks a lot!! From jorn at artinis.com Mon Feb 23 12:06:25 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 23 Feb 2015 12:06:25 +0100 Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence In-Reply-To: <44fc-54eb0600-5-346af640@146761187> References: <44fc-54eb0600-5-346af640@146761187> Message-ID: <002501d04f58$c4fa03a0$4eee0ae0$@artinis.com> HI Barbara, I hope I followed all of your mail. I think this should work: >> mean(mean(mean(connectivity.pdcspctrm(frontal(:), parietal(:), 5:16), 1), 2), 3) This first averages over the frontal channels, then over the parietal channels, then over frequencies. You get into troubles with your nana solution though, so you might need to use something like frontal(~isnan(frontal(:, 1)), :) = []; to get rid of these. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems  |  +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Barbara Schorr > Sent: Monday, February 23, 2015 11:50 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence > > Dear Fieldtrippers > > > > Here the introduction to my problem (I hope I can make myself clear): > > I am doing a connectivity analysis (partial directed coherence) and obtain as a > result following array: > > > > connectivity = > > label:{51x1} > dimord: 'chan_chan_freq' > pdcspctrm: [51x51x101] > freq: [1x101 double] > cfg: [1x1 struct] > > > > > I have 51 channels in my analysis. I want to find out the outflow from frontal > to parietal regions. > So what I did next was defining which channels belong to frontal and which > to parietal regions (note: the sensor layout of the sensor net is really > random), e.g.: > > > > Frontal = { 'E5' 'E6' 'E197' 'E198'} > Parietal = { 'E77' 'E78' 'E89' 'E163'} > > > > > Next step: find outflow from each Frontal to each Parietal channels > > > In order to do this I need to look in "connectivity.pdspctrm" for the pdc > value: > > find all the channels in "Frontal" and "Parietal" in the original "connectivity" in > order to find there the corresponding pdc values: > > > "frontal" is a vector with indices of the channels in the connectivity.label > channel list (same with "parietal") > > frontal = zeros(4,1) > > for l=1:4 > channelposition = find(ismember(connectivity.label, Frontal{l}) == 1); > if isfinite(channelposition); > > if isfinite (ismember(connectivity.label, Frontal{l}) == 1, frontal (l,1) = > find(ismember(connectivity.label, Frontal{l}) ==1); else frontal(l,1) = NaN; > end > > else > end > end > > > > I get: frontal = > > 1 > 2 > 10 > 11 > > parietal = zeros(4,1) > > for l=1:4 > channelposition = find(ismember(connectivity.label, Parietal {l}) == 1); > if isfinite(channelposition); > > if isfinite (ismember(connectivity.label, Parietal{l}) == 1, parietal (l,1) = > find(ismember(connectivity.label, Parietal{l}) ==1); else parietal(l,1) = NaN; > end > > else > end > end > > > > I get: parietal = > > 9 > 14 > 20 > 31 > > > If I want to know now the outflow from E5 to E77 i would have to enter this > as follows: > > Outflow = connectivity.pdcsptrm(1,9,5) %5 is here just an example for the > frequency of interest > > and I would get a value, e.g. > > ans = 0.567 > > (This worked totally fine!) > > > > > >>>>>>>>>>>>>Now my Problem: <<<<<<<<<<<<<< > > I don't want to know the outflow from a single electrode to another, but the > average outflow from frontal to parietal for the whole Alpha frequencyband: > > So my line of code would look like this: > > > Outflow = connectivity.pdcspctrm(frontal',parietal',5:16) > > > > I tried eval (eventhough it is not elegant, but it's the only thing I could think > about that might work): > > > > Outflow = eval ([ 'mean(mean(mean(connectivity.pdcspctrm(' > num2str(frontal') ',' num2str(parietal'), 5:16))))' ]) > > > When I enter it as follows: > > Outflow = mean(mean(mean(connectivity.pdcspctrm([1 2 10 11], [9 14 20 > 31], 5:16)))) > > it works fine. > > > > But the vectors frontal and parietal will contain upt to 30 indices each, so > typing them is not an option. > > I tried everything else I could think of (different parethesis etc.). > > Maybe someone can help me out here?? > > Thanks a lot!! > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m_wink10 at uni-muenster.de Mon Feb 23 17:00:48 2015 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Mon, 23 Feb 2015 17:00:48 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS Message-ID: Dear Fieldtrippers, we encountered a problem during our DICS Beamformer-Statistics. After calculating a beamformer (DICS), normalisation and building grandaverages across subjects (here exemplarily 3 subjects) we try to calculate cluster based permutation statistic (in this study: between groups - one condition). The code we used is as follows: cfg = []; cfg.method = 'montecarlo'; %cfg.statistic = 'depsamplesT'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; %ft default 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; %ft hat hier 0,025 cfg.parameter = 'pow'; cfg.dim = grandavgA.dim; cfg.numrandomization = 1; % number of draws from the permutation distribution design(1,:) = [1 1 1 2 2 2]; design(2,:) = [1 1 1 1 1 1]; cfg.design = design; cfg.ivar = 1; stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); The input data structure (grandavgA, grandavgB) is as follows: grandavgA = pow: [3x116380 double] dim: [46 55 46] inside: [116380x1 logical] pos: [116380x3 double] cfg: [1x1 struct] grandavgB = pow: [3x116380 double] dim: [46 55 46] inside: [116380x1 logical] pos: [116380x3 double] cfg: [1x1 struct] Fieldtrip version: current (02/23/2015) Thanks, Martin -- M.Sc. Martin Winkels Universitätsklinikum Münster Institut für Biomagnetismus & Biosignalanalyse Malmedyweg 15 48149 Münster GERMANY Telefon: +49 251 83 56 846 Web: http://biomag.uni-muenster.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Mon Feb 23 17:14:48 2015 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 23 Feb 2015 17:14:48 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS In-Reply-To: References: Message-ID: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> Dear Martin, what kind of machine are you using? Did you interpolate your data to an MRI? What is your grid resolution? You have quite a high number of grid points that you want to compare. So in case you run out of memory, I'd suggest not interpolating to an MRI (in case you have done this) but to stay on the grid-point level for your stats. Otherwise, you could use a less dense grid which obviously results in smaller data structures. Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 23.02.2015 um 17:00 schrieb Martin Winkels: > Dear Fieldtrippers, > > we encountered a problem during our DICS Beamformer-Statistics. > > After calculating a beamformer (DICS), normalisation and building grandaverages across subjects (here exemplarily 3 subjects) we try to calculate cluster based permutation statistic (in this study: between groups - one condition). > > The code we used is as follows: > > cfg = []; > > cfg.method = 'montecarlo'; > %cfg.statistic = 'depsamplesT'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; %ft default 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; %ft hat hier 0,025 > > cfg.parameter = 'pow'; > cfg.dim = grandavgA.dim; > > cfg.numrandomization = 1; % number of draws from the permutation distribution > > design(1,:) = [1 1 1 2 2 2]; > design(2,:) = [1 1 1 1 1 1]; > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); > > > > The input data structure (grandavgA, grandavgB) is as follows: > > grandavgA = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > grandavgB = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > > Fieldtrip version: current (02/23/2015) > > > Thanks, Martin > > -- > > M.Sc. Martin Winkels > > Universitätsklinikum Münster > > Institut für Biomagnetismus & Biosignalanalyse > > Malmedyweg 15 > > 48149 Münster > > GERMANY > > > Telefon: +49 251 83 56 846 > > Web: http://biomag.uni-muenster.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From lysne at unm.edu Mon Feb 23 18:37:04 2015 From: lysne at unm.edu (Per Arnold Lysne) Date: Mon, 23 Feb 2015 17:37:04 +0000 Subject: [FieldTrip] ft_megrealign with source localization? Message-ID: <1424713017019.6820@unm.edu> Hello All, Apologies for reintroducing a question which has previously been covered: that of using ft_megrealign on data which is intended for use in MEG source localization. My understanding is that this algorithm changes the covariance structure between the channels in such a way that localizations may be unstable afterwards (http://mailman.science.ru.nl/pipermail/fieldtrip/2012-May/005231.html). Additionally, the handful of published works using ft_megrealign appear to all be sensor-level analyses (5-6 unique results for "ft_megrealign" from google scholar). Nonetheless, I am trying to develop a group procedure for the tf_mixed_norm sparse localization algorithm in MNE-Python (Gramfort et al. 2013) , and it would be enormously beneficial to have the subjects "virtualized" onto a common head position (and shape, but this problem might also be solved separately) so that their sensor-level measurement data could be combined into a grand average prior to localization. So my questions are, how detrimental might the ft_megrealign algorithm be expected to be to source localization, particularly a sparse localization such as the one I am using? In my application a minor loss of precision would be acceptable, but the localizations need to remain generally correct. Does anyone know of an alternative way to achieve "virtualized" data in a common head position that might be more suitable? (I also need to avoid the assumption of temporal stationarity.) Thank you for your help, Per Lysne University of New Mexico -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Mon Feb 23 20:52:10 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Mon, 23 Feb 2015 21:52:10 +0200 Subject: [FieldTrip] problems with ft_read_data Message-ID: Hello Fieldtrippers, I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. While running ft_read_data on an mff, I've encounter following bug index exceeds matrix dimensions. Error in ft_read_data (line 787) dat{end} = dat{end}(:,begsel:endsel); Data sampling is 1000 hz. Would appreciate your help. If any further information is needed, please ask me. Thanks, -- Shlomit Beker, PhD Postdoctoral fellow, Nir lab Sackler Faculty of Medicine Tel Aviv University -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Mon Feb 23 21:09:15 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Mon, 23 Feb 2015 15:09:15 -0500 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: References: Message-ID: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> Hi Shlomit, I have a feeling that your file ends before your post sample. For example, if your trial definition has .2 ms pre and 1.0 post, you don't have 1000 samples after your last event. You can use ft_read_event to confirm. Best, Raquel Sent from my iPhone > On Feb 23, 2015, at 2:52 PM, shlomit beker wrote: > > Hello Fieldtrippers, > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. > > While running ft_read_data on an mff, I've encounter following bug > > index exceeds matrix dimensions. > > Error in ft_read_data (line 787) > dat{end} = dat{end}(:,begsel:endsel); > > Data sampling is 1000 hz. > Would appreciate your help. If any further information is needed, please ask me. > > Thanks, > > -- > Shlomit Beker, PhD > Postdoctoral fellow, Nir lab > Sackler Faculty of Medicine > Tel Aviv University > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Mon Feb 23 22:00:33 2015 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Mon, 23 Feb 2015 23:00:33 +0200 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> References: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> Message-ID: <4077A3AD-A067-436A-BA49-1F3008DF7F42@gmail.com> Hi Raquel, Thanks for the response. I run ft_read_data before and segmentation to trials. I just want to read the raw data in a matrix. Do you have any other ideas? Thanks! Shlomit ‫ב-23 בפבר 2015, בשעה 22:09, ‏Raquel Bibi כתב/ה:‬ > Hi Shlomit, > I have a feeling that your file ends before your post sample. For example, if your trial definition has .2 ms pre and 1.0 post, you don't have 1000 samples after your last event. You can use ft_read_event to confirm. > > Best, > > Raquel > > Sent from my iPhone > >> On Feb 23, 2015, at 2:52 PM, shlomit beker wrote: >> >> Hello Fieldtrippers, >> >> I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. >> >> While running ft_read_data on an mff, I've encounter following bug >> >> index exceeds matrix dimensions. >> >> Error in ft_read_data (line 787) >> dat{end} = dat{end}(:,begsel:endsel); >> >> Data sampling is 1000 hz. >> Would appreciate your help. If any further information is needed, please ask me. >> >> Thanks, >> >> -- >> Shlomit Beker, PhD >> Postdoctoral fellow, Nir lab >> Sackler Faculty of Medicine >> Tel Aviv University >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From kumar at cbs.mpg.de Tue Feb 24 15:33:15 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Tue, 24 Feb 2015 15:33:15 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> Hello fieldtrippers, I have a question which I could not find has been answered. I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) I am using mne to localize the source. The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. Code: %% load MRI data %%%%%%%% mri = ft_read_mri('Subject01.mri'); % convert the coordinate system mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni mri.coordsys = 'mni'; %% Volume segmentation %%%%%%%% cfg = []; cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); % it takes some time. %% creating the head model %%%%%%%% cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, seg); %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% %load elec_new cfg = []; cfg.method = 'interactive'; cfg.elec = elec_new; cfg.headshape = vol.bnd(3); elec_aligned = ft_electroderealign(cfg); %% make grid %%%%%%%% cfg = []; cfg.vol = vol; cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution cfg.grid.unit = 'cm'; grid = ft_prepare_leadfield(cfg); % %%%%%%%% Check the full model %%%%%%% % grid.pos = grid.pos * 10; % elec_aligned.chanpos = elec_aligned.chanpos*100; % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% source analysis %%%%%%%% cfg = []; cfg.method = 'mne'; cfg.vol = vol; cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; cfg.grid = grid; cfg.mne.lambda = 3; cfg.mne.prewhiten = 'yes'; cfg.mne.scalesourcecov = 'yes'; source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data %% Interpolation of the localized source with the mri %%%%%%%% mri_reslice = ft_volumereslice([],mri); cfg=[]; cfg.parameter = 'pow'; source_int = ft_sourceinterpolate(cfg, source, mri_reslice); %% Visualization (Orthogonal plot) %%%%%%%% cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'pow'; cfg.funcolormap = 'jet'; cfg.maskparameter = cfg.funparameter; ft_sourceplot(cfg, source_int_admit); % (figure attached) ---------------------------------------------------- Thanks for your time, Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig -------------- next part -------------- A non-text attachment was scrubbed... Name: 03 PM.jpg Type: image/jpeg Size: 228015 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Tue Feb 24 15:41:30 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 24 Feb 2015 15:41:30 +0100 Subject: [FieldTrip] source localization only at the edges In-Reply-To: References: Message-ID: Dear Saurabh, Without having gone through the details of your code, my hunch is that this has something to do with the units (m/cm/mm) of your geometrical objects (electrode/gradiometer description, volume conduction model, source model). You could explicitly convert them all to the same using ft_convert_units([data.grad|vol|source], 'm') and then try again, perhaps that helps? Best, Eelke On 24 February 2015 at 15:33, Saurabh Kumar wrote: > Hello fieldtrippers, > > I have a question which I could not find has been answered. > I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) > > I am using mne to localize the source. > The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. > > Code: > > %% load MRI data %%%%%%%% > mri = ft_read_mri('Subject01.mri'); > % convert the coordinate system > mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni > mri.coordsys = 'mni'; > > > %% Volume segmentation %%%%%%%% > cfg = []; > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); % it takes some time. > > > %% creating the head model %%%%%%%% > cfg = []; > cfg.method ='bemcp'; > vol = ft_prepare_headmodel(cfg, seg); > > > %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% > %load elec_new > cfg = []; > cfg.method = 'interactive'; > cfg.elec = elec_new; > cfg.headshape = vol.bnd(3); > elec_aligned = ft_electroderealign(cfg); > > %% make grid %%%%%%%% > cfg = []; > cfg.vol = vol; > cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; > cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution > cfg.grid.unit = 'cm'; > grid = ft_prepare_leadfield(cfg); > > > > % %%%%%%%% Check the full model %%%%%%% > % grid.pos = grid.pos * 10; > % elec_aligned.chanpos = elec_aligned.chanpos*100; > % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); > % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > > %% source analysis %%%%%%%% > cfg = []; > cfg.method = 'mne'; > cfg.vol = vol; > cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; > cfg.grid = grid; > cfg.mne.lambda = 3; > cfg.mne.prewhiten = 'yes'; > cfg.mne.scalesourcecov = 'yes'; > source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data > > %% Interpolation of the localized source with the mri %%%%%%%% > mri_reslice = ft_volumereslice([],mri); > cfg=[]; > cfg.parameter = 'pow'; > source_int = ft_sourceinterpolate(cfg, source, mri_reslice); > > %% Visualization (Orthogonal plot) %%%%%%%% > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'pow'; > cfg.funcolormap = 'jet'; > cfg.maskparameter = cfg.funparameter; > ft_sourceplot(cfg, source_int_admit); % (figure attached) > > > > > ---------------------------------------------------- > Thanks for your time, > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig From kumar at cbs.mpg.de Tue Feb 24 16:13:10 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Tue, 24 Feb 2015 16:13:10 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <1761066429.1447014.1424790790305.JavaMail.zimbra@cbs.mpg.de> Dear Eelke I checked again the units of mri, leadfield, electrode positions and the volume and all seem to be in harmony. I also think that even though you dont specify them explicitely they are adjusted to a common one as the results remain exactly the same as I just checked. Do you have any idea what else could be the problem? ---------------------------------------------------- Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig From m_wink10 at uni-muenster.de Tue Feb 24 22:57:00 2015 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Tue, 24 Feb 2015 22:57:00 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS In-Reply-To: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> References: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> Message-ID: Hey Julian, thanks for the answer. We are using some sort of an Intel iCore i7 with 16 GB of RAM as well as 40 GB of swap and Fedora 16. We do interpolate the data on an MRI. In fact I'm not sure if that is the source of the problem. We downsampled the data and it did not change anything. The problem seems to be that there is a number generated that is too big for MATLAB to process it with the zeros(x) instruction. Around 1-2 years ago I did nearly the same thing in fieldtrip but including an LCMV-Beamformer, the resulting data structures where much bigger and it worked without a problem. Thanks, Martin On Mon, Feb 23, 2015 at 5:14 PM, Julian Keil wrote: > Dear Martin, > > what kind of machine are you using? > Did you interpolate your data to an MRI? > What is your grid resolution? > > You have quite a high number of grid points that you want to compare. > So in case you run out of memory, I'd suggest not interpolating to an MRI > (in case you have done this) but to stay on the grid-point level for your > stats. Otherwise, you could use a less dense grid which obviously results > in smaller data structures. > > Good luck, > > Julian > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 23.02.2015 um 17:00 schrieb Martin Winkels: > > Dear Fieldtrippers, > > we encountered a problem during our DICS Beamformer-Statistics. > > After calculating a beamformer (DICS), normalisation and building > grandaverages across subjects (here exemplarily 3 subjects) we try to > calculate cluster based permutation statistic (in this study: between > groups - one condition). > > The code we used is as follows: > > cfg = []; > > cfg.method = 'montecarlo'; > %cfg.statistic = 'depsamplesT'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; %ft default 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; %ft hat hier 0,025 > > cfg.parameter = 'pow'; > cfg.dim = grandavgA.dim; > > cfg.numrandomization = 1; % number of draws from the > permutation distribution > > design(1,:) = [1 1 1 2 2 2]; > design(2,:) = [1 1 1 1 1 1]; > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); > > > > The input data structure (grandavgA, grandavgB) is as follows: > > grandavgA = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > grandavgB = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > > Fieldtrip version: current (02/23/2015) > > > Thanks, Martin > > -- > > M.Sc. Martin Winkels > > Universitätsklinikum Münster > > Institut für Biomagnetismus & Biosignalanalyse > > Malmedyweg 15 > > 48149 Münster > > GERMANY > > > Telefon: +49 251 83 56 846 > Web: http://biomag.uni-muenster.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Wed Feb 25 14:22:30 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 25 Feb 2015 13:22:30 +0000 Subject: [FieldTrip] source localization only at the edges Message-ID: I would like to see an answer to this also. I am in the middle of Œbeginning¹ to use FT for mne and eloreta. I had the same issue, and then used ³depth normalization², since mne tends to have only surface results. I read on the www (google mne depth normalization) that this might be an issue, and tried: cfg.normalizeparam=5; cfg.normalize='yes'; I got Œdepth¹ results to my mne¹s and eloreta solutions, though I am not sure if I have accurate results. I can¹t find any use of these in the examples. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** On 2/25/15, 6:00 AM, "fieldtrip-request at science.ru.nl" wrote: >Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > >To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > >You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of fieldtrip digest..." > > >Today's Topics: > > 1. Re: source localization only at the edges (Eelke Spaak) > 2. source localization only at the edges (Saurabh Kumar) > 3. Re: ft_clusterstat OUT OF MEMORY - DICS (Martin Winkels) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Tue, 24 Feb 2015 15:41:30 +0100 >From: Eelke Spaak >To: FieldTrip discussion list >Subject: Re: [FieldTrip] source localization only at the edges >Message-ID: > >Content-Type: text/plain; charset=UTF-8 > >Dear Saurabh, > >Without having gone through the details of your code, my hunch is that >this has something to do with the units (m/cm/mm) of your geometrical >objects (electrode/gradiometer description, volume conduction model, >source model). You could explicitly convert them all to the same using >ft_convert_units([data.grad|vol|source], 'm') and then try again, >perhaps that helps? > >Best, >Eelke > >On 24 February 2015 at 15:33, Saurabh Kumar wrote: >> Hello fieldtrippers, >> >> I have a question which I could not find has been answered. >> I am doing source localization for my data and the problem is that no >>matter the data, (even random numbers) the source always comes out at >>the edges of the mri. (Figure attached) >> >> I am using mne to localize the source. >> The code in short is attached below which I use. Please have a look and >>lemme know if you find something that can be changed. >> >> Code: >> >> %% load MRI data %%%%%%%% >> mri = ft_read_mri('Subject01.mri'); >> % convert the coordinate system >> mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system >>from the ctf into the mni >> mri.coordsys = 'mni'; >> >> >> %% Volume segmentation %%%%%%%% >> cfg = []; >> cfg.output = {'brain','skull','scalp'}; >> seg = ft_volumesegment(cfg, mri); % it takes some time. >> >> >> %% creating the head model %%%%%%%% >> cfg = []; >> cfg.method ='bemcp'; >> vol = ft_prepare_headmodel(cfg, seg); >> >> >> %% setting the electrodes (have checked the electrodes are in correct >>positions) %%%%%%%% >> %load elec_new >> cfg = []; >> cfg.method = 'interactive'; >> cfg.elec = elec_new; >> cfg.headshape = vol.bnd(3); >> elec_aligned = ft_electroderealign(cfg); >> >> %% make grid %%%%%%%% >> cfg = []; >> cfg.vol = vol; >> cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; >> cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution >> cfg.grid.unit = 'cm'; >> grid = ft_prepare_leadfield(cfg); >> >> >> >> % %%%%%%%% Check the full model %%%%%%% >> % grid.pos = grid.pos * 10; >> % elec_aligned.chanpos = elec_aligned.chanpos*100; >> % ft_plot_mesh(grid.pos(grid.inside,:));hold >>on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold >>on; ft_plot_sens(elec_aligned); >> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> >> >> >> >> %% source analysis %%%%%%%% >> cfg = []; >> cfg.method = 'mne'; >> cfg.vol = vol; >> cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; >> cfg.grid = grid; >> cfg.mne.lambda = 3; >> cfg.mne.prewhiten = 'yes'; >> cfg.mne.scalesourcecov = 'yes'; >> source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data >> >> %% Interpolation of the localized source with the mri %%%%%%%% >> mri_reslice = ft_volumereslice([],mri); >> cfg=[]; >> cfg.parameter = 'pow'; >> source_int = ft_sourceinterpolate(cfg, source, mri_reslice); >> >> %% Visualization (Orthogonal plot) %%%%%%%% >> cfg = []; >> cfg.method = 'ortho'; >> cfg.funparameter = 'pow'; >> cfg.funcolormap = 'jet'; >> cfg.maskparameter = cfg.funparameter; >> ft_sourceplot(cfg, source_int_admit); % (figure attached) >> >> >> >> >> ---------------------------------------------------- >> Thanks for your time, >> Saurabh Kumar >> >> Cognitive Neurology >> Max Planck Institute >> for Human Cognitive and Brain Sciences >> Stephanstr. 1a >> 04103 Leipzig > > >------------------------------ > >Message: 2 >Date: Tue, 24 Feb 2015 16:13:10 +0100 (CET) >From: Saurabh Kumar >To: fieldtrip >Subject: [FieldTrip] source localization only at the edges >Message-ID: > <1761066429.1447014.1424790790305.JavaMail.zimbra at cbs.mpg.de> >Content-Type: text/plain; charset=utf-8 > >Dear Eelke > >I checked again the units of mri, leadfield, electrode positions and the >volume and all seem to be in harmony. >I also think that even though you dont specify them explicitely they are >adjusted to a common one as the results remain exactly the same as I just >checked. > >Do you have any idea what else could be the problem? > >---------------------------------------------------- >Saurabh Kumar > >Cognitive Neurology >Max Planck Institute >for Human Cognitive and Brain Sciences >Stephanstr. 1a >04103 Leipzig > > >------------------------------ > >Message: 3 >Date: Tue, 24 Feb 2015 22:57:00 +0100 >From: Martin Winkels >To: FieldTrip discussion list >Subject: Re: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Hey Julian, > >thanks for the answer. > >We are using some sort of an Intel iCore i7 with 16 GB of RAM as well as >40 >GB of swap and Fedora 16. > >We do interpolate the data on an MRI. In fact I'm not sure if that is the >source of the problem. We downsampled the data and it did not change >anything. The problem seems to be that there is a number generated that is >too big for MATLAB to process it with the zeros(x) instruction. > >Around 1-2 years ago I did nearly the same thing in fieldtrip but >including >an LCMV-Beamformer, the resulting data structures where much bigger and it >worked without a problem. > >Thanks, Martin > >On Mon, Feb 23, 2015 at 5:14 PM, Julian Keil >wrote: > >> Dear Martin, >> >> what kind of machine are you using? >> Did you interpolate your data to an MRI? >> What is your grid resolution? >> >> You have quite a high number of grid points that you want to compare. >> So in case you run out of memory, I'd suggest not interpolating to an >>MRI >> (in case you have done this) but to stay on the grid-point level for >>your >> stats. Otherwise, you could use a less dense grid which obviously >>results >> in smaller data structures. >> >> Good luck, >> >> Julian >> >> ******************** >> *Dr. Julian Keil* >> >> AG Multisensorische Integration >> Psychiatrische Universit?tsklinik >> der Charit? im St. Hedwig-Krankenhaus >> Gro?e Hamburger Stra?e 5-11, Raum E 307 >> 10115 Berlin >> >> Telefon: +49-30-2311-1879 >> Fax: +49-30-2311-2209 >> >> >>http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integr >>ation >> >> Am 23.02.2015 um 17:00 schrieb Martin Winkels: >> >> Dear Fieldtrippers, >> >> we encountered a problem during our DICS Beamformer-Statistics. >> >> After calculating a beamformer (DICS), normalisation and building >> grandaverages across subjects (here exemplarily 3 subjects) we try to >> calculate cluster based permutation statistic (in this study: between >> groups - one condition). >> >> The code we used is as follows: >> >> cfg = []; >> >> cfg.method = 'montecarlo'; >> %cfg.statistic = 'depsamplesT'; >> cfg.statistic = 'ft_statfun_indepsamplesT'; >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; %ft default 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; %ft hat hier 0,025 >> >> cfg.parameter = 'pow'; >> cfg.dim = grandavgA.dim; >> >> cfg.numrandomization = 1; % number of draws from the >> permutation distribution >> >> design(1,:) = [1 1 1 2 2 2]; >> design(2,:) = [1 1 1 1 1 1]; >> >> cfg.design = design; >> cfg.ivar = 1; >> >> stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); >> >> >> >> The input data structure (grandavgA, grandavgB) is as follows: >> >> grandavgA = >> >> pow: [3x116380 double] >> dim: [46 55 46] >> inside: [116380x1 logical] >> pos: [116380x3 double] >> cfg: [1x1 struct] >> >> grandavgB = >> >> pow: [3x116380 double] >> dim: [46 55 46] >> inside: [116380x1 logical] >> pos: [116380x3 double] >> cfg: [1x1 struct] >> >> >> Fieldtrip version: current (02/23/2015) >> >> >> Thanks, Martin >> >> -- >> >> M.Sc. Martin Winkels >> >> Universit?tsklinikum M?nster >> >> Institut f?r Biomagnetismus & Biosignalanalyse >> >> Malmedyweg 15 >> >> 48149 M?nster >> >> GERMANY >> >> >> Telefon: +49 251 83 56 846 >> Web: http://biomag.uni-muenster.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >a249f/attachment-0001.html> > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 51, Issue 24 >***************************************** From r.oostenveld at donders.ru.nl Wed Feb 25 17:57:43 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 25 Feb 2015 17:57:43 +0100 Subject: [FieldTrip] job opportunities at NeuroSpin, France References: Message-ID: Dear FieldTrip users On behalf of Aaron Schurger, please find below a number of opportunities for MSc, PhD and PostDoc positions at NeuroSpin. best regards, Robert Contact information: Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ ----------------------------------------------------------------------------- Masters and PhD positions in cognitive neuroscience Neural antecedents of spontaneous self-initiated movement in humans and the perception of personal causation Starting date: Fall 2015 or Spring 2016 Duration: 3 years for PhD, 1 or 2 years for masters The French Institute of Health and Medical Research (INSERM) invites applications for masters and PhD positions in the Cognitive Neuroimaging Group, at the NeuroSpin Research Center near Paris, France, as part of the research team of Dr. Aaron Schurger. The Schurger lab focuses on understanding how decisions are made and actions initiated spontaneously, without an external sensory cue, and how the relevant causal processes in the brain are related to the subjective perception of personal causation and societal concepts of personal responsibility. We pursue this research using a combination of behavioral experiments, neuroimaging, computational modeling, and machine learning techniques. There are no specific requirements other than a bachelors degree (for masters applicants) and a masters degree (for PhD applicants) in a relevant discipline. Previous research experience is a plus. Skills used in the lab include: computer programming (MatLab, Python, C, C++), statistics, signal processing, computational and neural network modeling, neuroimaging techniques (EEG, MEG, fMRI) and data-analysis software tools, behavioral psychophysics. Resources available at NeuroSpin include Siemens 3T and 7T MRI scanners; high-density EEG (EGI Inc.); Elekta NeuroMag 306-channel MEG (allowing for the simultaneous recording of EEG); eye tracking (available for MRI, MEG, and behavioral experiments); an in-house team of experts in signal processing and statistical learning; a dedicated staff handling subject recruitment, scheduling, and payment; various Nespresso devices; and proximity to Paris. The salary is highly competitive. Applicants should send a CV, letter of motivation (max 2 pages), and three letters of recommendation via e-mail to aaron.schurger at gmail.com. Review of applicants will begin on the 1st of April, 2015, and will continue until the positions are filled. The NeuroSpin Research Center is located on the campus of the CEA-Saclay, near Orsay, about 18 km southwest of Paris. For more information on the NeuroSpin Research Center and the Cognitive Neuroimaging Group: http://www-centre-saclay.cea.fr/fr/Visite-guidee-de-NeuroSpin http://meg-france.in2p3.fr/_lesCentres/Neurospin_en.php http://www-dsv.cea.fr/en/institutes/institute-of-biomedical-imaging-i2bm/departments/neurospin-neurospin http://www.unicog.org/pm/pmwiki.php ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Post-doctoral position in cognitive neuroscience Neural antecedents of spontaneous self-initiated movement in humans and the perception of personal causation Starting date: Fall 2015 or Spring 2016 Duration: 2 years (renewable for one additional year) The French Institute of Health and Medical Research (INSERM) invites applications for a post-doctoral position in the Cognitive Neuroimaging Group, at the NeuroSpin Research Center near Paris, France, as part of the research team of Dr. Aaron Schurger. The Schurger lab focuses on understanding how decisions are made and actions initiated spontaneously, without an external sensory cue, and how the relevant causal processes in the brain are related to the subjective perception of personal causation and societal concepts of personal responsibility. We pursue this research using a combination of behavioral experiments, neuroimaging, computational modeling, and machine learning techniques. Applicants should have a obtained a PhD in a relevant discipline prior to the starting date, and should have strong skills in at least some of the following areas: computer programming (MatLab, Python, C, C++), statistics, signal processing, computational and neural network modeling, neuroimaging techniques (EEG, MEG, fMRI) and data-analysis tools, behavioral psychophysics. Resources available at NeuroSpin include Siemens 3T and 7T MRI scanners; high-density EEG (EGI Inc.); Elekta NeuroMag 306-channel MEG (allowing for the simultaneous recording of EEG); eye tracking (available for MRI, MEG, and behavioral experiments); an in-house team of experts in signal processing and statistical learning; a dedicated staff handling subject recruitment, scheduling, and payment; various Nespresso devices; and proximity to Paris. The salary is highly competitive, being aligned with that offered by Marie Curie fellowships. Applicants should send a CV, letter of motivation (max 2 pages), and three letters of recommendation via e-mail to aaron.schurger at gmail.com. Review of applicants will begin on April 1, 2015, and will continue until the positions are filled. The NeuroSpin Research Center is located on the campus of the CEA-Saclay, near Orsay, about 18 km southwest of Paris. For more information on the NeuroSpin Research Center and the Cognitive Neuroimaging Group: http://www-centre-saclay.cea.fr/fr/Visite-guidee-de-NeuroSpin http://meg-france.in2p3.fr/_lesCentres/Neurospin_en.php http://www-dsv.cea.fr/en/institutes/institute-of-biomedical-imaging-i2bm/departments/neurospin-neurospin http://www.unicog.org/pm/pmwiki.php ----------------------------------------------------------------------------- From jim.mckay at candoosys.com Wed Feb 25 22:40:23 2015 From: jim.mckay at candoosys.com (Jim McKay) Date: Wed, 25 Feb 2015 13:40:23 -0800 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit Message-ID: <54EE4147.9090408@candoosys.com> Hello Fieldtrippers, I am consulting with the Sandia Labs on development of an atomic magnetometer based MEG system prototype. One of the areas I am working on is head localization, so I was looking at the code for the realtime head localization in Fieldtrip. I was surprised to see that although the comments talk about using a magnetic dipole forward solution, it actually used the FT dipolefit code which is based on an equivalent current dipole, as far as I can tell. There should be a significant difference in the forward solutions between MD and ECD, so how does this work? Or am I just missing something? Cheers, Jim -- Jim McKay Candoo Systems Inc. - Magnetic field sensors, systems, and site surveys Tel. 778-840-0361 jim.mckay at candoosys.com www.candoosys.com From tyler.grummett at flinders.edu.au Thu Feb 26 00:40:29 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 25 Feb 2015 23:40:29 +0000 Subject: [FieldTrip] source localization only at the edges In-Reply-To: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> References: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> Message-ID: Hello :) I've come across this issue myself a while back and for me it was because there were dipoles located outside the brain, but the code was telling me they were inside. Could this be happening to you? Tyler Sent from my iPhone > On 25 Feb 2015, at 1:06 am, Saurabh Kumar wrote: > > Hello fieldtrippers, > > I have a question which I could not find has been answered. > I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) > > I am using mne to localize the source. > The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. > > Code: > > %% load MRI data %%%%%%%% > mri = ft_read_mri('Subject01.mri'); > % convert the coordinate system > mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni > mri.coordsys = 'mni'; > > > %% Volume segmentation %%%%%%%% > cfg = []; > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); % it takes some time. > > > %% creating the head model %%%%%%%% > cfg = []; > cfg.method ='bemcp'; > vol = ft_prepare_headmodel(cfg, seg); > > > %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% > %load elec_new > cfg = []; > cfg.method = 'interactive'; > cfg.elec = elec_new; > cfg.headshape = vol.bnd(3); > elec_aligned = ft_electroderealign(cfg); > > %% make grid %%%%%%%% > cfg = []; > cfg.vol = vol; > cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; > cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution > cfg.grid.unit = 'cm'; > grid = ft_prepare_leadfield(cfg); > > > > % %%%%%%%% Check the full model %%%%%%% > % grid.pos = grid.pos * 10; > % elec_aligned.chanpos = elec_aligned.chanpos*100; > % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); > % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > > %% source analysis %%%%%%%% > cfg = []; > cfg.method = 'mne'; > cfg.vol = vol; > cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; > cfg.grid = grid; > cfg.mne.lambda = 3; > cfg.mne.prewhiten = 'yes'; > cfg.mne.scalesourcecov = 'yes'; > source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data > > %% Interpolation of the localized source with the mri %%%%%%%% > mri_reslice = ft_volumereslice([],mri); > cfg=[]; > cfg.parameter = 'pow'; > source_int = ft_sourceinterpolate(cfg, source, mri_reslice); > > %% Visualization (Orthogonal plot) %%%%%%%% > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'pow'; > cfg.funcolormap = 'jet'; > cfg.maskparameter = cfg.funparameter; > ft_sourceplot(cfg, source_int_admit); % (figure attached) > > > > > ---------------------------------------------------- > Thanks for your time, > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig > <03 PM.jpg> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From kumar at cbs.mpg.de Thu Feb 26 12:11:15 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Thu, 26 Feb 2015 12:11:15 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> Hello all, The problem may be because of the 'mne' that is used because I have changed the method to 'music' and now I have been able to obtain the sources in the inner parts of the brain too. This may give rise to another question as to which methos to use and I am still pondering on this. So, in short if you are stuck like me knowing that your headmodel is working fine and everything including the units and the electrode positions are fine then just change the method. ---------------------------------------------------- Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig From ayobimpe2004 at hotmail.com Thu Feb 26 12:30:25 2015 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Thu, 26 Feb 2015 12:30:25 +0100 Subject: [FieldTrip] source localization only at the edges In-Reply-To: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> References: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> Message-ID: I may be wrong but I disagree with changing method will locate sources inside the brain. The main problem has to come from head modeling ( lead fields, segmentation, conductivity assignment etc)if the head modeling or forward problem is done right, whatever method you use for inverse problem, it will be similar to one another. please check the forward problem againAzeez > Date: Thu, 26 Feb 2015 12:11:15 +0100 > From: kumar at cbs.mpg.de > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] source localization only at the edges > > Hello all, > > The problem may be because of the 'mne' that is used because I have changed the method to 'music' and now I have been able to obtain the sources in the inner parts of the brain too. > This may give rise to another question as to which methos to use and I am still pondering on this. > > So, in short if you are stuck like me knowing that your headmodel is working fine and everything including the units and the electrode positions are fine then just change the method. > > > ---------------------------------------------------- > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.wollbrink at wwu.de Thu Feb 26 15:05:23 2015 From: a.wollbrink at wwu.de (Andreas Wollbrink) Date: Thu, 26 Feb 2015 15:05:23 +0100 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: References: Message-ID: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> Hi Shlomit, I guess your problem is related to the fact the data storage format of EGI data recorded with Netstation 4.5.4 contains time scale values in nano seconds instead of micro seconds. A sanity check for that was missing in the ft_read_header function (after reporting this bug it is supposed to be fixed in the new fieldtrip version by tomorrow). You might give it a try to run your analysis again. At least for me it worked out after the 'bug' was fixed. Thanks, Andreas On Mon, 2015-02-23 at 21:52 +0200, shlomit beker wrote: > Hello Fieldtrippers, > > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use > fieldtrip functions on the mff format. > > > While running ft_read_data on an mff, I've encounter following bug > > > index exceeds matrix dimensions. > > Error in ft_read_data (line 787) > dat{end} = dat{end}(:,begsel:endsel); > > > > Data sampling is 1000 hz. > Would appreciate your help. If any further information is needed, > please ask me. > > > > Thanks, > > > -- > Shlomit Beker, PhD > Postdoctoral fellow, Nir lab > Sackler Faculty of Medicine > Tel Aviv University > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ############################################# Andreas Wollbrink, Dipl.-Ing. Biomedical Engineer MEG / EEG Lab Manager Institute for Biomagnetism and Biosignalanalysis University Hospital, University of Muenster address: Malmedyweg 15, 48149 Muenster, Germany office: +49-251-83-52546 email: a.wollbrink at wwu.de website: http://biomag.uni-muenster.de From shlomitbeker at gmail.com Thu Feb 26 15:09:32 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Thu, 26 Feb 2015 16:09:32 +0200 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> References: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> Message-ID: Thanks Andreas, I will give it a try with the new FT version. Shlomit On Thu, Feb 26, 2015 at 4:05 PM, Andreas Wollbrink wrote: > Hi Shlomit, > > I guess your problem is related to the fact the data storage format of > EGI data recorded with Netstation 4.5.4 contains time scale values in > nano seconds instead of micro seconds. > > A sanity check for that was missing in the ft_read_header function > (after reporting this bug it is supposed to be fixed in the new > fieldtrip version by tomorrow). > > You might give it a try to run your analysis again. > At least for me it worked out after the 'bug' was fixed. > > Thanks, > Andreas > > > > > On Mon, 2015-02-23 at 21:52 +0200, shlomit beker wrote: > > Hello Fieldtrippers, > > > > > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use > > fieldtrip functions on the mff format. > > > > > > While running ft_read_data on an mff, I've encounter following bug > > > > > > index exceeds matrix dimensions. > > > > Error in ft_read_data (line 787) > > dat{end} = dat{end}(:,begsel:endsel); > > > > > > > > Data sampling is 1000 hz. > > Would appreciate your help. If any further information is needed, > > please ask me. > > > > > > > > Thanks, > > > > > > -- > > Shlomit Beker, PhD > > Postdoctoral fellow, Nir lab > > Sackler Faculty of Medicine > > Tel Aviv University > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > ############################################# > > Andreas Wollbrink, Dipl.-Ing. > Biomedical Engineer > > MEG / EEG Lab Manager > > Institute for Biomagnetism and Biosignalanalysis > University Hospital, University of Muenster > > address: Malmedyweg 15, 48149 Muenster, Germany > > office: +49-251-83-52546 > > email: a.wollbrink at wwu.de > website: http://biomag.uni-muenster.de > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Shlomit Beker, PhD Postdoctoral fellow, Nir lab Sackler Faculty of Medicine Tel Aviv University -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Thu Feb 26 15:13:51 2015 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Thu, 26 Feb 2015 15:13:51 +0100 Subject: [FieldTrip] Conditional trial definition Message-ID: Dear fieldtrippers, I would like to evaluate a reaction time experiment. Hence for me two types of trigger are of interest: the onset of the stimulus and the reaction to it. I found this function at the fieldtrip homepage: function [trl, event] = mytestfunction(cfg); hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); value = [event(find(strcmp('trigger', {event.type}))).value]'; sample = [event(find(strcmp('trigger', {event.type}))).sample]'; pretrig = -round(cfg.trialdef.pre * hdr.Fs); posttrig = round(cfg.trialdef.post * hdr.Fs); trl = []; for j = 1:(length(value)-1) trl1 = value(j); trl2 = value(j+1); if trl1==3 && trl2==5 trlbegin =sample(j) + pretrig; trlend = sample(j) + posttrig; offset =pretrig; newtrl = [trlbegin trlend offset]; trl = [trl; newtrl]; end end Creating the sample-matrix I get a long string (all values in one field without delimiter). I think it’s because my values are in string format (‘DI11’, ‘DIN1’, …). Does anyone have an idea, for example how to convert the string values to numbers in this case? Or an other advise for a solution of this problem. Looking forward to support! Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gugale at pop.com.br Thu Feb 26 15:27:42 2015 From: gugale at pop.com.br (gugale at pop.com.br) Date: Thu, 26 Feb 2015 11:27:42 -0300 Subject: [FieldTrip] Hemispheric comparison Message-ID: <20150226112742.Horde.xOOb_dns-7f73dqSoqH7zg6@webmail.pop.com.br> Hello, I am new in FieldTrip but I have learnt a lot in the mlast months! I would like to make an estatistical analysis in differences inter hemispheric. It means, compare the differences in ERP between left and right hemispheres, as also between anterior and posterior regiosn. I already have my timelockanalysis data. How should I do that in FieldTrip? Thank you very much for this toolbox and for your attention! Best regard, Gustavo L.E. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sapttrs at gmail.com Fri Feb 27 03:53:25 2015 From: sapttrs at gmail.com (Steve Patterson) Date: Thu, 26 Feb 2015 22:53:25 -0400 Subject: [FieldTrip] inconsistent chanunit for Neuromag data Message-ID: Hello, I noticed that fieldtrip produces inconsistent channel units when I read in Neuromag (vectorview) data. For example: %%%%%%%%%%%%%%%%%%%%%%%% cfg = []; cfg.dataset = 'example.fif'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'STI101'; cfg.trialdef.eventvalue = [17 18 20]; cfg.trialdef.prestim = 0.500; cfg.trialdef.poststim = 1.000; cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); disp(data.hdr.chanunit(1:6)); 'T/m' 'T/m' 'T' 'T/m' 'T/m' 'T' disp(data.grad.chanunit(1:6)); 'T' 'T' 'T' 'T' 'T' 'T' %%%%%%%%%%%%%%%%%%%%%%%% data.hdr.chanunit is correct and data.grad.chanunit is wrong. data.grad.chanunit must take precedence in further analysis, because I've noticed this causes problems downstream. For example, when using ft_dipolesimulation, the simulated data on the gradiometer channels is too small in amplitude by a factor of 1/(16.8E-3) (the distance between the gradiometer coil pair in meters). This is reflected in the grad.tra matrix, whose non-zero values are all 1's and -1's, whereas they should be 1's (magnetometers), and +/- 1/16.8E-3 (gradiometers). If you could fix this, it would be much appreciated! thanks, Steve From dboratyn at u.northwestern.edu Sat Feb 28 02:20:11 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Fri, 27 Feb 2015 19:20:11 -0600 Subject: [FieldTrip] ft_connectivityplot axis lables Message-ID: New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I’d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. Thank you! Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plotex.tiff Type: image/tiff Size: 18948 bytes Desc: not available URL: From f.roux at bcbl.eu Sun Feb 1 16:03:57 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Sun, 1 Feb 2015 16:03:57 +0100 (CET) Subject: [FieldTrip] problem with copyfields and removefields after fieldtrip update during call to ft_freqanalysis and ft_topoplotTFR Message-ID: <1739525902.373403.1422803037589.JavaMail.root@bcbl.eu> Dear all, I've updated my ft version to 20150115 but now I am having problems with two functions that ft is calling and which are not in my Matlab path. While calling ft_freqanalysis and ft_topoplotTFR I received error messages related to "copyfields" and "removefields". If I am not mistaken, these functions are not native Matlab functions, so I suppose that these are ft-specifc and that they are located in a subfolder somewhere in the main ft folder but that my Matlab path does not include them. I've commented out the lines in the ft-code where these functions are called to avoid the problem but I am not sure whether there could be any other problems arising from the fact that my ft-path seems not to be set correctly. I usually add ft to my Matlab path through: addpath('/home/user/fieldtrip-20150115/'); ft_defaults; and have never experienced any problems so far. Has anybody experienced a similar problem after updating their ft-version and can anyone tell me how to fix this? Best, Fred --------------------------------------------------------------------------- From ktyler at swin.edu.au Mon Feb 2 02:26:11 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 2 Feb 2015 01:26:11 +0000 Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial Message-ID: Hi all, Just a question: I was running through the 'Beamforming oscillatory responses in MEG and EEG data' tutorial, and at one plot, the strongest motor response is located in the center of the head. The tutorial asks "Can you explain this finding?" Has anyone else done this tutorial? Because I am not at all sure why a motor response would show up in the centre of the head. Can anyone enlighten me? When I have been getting results that look like this, I kept feeling there was an error or some artefact going on. Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Feb 2 05:13:17 2015 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 2 Feb 2015 04:13:17 +0000 Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial In-Reply-To: References: Message-ID: Hi Kaelasha, Take a look at http://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_biashttp://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_biashttp://fieldtrip.fcdonders.nl/tutorial/beamformer#exercise_3center_of_head_bias This should help clarify what's going on. Peter __________________________ Peter Goodin, BSc (Hons), Ph.D Candidate. Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 http://www.swinburne.edu.au/swinburneresearchers/index.php?fuseaction=profile&pid=4149 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Kaelasha Tyler [ktyler at swin.edu.au] Sent: Monday, 2 February 2015 12:26 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Beamforming oscillatory responses in MEG and EEG data tutorial Hi all, Just a question: I was running through the 'Beamforming oscillatory responses in MEG and EEG data' tutorial, and at one plot, the strongest motor response is located in the center of the head. The tutorial asks "Can you explain this finding?" Has anyone else done this tutorial? Because I am not at all sure why a motor response would show up in the centre of the head. Can anyone enlighten me? When I have been getting results that look like this, I kept feeling there was an error or some artefact going on. Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Feb 2 09:24:40 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 2 Feb 2015 09:24:40 +0100 Subject: [FieldTrip] basic question Message-ID: Dear all, I've got a basic question regarding spectral analysis. In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Feb 2 09:25:23 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 2 Feb 2015 09:25:23 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <000001d03cab$039169c0$0ab43d40$@de> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> <000001d03cab$039169c0$0ab43d40$@de> Message-ID: <002f01d03ec1$ca3e86d0$5ebb9470$@artinis.com> Hi Todor, you are right that in saying that only one taper shows distinct peaks in all three frequency bands. I dare to say that you chose a rather long signal (something of several seconds), hence the broad frequency smoothing when adding a single taper. As you also indicated, the purpose of using multitapering is not to represent the PSD as 'clean' as possible - then you would need as little smoothing in the frequency domain as possible and therefore use a boxcar taper. In real life, we have noisy signals unfortunately, and most importantly, neurophysiological signals (of higher frequency) are of wide bandwidth, center frequencies of neurophysiological signals vary strongly across participants, etc. All these make your signal imperfect, and are probably properties that you did not simulate. You can calculate the amount of 'smoothing'/smearing in the frequency domain yourself a priori (2*length of your signal * frequency smoothing = # tapers). The choice of tapering depends thus a lot on what you want. If you want to increase statistical power across observations, where you expect activity in a certain, frequency band, slightly different across observations, possibly contaminated by noise, then multitapers might be the way to go. The advantage is that you have very good control over the bandwidth of your decomposition, and the frequency response is pretty amazing (as you probably saw in the script, additional tapers increase the magnitude of the main lobe while roughly maintaining the magnitude of the side lobes). It all depends on what you want though. We are dealing with tricky signals anyway due to their neurophysiological origin (imperfect sinusoids, lots of noise of different sources, etc.), so we need to choose a method that best suits our needs. Multitapers are one of those that I wouldn't want to miss (in practice mostly when dealing with gamma band responses due to their wide bandwidth). There are more than enough cases where multitapering can also be a pretty bad choice (e.g. when analyzing lower frequencies in shorter trials). Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of tjordanov at besa.de > Sent: Friday, January 30, 2015 5:37 PM > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Eelke, hi Jörn, > > thank you for your elaborate answers and for the script - it is very > informative and useful. > I am in some extent familiar with the theory behind multitapering and I am > also convinced that it has very good theoretical properties. However, let us > take a look at the application. I simulated 200 trials data with jitter in the > frequency. You can find the frequency profile of the trials as attachment > ("FrequenciesForSimulation.png"). There are 67 trials with central frequency > 34 Hz (variation between 32 and 36 Hz), 67 trials with central frequency 50 Hz > (48 to 52 Hz) and 66 trials with central frequency 66 Hz (64 to 68 Hz). I > performed multitaper analysis with 1, 2 and 3 tapers (see results > "Multitaper1taper.png", "Multitaper2tapers.png", "Multitaper3tapers.png"). > As we can see from the results only the decomposition with one taper > detected correctly the three frequencies, all other two methods (with 2 and > 3 tapers) just distorted (smoothed) the first result. I can see that such kind of > smoothing is good for the statistical power between subjects but it does not > prove the advantage of using multiple tapers compared to using just single > taper. What do you think? > > Best, > Todor > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Jörn M. Horschig > Sent: Freitag, 30. Januar 2015 13:34 > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > maybe this matlab function helps illustrating what dpss multitapers are, and > will thus clarify what makes them so powerful compared to other > techniques: > https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 > (go to example 5) > > Best, > Jörn > > > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Friday, January 30, 2015 11:52 AM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Todor, > > > > Although your procedure would also yield smoothing in the frequency > > domain which is independent from that in the time domain, it is not at > > all equivalent to using multitapers! > > > > The tapers in the discrete prolate spheroidal sequence (dpss, == > > multitaper in fieldtrip) are pairwise orthogonal, hence their > > estimates are independent from one another. This will result in there > > being more information extracted from the signal than if you used a > > single taper and then apply Gaussian smoothing over frequencies. You > > could have a look at https://en.wikipedia.org/wiki/Multitaper which > > gives quite a decent overview of multitapering. Or for the full > > details, refer to the original paper by David Thompson: > > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > > > Best. > > Eelke > > > > On 30 January 2015 at 11:10, tjordanov at besa.de > > wrote: > > > Hi Eelke, > > > > > > I found your answer very interesting. If I understand you correctly, > > > the > > advantage of the multitaper method is that it smoothes in the > > frequency domain independently of the smoothing in the time domain. > > Then it should be equivalent (or similar) with the following procedure: > > > 1) Calculate single trial single taper decomposition of the signal. > > > 2) Choose an appropriate 1D Gauss function (note that it is > > > important to be 1D else it would smooth in both - time and > > > frequency) > > > 3) Apply the selected Gauss function on the decomposed signal only > > > in the > > frequency direction (not in time in order to avoid temporal smearing). > > Do this for all trials and all time points. > > > 4) Calculate the average over the trials. > > > In this procedure the choice of the Gaussian would determine the > > > amount > > of smearing in the frequency domain. > > > > > > Is this so, or I misunderstood something? > > > > > > Best, > > > Todor > > > > > > > > > -----Original Message----- > > > From: fieldtrip-bounces at science.ru.nl > > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > > Sent: Mittwoch, 28. Januar 2015 12:24 > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > > > Hi Nico, > > > > > > As for question (2), you probably first need to think about what > > > constitutes > > a "better" result. Using more tapers with dpss will always result in > > more frequency smoothing. If your source signal is primarily composed > > of pure sinusoids, and you interpret a spectrum as "better" > > > if it shows clearer peaks, then you will always get the "best" > > > result for the > > single-taper case. > > > > > > Multitapering allows optimal control over the amount of smoothing > > > you > > obtain in the frequency domain, which is more or less independent of > > the amount of smoothing you obtain in the time domain (as opposed to > e.g. > > wavelets, where these are fundamentally linked). When dealing with > > brain signals, you will often find that a certain stimulus might > > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > > while in another subject or another trial the same stimulus might > > induce a 50-60 Hz response or so. Of course, in the average over > > trials (and subjects), this heterogeneity (i.e., > > noise) will wash out, but it will severely damage your statistical sensitivity. > > Therefore, using multitapers to add smoothing can produce a much more > > consistent result and therefore be "better" in the sense of actually > > understanding the brain. > > > > > > As for your simulation, perhaps using filtered noise would be better > > > than > > sinusoids. Also, since multitapering benefits you most strongly when > > taking variation over observations into account, you could consider > > simulating different observations, each consisting of noise filtered > > in a slightly different randomly chosen bandwidth, and inspecting the > > resulting variation over observations in the spectra. > > > > > > Best, > > > Eelke > > > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > > >> Hi Nico, > > >> > > >> I'm not sure about the second question, but as for the first > > >> question, you can manually set the scales for ft_singleplotTFR > > >> using > > cfg.zlim. > > >> > > >> Hope that helps, > > >> > > >> Max > > >> > > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > >> > > >> wrote: > > >>> > > >>> Hello FieldTrip community, > > >>> > > >>> > > >>> > > >>> I am new to FieldTrip and I try to simulate data to compare the > > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > >>> > > >>> Therefore I simulate Data manually using different latency, > > >>> amplitude and frequency combinations using the following equation: > > >>> > > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > >>> > > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > >>> > > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > >>> > > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > >>> > > >>> sig = sig1+sig2+sig3+sig4; > > >>> > > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > > >>> > > >>> > > >>> After using ft_frequanalysis (see the following cfgs) > > >>> > > >>> > > >>> Cfg Wavelet: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'wavelet'; > > >>> > > >>> cfg.width = 7; > > >>> > > >>> cfg.gwidth = 3; > > >>> > > >>> cfg.foilim = [1 70]; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> Cfg Hanning / Multitaper: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'mtmconvol' > > >>> > > >>> cfg.foi = 1:1:70 > > >>> > > >>> cfg.tapsmofrq = 0.2*cfg.foi; > > >>> > > >>> cfg.taper = 'dpss' / ‘hanning’; > > >>> > > >>> cfg.t_ftimwin = 4./cfg.foi; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> > > >>> the data is plotted with ft_singleplotTFR (see cfg below) > > >>> > > >>> > > >>> cfg singleplot: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.maskstyle = 'saturation'; > > >>> > > >>> cfg.colorbar = 'yes'; > > >>> > > >>> cfg.layout = 'AC_Osc.lay'; > > >>> > > >>> ft_singleplotTFR(cfg, TFRwave); > > >>> > > >>> > > >>> Two problems occur. First, the power scale of wavelet and > > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > > ~15*10^4). > > >>> > > >>> 1. How can I get the scale of all methods equal, or do I have to > > >>> change the Wavelet settings to get the right scale of the values? > > >>> > > >>> Second, the best result of Multitaper analysis is performed using > > >>> only one Taper. The goal was to get a result, where the advantages > > >>> and disadvantages of Multitaper analysis compared to the other > > methods can be seen. > > >>> > > >>> 2. How can I change the simulation so that more tapers show better > > >>> results than a single taper does? > > >>> > > >>> > > >>> Thank you for your time and help. > > >>> > > >>> > > >>> Regards, > > >>> > > >>> > > >>> > > >>> Nicolas Weeger > > >>> > > >>> Student of Master-Program Appied Research, > > >>> > > >>> University Ansbach, > > >>> > > >>> Germany > > >>> > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> > > >> > > >> > > >> -- > > >> Max Cantor > > >> Lab Manager > > >> Computational Neurolinguistics Lab > > >> University of Michigan > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From behinger at uos.de Mon Feb 2 10:12:50 2015 From: behinger at uos.de (Benedikt Ehinger) Date: Mon, 02 Feb 2015 10:12:50 +0100 Subject: [FieldTrip] basic question In-Reply-To: References: Message-ID: <54CF3F92.2050202@uos.de> Dear Hweeling, we use the following code: % Make 23 logarithmical spaced .25-octave frequencies cfg.foi = logspace(log10(4),log10(181),23); cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz % The windows should have 3/4 octave smoothing in frequency domain cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq % The timewindow should be so, that for freqs below 16, it results in n=1 % Taper used, but for frequencies higher, it should be a constant 250ms. % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1) cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)))]; I guess the first line is the answer to your question. I hope this bit of code helps. Best, Benedikt Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee: > Dear all, > > I've got a basic question regarding spectral analysis. > > In Hipp's neuron paper, it was mentioned that "spectral estimates were > computed across 23 logarithmically scaled frequencies from 4 - 181 Hz > (0.25 octave steps)". May I know how can one implement this using > Fieldtrip? > > Thanks. > > Best regards, > Hweeling > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Feb 2 11:47:52 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 2 Feb 2015 11:47:52 +0100 Subject: [FieldTrip] basic question In-Reply-To: <54CF3F92.2050202@uos.de> References: <54CF3F92.2050202@uos.de> Message-ID: <005401d03ed5$b1db9ba0$1592d2e0$@artinis.com> Hi Benedikt and Hweeling, note that the rounding step is not necessary, because FieldTrip will round to steps according to your frequency resolution. Actual frequencies of interest (foi) are subject to the time window of your trials defining the Raleigh frequency (i.e. frequency resolution). With trials of 2s you have a frequency resolution of 0.5 Hz, so you can only get estimates at 4 Hz, 4.5 Hz, 5 Hz etc. With the code you sent around, you request frequency at 4.0000 4.7568 5.6568 6.7271 will thus effectively 4, 5, 6 and 7 Hz will be computed (due to the rounding to the next step of the 0.5 Hz resolution). I do not know the length of your trials, but I thought I drop this here to avoid future questions on ‘why this didn’t work as expected’ ;) Best, Jörn Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Benedikt Ehinger Sent: Monday, February 2, 2015 10:13 AM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] basic question Dear Hweeling, we use the following code: % Make 23 logarithmical spaced .25-octave frequencies cfg.foi = logspace(log10(4),log10(181),23); cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz % The windows should have 3/4 octave smoothing in frequency domain cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq % The timewindow should be so, that for freqs below 16, it results in n=1 % Taper used, but for frequencies higher, it should be a constant 250ms. % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1) cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)) )]; I guess the first line is the answer to your question. I hope this bit of code helps. Best, Benedikt Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee: Dear all, I've got a basic question regarding spectral analysis. In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip? Thanks. Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _____ Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Feb 2 17:46:00 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 2 Feb 2015 17:46:00 +0100 Subject: [FieldTrip] Fwd: help with topoplot_TFR References: Message-ID: <4473FF08-8792-476C-A525-994186956989@uni-konstanz.de> Hi Payashi, I’m forwarding your message to the list again. > > Dear Tzvetan, > > Thank you, that works perfectly. Many apologies, this is the last question. Is it possible to topographically represent the change in alpha/delta ratio (i.e. one epoch in time from another) ? I have calculated this by selecting two epochs of time from my 'ADR' matrix and subtracting them. However, I get the following error message when I put this into topoplot ER I suspect you should check whether you did the subtraction properly. Regarding to this you should check the functionality of ft_selectdata (select the epochs) and ft_math(subtract them). I suggest you try these first and see whether the input to ft_topoplotER is properly organized. best tzvetan > > Index exceeds matrix dimensions. > > Error in topoplot_common (line 556) > dat = dat(sellab, xmin:xmax); > > Error in ft_topoplotER (line 192) > cfg = topoplot_common(cfg, varargin{:}); > > Many thanks > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > On 29 Jan 2015, at 18:31, Tzvetan Popov wrote: > >> >> Hi Payashi, >> >>> I have computed the ratio per sample and called it ADR. It is a 14x1x480 matrix (channels x freq x time). >> good, so now you squeeze(ADR) in order to get the actual ‘chan_time’ representation. Then you introduce a new variable say tlk_ADR: >> tlk_ADR.avg =ADR; >> tlk_ADR.label = freq_ADR.label; >> tlk_ADR.dimord = freq_ADR.dimord; >> tlk_ADR.time = freq_ADR.time; >> tlk_ADR.elec = freq_ADR.elec; >> >> then you call all plotting functions that deal with time domain signals such as ft_multiplotER, ft_singleplotER and ft_topoplotER. Not …TFR. >> So your code would look like; >>> cfg=[]; >>> cfg.xlim = [3000 3200]; >>> cfg.colorbar = 'yes'; >>> figure >>> ft_topoplotER(cfg, tlk_ADR); >> >> good luck >> tzvetan >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabra005 at odu.edu Wed Feb 4 17:08:05 2015 From: nabra005 at odu.edu (NIJO ABRAHAM) Date: Wed, 4 Feb 2015 11:08:05 -0500 Subject: [FieldTrip] ft_rejectartifact error with "interactive=yes" following 2014b Matlab upgrade Message-ID: Hi FTs, Recently I updated to Fieldtrip version 20150115 (was using 2014 Septemper version earlier) which resulted in a GUI error in the Matlab command window when any buttons in the interactive window were clicked. The GUI which I activated was cfg.artfctdefvalue.zvalue.interactive = 'yes'; I believe this error arises only on the Matlab2014b version since the error was not reproduced in Matlab2014a version. Given below is the error that was displayed: MATLAB COMMAND WINDOW showing trial 1, channel Cz No appropriate method, property, or field Key for class matlab.ui.eventdata.ActionData. Error in ft_artifact_zvalue>parseKeyboardEvent (line 1079) key = eventdata.Key; Error in ft_artifact_zvalue>keyboard_cb (line 680) key = parseKeyboardEvent(eventdata); Error using waitfor Error while evaluating UIControl Callback SAMPLE OF THE CODE: cfg=[]; cfg.continuous = 'yes'; cfg.trl = trl_2; cfg.artfctdef.zvalue.channel = data.label{jj}; cfg.artfctdef.zvalue.cutoff = 8; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.05; cfg.artfctdef.zvalue.fltpadding = 0; cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; cfg.artfctdef.zvalue.interactive = 'yes'; %%%%%% P.S. - I was aware of Bug2461 and that is why I upgraded to the latest FT version since a post dated this month states that FT had partially resolved the issues from Handle graphics 2. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Holger.Krause at med.uni-duesseldorf.de Wed Feb 4 17:24:15 2015 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Wed, 4 Feb 2015 17:24:15 +0100 Subject: [FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica' Message-ID: Dear all, documentation of FT_COMPONENTANALYSIS states: > You may specify a particular seed for random numbers called by > rand/randn/randi, or the random state used by a previous call to this > function to replicate results. For example: > cfg.randomseed = integer seed value of user's choice > cfg.randomseed = comp.cfg.callinfo.randomseed (from previous call) Aiming at reproducing independent components, I would expect cfg.method = 'runica'; cfg.randomseed = 5; comp = ft_componentanalysis(cfg, some_preprocessed_data); to yield the same results as cfg.method = 'runica'; cfg.randomseed = 5; comp = ft_componentanalysis(cfg, some_preprocessed_data); Unfortunately, this is not (always) the case. As far as I can see, all the FT functions seem to handle the 'randomseed' option properly. It is 'external/eeglab/runica.m', which is nasty, and sets the state of the prng to a value depending on system time (line 812): > rand('state',sum(100*clock)); % set the random number generator state to > % a position dependent on the system clock I'm not sure, what's FT's policy regarding making changes to external toolboxes. In this case, I would recommend to delete the aforementioned line, as it effectively renders fieldtrip's aims to have reproducible pseudo random numbers void. And, without this line, two consecutive calls of ft_componentanalysis() seem to produce identical results (checked by eye in ft_databrowser()). Could some FT developer please comment on this? Cheers, Holger -- Dr. rer. nat. Holger Krause MEG-Labor, Raum 13.54.-1.84 Telefon: +49 211 81-19031 Institut für klinische Neurowissenschaften http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik Düsseldorf From johanna.zumer at gmail.com Wed Feb 4 17:39:23 2015 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Wed, 4 Feb 2015 16:39:23 +0000 Subject: [FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica' In-Reply-To: References: Message-ID: Dear Holger, Please see the discussion on this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2585 in which it is a known bug, but still an open discussion as to solution. Sorry for the problem, but perhaps your email will help spur a solution... Cheers, Johanna 2015-02-04 16:24 GMT+00:00 Holger Krause < Holger.Krause at med.uni-duesseldorf.de>: > Dear all, > > documentation of FT_COMPONENTANALYSIS states: > > > You may specify a particular seed for random numbers called by > > rand/randn/randi, or the random state used by a previous call to this > > function to replicate results. For example: > > cfg.randomseed = integer seed value of user's choice > > cfg.randomseed = comp.cfg.callinfo.randomseed (from previous call) > > Aiming at reproducing independent components, I would expect > > cfg.method = 'runica'; > cfg.randomseed = 5; > comp = ft_componentanalysis(cfg, some_preprocessed_data); > > to yield the same results as > > cfg.method = 'runica'; > cfg.randomseed = 5; > comp = ft_componentanalysis(cfg, some_preprocessed_data); > > Unfortunately, this is not (always) the case. As far as I can see, all the > FT > functions seem to handle the 'randomseed' option properly. It is > 'external/eeglab/runica.m', which is nasty, and sets the state of the prng > to > a value depending on system time (line 812): > > > rand('state',sum(100*clock)); % set the random number generator > state to > > % a position dependent on the system clock > > I'm not sure, what's FT's policy regarding making changes to external > toolboxes. In this case, I would recommend to delete the aforementioned > line, > as it effectively renders fieldtrip's aims to have reproducible pseudo > random > numbers void. And, without this line, two consecutive calls of > ft_componentanalysis() seem to produce identical results (checked by eye in > ft_databrowser()). > > Could some FT developer please comment on this? > > Cheers, > > Holger > > -- > Dr. rer. nat. Holger Krause MEG-Labor, Raum > 13.54.-1.84 > Telefon: +49 211 81-19031 Institut für klinische > Neurowissenschaften > http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik > Düsseldorf > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Feb 5 11:39:28 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 5 Feb 2015 10:39:28 +0000 Subject: [FieldTrip] MNI coordinate to Anatomy Message-ID: ?Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Thu Feb 5 11:49:42 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Thu, 5 Feb 2015 10:49:42 +0000 Subject: [FieldTrip] MNI coordinate to Anatomy In-Reply-To: References: Message-ID: Hi Rabat, The function that jumps to my mind is ft_volumelookup. However, this quickly, I could only find the following page that might be relevant to you: http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source Hope it helps, arjen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Rajat Thomas [r.thomas at nin.knaw.nl] Sent: Thursday, February 05, 2015 11:39 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] MNI coordinate to Anatomy ​Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Feb 5 11:52:27 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 5 Feb 2015 11:52:27 +0100 Subject: [FieldTrip] MNI coordinate to Anatomy In-Reply-To: References: Message-ID: <002b01d04131$d53975a0$7fac60e0$@artinis.com> Dear Rajat, you can use ft_volumelookup in Fieldtrip (ahja, Arjen beat me to it!). You can also specify an atlas in your cfg when using ft_sourceplot, which will show the anatomical label according to that atlas. You need to specify an atlas which is in the same coordinate system, see http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#plotting_sources_of_oscillatory_gamma-band_activity (scroll down to the exercise. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Rajat Thomas Sent: Thursday, February 5, 2015 11:39 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] MNI coordinate to Anatomy ​Dear Fieldtrip users, If I give you an MNI coordinate (in mm), is there a function (say from the SPM Anatomy toolbox) that I can use to get a label associated with that location? (Without using the GUI) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From vahidgerami.mse at gmail.com Thu Feb 5 15:16:37 2015 From: vahidgerami.mse at gmail.com (vahid gerami) Date: Thu, 5 Feb 2015 17:46:37 +0330 Subject: [FieldTrip] real time EEG Message-ID: hello im new at fieldtrip. i want to record EEG signals as realtime using my own BCI interface connected to a laptob via RS232.ive found ft_realtime_oddball(cfg) for real time signal acquisition. i have problem configuring the function. i dont know the correct configuration. please help me about the cfg parameters. my bci send continues data at 9220 byte and 115200 baudrate 8 bit no parity. regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.uni-hamburg.de Thu Feb 5 15:39:00 2015 From: p.taesler at uke.uni-hamburg.de (Philipp Taesler) Date: Thu, 5 Feb 2015 15:39:00 +0100 Subject: [FieldTrip] real time EEG In-Reply-To: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> References: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> Message-ID: <54D38084.7010904@uke.uni-hamburg.de> Hello Vahid, I have not worked with real-time much, also I've never read EEG data over RS232, but you might want to look at the ft_realtime_signalproxy.m function. Apparently it is just generating random data, you can see this in line 114. Here you would have to splice in your RS232 data somehow, maybe you can get a hint getting started here http://de.mathworks.com/help/matlab/matlab_external/getting-started-with-serial-i-o.html Maybe you will also get some more help from someone who has actually worked with something closer to your setup. Best regards and happy hacking, Phil Am 05.02.2015 um 15:16 schrieb vahid gerami: > hello > im new at fieldtrip. i want to record EEG signals as realtime using my > own BCI interface connected to a laptob via RS232.ive > found ft_realtime_oddball(cfg) for real time signal acquisition. i have > problem configuring the function. i dont know the correct configuration. > please help me about the cfg parameters. my bci send continues data at > 9220 byte and 115200 baudrate 8 bit no parity. > regards > > ------------------------------------------------------------------------ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. > Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > > ------------------------------------------------------------------------ > > SAVE PAPER - THINK BEFORE PRINTING > -- Philipp Taesler, MSc. Department of Systems Neuroscience University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 Hamburg, Germany Phone: +49-40-7410-59902 Fax: +49-40-7410-59955 Email: p.taesler at uke.uni-hamburg.de -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From constantino.mendezbertolo at ctb.upm.es Thu Feb 5 15:56:24 2015 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 5 Feb 2015 15:56:24 +0100 Subject: [FieldTrip] Component analysis: search for the explained variance Message-ID: tl;dr: anybody knows whether this info is stored (or not) and where? thx Queridos fieldtrippers, I am trying to find where the info about the amount of variance that each component explains is stored (if it is) after running ft_componentanalysis (method='pca') I know the interesting data is in two fields: topo + unmixing. May it happen that I am supposed to derive the variance explained by each component using some kind of mathematical sorcery and this values. If my question is too naive, I apologize, I think that the channels (actually 'components') of the output structure are sorted in descending order of variance explained during the call to the function, I searched there and in ft_databrowser unfructiosly. Also parsed the mailing list (there are two other answered questions [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html] [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html] Peace, -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Feb 5 16:43:47 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 5 Feb 2015 16:43:47 +0100 Subject: [FieldTrip] real time EEG In-Reply-To: <54D38084.7010904@uke.uni-hamburg.de> References: <6e93e5c9745c4be795227a660cb2aa3c@EXCCAHT-3.mail.uke.ads> <54D38084.7010904@uke.uni-hamburg.de> Message-ID: <005a01d0415a$882f07b0$988d1710$@artinis.com> Dear Vahid, Generally, I would propose that you start by reading on the wiki about the different implementations: http://fieldtrip.fcdonders.nl/development/realtime/buffer_overview most relevant by this this site: http://fieldtrip.fcdonders.nl/development/realtime/implementation What FieldTrip provides is basically an interface for streaming data. You need to set up a shared memory segment that your data acquisition software writes to and that some other client accesses. That other client opens an IP socket, and you can get access from any programme, e.g. Matlab, to the streamed data. That other client (or interface as called in the wiki) probably needs to be tailored to your acquisition software, or in your case it should read out the data coming in at the serial port. You might need to write this interface yourself. Good luck! Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Philipp Taesler > Sent: Thursday, February 5, 2015 3:39 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] real time EEG > > Hello Vahid, > > I have not worked with real-time much, also I've never read EEG data over > RS232, but you might want to look at the > > ft_realtime_signalproxy.m > > function. Apparently it is just generating random data, you can see this in line > 114. Here you would have to splice in your RS232 data somehow, maybe you > can get a hint getting started here > > http://de.mathworks.com/help/matlab/matlab_external/getting-started- > with-serial-i-o.html > > Maybe you will also get some more help from someone who has actually > worked with something closer to your setup. > > Best regards and happy hacking, > Phil > > > > Am 05.02.2015 um 15:16 schrieb vahid gerami: > > hello > > im new at fieldtrip. i want to record EEG signals as realtime using my > > own BCI interface connected to a laptob via RS232.ive found > > ft_realtime_oddball(cfg) for real time signal acquisition. i have > > problem configuring the function. i dont know the correct configuration. > > please help me about the cfg parameters. my bci send continues data at > > 9220 byte and 115200 baudrate 8 bit no parity. > > regards > > > > ---------------------------------------------------------------------- > > -- > > > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > > Rechts; Gerichtsstand: Hamburg | www.uke.de > > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. > > Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > > > > ---------------------------------------------------------------------- > > -- > > > > SAVE PAPER - THINK BEFORE PRINTING > > > > -- > Philipp Taesler, MSc. > Department of Systems Neuroscience > University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 > Hamburg, Germany > > Phone: +49-40-7410-59902 > Fax: +49-40-7410-59955 > Email: p.taesler at uke.uni-hamburg.de > -- > > __________________________________________________________ > ___________ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. > Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik > __________________________________________________________ > ___________ > > SAVE PAPER - THINK BEFORE PRINTING > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From constantino.mendezbertolo at ctb.upm.es Thu Feb 5 18:34:26 2015 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 5 Feb 2015 18:34:26 +0100 Subject: [FieldTrip] Component analysis: search for the explained variance In-Reply-To: References: Message-ID: Dear all, here is a snippet from the ft_componentanalysis code which may prove useful to anybody facing this situation [from ft_componentanalysis) % compute data cross-covariance matrix > C = (dat*dat')./(size(dat,2)-1); > > % eigenvalue decomposition (EVD) > [E,D] = eig(C); > > % sort eigenvectors in descending order of eigenvalues > d = cat(2,(Nchan)',diag(D)); > d = sortrows(d,[-2]); > one could then use something like this to obtain the percentage of explained variance for each component.. > varianza=d(Nchan,2)/sum(diag(C));] paz! 2015-02-05 15:56 GMT+01:00 Constantino Méndez Bértolo < constantino.mendezbertolo at ctb.upm.es>: > tl;dr: anybody knows whether this info is stored (or not) and where? thx > > Queridos fieldtrippers, > > I am trying to find where the info about the amount of variance that each > component explains is stored (if it is) after running ft_componentanalysis > (method='pca') > > I know the interesting data is in two fields: topo + unmixing. May it > happen that I am supposed to derive the variance explained by each > component using some kind of mathematical sorcery and this values. > > If my question is too naive, I apologize, I think that the channels > (actually 'components') of the output structure are sorted in descending > order of variance explained during the call to the function, I searched > there and in ft_databrowser unfructiosly. Also parsed the mailing list > (there are two other answered questions > [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html] > [http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html > ] > > Peace, > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuria.donamayor at neuro.uni-luebeck.de Fri Feb 6 13:57:53 2015 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Fri, 6 Feb 2015 13:57:53 +0100 Subject: [FieldTrip] =?iso-8859-1?q?PhD_position_-_University_of_L=FCbeck?= =?iso-8859-1?q?=2C_Germany?= In-Reply-To: <2DBCAEA0-13BA-42A8-A889-F05AE7253174@neuro.uni-luebeck.de> References: <2DBCAEA0-13BA-42A8-A889-F05AE7253174@neuro.uni-luebeck.de> Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E7CA30ACEBC@solaris.neuro.uni-luebeck.de> Dear fieldtrippers, a colleague of mine, Dr. Jörg Bahlmann, currently has an opening for a PhD student. Could you please circulate the attached pdf to anyone who might me interested? Thanks, Nuria -------------------------------------------------- An der Universität zu Lübeck, Klinik für Neurologie ist eine Stelle als Doktorand/Doktorandin zu besetzen. Die Stelle beinhaltet die Durchführung, Auswertung und Interpretation von neurokognitiven Experimenten. Speziell handelt es sich um Untersuchungen zur Interaktion von Motivation und kognitiver Kontrolle bei Parkinson-Patienten und gesunden Probanden. Hierbei kommen die Methoden der funktionellen Kernspintomographie (fMRT) und Transkranielle Magnetstimulation (TMS) zur Anwendung. Das Projekt ist in den Forschungsschwerpunkt der Arbeitsgruppe Kognitive Neurologie eingebettet. Die Arbeitsgruppe ist multidisziplinär und kombiniert eine Vielzahl von neurowissenschaftlichen Methoden. Sie ist im Center of Brain, Behavior, and Metabolism (CBBM) integriert, welches Neurowissenschaftlern ein exzellentes Forschungsumfeld bietet. Für die Forschung stehen ein 3T-MRT-Scanner, mehrere EEG-Labore, TMS-Geräte und ein NIRS-Gerät zur Verfügung. Die Kandidatin/der Kandidat sollte einen Master of Science oder ein Diplom in Psychologie oder anderen einschlägigen Fächern vorweisen können und großes Interesse an Themen und Methoden der kognitiven Neurowissenschaften mitbringen. Vorerfahrung mit fMRT oder TMS und Programmiererfahrung (Matlab, Python, Presentation®) sind von Vorteil, aber nicht Einstellungsvoraussetzung. Die Stelle ist zum nächstmöglichen Zeitpunkt zu besetzen. Sie ist zunächst für zwei Jahre befristet und wird nach Entgeltgruppe 13 TV-L, 65% vergütet. Die Universität Lübeck strebt eine Erhöhung des Anteils von Frauen in der Wissenschaft an und fordert entsprechend qualifizierte Frauen ausdrücklich zur Bewerbung auf. Bewerbungen von Schwerbehinderten werden bei gleicher Eignung und Befähigung bevorzugt berücksichtigt. Bei inhaltlichen Fragen zur ausgeschriebenen Stelle wenden Sie sich bitte an Herrn PD Dr. Jörg Bahlmann (Tel.: 0451-317931-313, E-Mail: joerg.bahlmann at neuro.uni-luebeck.de). Ihre vollständige Bewerbung (Anschreiben, Lebenslauf, Zeugnisse zusammengefasst in einer pdf-Datei) senden Sie bitte bis zum 15. März 2015 an joerg.bahlmann at neuro.uni-luebeck.de -------------- next part -------------- A non-text attachment was scrubbed... Name: Ausschreibung_Doktorandin.pdf Type: application/pdf Size: 110356 bytes Desc: Ausschreibung_Doktorandin.pdf URL: From r.oostenveld at donders.ru.nl Fri Feb 6 14:25:12 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 6 Feb 2015 14:25:12 +0100 Subject: [FieldTrip] MEG/EEG FieldTrip toolkit course in Nijmegen: pre-registration now open Message-ID: Dear All, — Please disseminate to PhD students and postdoctoral researchers working with MEG, EEG and ECoG data analysis. --- On April 20-23, 2015 we will host the "Toolkit of Cognitive Neuroscience: advanced data analysis and source modelling of EEG and MEG data" at the Donders Institute in Nijmegen. This intense 4-day toolkit course will teach you advanced MEG and EEG data analysis skills. Preprocessing, frequency analysis, source reconstruction, connectivity and various statistical methods will be covered. The toolkit will consist of a number of lectures, followed by hands-on sessions in which you will be tutored through the complete analysis of a MEG data set using the FieldTrip toolbox. The lectures and tutoring will be provided by the core FieldTrip development team, and there will also be plenty of opportunity to interact and ask questions to us about your research and data. On the final day you will have the opportunity to work on your own dataset under supervision of the tutors. We can host 40 participants for this toolkit. From past experience we expect the course to be oversubscribed, hence we will start with pre-registration. The final selection of the participants will be based on the motivation, background experience and research interests that are provided in the registration form. The deadline for pre-registration is March 13, 2015. More information, including a preliminary program, can be found at https://www.ru.nl/donders/course-information/courses/toolkit-eeg-meg/ Looking forward to welcoming you in Nijmegen, Robert Oostenveld and Jan-Mathijs Schoffelen. ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Feb 6 15:19:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 6 Feb 2015 15:19:59 +0100 Subject: [FieldTrip] ANNOUNCEMENT: change of source data structure, source.inside now logical rather than indices Message-ID: <5F1DDBF3-8937-43F7-A09E-586FD17992F5@donders.ru.nl> Dear FieldTrip users, For a long time we have been planning to make some changes in the representation of source-reconstructed data. These changes should facilitate the maintenance of the code, the reuse of functionality and accomodate future extensions. Over the last few days I have been working on a first set of changes to the code that affect how the source positions inside the brain are represented. It used to be the case that source.inside and source.outside could be two vectors, containing the indices (i.e. 1, 2, 3, …) of source positions that are inside or outside the brain, respectively. I.e. the combined length of both vectors was equal to size(source.pos.1). In some cases however, the source.inside was represented as a boolean/logical vector with a true or false (a 1 or 0) value for each source position. With this logical representation, there is no need for source.outside. To improve consistency between the source and the volume representation, and to facilitate working with parcellated brain atlases, we have decided to move to a consistent implementation throughout FieldTrip that always uses the boolean/logical representation. So all FieldTrip functions will from now on return source.inside as a boolean vector. The consequence is that the code in your scripts such as for i=1:length(source.inside) select = source.inside(i); % do something with the selected source end will fail, since source.inside will only contain 0 or 1 values. If the source.inside vector has a 0 (i.e. not inside the brain), it will fail, since 0 is not a valid index. This is something you will notice, as MATLAB will give an error. If all values in source.inside vector are 1 (i.e. all inside the brain), MATLAB might not give an error immediately, but the result of the computation is not what it should be, since the computation is repeated over and over for source position 1 rather than all source positions. To get the original behavour with the indices, please use some code like this insideindx = find(source.inside) and then loop over all elements of insideindx. Appologies for the inconvenience this might cause. best regards, Robert PS another upcoming change will be that in the near future we will also deprecate the source.avg and the source.trial sub-structures. Instead of these sub-structures, the results of the source reconstruction will be represented at the top-level of the source structure, as is the case with all other data representations. Please see the ft_datatype_source function (or http://fieldtrip.fcdonders.nl/reference/ft_datatype_source) for an example of the new representation with source.pow rather than source.avg.pow. From Johanna.Fiess at uni-konstanz.de Fri Feb 6 17:23:25 2015 From: Johanna.Fiess at uni-konstanz.de (Johanna Fiess) Date: Fri, 06 Feb 2015 17:23:25 +0100 Subject: [FieldTrip] =?utf-8?q?ANNOUNCEMENT=3A_change_of_source_data_struc?= =?utf-8?q?ture=2C=09source=2Einside_now_logical_rather_than_indice?= =?utf-8?q?s?= In-Reply-To: <5F1DDBF3-8937-43F7-A09E-586FD17992F5@donders.ru.nl> Message-ID: <79edc59a9c2f41fe.54d4ea7e@limbe.rz.uni-konstanz.de> Hallo Christian, ich weiß nicht, ob Du auch auf dem Verteiler bist - und ob diese Änderung für Dich von Interesse ist. Schicke es Dir einfach mal weiter. Viele Grüße und ein schönes WE Hanna Am Freitag, 06. Februar 2015 15:19 CET, Robert Oostenveld schrieb: > Dear FieldTrip users, > > For a long time we have been planning to make some changes in the representation of source-reconstructed data. These changes should facilitate the maintenance of the code, the reuse of functionality and accomodate future extensions. Over the last few days I have been working on a first set of changes to the code that affect how the source positions inside the brain are represented. > It used to be the case that source.inside and source.outside could be two vectors, containing the indices (i.e. 1, 2, 3, …) of source positions that are inside or outside the brain, respectively. I.e. the combined length of both vectors was equal to size(source.pos.1). In some cases however, the source.inside was represented as a boolean/logical vector with a true or false (a 1 or 0) value for each source position. With this logical representation, there is no need for source.outside. > > To improve consistency between the source and the volume representation, and to facilitate working with parcellated brain atlases, we have decided to move to a consistent implementation throughout FieldTrip that always uses the boolean/logical representation. So all FieldTrip functions will from now on return source.inside as a boolean vector. > > The consequence is that the code in your scripts such as > > for i=1:length(source.inside) > select = source.inside(i); > % do something with the selected source end > > will fail, since source.inside will only contain 0 or 1 values. If the source.inside vector has a 0 (i.e. not inside the brain), it will fail, since 0 is not a valid index. This is something you will notice, as MATLAB will give an error. If all values in source.inside vector are 1 (i.e. all inside the brain), MATLAB might not give an error immediately, but the result of the computation is not what it should be, since the computation is repeated over and over for source position 1 rather than all source positions. > > To get the original behavour with the indices, please use some code like this > insideindx = find(source.inside) > and then loop over all elements of insideindx. > > > Appologies for the inconvenience this might cause. > > best regards, > Robert > > > PS another upcoming change will be that in the near future we will also deprecate the source.avg and the source.trial sub-structures. Instead of these sub-structures, the results of the source reconstruction will be represented at the top-level of the source structure, as is the case with all other data representations. Please see the ft_datatype_source function (or http://fieldtrip.fcdonders.nl/reference/ft_datatype_source) for an example of the new representation with source.pow rather than source.avg.pow. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dipl.-Psych. Johanna Fiess Fachbereich Psychologie Universität Konstanz Postfach 905 78457 Konstanz Telefon: +49-(0)7531-88-4604 Fax: +49-(0)7531-88-4601 From berdakho at gmail.com Sat Feb 7 19:32:30 2015 From: berdakho at gmail.com (Berdakh Abibullaev) Date: Sat, 7 Feb 2015 12:32:30 -0600 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes Message-ID: Hi there, Is there any way to "Import anatomy folder" generated by FSL into the FieldTrip ? We are trying to work with infant MRI data pre-processed by FSL for infant EEG source estimation. The data description is available here: http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html And, I am copying it below: Description. The database consists of MRI average templates for a number of ages; in 1-3 month increments through 18 months; then half-year increments through 19-5 years; then 5 year increments through 89 years. The templates were done separately for brain and head. Also included are segmentation PVE volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for infants. Access to the dataset is separated by ages (infants; 0-12 mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 through 17-5 yrs; adults 20-89 years). The segment data for ages 15-months and older consists of GM, WM, CSF, and T2W-derived CSF. The best combination of segments would be the image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. For 3 through 12 months, the best combination of segments would be the nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other Matter") and does not reflect actual CSF. The T2W-derived CSF is identified as bright voxels in the T2W scan and represent actual CSF in the brain or head. There is an atlas derived from FSL "Harvard-Oxford" cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old templates. Overview: ANTS....brain.nii.gz: Average MRI template derived from extracted brain ANTS....head.nii.gz: Average MRI template derived from whole head ANTS....brain-head: brain extracted from head template ANTS....T2W_brain: MRI template separate for extracted brain T2W ANTS....T2W_head: MRI template separate for whole head T2W Segments AVG...T2W_brain...: T2W for individual participants, warped to template, averaged AVG...image_seg_...: Image-based segment averages AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a posteriori FAST AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter AVG....seg_csf: "Other matter" in 3-class segmentation AVG....seg_t2wcsf: T2W-derived CSF Atlas: ANTS...brain...brainstem: The individual files have the brain areas ANTS...brain_atlas: Segmented atlas for all brain areas Please help. Thanks, Berdakh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Feb 8 10:08:07 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 8 Feb 2015 09:08:07 +0000 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes In-Reply-To: References: Message-ID: Hi Berdakh, What do you mean with ‘import anatomy folder’? Please check out the links below in order to formulate your question more constructively. http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 Note that FieldTrip’s low-level fileio functions know how to deal with compressed nifti files, so if your question means ‘can I use FieldTrip to load in images that have been constructed with FSL’, the answer would be yes. For information about supported dataformats, see: http://fieldtrip.fcdonders.nl/dataformat Best wishes, Jan-Mathijs On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev > wrote: Hi there, Is there any way to "Import anatomy folder" generated by FSL into the FieldTrip ? We are trying to work with infant MRI data pre-processed by FSL for infant EEG source estimation. The data description is available here: http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html And, I am copying it below: Description. The database consists of MRI average templates for a number of ages; in 1-3 month increments through 18 months; then half-year increments through 19-5 years; then 5 year increments through 89 years. The templates were done separately for brain and head. Also included are segmentation PVE volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for infants. Access to the dataset is separated by ages (infants; 0-12 mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 through 17-5 yrs; adults 20-89 years). The segment data for ages 15-months and older consists of GM, WM, CSF, and T2W-derived CSF. The best combination of segments would be the image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. For 3 through 12 months, the best combination of segments would be the nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other Matter") and does not reflect actual CSF. The T2W-derived CSF is identified as bright voxels in the T2W scan and represent actual CSF in the brain or head. There is an atlas derived from FSL "Harvard-Oxford" cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old templates. Overview: ANTS....brain.nii.gz: Average MRI template derived from extracted brain ANTS....head.nii.gz: Average MRI template derived from whole head ANTS....brain-head: brain extracted from head template ANTS....T2W_brain: MRI template separate for extracted brain T2W ANTS....T2W_head: MRI template separate for whole head T2W Segments AVG...T2W_brain...: T2W for individual participants, warped to template, averaged AVG...image_seg_...: Image-based segment averages AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a posteriori FAST AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter AVG....seg_csf: "Other matter" in 3-class segmentation AVG....seg_t2wcsf: T2W-derived CSF Atlas: ANTS...brain...brainstem: The individual files have the brain areas ANTS...brain_atlas: Segmented atlas for all brain areas Please help. Thanks, Berdakh. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 16:52:06 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 10:52:06 -0500 Subject: [FieldTrip] cfg.trl matrix Message-ID: I've imported a cnt file that contains TTL trigger events. I defined a prestim time of 1 second and poststim time of 0.5 seconds. However, when I checked the cfg.trl matrix the offset shows "-5000". Can someone explain why? -AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Feb 8 17:34:11 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sun, 8 Feb 2015 17:34:11 +0100 Subject: [FieldTrip] cfg.trl matrix In-Reply-To: References: Message-ID: Hi asauf, is your samplefreq 5000? The offset is the sample amount between the first sample of the trial and the sample corresponding to t=0 in that trial. Best, arjen Op 8 feb. 2015 16:52 schreef "Ausaf Bari" het volgende: > I've imported a cnt file that contains TTL trigger events. I defined a > prestim time of 1 second and poststim time of 0.5 seconds. However, when I > checked the cfg.trl matrix the offset shows "-5000". Can someone explain > why? > > -AB > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berdakho at gmail.com Sun Feb 8 17:43:47 2015 From: berdakho at gmail.com (Berdakh Abibullaev) Date: Sun, 8 Feb 2015 10:43:47 -0600 Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes In-Reply-To: References: Message-ID: Hello Jan-Mathijs, My apologies for not being constructive in posing my question. By anatomy folder I meant the MRI segmentation results (scalp, outer skull, inner skull (CSF) and brain) generated by FSL. *Can I use the FieldTrip to load those segmentation results to generate meshes and model BEM for source estimation? * As you know that extracting cortical matters from infant MRI is an extremely difficult task as most MRI segmentation tools are developed using adult brain parameters. And, I presume that "ft_volumesegment" cannot handle infant MRI segmentation. Thanks again, Berdakh. On Sun, Feb 8, 2015 at 3:08 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Berdakh, > > What do you mean with 'import anatomy folder'? Please check out the links > below in order to formulate your question more constructively. > > > http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community > > > http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 > > Note that FieldTrip's low-level fileio functions know how to deal with > compressed nifti files, so if your question means 'can I use FieldTrip to > load in images that have been constructed with FSL', the answer would be > yes. > For information about supported dataformats, see: > http://fieldtrip.fcdonders.nl/dataformat > > Best wishes, > > Jan-Mathijs > > On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev > wrote: > > Hi there, > > Is there any way to "Import anatomy folder" generated by FSL into the > FieldTrip > ? > > We are trying to work with infant MRI data pre-processed by FSL for infant > EEG source estimation. > > > The data description is available here: > http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html > And, I am copying it below: > > Description. > > The database consists of MRI average templates for a number of ages; in > 1-3 month increments through 18 months; then half-year increments through > 19-5 years; then 5 year increments through 89 years. The templates were > done separately for brain and head. Also included are segmentation PVE > volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for > infants. Access to the dataset is separated by ages (infants; 0-12 mo; > preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; > adolescents 11-0 through 17-5 yrs; adults 20-89 years). > > The segment data for ages 15-months and older consists of GM, WM, CSF, and > T2W-derived CSF. The best combination of segments would be the > image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. > For 3 through 12 months, the best combination of segments would be the > nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE > segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other > Matter") and does not reflect actual CSF. The T2W-derived CSF is identified > as bright voxels in the T2W scan and represent actual CSF in the brain or > head. There is an atlas derived from FSL "Harvard-Oxford" cortical and > subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old > templates. > > Overview: > > ANTS....brain.nii.gz: Average MRI template derived from extracted brain > ANTS....head.nii.gz: Average MRI template derived from whole head > ANTS....brain-head: brain extracted from head template > ANTS....T2W_brain: MRI template separate for extracted brain T2W > ANTS....T2W_head: MRI template separate for whole head T2W > > Segments > AVG...T2W_brain...: T2W for individual participants, warped to template, > averaged > AVG...image_seg_...: Image-based segment averages > AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori FAST > AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a > posteriori FAST > AVG...nma_seg_: For infants, non-myelinated axons separate from gray matter > AVG....seg_csf: "Other matter" in 3-class segmentation > AVG....seg_t2wcsf: T2W-derived CSF > > Atlas: > ANTS...brain...brainstem: The individual files have the brain areas > ANTS...brain_atlas: Segmented atlas for all brain areas > > Please help. > > Thanks, > Berdakh. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 17:46:24 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 11:46:24 -0500 Subject: [FieldTrip] cfg.trl matrix In-Reply-To: References: Message-ID: Thanks Arjen. It makes sense now. Yes my sample frequency is 5000. -AB On Sun, Feb 8, 2015 at 11:34 AM, Arjen Stolk wrote: > Hi asauf, is your samplefreq 5000? The offset is the sample amount between > the first sample of the trial and the sample corresponding to t=0 in that > trial. Best, arjen > Op 8 feb. 2015 16:52 schreef "Ausaf Bari" het volgende: > >> I've imported a cnt file that contains TTL trigger events. I defined a >> prestim time of 1 second and poststim time of 0.5 seconds. However, when I >> checked the cfg.trl matrix the offset shows "-5000". Can someone explain >> why? >> >> -AB >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Ausaf A. Bari MD PhD Clinical Fellow Functional Neurosurgery Toronto Western Hospital University of Toronto Phone: 647-624-1929 Email: ausafb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Sun Feb 8 17:52:24 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Sun, 8 Feb 2015 11:52:24 -0500 Subject: [FieldTrip] Problem with ft_databrowser Message-ID: I have 122 trials (equal trial lengths) with 14 channels. I tried to use this: cfg = ft_databrowser(cfg,data); *I'm getting this error:* Warning: The field cfg.demean is deprecated, please specify it as cfg.preproc.demean instead of cfg. > In ft_checkconfig at 461 In ft_databrowser at 157 the input is raw data with 0 channels and 122 trials Error using ft_datatype_raw (line 88) inconsistent number of channels in trial 1 Error in ft_checkdata (line 222) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_databrowser (line 261) data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'yes', 'hassampleinfo', 'yes'); Can someone help? -AB My cfg array looks like this: cfg = dataset: '/Users/user/Desktop/test.cnt' trialfun: @ft_trialfun_general trialdef: [1x1 struct] callinfo: [1x1 struct] version: [1x1 struct] trackconfig: 'off' checkconfig: 'loose' checksize: 100000 showcallinfo: 'yes' debug: 'no' trackcallinfo: 'yes' trackdatainfo: 'no' trackparaminfo: 'no' dataformat: 'ns_cnt' headerformat: 'ns_cnt' event: [1x488 struct] trl: [122x4 double] channel: [] continuous: 'no' demean: 'yes' viewmode: 'vertical' My data array look like this: data = hdr: [1x1 struct] label: {} time: {1x122 cell} trial: {1x122 cell} fsample: 5000 sampleinfo: [122x2 double] trialinfo: [122x1 double] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Sun Feb 8 20:23:24 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Sun, 08 Feb 2015 20:23:24 +0100 Subject: [FieldTrip] Connectivity - Partial directed coherence Message-ID: <54D7B7AC.6040600@uni-ulm.de> Dear Fieldtrippers, I am doing connectivity analysis, more precisely a partial directed coherence. As I understand the output (chan x chan x freq) contains both input (what is the information input from electrode X to electrode Y) and output info (what is the information output from electrode X to Y). How do I have to read the Matrix? For example: I want to know how much information electrode 1 gets from electrode 10 (and vice versa). Thank you a lot! Barbara -- Barbara Schorr, MSc Clinical and Biological Psychology University of Ulm Albert-Einstein-Allee 47 89069 Ulm Therapiezentrum Burgau Kapuzinerstraße 34 89331 Burgau From RICHARDS at mailbox.sc.edu Sun Feb 8 21:09:39 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 8 Feb 2015 20:09:39 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 51, Issue 6 In-Reply-To: References: Message-ID: The answer to the question about the ³Neurodevelopmental MRI database², is yes you can import these files. They are nifti.nii.gz files, and I have used field trip to import them. I also have gone through the field trip procedure to make source models, BEM and FEM head models from these data (though that work is not available on the www site). I have used these head models in EMSE, BESA, CURRY, Fieldtrip. FYI others on this list. Each age has the complete information to make head models for source analysis. This includes: Average MRI template GM, WM, T2WCSF segmented priors Fully segmented BEM-3, 4, or 5 compartment MRI volume Fully segmented head volume for FEM model (e.g., gm, wm, csf, skull, skin, eyes, muscle..) 10-10 electrode positions already co-registered on the head MRI volume (created on the head as Virtual-10-10 electrodes) EGI-GSN-128 and HGSN-128 electrode positions based on average electrodes from individual participants. See Richards, J.E. & Xie, W. (2015) Brains for all the ages: Structural neurodevelopment in infants and children from a life-span perspective. In J. Benson (Ed.), Advances in Child Development and Behavior (Volume 48, chapter 7). Philadephia, PA: Elsevier. DOI:10.1016/bs.acdb.2014.11.001 Richards, J.E. Boswell, C., Stevens, M., & Vendemia, J.M.C. (2015). Evaluating methods for constructing average high-density electrode positions. Brain Topography, 28, 70-86, doi 10.1007/s01548-014-0400-8(pdf ) I am working on a paper describing the child and adolescent electrode positions. John > >Message: 1 >Date: Sat, 7 Feb 2015 12:32:30 -0600 >From: Berdakh Abibullaev >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] Fieldtrip Compatibility with FSL generated meshes >Message-ID: > >Content-Type: text/plain; charset="iso-8859-1" > >Hi there, > >Is there any way to "Import anatomy folder" generated by FSL into the >FieldTrip >? > >We are trying to work with infant MRI data pre-processed by FSL for infant >EEG source estimation. > > > >The data description is available here: > >http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html >And, I am copying it below: > >Description. > >The database consists of MRI average templates for a number of ages; in >1-3 >month increments through 18 months; then half-year increments through 19-5 >years; then 5 year increments through 89 years. The templates were done >separately for brain and head. Also included are segmentation PVE volumes >for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) for >infants. >Access to the dataset is separated by ages (infants; 0-12 mo; preschool, >15 >mo through 4-0 years; children 4-5 through 10-5 yrs; adolescents 11-0 >through 17-5 yrs; adults 20-89 years). > >The segment data for ages 15-months and older consists of GM, WM, CSF, and >T2W-derived CSF. The best combination of segments would be the >image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. >For 3 through 12 months, the best combination of segments would be the >nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE >segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other >Matter") and does not reflect actual CSF. The T2W-derived CSF is >identified >as bright voxels in the T2W scan and represent actual CSF in the brain or >head. There is an atlas derived from FSL "Harvard-Oxford" cortical and >subcortical atlas for the infants, 8 10 12 14 16 18, and 20-24 year old >templates. > >Overview: > >ANTS....brain.nii.gz: Average MRI template derived from extracted brain >ANTS....head.nii.gz: Average MRI template derived from whole head >ANTS....brain-head: brain extracted from head template >ANTS....T2W_brain: MRI template separate for extracted brain T2W >ANTS....T2W_head: MRI template separate for whole head T2W > >Segments >AVG...T2W_brain...: T2W for individual participants, warped to template, >averaged >AVG...image_seg_...: Image-based segment averages >AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori >FAST >AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a >posteriori FAST >AVG...nma_seg_: For infants, non-myelinated axons separate from gray >matter >AVG....seg_csf: "Other matter" in 3-class segmentation >AVG....seg_t2wcsf: T2W-derived CSF > >Atlas: >ANTS...brain...brainstem: The individual files have the brain areas >ANTS...brain_atlas: Segmented atlas for all brain areas > > > >Please help. > >Thanks, >Berdakh. >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >0f1d6/attachment-0001.html> > >------------------------------ > >Message: 2 >Date: Sun, 8 Feb 2015 09:08:07 +0000 >From: "Schoffelen, J.M. (Jan Mathijs)" >To: FieldTrip discussion list >Subject: Re: [FieldTrip] Fieldtrip Compatibility with FSL generated > meshes >Message-ID: >Content-Type: text/plain; charset="windows-1252" > >Hi Berdakh, > >What do you mean with ?import anatomy folder?? Please check out the links >below in order to formulate your question more constructively. > >http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_communi >ty > >http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002 >202 > >Note that FieldTrip?s low-level fileio functions know how to deal with >compressed nifti files, so if your question means ?can I use FieldTrip to >load in images that have been constructed with FSL?, the answer would be >yes. >For information about supported dataformats, see: >http://fieldtrip.fcdonders.nl/dataformat > >Best wishes, > >Jan-Mathijs > >On Feb 7, 2015, at 7:32 PM, Berdakh Abibullaev >> wrote: > >Hi there, > >Is there any way to "Import anatomy folder" generated by FSL into the >FieldTrip >? > >We are trying to work with infant MRI data pre-processed by FSL for >infant EEG source estimation. > > >The data description is available here: >http://jerlab.psych.sc.edu/NeurodevelopmentalMRIDatabase/description.html >And, I am copying it below: > >Description. > >The database consists of MRI average templates for a number of ages; in >1-3 month increments through 18 months; then half-year increments through >19-5 years; then 5 year increments through 89 years. The templates were >done separately for brain and head. Also included are segmentation PVE >volumes for gm/wm/csf; T2W-derived CSF; and non-myelinated axons (NMA) >for infants. Access to the dataset is separated by ages (infants; 0-12 >mo; preschool, 15 mo through 4-0 years; children 4-5 through 10-5 yrs; >adolescents 11-0 through 17-5 yrs; adults 20-89 years). > >The segment data for ages 15-months and older consists of GM, WM, CSF, >and T2W-derived CSF. The best combination of segments would be the >image_aposteriori_seg data, using GM, WM, and T2W-derived CSF for priors. >For 3 through 12 months, the best combination of segments would be the >nma_seg data; using GM, WM, NMA, and T2W-derived CSF. The "CSF" PVE >segments are "Other Matter" in a 3-class segmentation (GM, WM, "Other >Matter") and does not reflect actual CSF. The T2W-derived CSF is >identified as bright voxels in the T2W scan and represent actual CSF in >the brain or head. There is an atlas derived from FSL "Harvard-Oxford" >cortical and subcortical atlas for the infants, 8 10 12 14 16 18, and >20-24 year old templates. > >Overview: > >ANTS....brain.nii.gz: Average MRI template derived from extracted brain >ANTS....head.nii.gz: Average MRI template derived from whole head >ANTS....brain-head: brain extracted from head template >ANTS....T2W_brain: MRI template separate for extracted brain T2W >ANTS....T2W_head: MRI template separate for whole head T2W > >Segments >AVG...T2W_brain...: T2W for individual participants, warped to template, >averaged >AVG...image_seg_...: Image-based segment averages >AVG...image_aposteriori_seg_.. : Age-template priors with a posteriori >FAST >AVG...MNI_aposteriori_seg_...: AVG of MNI-template priors, with a >posteriori FAST >AVG...nma_seg_: For infants, non-myelinated axons separate from gray >matter >AVG....seg_csf: "Other matter" in 3-class segmentation >AVG....seg_t2wcsf: T2W-derived CSF > >Atlas: >ANTS...brain...brainstem: The individual files have the brain areas >ANTS...brain_atlas: Segmented atlas for all brain areas > >Please help. > >Thanks, >Berdakh. > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >b4262/attachment-0001.html> > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 51, Issue 6 >**************************************** From n.lam at donders.ru.nl Sun Feb 8 22:49:24 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Sun, 8 Feb 2015 21:49:24 +0000 Subject: [FieldTrip] Problem with ft_databrowser In-Reply-To: References: Message-ID: Hi Ausaf, I believe (as is noted in the error message) that you need to change your cfg structure: cfg.demean = 'yes'; should be 'cfg.preproc.demean' = 'yes'; Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Ausaf Bari [ausafb at gmail.com] Sent: 08 February 2015 17:52 To: FieldTrip discussion list Subject: [FieldTrip] Problem with ft_databrowser I have 122 trials (equal trial lengths) with 14 channels. I tried to use this: cfg = ft_databrowser(cfg,data); I'm getting this error: Warning: The field cfg.demean is deprecated, please specify it as cfg.preproc.demean instead of cfg. > In ft_checkconfig at 461 In ft_databrowser at 157 the input is raw data with 0 channels and 122 trials Error using ft_datatype_raw (line 88) inconsistent number of channels in trial 1 Error in ft_checkdata (line 222) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_databrowser (line 261) data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'yes', 'hassampleinfo', 'yes'); Can someone help? -AB My cfg array looks like this: cfg = dataset: '/Users/user/Desktop/test.cnt' trialfun: @ft_trialfun_general trialdef: [1x1 struct] callinfo: [1x1 struct] version: [1x1 struct] trackconfig: 'off' checkconfig: 'loose' checksize: 100000 showcallinfo: 'yes' debug: 'no' trackcallinfo: 'yes' trackdatainfo: 'no' trackparaminfo: 'no' dataformat: 'ns_cnt' headerformat: 'ns_cnt' event: [1x488 struct] trl: [122x4 double] channel: [] continuous: 'no' demean: 'yes' viewmode: 'vertical' My data array look like this: data = hdr: [1x1 struct] label: {} time: {1x122 cell} trial: {1x122 cell} fsample: 5000 sampleinfo: [122x2 double] trialinfo: [122x1 double] cfg: [1x1 struct] -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Tue Feb 10 06:10:44 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Tue, 10 Feb 2015 00:10:44 -0500 Subject: [FieldTrip] Selecting Trials from Blocks Message-ID: I have large .cnt (neuroscan) files with trials under different conditions. The trials are marked by triggers but the conditions are not marked. I have my own record of timestamps for the start of each condition block. How do cut out a block (e.g. 30 minute block) and then subsequently break that into trials based on triggers? I know you can use ft_redefinetrial to choose a section based on a begsample and endsample but I'm having trouble using the resulting data structure as an input to ft_definetrial. -AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Tue Feb 10 08:43:41 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Tue, 10 Feb 2015 02:43:41 -0500 Subject: [FieldTrip] Selecting Trials from Blocks In-Reply-To: References: Message-ID: Hi Ausaf, Have you tried to read all EEG events as usual? You then can compare the tri or trialinfo sample value to your condition values. This information could then be stored in a new column of data in the data.trl structure. Best, Raquel On Tue, Feb 10, 2015 at 12:10 AM, Ausaf Bari wrote: > I have large .cnt (neuroscan) files with trials under different > conditions. The trials are marked by triggers but the conditions are not > marked. I have my own record of timestamps for the start of each condition > block. How do cut out a block (e.g. 30 minute block) and then subsequently > break that into trials based on triggers? > > I know you can use ft_redefinetrial to choose a section based on a > begsample and endsample but I'm having trouble using the resulting data > structure as an input to ft_definetrial. > > -AB > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Tue Feb 10 13:54:16 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Tue, 10 Feb 2015 07:54:16 -0500 Subject: [FieldTrip] Selecting Trials from Blocks In-Reply-To: References: Message-ID: Thanks Raquel. I didn't realize I could recode by adding that column. I'll try it. Thanks! On Tuesday, February 10, 2015, Raquel Bibi wrote: > Hi Ausaf, > Have you tried to read all EEG events as usual? You then can compare the > tri or trialinfo sample value to your condition values. This information > could then be stored in a new column of data in the data.trl structure. > Best, > > Raquel > > On Tue, Feb 10, 2015 at 12:10 AM, Ausaf Bari > wrote: > >> I have large .cnt (neuroscan) files with trials under different >> conditions. The trials are marked by triggers but the conditions are not >> marked. I have my own record of timestamps for the start of each condition >> block. How do cut out a block (e.g. 30 minute block) and then subsequently >> break that into trials based on triggers? >> >> I know you can use ft_redefinetrial to choose a section based on a >> begsample and endsample but I'm having trouble using the resulting data >> structure as an input to ft_definetrial. >> >> -AB >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- Ausaf A. Bari MD PhD Clinical Fellow Functional Neurosurgery Toronto Western Hospital University of Toronto Phone: 647-624-1929 Email: ausafb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgio.arcara at gmail.com Wed Feb 11 10:46:57 2015 From: giorgio.arcara at gmail.com (Giorgio Arcara) Date: Wed, 11 Feb 2015 10:46:57 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA Message-ID: Dear Fieldtrip users, I recorded some MEG data in two separate recordings. The recordings were one immediately after the other, with a short pause (of few seconds) in the middle. In my recording I stored the head position continuously (CTF-system). My aim is to combine the data from the two recordings to run a single ICA, with the aim of identifying artifacts. After the preprocessing and after using ft_appenddata I receive I warning because there is an inconsistency in sensor positions stored in the data structure. The appending works but I lose all sensor information. (to draw some figures I solved retrieving the sensor information from some previous data objects). I'm just using this data for an ERF analysis, but I'd like to perform also source analysis later. My questions are: how to deal with this issue? Do you think it is reasonable (as I think) to perform an ICA on the overall data even if from different files? Could this issue affect a following source analysis? Thanks! -- *Giorgio Arcara* Post-doc research fellow Department of Neuroscience, University of Padua Via Giustiniani, 2 35128, Padua, Italy https://sites.google.com/site/giorgioarcara/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Feb 11 12:16:37 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 11 Feb 2015 12:16:37 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA In-Reply-To: References: Message-ID: Dear Giorgio, FieldTrip kind of 'protects' the users against themselves when appending different data sets, because if sensor positions are substantially different then this could be a serious problem. However, if you are certain the sensor positions are highly comparable (e.g. if you've used interactive realignment during the recording session) you can simply take the .grad field (which contains the sensor positions) of one of the datasets (best to use the first one, if that's the one you aligned to) and put it in the combined data structure. Best, Eleke On 11 February 2015 at 10:46, Giorgio Arcara wrote: > Dear Fieldtrip users, > > I recorded some MEG data in two separate recordings. The recordings were one > immediately after the other, with a short pause (of few seconds) in the > middle. In my recording I stored the head position continuously > (CTF-system). > > My aim is to combine the data from the two recordings to run a single ICA, > with the aim of identifying artifacts. > > After the preprocessing and after using ft_appenddata I receive I warning > because there is an inconsistency in sensor positions stored in the data > structure. > > The appending works but I lose all sensor information. (to draw some figures > I solved retrieving the sensor information from some previous data objects). > > I'm just using this data for an ERF analysis, but I'd like to perform also > source analysis later. > > > My questions are: how to deal with this issue? Do you think it is reasonable > (as I think) to perform an ICA on the overall data even if from different > files? Could this issue affect a following source analysis? > > > > > Thanks! > > > -- > Giorgio Arcara > > Post-doc research fellow > > Department of Neuroscience, University of Padua > Via Giustiniani, 2 > 35128, Padua, Italy > > https://sites.google.com/site/giorgioarcara/ > From jorn at artinis.com Wed Feb 11 14:29:48 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Wed, 11 Feb 2015 14:29:48 +0100 Subject: [FieldTrip] Appending data from two sessions for ICA In-Reply-To: References: Message-ID: <002b01d045fe$d0361780$70a24680$@artinis.com> Hi Giorgio, you could also try to use ft_megrealign, which projects the channels of your data to source space and then projects the activity back to some predefined set of sensors. I have never tested how well this function works, but it was intended for such purposes back then ;) http://fieldtrip.fcdonders.nl/reference/ft_megrealign The documentation states that it's for timelocked data, but I am 100% sure that the code will only work on raw data. Maybe test both, simply copying over the sensor description as Eleke (I like that typo!) suggested and compare it with what ft_megrealign gives you and decide for yourself what you prefer best/seems to give most reliable results. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems  |  +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Wednesday, February 11, 2015 12:17 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Appending data from two sessions for ICA > > Dear Giorgio, > > FieldTrip kind of 'protects' the users against themselves when appending > different data sets, because if sensor positions are substantially different > then this could be a serious problem. However, if you are certain the sensor > positions are highly comparable (e.g. if you've used interactive realignment > during the recording session) you can simply take the .grad field (which > contains the sensor positions) of one of the datasets (best to use the first > one, if that's the one you aligned to) and put it in the combined data > structure. > > Best, > Eleke > > On 11 February 2015 at 10:46, Giorgio Arcara > wrote: > > Dear Fieldtrip users, > > > > I recorded some MEG data in two separate recordings. The recordings > > were one immediately after the other, with a short pause (of few > > seconds) in the middle. In my recording I stored the head position > > continuously (CTF-system). > > > > My aim is to combine the data from the two recordings to run a single > > ICA, with the aim of identifying artifacts. > > > > After the preprocessing and after using ft_appenddata I receive I > > warning because there is an inconsistency in sensor positions stored > > in the data structure. > > > > The appending works but I lose all sensor information. (to draw some > > figures I solved retrieving the sensor information from some previous data > objects). > > > > I'm just using this data for an ERF analysis, but I'd like to perform > > also source analysis later. > > > > > > My questions are: how to deal with this issue? Do you think it is > > reasonable (as I think) to perform an ICA on the overall data even if > > from different files? Could this issue affect a following source analysis? > > > > > > > > > > Thanks! > > > > > > -- > > Giorgio Arcara > > > > Post-doc research fellow > > > > Department of Neuroscience, University of Padua Via Giustiniani, 2 > > 35128, Padua, Italy > > > > https://sites.google.com/site/giorgioarcara/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Thu Feb 12 11:00:35 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 12 Feb 2015 11:00:35 +0100 Subject: [FieldTrip] Fwd: Postdoc Position Available References: <54DBD62D.1020501@sipi.usc.edu> Message-ID: <164C4977-18F6-4225-B2E1-E373A80A74FD@donders.ru.nl> Post-Doctoral Research Associate Biomedical Imaging Group Signal and Image Processing Institute University of Southern California A Postdoctoral Research Associate position is available immediately to work on brain network analysis with a focus on integrating electrophysiological (MEG, EEG, ECoG, LFP) measures with MR imaging data. This position requires knowledge of the models and methods used for connectivity modeling, and the mathematical and software background to develop and implement novel approaches. This is part of an NIH supported project to develop a multimodal brain connectivity atlas in collaboration with John Mosher and colleagues in the Epilepsy Center at the Cleveland Clinic. Data in the atlas will include spontaneous and evoked invasive and noninvasive electrophysiology and structural, resting and diffusion MRI. The position will also involve working with and contributing to the BrainStorm software (http://neuroimage.usc.edu/brainstorm/). Required Qualifications: PhD in Electrical Engineering, Statistics, Computer Science, Physics, Neuroscience or related fields and publications related to brain mapping. Programming experience, preferably including Matlab, Java, C, C++. The University of Southern California strongly values diversity and is committed to equal opportunity in employment. Women and men, and members of all racial and ethnic groups, are encouraged to apply. Send applications to: Richard M. Leahy, Ph.D. Professor and Director Signal and Image Processing Institute 3740 McClintock Ave, EEB400 University of Southern California Los Angeles, CA 90089 2564 http://neuroimage.usc.edu leahy at sipi.usc.edu -- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PostDoc_2015.pdf Type: application/pdf Size: 10763 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From payashi.garry at seh.ox.ac.uk Thu Feb 12 14:38:31 2015 From: payashi.garry at seh.ox.ac.uk (Payashi Garry) Date: Thu, 12 Feb 2015 13:38:31 +0000 Subject: [FieldTrip] TFR channel average plot Message-ID: Dear FieldTrip discussion list I was wondering if there was a way of displaying the channel average plot in multi plot TFR? I would like to represent my time/frequency plot as an average of all the channels and was wondering if there was a function in multi plot to enable this? Many thanks Payashi **** Dr Payashi Garry MB BChir FRCA Specialty Registrar in Anaesthetics and BRC Research Fellow Nuffield Department of Clinical Neurosciences John Radcliffe Hospital Oxford OX3 9DU Tel: 01865 572878 From tzvetan.popov at uni-konstanz.de Thu Feb 12 15:54:20 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 12 Feb 2015 15:54:20 +0100 Subject: [FieldTrip] TFR channel average plot In-Reply-To: References: Message-ID: <117D696B-CFE9-4A1E-B691-3F492C0C1382@uni-konstanz.de> Dear Payashi, there are two options: 1). During the call to ft_mulitplotTFR you can interactively select all the channels with the mouse cursor. This is allowed by the cfg.interactive = ‘yes’;, which is the default. 2). You call ft_singleplotTFR without specifying cfg.channel = XY. Thus you’ll get an average across all channels in your input structure. best tzvetan > Dear FieldTrip discussion list > > I was wondering if there was a way of displaying the channel average plot in multi plot TFR? I would like to represent my time/frequency plot as an average of all the channels and was wondering if there was a function in multi plot to enable this? > > Many thanks > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.donda at hotmail.com Thu Feb 12 17:26:04 2015 From: a.donda at hotmail.com (A. Donda) Date: Thu, 12 Feb 2015 16:26:04 +0000 Subject: [FieldTrip] "mask" option being ignored when plotting source statistics Message-ID: Hi everybody, when trying to plot the results of the group-level source statistics with the option "mask", it seems that ft_sourceplot ignores the "mask" option and just plots all values of the t-statistic map. I even changed manually the field data.mask (taking logic values 0 / 1) to see whether that affects the plot, but nothing changes. Is there something obvious in the plotting function "ft_sourceplot" that I oversaw? The result of statistics for differences between two source estimates has the following structure: stat = prob: [38x48x41 double] cirange: [38x48x41 double] mask: [38x48x41 logical] stat: [38x48x41 double] ref: [38x48x41 double] dim: [38 48 41] inside: [1x37163 double] outside: [1x37621 double] pos: [74784x3 double] freq: 22.4439 cfg: [1x1 struct] Then I interpolate the stat data to one normalized (to MNI space) mri from one subject cfg = [];cfg.parameter = 'all';statplot = ft_sourceinterpolate(cfg, stat, norm); To plot only significant voxels I use stat.mask (i.e. statplot.mask: values 0 and 1) to mask the data, but it is ignored when plotting: cfg = [];cfg.method = 'ortho';cfg.funparameter = 'stat';cfg.maskparameter = 'mask';cfg.maskstyle = 'saturation';cfg.opacitymap = 'rampup';cfg.opacitylim =[0 1]figureft_sourceplot(cfg, statplot); The plot simply shows all values of the funparameter statplot.stat If I missed sthg, I would be grateful for any feedback. Thanks! A. Donda -------------- next part -------------- An HTML attachment was scrubbed... URL: From ausafb at gmail.com Thu Feb 12 23:13:34 2015 From: ausafb at gmail.com (Ausaf Bari) Date: Thu, 12 Feb 2015 17:13:34 -0500 Subject: [FieldTrip] Error with Precprocessing LFPs Message-ID: Can someone explain what this error means? Reading data ..... Scaling data ..... Reading Event Table... Warning: events imported with a time shift might be innacurate Warning: Matrix is singular to working precision. > In ft_preproc_polyremoval at 76 In fieldtrip-20150212/private/preproc at 315 In ft_preprocessing at 590 Warning: Matrix is singular to working precision. > In ft_preproc_polyremoval at 76 In ft_preproc_baselinecorrect at 49 In fieldtrip-20150212/private/preproc at 348 In ft_preprocessing at 590 The error occurs after "data=ft_preprocessing(cfg)": cfg = []; cfg.dataset = 'file.cnt'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = [11 12 21 22 31 32 41 42 51 52]; cfg.trialdef.prestim = -1; cfg.trialdef.poststim = .5; cfg = ft_definetrial(cfg); cfg.channel={'channel2' 'channel3'}; cfg.demean ='yes'; cfg.reref = 'yes'; cfg.implicitref = []; cfg.refchannel = {'channel3'}; data = ft_preprocessing(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From elam4HCP at gmail.com Sat Feb 14 01:33:59 2015 From: elam4HCP at gmail.com (elam4HCP at gmail.com) Date: Fri, 13 Feb 2015 18:33:59 -0600 Subject: [FieldTrip] Announcing the 2015 HCP Course: "Exploring the Human Connectome" Message-ID: <125601d047ed$ecca8160$c65f8420$@gmail.com> We are pleased to announce the 2015 HCP Course: "Exploring the Human Connectome", to be held June 8-12 at the Marriott Resort Waikiki Beach , in Honolulu, Hawaii, USA. This 5-day intensive course will provide training in the acquisition, analysis and visualization of imaging and behavioral data from the Human Connectome Project (HCP) using methods and informatics tools developed by the WU-Minn HCP consortium plus data made freely available to the neuroscience community. The course is designed for investigators who are interested in: * using data being collected and distributed by HCP * acquiring and analyzing HCP-style imaging and behavioral data at your own institution * processing your own non-HCP imaging data using HCP pipelines and methods * learning to use Connectome Workbench tools and the CIFTI connectivity data format * learning HCP multi-modal neuroimaging analysis methods, including those that combine MEG and MRI data * positioning yourself to capitalize on HCP-style data from forthcoming large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human Disease) Participants will learn how to acquire, analyze, visualize, and interpret data from resting-state and task-evoked magnetoencephalography (MEG), four major MR modalities (structural MR, resting-state fMRI, diffusion imaging, task-evoked fMRI), plus extensive behavioral data. Lectures and labs will provide grounding in neurobiological as well as methodological issues involved in interpreting multimodal data, and will span the range from single-voxel/vertex to brain network analysis approaches. The course is open to graduate students, postdocs, faculty, and industry participants. The course is aimed at both new and existing users of HCP data, methods, and tools, and will cover both basic and advanced topics. Prior experience in human neuroimaging or in computational analysis of brain networks is desirable, preferably including familiarity with FSL and Freesurfer software. For more info and to register visit the HCP Course website . If you would like a flyer to post for interested colleagues, email elam at wustl.edu. We hope to see you in Hawaii! Best, 2015 HCP Course Organizers Jennifer Elam, Ph.D. Outreach Coordinator, Human Connectome Project Washington University School of Medicine Department of Anatomy and Neurobiology, Box 8108 660 South Euclid Avenue St. Louis, MO 63110 314-362-9387 elamj at pcg.wustl.edu www.humanconnectome.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From demiral.007 at gmail.com Sat Feb 14 17:58:21 2015 From: demiral.007 at gmail.com (Baris Demiral) Date: Sat, 14 Feb 2015 11:58:21 -0500 Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? Message-ID: Hi all, I am testing clustering based correction algorithms on a TF power data in a predefined frequent band; theta. I have four conditions. I used F statistic. I defined neighbors moderately so that the number of neighbors is not very small or extremely large. In some analyses I used pairwise t-test statistic to compare between conditions as well. I have a-priory expectations, such that some conditions will increase the centro-frontal theta, and some will increase the posterior theta. I use maxsum and wcm approaches. I heave the following questions: -Why do I observe that very distant electrodes are clustered together? I noticed that FCZ is clustered with occipital electrodes and belong to the same cluster written as in stat.cfg.posclusterlabel (label 1). In some ways I can understand that because my task produces highly posteriorized theta power. The centro-frontal power is weaker. This leads to my next question: "Is there a watershed type of algorithm to separate these activities?" - Are the electrodes I see in the plotting (marked by *,x,+) the peak electrodes in the clusters, or do these electrodes form the significant clusters (with smaller p values < .01, .05 etc)? Because, if the cluster is formed between distant electrodes as mentioned above, I would expect to see the intermediate electrodes (such as CZ etc.) in the cluster electrode list as well. -Can you implement in plotting function where color can represent the cluster number? The *,+,x signs represent thresholds, but I cannot see which electrode belongs to which cluster. If you color code electrodes, it will be very helpful. -Is there a range of weight values for the weighted cluster mass (wcm) approach? I looked at the paper, and seems like 0.45-.055 seems to be the weight parameter. Is this correct? Thanks, -- S. Baris Demiral NIH/NIDCD 10 Center Drive Building 10, 5C410 Bethesda, 20892 MD -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Sun Feb 15 04:53:04 2015 From: pgoodin at swin.edu.au (Peter Goodin) Date: Sun, 15 Feb 2015 03:53:04 +0000 Subject: [FieldTrip] MEG resting state covariance matrix estimate without empty room recording? Message-ID: Hi Fieldtrip list, I'm having a bit of a quandary at the moment regarding resting state data. In order to generate the covariance matrix all the papers I've seen estimate it from an empty room recording on the day of testing which makes sense. The problem I have is that while I have 5+ minutes of resting state data for each participant, there's no empty room recordings to go along with it. So I've been doing some thinking about the "least wrong" method of estimating the covariance (between a "trial by trial" method where covariance is estimated from epoched data) vs. estimation from the entire recording. My conclusions have been less than stellar with the idea that the trial by trial method is a really stupid one due to the non-timelocked nature of resting state analysis while estimation from the entire recording is fraught with problems due to the shifting nature of resting state data leading to a bad estimation of noise to begin with. To further complicate the issue I'm using a neuromag system which removes noise from outside the head sphere as a required method, but I'm not sure if this would be a positive or negative influence on the covariance matrix. Has anyone had to deal with a similar problem / can anyone recommend any literature on the topic? Thanks for any assistance, Peter _____________________ Peter Goodin, BSc (Hons), Ph.D Candidate (submitted). Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 http://www.swinburne.edu.au/swinburneresearchers/index.php?fuseaction=profile&pid=4149 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 From RICHARDS at mailbox.sc.edu Sun Feb 15 06:27:01 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 15 Feb 2015 05:27:01 +0000 Subject: [FieldTrip] lead field Cholesky.... Message-ID: I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Mon Feb 16 06:19:33 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 16 Feb 2015 05:19:33 +0000 Subject: [FieldTrip] ROI for ft_sourcestatistics Message-ID: Hi all, I'm having some difficulty restricting source statistics to a region of interest. I am running the ft_sourcestatistics with the following cfg for ROI: cfg.atlas = ft_read_atlas('~/MATLAB/fieldtrip-20140910/template/atlas/aal/ROI_MNI_V4.nii') cfg.roi ={-5,0,3}; cfg.sphere=3; cfg.inputcoord = 'mni'; This results in the following error: Error using ft_volumelookup (line 131) either specify cfg.sphere or cfg.box Error in statistics_wrapper (line 140) tmp = ft_volumelookup(tmpcfg, varargin{1}); Error in ft_sourcestatistics (line 112) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I had understood that this should have chosen the grid position (-5, 0, 3) and then then selected grid points within a 3cm radius around this point as the ROI. These variables are just for trying it out, and are not what I will be using once I get this code working. Any help much appreciated. P.s. I had thought that the following code would return anatomical labels for this ROI. Instead it just returns a matrix of zeros with the dimensions of source.dim. cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi ={-5,0,3}; cfg.sphere=3; labels = ft_volumelookup( cfg, sourceData) Again, any help will be much appreciated! Regards, Kaelasha Tyler PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Mon Feb 16 14:34:45 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Mon, 16 Feb 2015 13:34:45 +0000 Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? In-Reply-To: References: Message-ID: Hi S. Baris Demiral, I have answers some of your questions, see below. Please note that it was difficult to answer all your questions because you didn't provide provide the actual code you used. Although your description is helpful, being able to see the actual parameters you implemented, and the specific function (e.g, did you use ft_freqstatistics, and did you use ft_clusterplot?) make it easier for anyone in the community attempting to answer your questions. Please see the FAQ for more details: http://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_communityhttp://fieldtrip.fcdonders.nl/faq/how_to_ask_good_questions_to_the_community. I'd like to point out that you can make good use of the search function (both inside FT - on the top right corner, and just on google), and reading the documentation for the functions that you are using, as many of your answers can be found there. Finally, this FAQ should be of interest to you: http://fieldtrip.fcdonders.nl/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Baris Demiral [demiral.007 at gmail.com] Sent: 14 February 2015 17:58 To: FieldTrip discussion list Subject: [FieldTrip] Clustering algorithms, large and long clusters, and watershed? Hi all, I am testing clustering based correction algorithms on a TF power data in a predefined frequent band; theta. I have four conditions. I used F statistic. I defined neighbors moderately so that the number of neighbors is not very small or extremely large. In some analyses I used pairwise t-test statistic to compare between conditions as well. I have a-priory expectations, such that some conditions will increase the centro-frontal theta, and some will increase the posterior theta. I use maxsum and wcm approaches. I heave the following questions: -Why do I observe that very distant electrodes are clustered together? I noticed that FCZ is clustered with occipital electrodes and belong to the same cluster written as in stat.cfg.posclusterlabel (label 1). ==> This could be due to the way your defined your neighbourhood structure. However, I can't make any conclusion from your defnition of "not very small or extremely large". Usually, when the neighbours are defined it specifies the neighbourhood size in the matlab workspace, and it would also help to know what you specific for cfg.method, when calling ft_prepare_neighbours. ==> It is important to note that even if there was a watershed method that it wouldn't answer the question of whether the centro-frontal theta is distinct from the occipital theta. More generally, the use of clustering won't answer this question either. It is better to use a feature in the data e.g., power change, to determine whether the theta differs between (groups of) sensors. In some ways I can understand that because my task produces highly posteriorized theta power. The centro-frontal power is weaker. This leads to my next question: "Is there a watershed type of algorithm to separate these activities?" - Are the electrodes I see in the plotting (marked by *,x,+) the peak electrodes in the clusters, or do these electrodes form the significant clusters (with smaller p values < .01, .05 etc)? ==> I assume you are using ft_clusterplot, and in the documentation of this function it states that the "(default ['*','x','+','o','.'] for p < [0.01 0.05 0.1 0.2 0.3])" ==> Electrodes marked with the same symbol belong the the same cluster (whether they are significant depends on the symbol, or the way you've assigned what the symbols mean). Because, if the cluster is formed between distant electrodes as mentioned above, I would expect to see the intermediate electrodes (such as CZ etc.) in the cluster electrode list as well. -Can you implement in plotting function where color can represent the cluster number? The *,+,x signs represent thresholds, but I cannot see which electrode belongs to which cluster. If you color code electrodes, it will be very helpful. ==> The elements in stat.poscluster/stat.negclusters are sorted according their p-values such that the cluster with the smallest p-value is first. ==> Part of this tutorial also applies to TF data, it should help you with differentiating clusters (and not just using the symbols): http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock The section of interest begins following text "We now briefly discuss the configuration fields that are not specific for ft_timelockstatistics:". ==> I cannot implement this feature, however, if you would like to contribute to FT by adding this functionality, you're welcome to do so, see http://fieldtrip.fcdonders.nl/contribute -Is there a range of weight values for the weighted cluster mass (wcm) approach? I looked at the paper, and seems like 0.45-.055 seems to be the weight parameter. Is this correct? ==> As a user, you need to determine and define a weight that is suitable for your data. The parameter to specify the weight is, cfg.wcm_weight. Thanks, -- S. Baris Demiral NIH/NIDCD 10 Center Drive Building 10, 5C410 Bethesda, 20892 MD -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Feb 16 14:37:47 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 16 Feb 2015 13:37:47 +0000 Subject: [FieldTrip] lead field Cholesky.... In-Reply-To: References: Message-ID: Update on this. I may have solved my own problem. I had “nasal cavity” with an assigned conductivity of 0. I changed this to a very small value, and it passed this step at least once. I will let you know if this happens again. Thanks in advance for your consideration. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** From: , John Richards > Date: Sunday, February 15, 2015 at 12:26 AM To: "fieldtrip at science.ru.nl" > Subject: lead field Cholesky.... I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From marta.bortoletto at cognitiveneuroscience.it Mon Feb 16 15:09:00 2015 From: marta.bortoletto at cognitiveneuroscience.it (Marta Bortoletto) Date: Mon, 16 Feb 2015 14:09:00 +0000 (UTC) Subject: [FieldTrip] Negative values of debiased wPLI Message-ID: <1260984826.7627092.1424095740727.JavaMail.yahoo@mail.yahoo.com> Dear Community,I am using the debiased wPLI to estimate connectivity between 70 EEG electrodes. I have about 150 trials for each subject. I noticed that some values of my 70x70 dwPLI matrix are negative. My understanding is that all values should be between 0 and 1, but for some reason I can get negative values from the debiasing process. My question is: Shall I calculate the absolute value of these negative values? Otherwise what shall I do with them? Thank you in advance for your help.Marta -------------- next part -------------- An HTML attachment was scrubbed... URL: From miano at lsbu.ac.uk Mon Feb 16 16:38:43 2015 From: miano at lsbu.ac.uk (Mian, Omar) Date: Mon, 16 Feb 2015 15:38:43 +0000 Subject: [FieldTrip] eeglab2fieldtrip - Fieldtrip vs EEGLAB version Message-ID: Hello, There seem to be differences between the eeglab2fieldtrip.m when the Fieldtrip and EEGLAB versions are compared. Is this an oversight? Which one is "better" ? data.cfg.version.id contains a later date in the Fieldtrip version, but the file properties modified date is later in the EEGLAB version. The versions I am comparing are: \fieldtrip-20150109\external\eeglab\eeglab2fieldtrip.m \eeglab13_4_4b\plugins\dipfit2.3\eeglab2fieldtrip.m Thanks Omar --------------------------- Omar Mian, Phd Research Fellow School of Applied Sciences London South Bank University 103 Borough Road London SE1 0AA Copyright in this email and in any attachments belongs to London South Bank University. This email, and its attachments if any, may be confidential or legally privileged and is intended to be seen only by the person to whom it is addressed. If you are not the intended recipient, please note the following: (1) You should take immediate action to notify the sender and delete the original email and all copies from your computer systems; (2) You should not read copy or use the contents of the email nor disclose it or its existence to anyone else. The views expressed herein are those of the author(s) and should not be taken as those of London South Bank University, unless this is specifically stated. London South Bank University is a company limited by guarantee registered in England and Wales. The following details apply to London South Bank University: Company number - 00986761; Registered office and trading address - 103 Borough Road London SE1 0AA; VAT number - 778 1116 17 Email address - LSBUinfo at lsbu.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Feb 16 16:47:11 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 16 Feb 2015 15:47:11 +0000 Subject: [FieldTrip] More: lead field Cholesky.... Message-ID: I solved this problem on my windows computers. Now when I run the same program on a Linux machine, I get the same output. I note that with the windows computer I had to add the MS Visual C++ 2008 redistributable and the Intel Visual Fortran redistributable libraries. I found in another post that someone said these libraries are unnecessary on Linux, I presume that means either these libraries exist on Linux already, or that they use a different library for these functions. My linux is Red Hat 7, MATLAB is the 2014a, FT is the 2/14/15 download. I realize this may be a question for the simbio development group, if so would you let me know and I will try to contact that group. By the way the models are a five segmented head (wm, gm, csf, skull, scalp) or fully segmented head (the former + eyes, nasal cavity, head-muscle, ….); the electrodes are co-registered with the MRI outside of FT so they fit correctly on the scalp; Thanks, John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu ************************************************* [cid:75EDAFDB-FCB8-4E5C-A9A4-4A2E0A1B56B7] From: , John Richards > Date: Monday, February 16, 2015 at 8:37 AM To: "fieldtrip at science.ru.nl" > Subject: Re: lead field Cholesky.... Update on this. I may have solved my own problem. I had “nasal cavity” with an assigned conductivity of 0. I changed this to a very small value, and it passed this step at least once. I will let you know if this happens again. Thanks in advance for your consideration. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** From: , John Richards > Date: Sunday, February 15, 2015 at 12:26 AM To: "fieldtrip at science.ru.nl" > Subject: lead field Cholesky.... I am just starting to try field trip, and want to do EEG/ERP source modeling with FEM models. I am trying to create a FEM model with the simbio method. I am following the tutorial: http://fieldtrip.fcdonders.nl/development/simbio. I have a fully segmented head model (gm, wm, csf, eyes, skull,….) and get almost all the way through the methods; including seeing figures that suggest things are going in correctly. At the last step to prepare the lead field, I get the following output (and error): Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix (full output below). I understand in principle the Cholesky-decomposition and why it is used, the rescaling, where this is happening in the sb_solve.m, etc However, I don’t know what to do with my model to get this to work. I have tried a simpler model (fewer segments), a smaller head (full head, vs MNI-type-size head), and a few other things, none of them work. Any help on this? John using headmodel specified in the configuration using electrodes specified in the configuration Find electrode positions... Calculate transfer matrix... Electrode 2 of 128 Scaling stiffnes matrix... Preconditioning... Could not compute incomplete Cholesky-decompositon. Rescaling stiffness matrix… error using ichol Input must be structurally nonsingular with structurally nonzero diagonal. Error in sb_solve (line 33) L = ichol(L); Error in sb_calc_vecx (line 12) vecx = sb_solve(stiff,vecb); Error in sb_transfer (line 40) transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1)); Error in ft_prepare_vol_sens (line 500) vol.transfer = sb_transfer(vol,sens); Error in prepare_headmodel (line 94) [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ft_prepare_leadfield (line 137) [vol, sens, cfg] = prepare_headmodel(cfg, data); *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0E9D0CE7-F37D-4858-BC01-79FD2F2554B1[1].png Type: image/png Size: 30144 bytes Desc: 0E9D0CE7-F37D-4858-BC01-79FD2F2554B1[1].png URL: From ktyler at swin.edu.au Tue Feb 17 06:23:57 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Tue, 17 Feb 2015 05:23:57 +0000 Subject: [FieldTrip] centre of head bias Message-ID: Hi all, A question about the centre head bias. Does computing a contrast of conditions remove the issue of the centre head bias? Read below. The Localizing oscillatory sources tutorial talks about the possibility of a beamformer over estimating power in the centre of the head, and suggests several methods of counteracting this. After suggestion use of the NAI to counter this bias, the tutorial goes on to show this beamformer method using contrasting conditions and says that using this approach we can "assume that the noise bias is the same for the pre- and post-stimulus interval and it will thus be removed." The tutorial uses the following code to do this: sourceDiff = sourcePost_con; sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; My question again: Does using this approach and computing the contrast condition remove the centre of head bias for this contrasted condition? Thanks! Kaelasha PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Feb 17 07:47:43 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 17 Feb 2015 07:47:43 +0100 Subject: [FieldTrip] centre of head bias In-Reply-To: References: Message-ID: Hi Kaelasha, The center-of-head bias is due to noise. Since you can assume the noise to be uncorrelated across experimental conditions, you can assume this bias will not be present in a contrast. To verify this for yourself, simply plot the beamforming results for two conditions separately; you will see a strong center-of-head bias. Subtract one big blob from another equally big blob and they should disappear :) So, plot the (normalized) difference, and you will likely notice less center-of-head bias. Best, Eelke On 17 February 2015 at 06:23, Kaelasha Tyler wrote: > Hi all, > > A question about the centre head bias. > > Does computing a contrast of conditions remove the issue of the centre head > bias? Read below. > > The Localizing oscillatory sources tutorial talks about the possibility of a > beamformer over estimating power in the centre of the head, and suggests > several methods of counteracting this. > > After suggestion use of the NAI to counter this bias, the tutorial goes on > to show this beamformer method using contrasting conditions and says that > using this approach we can "assume that the noise bias is the same for the > pre- and post-stimulus interval and it will thus be removed." > > The tutorial uses the following code to do this: > > sourceDiff = sourcePost_con; > sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ > sourcePre_con.avg.pow; > > My question again: Does using this approach and computing the contrast > condition remove the centre of head bias for this contrasted condition? > > Thanks! > Kaelasha > > PhD Candidate > > Brain and Psychological Sciences Research Centre > > Swinburne University of Technology > > Melbourne > > Australia From jan.schoffelen at donders.ru.nl Tue Feb 17 07:48:58 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 17 Feb 2015 06:48:58 +0000 Subject: [FieldTrip] centre of head bias In-Reply-To: References: Message-ID: <4BD7A3E7-2A26-47AF-ABCE-F2AC43019ACD@fcdonders.ru.nl> Hi Kaelasha, What’s the question behind this question? In principle the normalization step described should largely alleviate the depth bias. Whether or not the remaining estimated activity near the centre of the head is to be trusted, is another story. Best, Jan-Mathijs On Feb 17, 2015, at 6:23 AM, Kaelasha Tyler > wrote: Hi all, A question about the centre head bias. Does computing a contrast of conditions remove the issue of the centre head bias? Read below. The Localizing oscillatory sources tutorial talks about the possibility of a beamformer over estimating power in the centre of the head, and suggests several methods of counteracting this. After suggestion use of the NAI to counter this bias, the tutorial goes on to show this beamformer method using contrasting conditions and says that using this approach we can "assume that the noise bias is the same for the pre- and post-stimulus interval and it will thus be removed." The tutorial uses the following code to do this: sourceDiff = sourcePost_con; sourceDiff.avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; My question again: Does using this approach and computing the contrast condition remove the centre of head bias for this contrasted condition? Thanks! Kaelasha PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From munsif.jatoi at gmail.com Tue Feb 17 09:31:03 2015 From: munsif.jatoi at gmail.com (Munsif Jatoi) Date: Tue, 17 Feb 2015 16:31:03 +0800 Subject: [FieldTrip] Fwd: FEM implementation problem. In-Reply-To: References: Message-ID: Dear Sir/Madam, I hope you are fine. I am using FEM and BEM head modelling for solution of EEG inverse problem related to my doctoral work. For this, I gone through the tutorial provided at http://fieldtrip.fcdonders.nl/development/project/example_fem which suggests the MATLAB implementation of FEM. when I applied on an sMRI image by using segmentedmri = ft_volumesegment(cfg,mri); it give option as: the input is volume data with dimensions [177 240 256] The axes are 150 mm long in each direction The diameter of the sphere at the origin is 10 mm Do you want to change the anatomical labels for the axes [Y, n]? Y What is the anatomical label for the positive X-axis [r, l, a, p, s, i]? I don't know what to supply for these values? Can you please guide me about the values to be supplied? Many Thanks, Munsif -- Munsif Ali H.Jatoi, Ph D Scholar, Centre for Intelligent Signals and Imaging Research, Universiti Teknologi PETRONAS, Malaysia. http://scholar.google.com.my/citations?user=Y6g6jOAAAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 10:06:04 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 10:06:04 +0100 Subject: [FieldTrip] calculating behavioural-power correlation Message-ID: Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 10:18:13 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 09:18:13 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 10:33:07 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 10:33:07 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) wrote: > Hi Hweeling, > > Have a look at the help of ft_statfun_correlationT, which might be the > function you're looking for. This function calculates correlations between > two variables (e.g. subjects' behaviors and brain activities) and converts > the resulting correlation coefficients to t-statistics. > > Best, > arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 10:06 AM > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] calculating behavioural-power correlation > > > Dear all, > > I read on the "walkthrough" that it is possible to calculate > behavioural-power correlation across subjects. However, I was not sure what > type of descriptive statistics (i.e. cfg.statistics) I should use when > performing correlation cluster statistics. > > Would someone please enlighten me which type of statistics I should > input for cfg.statistics? > > Thanks! > > Best regards, > Hweeling > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 11:23:32 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 10:23:32 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: , Message-ID: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 11:34:48 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 11:34:48 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) wrote: > Hey Hweeling, > > It seems you're only inserting one input variable into the statistics > function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, > sub_LF_c200{:});" > > Could you try something along this line: ft_freqstatistics(cfg, freq1, > freq2) > > where freq1 is the original freq data, and freq2 is a copy of freq but > with the relevant values (say, in powspctrm) replaced with behavior values > (ensure this behavior matrix is matched in terms of size and dimensions to > the original freq values). > > Hope this helps, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > > ------------------------------ > *From:* Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 10:33 AM > *To:* Stolk, A. (Arjen) > *Cc:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation > > Dear Arjen, > > Thanks for the prompt reply. I keep getting an error message when I set > up my correlation cluster statistics, and I'm not sure what I could have > done wrong. Here's my script: > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.neighbours = neighbours; > cfg.channel = 'all'; > cfg.latency = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistics = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 1000; > cfg.ivar = 1; > cfg.uvar = 1; > > % design matrices > clear design; > % change in MMSE score relative to baseline > design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 > -0.157894737 0.117647059]; > design(2,:) = 1:6; > cfg.design = design; > > % for delta band > cfg.frequency = [2 4]; > [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); > [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); > > Here's the output from Matlab: > > computing statistic over the frequency range [2.000 4.000] > the call to "ft_appendfreq" took 0 seconds > the call to "ft_selectdata" took 0 seconds > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_correlationT" for the single-sample statistics > constructing randomized design > total number of measurements = 6 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 6 levels > number of repeated measurements in each level is 1 1 1 1 1 1 > computing a parametric threshold for clustering > Error using ft_statfun_correlationT (line 90) > Invalid specification of the design array. > Error using ft_statistics_montecarlo (line 254) > could not determine the parametric critical value > for clustering > > Error in ft_freqstatistics (line 319) > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Would you please tell what I have done wrong in this case? > > Thanks! > > Cheers, > Hweeling > > > On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: > >> Hi Hweeling, >> >> Have a look at the help of ft_statfun_correlationT, which might be the >> function you're looking for. This function calculates correlations between >> two variables (e.g. subjects' behaviors and brain activities) and converts >> the resulting correlation coefficients to t-statistics. >> >> Best, >> arjen >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> >> ------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 10:06 AM >> *To:* FieldTrip discussion list >> *Subject:* [FieldTrip] calculating behavioural-power correlation >> >> >> Dear all, >> >> I read on the "walkthrough" that it is possible to calculate >> behavioural-power correlation across subjects. However, I was not sure what >> type of descriptive statistics (i.e. cfg.statistics) I should use when >> performing correlation cluster statistics. >> >> Would someone please enlighten me which type of statistics I should >> input for cfg.statistics? >> >> Thanks! >> >> Best regards, >> Hweeling >> >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at donders.ru.nl Tue Feb 17 11:45:33 2015 From: a.stolk at donders.ru.nl (Stolk, A. (Arjen)) Date: Tue, 17 Feb 2015 10:45:33 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: , Message-ID: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 15:18:11 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 15:18:11 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) wrote: > Hey Hweeling, > > "Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency?" > > indeed > > "What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect?" > > the walkthough may refer to a GLM-based statistical implementation, for > which the FT implementation differs from the correlationT statfun. Namely, > the former uses the behavioral measure as a regressor in a data model > whereas the latter uses the behavioral measure as a datapoint series for > correlation with another datapoint series (and then converts to a T value). > The correlationT statfun is relatively 'new', hence not yet addressed in > the walkthrough. > > Yours, > arjen > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] > *Sent:* Tuesday, February 17, 2015 11:34 AM > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation > > Dear Arjen, > > Thanks for the prompt reply again! > > Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency? > > What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect? > > Cheers, > Hweeling > > > On 17 February 2015 at 11:23, Stolk, A. (Arjen) > wrote: > >> Hey Hweeling, >> >> It seems you're only inserting one input variable into the statistics >> function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, >> sub_LF_c200{:});" >> >> Could you try something along this line: ft_freqstatistics(cfg, freq1, >> freq2) >> >> where freq1 is the original freq data, and freq2 is a copy of freq but >> with the relevant values (say, in powspctrm) replaced with behavior values >> (ensure this behavior matrix is matched in terms of size and dimensions to >> the original freq values). >> >> Hope this helps, >> Arjen >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> >> ------------------------------ >> *From:* Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 10:33 AM >> *To:* Stolk, A. (Arjen) >> *Cc:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >> >> Dear Arjen, >> >> Thanks for the prompt reply. I keep getting an error message when I set >> up my correlation cluster statistics, and I'm not sure what I could have >> done wrong. Here's my script: >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.neighbours = neighbours; >> cfg.channel = 'all'; >> cfg.latency = 'all'; >> cfg.avgovertime = 'no'; >> cfg.avgoverchan = 'no'; >> cfg.avgoverfreq = 'yes'; >> cfg.parameter = 'powspctrm'; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'ft_statfun_correlationT'; >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistics = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; >> cfg.numrandomization = 1000; >> cfg.ivar = 1; >> cfg.uvar = 1; >> >> % design matrices >> clear design; >> % change in MMSE score relative to baseline >> design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 >> -0.157894737 0.117647059]; >> design(2,:) = 1:6; >> cfg.design = design; >> >> % for delta band >> cfg.frequency = [2 4]; >> [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); >> [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); >> >> Here's the output from Matlab: >> >> computing statistic over the frequency range [2.000 4.000] >> the call to "ft_appendfreq" took 0 seconds >> the call to "ft_selectdata" took 0 seconds >> using "ft_statistics_montecarlo" for the statistical testing >> using "ft_statfun_correlationT" for the single-sample statistics >> constructing randomized design >> total number of measurements = 6 >> total number of variables = 2 >> number of independent variables = 1 >> number of unit variables = 1 >> number of within-cell variables = 0 >> number of control variables = 0 >> using a permutation resampling approach >> repeated measurement in variable 1 over 6 levels >> number of repeated measurements in each level is 1 1 1 1 1 1 >> computing a parametric threshold for clustering >> Error using ft_statfun_correlationT (line 90) >> Invalid specification of the design array. >> Error using ft_statistics_montecarlo (line 254) >> could not determine the parametric critical value >> for clustering >> >> Error in ft_freqstatistics (line 319) >> [stat, cfg] = statmethod(cfg, dat, cfg.design); >> >> Would you please tell what I have done wrong in this case? >> >> Thanks! >> >> Cheers, >> Hweeling >> >> >> On 17 February 2015 at 10:18, Stolk, A. (Arjen) >> wrote: >> >>> Hi Hweeling, >>> >>> Have a look at the help of ft_statfun_correlationT, which might be the >>> function you're looking for. This function calculates correlations between >>> two variables (e.g. subjects' behaviors and brain activities) and converts >>> the resulting correlation coefficients to t-statistics. >>> >>> Best, >>> arjen >>> >>> -- >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> >>> Email: a.stolk at donders.ru.nl >>> >>> Phone: +31(0)243 68294 >>> Web: www.arjenstolk.nl >>> >>> ------------------------------ >>> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >>> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >>> *Sent:* Tuesday, February 17, 2015 10:06 AM >>> *To:* FieldTrip discussion list >>> *Subject:* [FieldTrip] calculating behavioural-power correlation >>> >>> >>> Dear all, >>> >>> I read on the "walkthrough" that it is possible to calculate >>> behavioural-power correlation across subjects. However, I was not sure what >>> type of descriptive statistics (i.e. cfg.statistics) I should use when >>> performing correlation cluster statistics. >>> >>> Would someone please enlighten me which type of statistics I should >>> input for cfg.statistics? >>> >>> Thanks! >>> >>> Best regards, >>> Hweeling >>> >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Feb 17 16:44:45 2015 From: a.stolk8 at gmail.com (arjen stolk) Date: Tue, 17 Feb 2015 16:44:45 +0100 Subject: [FieldTrip] calculating behavioural-power correlation Message-ID: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee Datum: Aan: "Stolk, A. (Arjen)" Cc: FieldTrip discussion list Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen   From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email:  a.stolk at donders.ru.nl Phone:  +31(0)243 68294 Web:    www.arjenstolk.nl From: Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements     = 6 total number of variables        = 2 number of independent variables  = 1 number of unit variables         = 1 number of within-cell variables  = 0 number of control variables      = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1  computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319)   [stat, cfg] = statmethod(cfg, dat, cfg.design);   Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email:  a.stolk at donders.ru.nl Phone:  +31(0)243 68294 Web:    www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Tue Feb 17 17:39:29 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Tue, 17 Feb 2015 17:39:29 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: References: Message-ID: Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk wrote: > Yes it does. ;) > Arjen > > > > -------- Oorspronkelijk bericht -------- > Van: Hwee Ling Lee > Datum: > Aan: "Stolk, A. (Arjen)" > Cc: FieldTrip discussion list > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation > > > Dear Arjen, > > Thanks! It works well now. > > I plotted the results using ft_clusterplot, and it only shows the > significant clusters that show significant correlation of power and > behavioural measure, right? Or is there a better way I can display the > results? > > Thanks again. > > Cheers, > Hweeling > > > > On 17 February 2015 at 11:45, Stolk, A. (Arjen) > wrote: > >> Hey Hweeling, >> >> "Just to ensure that I get this right, I should create a variable for the >> behavioural measure such that the variable contains a powspctrm field with >> the behavioural information for every frequency?" >> > indeed >> >> "What I'm confused is that in the walkthrough website, under the >> subsection on correlation, it is suggested to create the cfg.design with >> the behavioural measure that one wants to correlate. So is this information >> in the walkthrough website incorrect?" >> > the walkthough may refer to a GLM-based statistical implementation, for >> which the FT implementation differs from the correlationT statfun. Namely, >> the former uses the behavioral measure as a regressor in a data model >> whereas the latter uses the behavioral measure as a datapoint series for >> correlation with another datapoint series (and then converts to a T value). >> The correlationT statfun is relatively 'new', hence not yet addressed in >> the walkthrough. >> >> Yours, >> arjen >> >> ------------------------------ >> *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] >> on behalf of Hwee Ling Lee [hweeling.lee at gmail.com] >> *Sent:* Tuesday, February 17, 2015 11:34 AM >> *To:* FieldTrip discussion list >> >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >> >> Dear Arjen, >> >> Thanks for the prompt reply again! >> >> Just to ensure that I get this right, I should create a variable for >> the behavioural measure such that the variable contains a powspctrm field >> with the behavioural information for every frequency? >> >> What I'm confused is that in the walkthrough website, under the >> subsection on correlation, it is suggested to create the cfg.design with >> the behavioural measure that one wants to correlate. So is this information >> in the walkthrough website incorrect? >> >> Cheers, >> Hweeling >> >> >> On 17 February 2015 at 11:23, Stolk, A. (Arjen) >> wrote: >> >>> Hey Hweeling, >>> >>> It seems you're only inserting one input variable into the statistics >>> function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, >>> sub_LF_c200{:});" >>> >>> Could you try something along this line: ft_freqstatistics(cfg, freq1, >>> freq2) >>> >>> where freq1 is the original freq data, and freq2 is a copy of freq but >>> with the relevant values (say, in powspctrm) replaced with behavior values >>> (ensure this behavior matrix is matched in terms of size and dimensions to >>> the original freq values). >>> >>> Hope this helps, >>> Arjen >>> >>> -- >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> >>> Email: a.stolk at donders.ru.nl >>> >>> Phone: +31(0)243 68294 >>> Web: www.arjenstolk.nl >>> >>> ------------------------------ >>> *From:* Hwee Ling Lee [hweeling.lee at gmail.com] >>> *Sent:* Tuesday, February 17, 2015 10:33 AM >>> *To:* Stolk, A. (Arjen) >>> *Cc:* FieldTrip discussion list >>> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation >>> >>> Dear Arjen, >>> >>> Thanks for the prompt reply. I keep getting an error message when I >>> set up my correlation cluster statistics, and I'm not sure what I could >>> have done wrong. Here's my script: >>> >>> cfg = []; >>> cfg.layout = 'EEG1010.lay'; >>> cfg.neighbours = neighbours; >>> cfg.channel = 'all'; >>> cfg.latency = 'all'; >>> cfg.avgovertime = 'no'; >>> cfg.avgoverchan = 'no'; >>> cfg.avgoverfreq = 'yes'; >>> cfg.parameter = 'powspctrm'; >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'ft_statfun_correlationT'; >>> cfg.correctm = 'cluster'; >>> cfg.clusteralpha = 0.05; >>> cfg.clusterstatistics = 'maxsum'; >>> cfg.minnbchan = 2; >>> cfg.tail = 0; >>> cfg.clustertail = 0; >>> cfg.alpha = 0.025; >>> cfg.numrandomization = 1000; >>> cfg.ivar = 1; >>> cfg.uvar = 1; >>> >>> % design matrices >>> clear design; >>> % change in MMSE score relative to baseline >>> design(1,:) = [0.095238095 -0.045454545 -0.533333333 0.238095238 >>> -0.157894737 0.117647059]; >>> design(2,:) = 1:6; >>> cfg.design = design; >>> >>> % for delta band >>> cfg.frequency = [2 4]; >>> [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); >>> [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); >>> >>> Here's the output from Matlab: >>> >>> computing statistic over the frequency range [2.000 4.000] >>> the call to "ft_appendfreq" took 0 seconds >>> the call to "ft_selectdata" took 0 seconds >>> using "ft_statistics_montecarlo" for the statistical testing >>> using "ft_statfun_correlationT" for the single-sample statistics >>> constructing randomized design >>> total number of measurements = 6 >>> total number of variables = 2 >>> number of independent variables = 1 >>> number of unit variables = 1 >>> number of within-cell variables = 0 >>> number of control variables = 0 >>> using a permutation resampling approach >>> repeated measurement in variable 1 over 6 levels >>> number of repeated measurements in each level is 1 1 1 1 1 1 >>> computing a parametric threshold for clustering >>> Error using ft_statfun_correlationT (line 90) >>> Invalid specification of the design array. >>> Error using ft_statistics_montecarlo (line 254) >>> could not determine the parametric critical value >>> for clustering >>> >>> Error in ft_freqstatistics (line 319) >>> [stat, cfg] = statmethod(cfg, dat, cfg.design); >>> >>> Would you please tell what I have done wrong in this case? >>> >>> Thanks! >>> >>> Cheers, >>> Hweeling >>> >>> >>> On 17 February 2015 at 10:18, Stolk, A. (Arjen) >>> wrote: >>> >>>> Hi Hweeling, >>>> >>>> Have a look at the help of ft_statfun_correlationT, which might be the >>>> function you're looking for. This function calculates correlations between >>>> two variables (e.g. subjects' behaviors and brain activities) and converts >>>> the resulting correlation coefficients to t-statistics. >>>> >>>> Best, >>>> arjen >>>> >>>> -- >>>> Donders Institute for Brain, Cognition and Behaviour >>>> Centre for Cognitive Neuroimaging >>>> Radboud University Nijmegen >>>> >>>> Email: a.stolk at donders.ru.nl >>>> >>>> Phone: +31(0)243 68294 >>>> Web: www.arjenstolk.nl >>>> >>>> ------------------------------ >>>> *From:* fieldtrip-bounces at science.ru.nl [ >>>> fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [ >>>> hweeling.lee at gmail.com] >>>> *Sent:* Tuesday, February 17, 2015 10:06 AM >>>> *To:* FieldTrip discussion list >>>> *Subject:* [FieldTrip] calculating behavioural-power correlation >>>> >>>> >>>> Dear all, >>>> >>>> I read on the "walkthrough" that it is possible to calculate >>>> behavioural-power correlation across subjects. However, I was not sure what >>>> type of descriptive statistics (i.e. cfg.statistics) I should use when >>>> performing correlation cluster statistics. >>>> >>>> Would someone please enlighten me which type of statistics I should >>>> input for cfg.statistics? >>>> >>>> Thanks! >>>> >>>> Best regards, >>>> Hweeling >>>> >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Feb 17 18:03:09 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 17 Feb 2015 18:03:09 +0100 (CET) Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: Message-ID: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "arjen stolk" Cc: "FieldTrip discussion list" Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0.533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Wed Feb 18 08:58:51 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 18 Feb 2015 08:58:51 +0100 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Message-ID: Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux wrote: > Dear Arjen, dear Hweeling, > > I would be interested in trying this method as well. > > May I ask you how to specify the design matrix? > > For instance if I want to measure the correlation between a TFR-matrix > and some behavioral measure (Y) across participants would something like > this make sense: > > AVG = > powspctrm:[4-D double] > label:{186x1 cell} > freq:[1x49 double] > time:[1x121 double] > dimord: 'subj_chan_freq_time' > cfg:[1x1 stuct] > > > dum = AVG; > dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) > size(AVG.powspctrm,4)]); > %here Y is a vector with the behavioral measure > > cfg = []; > cfg.method = 'montecarlo'; > cfg.parameter = 'powspctrm'; > cfg.statistic = 'ft_statfun_correlationT'; > etc > > cfg.design = []; > cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; > cfg.design(2,:) = [1:length(Y) 1:length(Y)]; > > freq_stat = ft_freqstatistica(cfg,AVG,dum); > > > This, however, results in extremely long computing times, which makes me > doubt that this is the correct way. > > Best, > > Fred > > Frédéric Roux > > ----- Original Message ----- > From: "Hwee Ling Lee" > To: "arjen stolk" > Cc: "FieldTrip discussion list" > Sent: Tuesday, February 17, 2015 5:39:29 PM > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > Thanks! One last question, just to be sure, what is the reference for this > correlation method? I tried to search for your publications but not sure > which one to cite. > > > Cheers, > Hweeling > > > On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: > > > > > > Yes it does. ;) > Arjen > > > -------- Oorspronkelijk bericht -------- > Van: Hwee Ling Lee < hweeling.lee at gmail.com > > Datum: > Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation > > > > Dear Arjen, > > > Thanks! It works well now. > > > I plotted the results using ft_clusterplot, and it only shows the > significant clusters that show significant correlation of power and > behavioural measure, right? Or is there a better way I can display the > results? > > > Thanks again. > > > Cheers, > Hweeling > > > > > > > On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hey Hweeling, > > "Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency?" > > indeed > > "What I'm confused is that in the walkthrough website, under the > subsection on correlation, it is suggested to create the cfg.design with > the behavioural measure that one wants to correlate. So is this information > in the walkthrough website incorrect?" > > the walkthough may refer to a GLM-based statistical implementation, for > which the FT implementation differs from the correlationT statfun. Namely, > the former uses the behavioral measure as a regressor in a data model > whereas the latter uses the behavioral measure as a datapoint series for > correlation with another datapoint series (and then converts to a T value). > The correlationT statfun is relatively 'new', hence not yet addressed in > the walkthrough. > > Yours, > arjen > > > > > From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] > on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 11:34 AM > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > > > > Dear Arjen, > > > Thanks for the prompt reply again! > > > Just to ensure that I get this right, I should create a variable for the > behavioural measure such that the variable contains a powspctrm field with > the behavioural information for every frequency? > > > What I'm confused is that in the walkthrough website, under the subsection > on correlation, it is suggested to create the cfg.design with the > behavioural measure that one wants to correlate. So is this information in > the walkthrough website incorrect? > > > Cheers, > Hweeling > > > > > On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hey Hweeling, > > It seems you're only inserting one input variable into the statistics > function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, > sub_LF_c200{:});" > > Could you try something along this line: ft_freqstatistics(cfg, freq1, > freq2) > > where freq1 is the original freq data, and freq2 is a copy of freq but > with the relevant values (say, in powspctrm) replaced with behavior values > (ensure this behavior matrix is matched in terms of size and dimensions to > the original freq values). > > Hope this helps, > Arjen > > > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31 (0)243 68294 > Web: www.arjenstolk.nl > > > From: Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 10:33 AM > To: Stolk, A. (Arjen) > Cc: FieldTrip discussion list > Subject: Re: [FieldTrip] calculating behavioural-power correlation > > > > > > > Dear Arjen, > > > Thanks for the prompt reply. I keep getting an error message when I set up > my correlation cluster statistics, and I'm not sure what I could have done > wrong. Here's my script: > > > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.neighbours = neighbours; > cfg.channel = 'all'; > cfg.latency = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverchan = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistics = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 1000; > cfg.ivar = 1; > cfg.uvar = 1; > > > % design matrices > clear design; > % change in MMSE score relative to baseline > design(1,:) = [0.095238095 -0. 045454545 - 0.533333333 0.238095238 > -0.157894737 0.117647059]; > design(2,:) = 1:6; > cfg.design = design; > > > % for delta band > cfg.frequency = [2 4]; > [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); > [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); > > > Here's the output from Matlab: > > > > computing statistic over the frequency range [2.000 4.000] > the call to "ft_appendfreq" took 0 seconds > the call to "ft_selectdata" took 0 seconds > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_correlationT" for the single-sample statistics > constructing randomized design > total number of measurements = 6 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 6 levels > number of repeated measurements in each level is 1 1 1 1 1 1 > computing a parametric threshold for clustering > Error using ft_statfun_correlationT (line 90) > Invalid specification of the design array. > Error using ft_statistics_montecarlo (line 254) > could not determine the parametric critical value > for clustering > > > Error in ft_freqstatistics (line 319) > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Would you please tell what I have done wrong in this case? > > > Thanks! > > > Cheers, > Hweeling > > > > > On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > > wrote: > > > > > Hi Hweeling, > > Have a look at the help of ft_statfun_correlationT, which might be the > function you're looking for. This function calculates correlations between > two variables (e.g. subjects' behaviors and brain activities) and converts > the resulting correlation coefficients to t-statistics. > > Best, > arjen > > > > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31 (0)243 68294 > Web: www.arjenstolk.nl > > > From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] > on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] > Sent: Tuesday, February 17, 2015 10:06 AM > To: FieldTrip discussion list > Subject: [FieldTrip] calculating behavioural-power correlation > > > > > > > > > Dear all, > > > I read on the "walkthrough" that it is possible to calculate > behavioural-power correlation across subjects. However, I was not sure what > type of descriptive statistics (i.e. cfg.statistics) I should use when > performing correlation cluster statistics. > > > Would someone please enlighten me which type of statistics I should input > for cfg.statistics? > > > Thanks! > > > Best regards, > Hweeling > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.lee dzne.de > Email 2: hweeling.lee gmail.com > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > > > > -- > > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.lee dzne.de > Email 2: hweeling.lee gmail.com > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Wed Feb 18 10:15:57 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Wed, 18 Feb 2015 10:15:57 +0100 (CET) Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: Message-ID: <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> Hello Hweeling, thanks for sharing these very helpful comments! Cheers, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "Frédéric Roux" Cc: "FieldTrip discussion list" , "arjen stolk" Sent: Wednesday, February 18, 2015 8:58:51 AM Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux < f.roux at bcbl.eu > wrote: Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" < hweeling.lee at gmail.com > To: "arjen stolk" < arjen.stolk at donders.ru.nl > Cc: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0 .533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= From nathanweisz at mac.com Wed Feb 18 23:21:53 2015 From: nathanweisz at mac.com (Nathan Weisz) Date: Wed, 18 Feb 2015 23:21:53 +0100 Subject: [FieldTrip] phd and postdoc opportunities Message-ID: <2F5AAF31-006C-47EF-BA69-B0948C008821@mac.com> FYI. please contact jens blechert directly in case of interest / questions. best, nathan -------------- next part -------------- A non-text attachment was scrubbed... Name: ERCundFWFProjekt.pdf Type: application/pdf Size: 215254 bytes Desc: not available URL: From m.stoica at uke.de Thu Feb 19 11:17:26 2015 From: m.stoica at uke.de (Stoica, Mircea) Date: Thu, 19 Feb 2015 10:17:26 +0000 Subject: [FieldTrip] calculating behavioural-power correlation In-Reply-To: <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> References: , <2082533800.617074.1424250957633.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, you should take a look at ft_statfun_indepsamplesregrT which more often than not gives the same results but with much lower computation times. Best, Mircea Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Frédéric Roux [f.roux at bcbl.eu] Sent: Wednesday, February 18, 2015 10:15 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Hello Hweeling, thanks for sharing these very helpful comments! Cheers, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" To: "Frédéric Roux" Cc: "FieldTrip discussion list" , "arjen stolk" Sent: Wednesday, February 18, 2015 8:58:51 AM Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me. I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). I think the main reason for the long computation time of your design matrix is because the statistics is calculating the correlation for every frequency and every time point and every channel. You should probably ask yourself if the behavioural is going to change along the time dimension. If not, then probably averaging across time might be a good idea, or pick a time period that you hypothesized to be most sensitive to your behavioural measure. Also, I would suggest to look into some specify frequency bands based on your hypothesis, and averaged across a specified frequency band would shorten your computation time. I hope this helps. Cheers, Hweeling On 17 February 2015 at 18:03, Frédéric Roux < f.roux at bcbl.eu > wrote: Dear Arjen, dear Hweeling, I would be interested in trying this method as well. May I ask you how to specify the design matrix? For instance if I want to measure the correlation between a TFR-matrix and some behavioral measure (Y) across participants would something like this make sense: AVG = powspctrm:[4-D double] label:{186x1 cell} freq:[1x49 double] time:[1x121 double] dimord: 'subj_chan_freq_time' cfg:[1x1 stuct] dum = AVG; dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]); %here Y is a vector with the behavioral measure cfg = []; cfg.method = 'montecarlo'; cfg.parameter = 'powspctrm'; cfg.statistic = 'ft_statfun_correlationT'; etc cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); This, however, results in extremely long computing times, which makes me doubt that this is the correct way. Best, Fred Frédéric Roux ----- Original Message ----- From: "Hwee Ling Lee" < hweeling.lee at gmail.com > To: "arjen stolk" < arjen.stolk at donders.ru.nl > Cc: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Tuesday, February 17, 2015 5:39:29 PM Subject: Re: [FieldTrip] calculating behavioural-power correlation Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. Cheers, Hweeling On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: Yes it does. ;) Arjen -------- Oorspronkelijk bericht -------- Van: Hwee Ling Lee < hweeling.lee at gmail.com > Datum: Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks! It works well now. I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? Thanks again. Cheers, Hweeling On 17 February 2015 at 11:45, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, "Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?" > indeed "What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?" > the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough. Yours, arjen From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 11:34 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply again! Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency? What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect? Cheers, Hweeling On 17 February 2015 at 11:23, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hey Hweeling, It seems you're only inserting one input variable into the statistics function, i.e. " [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});" Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2) where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values). Hope this helps, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:33 AM To: Stolk, A. (Arjen) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation Dear Arjen, Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script: cfg = []; cfg.layout = 'EEG1010.lay'; cfg.neighbours = neighbours; cfg.channel = 'all'; cfg.latency = 'all'; cfg.avgovertime = 'no'; cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'yes'; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_correlationT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistics = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; cfg.ivar = 1; cfg.uvar = 1; % design matrices clear design; % change in MMSE score relative to baseline design(1,:) = [0.095238095 -0. 045454545 - 0 .533333333 0.238095238 -0.157894737 0.117647059]; design(2,:) = 1:6; cfg.design = design; % for delta band cfg.frequency = [2 4]; [c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:}); [c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:}); Here's the output from Matlab: computing statistic over the frequency range [2.000 4.000] the call to "ft_appendfreq" took 0 seconds the call to "ft_selectdata" took 0 seconds using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_correlationT" for the single-sample statistics constructing randomized design total number of measurements = 6 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 6 levels number of repeated measurements in each level is 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ft_statfun_correlationT (line 90) Invalid specification of the design array. Error using ft_statistics_montecarlo (line 254) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 319) [stat, cfg] = statmethod(cfg, dat, cfg.design); Would you please tell what I have done wrong in this case? Thanks! Cheers, Hweeling On 17 February 2015 at 10:18, Stolk, A. (Arjen) < a.stolk at donders.ru.nl > wrote: Hi Hweeling, Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients to t-statistics. Best, arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31 (0)243 68294 Web: www.arjenstolk.nl From: fieldtrip-bounces at science.ru.nl [ fieldtrip-bounces at science.ru.nl ] on behalf of Hwee Ling Lee [ hweeling.lee at gmail.com ] Sent: Tuesday, February 17, 2015 10:06 AM To: FieldTrip discussion list Subject: [FieldTrip] calculating behavioural-power correlation Dear all, I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics. Would someone please enlighten me which type of statistics I should input for cfg.statistics? Thanks! Best regards, Hweeling _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.lee dzne.de Email 2: hweeling.lee gmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From stefanwiens at gmail.com Fri Feb 20 16:03:37 2015 From: stefanwiens at gmail.com (Stefan Wiens) Date: Fri, 20 Feb 2015 16:03:37 +0100 Subject: [FieldTrip] ft_topoplotER Message-ID: Hi! I use ft_topoplotER with the following cfg: cfg.highlightcolor = [1 1 1]; The markers are now white on the screen, but when I save the figure as tiff (or any other format), the markers are black. Is this is Matlab 2014b issue? Also, is there a way to fill the markers with a particular color? I think this would be easier to see. Cheers Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Feb 23 04:20:28 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 23 Feb 2015 03:20:28 +0000 Subject: [FieldTrip] Problem with mvaranalysis Message-ID: <1424661627824.86346@flinders.edu.au> Hello fieldtrip, I have come across something that is either a bug or something I am doing wrong, however I am unsure. The error message is as following: Error using .* Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 479) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 385) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in fieldtrip_peak_connectivity (line 164) mdata = ft_mvaranalysis( cfg, data); I had a closer look and it appears as though the tap variable is size 1x501 and tmpdata.trial is [85x500 double]. So on line 479 in catnan, when it asks to multiply a 85x500 matrix by 85x501, it crashes. Apparently I tried submitting this bug before (Bug 2784), but it was rejected. However, I still dont know what Im doing wrong. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66125 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Feb 23 09:00:26 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 23 Feb 2015 08:00:26 +0000 Subject: [FieldTrip] Problem with mvaranalysis In-Reply-To: <1424661627824.86346@flinders.edu.au> References: <1424661627824.86346@flinders.edu.au> Message-ID: <3A384D09-DDB9-4E00-AFDC-4812F326C828@fcdonders.ru.nl> Tyler, Please follow up on this in bug 2784 on bugzilla. This particular bug was ‘rejected’ due to insufficient input from your side. We require your feedback in order to get things solved for you (and just dumping the error message is usually not going to solve it :-) ). It seems you are running into problems regarding this function, and the only one reporting it, so it’s crucial that we get the right intel. Note that I suspect your data structure to contain data epochs that have slightly variable size in the second dimension, i.e. vary in time-length on the order of one sample less or more. The function apparently expects or assumes the epochs to be of equal length, and it initializes some variables based on the length of the first epoch. If this happens to have a length of 501 samples, the code chokes on the next epoch, which has 500 samples. Could you upload (into the bug) a small data structure and a cfg in order for us to reproduce your problem? Jan-Mathijs On Feb 23, 2015, at 4:20 AM, Tyler Grummett > wrote: Hello fieldtrip, I have come across something that is either a bug or something I am doing wrong, however I am unsure. The error message is as following: Error using .* Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 479) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 385) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in fieldtrip_peak_connectivity (line 164) mdata = ft_mvaranalysis( cfg, data); I had a closer look and it appears as though the tap variable is size 1x501 and tmpdata.trial is [85x500 double]. So on line 479 in catnan, when it asks to multiply a 85x500 matrix by 85x501, it crashes. Apparently I tried submitting this bug before (Bug 2784), but it was rejected. However, I still dont know what Im doing wrong. Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66125 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Mon Feb 23 11:50:13 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Mon, 23 Feb 2015 11:50:13 +0100 Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence Message-ID: <44fc-54eb0600-5-346af640@146761187> Dear Fieldtrippers Here the introduction to my problem (I hope I can make myself clear): I am doing a connectivity analysis (partial directed coherence) and obtain as a result following array: connectivity = label:{51x1} dimord: 'chan_chan_freq' pdcspctrm: [51x51x101] freq: [1x101 double] cfg: [1x1 struct] I have 51 channels in my analysis. I want to find out the outflow from frontal to parietal regions. So what I did next was defining which channels belong to frontal and which to parietal regions (note: the sensor layout of the sensor net is really random), e.g.: Frontal = { 'E5' 'E6' 'E197' 'E198'} Parietal = { 'E77' 'E78' 'E89' 'E163'} Next step: find outflow from each Frontal to each Parietal channels In order to do this I need to look in "connectivity.pdspctrm" for the pdc value: find all the channels in "Frontal" and "Parietal" in the original "connectivity" in order to find there the corresponding pdc values: "frontal" is a vector with indices of the channels in the connectivity.label channel list (same with "parietal") frontal = zeros(4,1) for l=1:4 channelposition = find(ismember(connectivity.label, Frontal{l}) == 1); if isfinite(channelposition); if isfinite (ismember(connectivity.label, Frontal{l}) == 1, frontal (l,1) = find(ismember(connectivity.label, Frontal{l}) ==1); else frontal(l,1) = NaN; end else end end I get: frontal = 1 2 10 11 parietal = zeros(4,1) for l=1:4 channelposition = find(ismember(connectivity.label, Parietal {l}) == 1); if isfinite(channelposition); if isfinite (ismember(connectivity.label, Parietal{l}) == 1, parietal (l,1) = find(ismember(connectivity.label, Parietal{l}) ==1); else parietal(l,1) = NaN; end else end end I get: parietal = 9 14 20 31 If I want to know now the outflow from E5 to E77 i would have to enter this as follows: Outflow = connectivity.pdcsptrm(1,9,5) %5 is here just an example for the frequency of interest and I would get a value, e.g. ans = 0.567 (This worked totally fine!) >>>>>>>>>>>>>Now my Problem: <<<<<<<<<<<<<< I don't want to know the outflow from a single electrode to another, but the average outflow from frontal to parietal for the whole Alpha frequencyband: So my line of code would look like this: Outflow = connectivity.pdcspctrm(frontal',parietal',5:16) I tried eval (eventhough it is not elegant, but it's the only thing I could think about that might work): Outflow = eval ([ 'mean(mean(mean(connectivity.pdcspctrm(' num2str(frontal') ',' num2str(parietal'), 5:16))))' ]) When I enter it as follows: Outflow = mean(mean(mean(connectivity.pdcspctrm([1 2 10 11], [9 14 20 31], 5:16)))) it works fine. But the vectors frontal and parietal will contain upt to 30 indices each, so typing them is not an option. I tried everything else I could think of (different parethesis etc.). Maybe someone can help me out here?? Thanks a lot!! From jorn at artinis.com Mon Feb 23 12:06:25 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 23 Feb 2015 12:06:25 +0100 Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence In-Reply-To: <44fc-54eb0600-5-346af640@146761187> References: <44fc-54eb0600-5-346af640@146761187> Message-ID: <002501d04f58$c4fa03a0$4eee0ae0$@artinis.com> HI Barbara, I hope I followed all of your mail. I think this should work: >> mean(mean(mean(connectivity.pdcspctrm(frontal(:), parietal(:), 5:16), 1), 2), 3) This first averages over the frontal channels, then over the parietal channels, then over frequencies. You get into troubles with your nana solution though, so you might need to use something like frontal(~isnan(frontal(:, 1)), :) = []; to get rid of these. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems  |  +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Barbara Schorr > Sent: Monday, February 23, 2015 11:50 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Connectitivy Analysis - partial directed coherence > > Dear Fieldtrippers > > > > Here the introduction to my problem (I hope I can make myself clear): > > I am doing a connectivity analysis (partial directed coherence) and obtain as a > result following array: > > > > connectivity = > > label:{51x1} > dimord: 'chan_chan_freq' > pdcspctrm: [51x51x101] > freq: [1x101 double] > cfg: [1x1 struct] > > > > > I have 51 channels in my analysis. I want to find out the outflow from frontal > to parietal regions. > So what I did next was defining which channels belong to frontal and which > to parietal regions (note: the sensor layout of the sensor net is really > random), e.g.: > > > > Frontal = { 'E5' 'E6' 'E197' 'E198'} > Parietal = { 'E77' 'E78' 'E89' 'E163'} > > > > > Next step: find outflow from each Frontal to each Parietal channels > > > In order to do this I need to look in "connectivity.pdspctrm" for the pdc > value: > > find all the channels in "Frontal" and "Parietal" in the original "connectivity" in > order to find there the corresponding pdc values: > > > "frontal" is a vector with indices of the channels in the connectivity.label > channel list (same with "parietal") > > frontal = zeros(4,1) > > for l=1:4 > channelposition = find(ismember(connectivity.label, Frontal{l}) == 1); > if isfinite(channelposition); > > if isfinite (ismember(connectivity.label, Frontal{l}) == 1, frontal (l,1) = > find(ismember(connectivity.label, Frontal{l}) ==1); else frontal(l,1) = NaN; > end > > else > end > end > > > > I get: frontal = > > 1 > 2 > 10 > 11 > > parietal = zeros(4,1) > > for l=1:4 > channelposition = find(ismember(connectivity.label, Parietal {l}) == 1); > if isfinite(channelposition); > > if isfinite (ismember(connectivity.label, Parietal{l}) == 1, parietal (l,1) = > find(ismember(connectivity.label, Parietal{l}) ==1); else parietal(l,1) = NaN; > end > > else > end > end > > > > I get: parietal = > > 9 > 14 > 20 > 31 > > > If I want to know now the outflow from E5 to E77 i would have to enter this > as follows: > > Outflow = connectivity.pdcsptrm(1,9,5) %5 is here just an example for the > frequency of interest > > and I would get a value, e.g. > > ans = 0.567 > > (This worked totally fine!) > > > > > >>>>>>>>>>>>>Now my Problem: <<<<<<<<<<<<<< > > I don't want to know the outflow from a single electrode to another, but the > average outflow from frontal to parietal for the whole Alpha frequencyband: > > So my line of code would look like this: > > > Outflow = connectivity.pdcspctrm(frontal',parietal',5:16) > > > > I tried eval (eventhough it is not elegant, but it's the only thing I could think > about that might work): > > > > Outflow = eval ([ 'mean(mean(mean(connectivity.pdcspctrm(' > num2str(frontal') ',' num2str(parietal'), 5:16))))' ]) > > > When I enter it as follows: > > Outflow = mean(mean(mean(connectivity.pdcspctrm([1 2 10 11], [9 14 20 > 31], 5:16)))) > > it works fine. > > > > But the vectors frontal and parietal will contain upt to 30 indices each, so > typing them is not an option. > > I tried everything else I could think of (different parethesis etc.). > > Maybe someone can help me out here?? > > Thanks a lot!! > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m_wink10 at uni-muenster.de Mon Feb 23 17:00:48 2015 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Mon, 23 Feb 2015 17:00:48 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS Message-ID: Dear Fieldtrippers, we encountered a problem during our DICS Beamformer-Statistics. After calculating a beamformer (DICS), normalisation and building grandaverages across subjects (here exemplarily 3 subjects) we try to calculate cluster based permutation statistic (in this study: between groups - one condition). The code we used is as follows: cfg = []; cfg.method = 'montecarlo'; %cfg.statistic = 'depsamplesT'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; %ft default 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; %ft hat hier 0,025 cfg.parameter = 'pow'; cfg.dim = grandavgA.dim; cfg.numrandomization = 1; % number of draws from the permutation distribution design(1,:) = [1 1 1 2 2 2]; design(2,:) = [1 1 1 1 1 1]; cfg.design = design; cfg.ivar = 1; stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); The input data structure (grandavgA, grandavgB) is as follows: grandavgA = pow: [3x116380 double] dim: [46 55 46] inside: [116380x1 logical] pos: [116380x3 double] cfg: [1x1 struct] grandavgB = pow: [3x116380 double] dim: [46 55 46] inside: [116380x1 logical] pos: [116380x3 double] cfg: [1x1 struct] Fieldtrip version: current (02/23/2015) Thanks, Martin -- M.Sc. Martin Winkels Universitätsklinikum Münster Institut für Biomagnetismus & Biosignalanalyse Malmedyweg 15 48149 Münster GERMANY Telefon: +49 251 83 56 846 Web: http://biomag.uni-muenster.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Mon Feb 23 17:14:48 2015 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 23 Feb 2015 17:14:48 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS In-Reply-To: References: Message-ID: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> Dear Martin, what kind of machine are you using? Did you interpolate your data to an MRI? What is your grid resolution? You have quite a high number of grid points that you want to compare. So in case you run out of memory, I'd suggest not interpolating to an MRI (in case you have done this) but to stay on the grid-point level for your stats. Otherwise, you could use a less dense grid which obviously results in smaller data structures. Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 23.02.2015 um 17:00 schrieb Martin Winkels: > Dear Fieldtrippers, > > we encountered a problem during our DICS Beamformer-Statistics. > > After calculating a beamformer (DICS), normalisation and building grandaverages across subjects (here exemplarily 3 subjects) we try to calculate cluster based permutation statistic (in this study: between groups - one condition). > > The code we used is as follows: > > cfg = []; > > cfg.method = 'montecarlo'; > %cfg.statistic = 'depsamplesT'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; %ft default 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; %ft hat hier 0,025 > > cfg.parameter = 'pow'; > cfg.dim = grandavgA.dim; > > cfg.numrandomization = 1; % number of draws from the permutation distribution > > design(1,:) = [1 1 1 2 2 2]; > design(2,:) = [1 1 1 1 1 1]; > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); > > > > The input data structure (grandavgA, grandavgB) is as follows: > > grandavgA = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > grandavgB = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > > Fieldtrip version: current (02/23/2015) > > > Thanks, Martin > > -- > > M.Sc. Martin Winkels > > Universitätsklinikum Münster > > Institut für Biomagnetismus & Biosignalanalyse > > Malmedyweg 15 > > 48149 Münster > > GERMANY > > > Telefon: +49 251 83 56 846 > > Web: http://biomag.uni-muenster.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From lysne at unm.edu Mon Feb 23 18:37:04 2015 From: lysne at unm.edu (Per Arnold Lysne) Date: Mon, 23 Feb 2015 17:37:04 +0000 Subject: [FieldTrip] ft_megrealign with source localization? Message-ID: <1424713017019.6820@unm.edu> Hello All, Apologies for reintroducing a question which has previously been covered: that of using ft_megrealign on data which is intended for use in MEG source localization. My understanding is that this algorithm changes the covariance structure between the channels in such a way that localizations may be unstable afterwards (http://mailman.science.ru.nl/pipermail/fieldtrip/2012-May/005231.html). Additionally, the handful of published works using ft_megrealign appear to all be sensor-level analyses (5-6 unique results for "ft_megrealign" from google scholar). Nonetheless, I am trying to develop a group procedure for the tf_mixed_norm sparse localization algorithm in MNE-Python (Gramfort et al. 2013) , and it would be enormously beneficial to have the subjects "virtualized" onto a common head position (and shape, but this problem might also be solved separately) so that their sensor-level measurement data could be combined into a grand average prior to localization. So my questions are, how detrimental might the ft_megrealign algorithm be expected to be to source localization, particularly a sparse localization such as the one I am using? In my application a minor loss of precision would be acceptable, but the localizations need to remain generally correct. Does anyone know of an alternative way to achieve "virtualized" data in a common head position that might be more suitable? (I also need to avoid the assumption of temporal stationarity.) Thank you for your help, Per Lysne University of New Mexico -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Mon Feb 23 20:52:10 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Mon, 23 Feb 2015 21:52:10 +0200 Subject: [FieldTrip] problems with ft_read_data Message-ID: Hello Fieldtrippers, I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. While running ft_read_data on an mff, I've encounter following bug index exceeds matrix dimensions. Error in ft_read_data (line 787) dat{end} = dat{end}(:,begsel:endsel); Data sampling is 1000 hz. Would appreciate your help. If any further information is needed, please ask me. Thanks, -- Shlomit Beker, PhD Postdoctoral fellow, Nir lab Sackler Faculty of Medicine Tel Aviv University -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Mon Feb 23 21:09:15 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Mon, 23 Feb 2015 15:09:15 -0500 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: References: Message-ID: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> Hi Shlomit, I have a feeling that your file ends before your post sample. For example, if your trial definition has .2 ms pre and 1.0 post, you don't have 1000 samples after your last event. You can use ft_read_event to confirm. Best, Raquel Sent from my iPhone > On Feb 23, 2015, at 2:52 PM, shlomit beker wrote: > > Hello Fieldtrippers, > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. > > While running ft_read_data on an mff, I've encounter following bug > > index exceeds matrix dimensions. > > Error in ft_read_data (line 787) > dat{end} = dat{end}(:,begsel:endsel); > > Data sampling is 1000 hz. > Would appreciate your help. If any further information is needed, please ask me. > > Thanks, > > -- > Shlomit Beker, PhD > Postdoctoral fellow, Nir lab > Sackler Faculty of Medicine > Tel Aviv University > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Mon Feb 23 22:00:33 2015 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Mon, 23 Feb 2015 23:00:33 +0200 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> References: <56ECD894-D25F-4BB3-A870-5F75FEBBE765@gmail.com> Message-ID: <4077A3AD-A067-436A-BA49-1F3008DF7F42@gmail.com> Hi Raquel, Thanks for the response. I run ft_read_data before and segmentation to trials. I just want to read the raw data in a matrix. Do you have any other ideas? Thanks! Shlomit ‫ב-23 בפבר 2015, בשעה 22:09, ‏Raquel Bibi כתב/ה:‬ > Hi Shlomit, > I have a feeling that your file ends before your post sample. For example, if your trial definition has .2 ms pre and 1.0 post, you don't have 1000 samples after your last event. You can use ft_read_event to confirm. > > Best, > > Raquel > > Sent from my iPhone > >> On Feb 23, 2015, at 2:52 PM, shlomit beker wrote: >> >> Hello Fieldtrippers, >> >> I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use fieldtrip functions on the mff format. >> >> While running ft_read_data on an mff, I've encounter following bug >> >> index exceeds matrix dimensions. >> >> Error in ft_read_data (line 787) >> dat{end} = dat{end}(:,begsel:endsel); >> >> Data sampling is 1000 hz. >> Would appreciate your help. If any further information is needed, please ask me. >> >> Thanks, >> >> -- >> Shlomit Beker, PhD >> Postdoctoral fellow, Nir lab >> Sackler Faculty of Medicine >> Tel Aviv University >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From kumar at cbs.mpg.de Tue Feb 24 15:33:15 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Tue, 24 Feb 2015 15:33:15 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> Hello fieldtrippers, I have a question which I could not find has been answered. I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) I am using mne to localize the source. The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. Code: %% load MRI data %%%%%%%% mri = ft_read_mri('Subject01.mri'); % convert the coordinate system mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni mri.coordsys = 'mni'; %% Volume segmentation %%%%%%%% cfg = []; cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); % it takes some time. %% creating the head model %%%%%%%% cfg = []; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, seg); %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% %load elec_new cfg = []; cfg.method = 'interactive'; cfg.elec = elec_new; cfg.headshape = vol.bnd(3); elec_aligned = ft_electroderealign(cfg); %% make grid %%%%%%%% cfg = []; cfg.vol = vol; cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution cfg.grid.unit = 'cm'; grid = ft_prepare_leadfield(cfg); % %%%%%%%% Check the full model %%%%%%% % grid.pos = grid.pos * 10; % elec_aligned.chanpos = elec_aligned.chanpos*100; % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% source analysis %%%%%%%% cfg = []; cfg.method = 'mne'; cfg.vol = vol; cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; cfg.grid = grid; cfg.mne.lambda = 3; cfg.mne.prewhiten = 'yes'; cfg.mne.scalesourcecov = 'yes'; source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data %% Interpolation of the localized source with the mri %%%%%%%% mri_reslice = ft_volumereslice([],mri); cfg=[]; cfg.parameter = 'pow'; source_int = ft_sourceinterpolate(cfg, source, mri_reslice); %% Visualization (Orthogonal plot) %%%%%%%% cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'pow'; cfg.funcolormap = 'jet'; cfg.maskparameter = cfg.funparameter; ft_sourceplot(cfg, source_int_admit); % (figure attached) ---------------------------------------------------- Thanks for your time, Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig -------------- next part -------------- A non-text attachment was scrubbed... Name: 03 PM.jpg Type: image/jpeg Size: 228015 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Tue Feb 24 15:41:30 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 24 Feb 2015 15:41:30 +0100 Subject: [FieldTrip] source localization only at the edges In-Reply-To: References: Message-ID: Dear Saurabh, Without having gone through the details of your code, my hunch is that this has something to do with the units (m/cm/mm) of your geometrical objects (electrode/gradiometer description, volume conduction model, source model). You could explicitly convert them all to the same using ft_convert_units([data.grad|vol|source], 'm') and then try again, perhaps that helps? Best, Eelke On 24 February 2015 at 15:33, Saurabh Kumar wrote: > Hello fieldtrippers, > > I have a question which I could not find has been answered. > I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) > > I am using mne to localize the source. > The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. > > Code: > > %% load MRI data %%%%%%%% > mri = ft_read_mri('Subject01.mri'); > % convert the coordinate system > mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni > mri.coordsys = 'mni'; > > > %% Volume segmentation %%%%%%%% > cfg = []; > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); % it takes some time. > > > %% creating the head model %%%%%%%% > cfg = []; > cfg.method ='bemcp'; > vol = ft_prepare_headmodel(cfg, seg); > > > %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% > %load elec_new > cfg = []; > cfg.method = 'interactive'; > cfg.elec = elec_new; > cfg.headshape = vol.bnd(3); > elec_aligned = ft_electroderealign(cfg); > > %% make grid %%%%%%%% > cfg = []; > cfg.vol = vol; > cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; > cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution > cfg.grid.unit = 'cm'; > grid = ft_prepare_leadfield(cfg); > > > > % %%%%%%%% Check the full model %%%%%%% > % grid.pos = grid.pos * 10; > % elec_aligned.chanpos = elec_aligned.chanpos*100; > % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); > % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > > %% source analysis %%%%%%%% > cfg = []; > cfg.method = 'mne'; > cfg.vol = vol; > cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; > cfg.grid = grid; > cfg.mne.lambda = 3; > cfg.mne.prewhiten = 'yes'; > cfg.mne.scalesourcecov = 'yes'; > source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data > > %% Interpolation of the localized source with the mri %%%%%%%% > mri_reslice = ft_volumereslice([],mri); > cfg=[]; > cfg.parameter = 'pow'; > source_int = ft_sourceinterpolate(cfg, source, mri_reslice); > > %% Visualization (Orthogonal plot) %%%%%%%% > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'pow'; > cfg.funcolormap = 'jet'; > cfg.maskparameter = cfg.funparameter; > ft_sourceplot(cfg, source_int_admit); % (figure attached) > > > > > ---------------------------------------------------- > Thanks for your time, > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig From kumar at cbs.mpg.de Tue Feb 24 16:13:10 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Tue, 24 Feb 2015 16:13:10 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <1761066429.1447014.1424790790305.JavaMail.zimbra@cbs.mpg.de> Dear Eelke I checked again the units of mri, leadfield, electrode positions and the volume and all seem to be in harmony. I also think that even though you dont specify them explicitely they are adjusted to a common one as the results remain exactly the same as I just checked. Do you have any idea what else could be the problem? ---------------------------------------------------- Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig From m_wink10 at uni-muenster.de Tue Feb 24 22:57:00 2015 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Tue, 24 Feb 2015 22:57:00 +0100 Subject: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS In-Reply-To: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> References: <303DCD7C-D94C-4A1D-B744-2D10CEA41E3E@gmail.com> Message-ID: Hey Julian, thanks for the answer. We are using some sort of an Intel iCore i7 with 16 GB of RAM as well as 40 GB of swap and Fedora 16. We do interpolate the data on an MRI. In fact I'm not sure if that is the source of the problem. We downsampled the data and it did not change anything. The problem seems to be that there is a number generated that is too big for MATLAB to process it with the zeros(x) instruction. Around 1-2 years ago I did nearly the same thing in fieldtrip but including an LCMV-Beamformer, the resulting data structures where much bigger and it worked without a problem. Thanks, Martin On Mon, Feb 23, 2015 at 5:14 PM, Julian Keil wrote: > Dear Martin, > > what kind of machine are you using? > Did you interpolate your data to an MRI? > What is your grid resolution? > > You have quite a high number of grid points that you want to compare. > So in case you run out of memory, I'd suggest not interpolating to an MRI > (in case you have done this) but to stay on the grid-point level for your > stats. Otherwise, you could use a less dense grid which obviously results > in smaller data structures. > > Good luck, > > Julian > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 23.02.2015 um 17:00 schrieb Martin Winkels: > > Dear Fieldtrippers, > > we encountered a problem during our DICS Beamformer-Statistics. > > After calculating a beamformer (DICS), normalisation and building > grandaverages across subjects (here exemplarily 3 subjects) we try to > calculate cluster based permutation statistic (in this study: between > groups - one condition). > > The code we used is as follows: > > cfg = []; > > cfg.method = 'montecarlo'; > %cfg.statistic = 'depsamplesT'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; %ft default 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; %ft hat hier 0,025 > > cfg.parameter = 'pow'; > cfg.dim = grandavgA.dim; > > cfg.numrandomization = 1; % number of draws from the > permutation distribution > > design(1,:) = [1 1 1 2 2 2]; > design(2,:) = [1 1 1 1 1 1]; > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); > > > > The input data structure (grandavgA, grandavgB) is as follows: > > grandavgA = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > grandavgB = > > pow: [3x116380 double] > dim: [46 55 46] > inside: [116380x1 logical] > pos: [116380x3 double] > cfg: [1x1 struct] > > > Fieldtrip version: current (02/23/2015) > > > Thanks, Martin > > -- > > M.Sc. Martin Winkels > > Universitätsklinikum Münster > > Institut für Biomagnetismus & Biosignalanalyse > > Malmedyweg 15 > > 48149 Münster > > GERMANY > > > Telefon: +49 251 83 56 846 > Web: http://biomag.uni-muenster.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Wed Feb 25 14:22:30 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 25 Feb 2015 13:22:30 +0000 Subject: [FieldTrip] source localization only at the edges Message-ID: I would like to see an answer to this also. I am in the middle of Œbeginning¹ to use FT for mne and eloreta. I had the same issue, and then used ³depth normalization², since mne tends to have only surface results. I read on the www (google mne depth normalization) that this might be an issue, and tried: cfg.normalizeparam=5; cfg.normalize='yes'; I got Œdepth¹ results to my mne¹s and eloreta solutions, though I am not sure if I have accurate results. I can¹t find any use of these in the examples. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** On 2/25/15, 6:00 AM, "fieldtrip-request at science.ru.nl" wrote: >Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > >To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > >You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of fieldtrip digest..." > > >Today's Topics: > > 1. Re: source localization only at the edges (Eelke Spaak) > 2. source localization only at the edges (Saurabh Kumar) > 3. Re: ft_clusterstat OUT OF MEMORY - DICS (Martin Winkels) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Tue, 24 Feb 2015 15:41:30 +0100 >From: Eelke Spaak >To: FieldTrip discussion list >Subject: Re: [FieldTrip] source localization only at the edges >Message-ID: > >Content-Type: text/plain; charset=UTF-8 > >Dear Saurabh, > >Without having gone through the details of your code, my hunch is that >this has something to do with the units (m/cm/mm) of your geometrical >objects (electrode/gradiometer description, volume conduction model, >source model). You could explicitly convert them all to the same using >ft_convert_units([data.grad|vol|source], 'm') and then try again, >perhaps that helps? > >Best, >Eelke > >On 24 February 2015 at 15:33, Saurabh Kumar wrote: >> Hello fieldtrippers, >> >> I have a question which I could not find has been answered. >> I am doing source localization for my data and the problem is that no >>matter the data, (even random numbers) the source always comes out at >>the edges of the mri. (Figure attached) >> >> I am using mne to localize the source. >> The code in short is attached below which I use. Please have a look and >>lemme know if you find something that can be changed. >> >> Code: >> >> %% load MRI data %%%%%%%% >> mri = ft_read_mri('Subject01.mri'); >> % convert the coordinate system >> mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system >>from the ctf into the mni >> mri.coordsys = 'mni'; >> >> >> %% Volume segmentation %%%%%%%% >> cfg = []; >> cfg.output = {'brain','skull','scalp'}; >> seg = ft_volumesegment(cfg, mri); % it takes some time. >> >> >> %% creating the head model %%%%%%%% >> cfg = []; >> cfg.method ='bemcp'; >> vol = ft_prepare_headmodel(cfg, seg); >> >> >> %% setting the electrodes (have checked the electrodes are in correct >>positions) %%%%%%%% >> %load elec_new >> cfg = []; >> cfg.method = 'interactive'; >> cfg.elec = elec_new; >> cfg.headshape = vol.bnd(3); >> elec_aligned = ft_electroderealign(cfg); >> >> %% make grid %%%%%%%% >> cfg = []; >> cfg.vol = vol; >> cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; >> cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution >> cfg.grid.unit = 'cm'; >> grid = ft_prepare_leadfield(cfg); >> >> >> >> % %%%%%%%% Check the full model %%%%%%% >> % grid.pos = grid.pos * 10; >> % elec_aligned.chanpos = elec_aligned.chanpos*100; >> % ft_plot_mesh(grid.pos(grid.inside,:));hold >>on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold >>on; ft_plot_sens(elec_aligned); >> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> >> >> >> >> %% source analysis %%%%%%%% >> cfg = []; >> cfg.method = 'mne'; >> cfg.vol = vol; >> cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; >> cfg.grid = grid; >> cfg.mne.lambda = 3; >> cfg.mne.prewhiten = 'yes'; >> cfg.mne.scalesourcecov = 'yes'; >> source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data >> >> %% Interpolation of the localized source with the mri %%%%%%%% >> mri_reslice = ft_volumereslice([],mri); >> cfg=[]; >> cfg.parameter = 'pow'; >> source_int = ft_sourceinterpolate(cfg, source, mri_reslice); >> >> %% Visualization (Orthogonal plot) %%%%%%%% >> cfg = []; >> cfg.method = 'ortho'; >> cfg.funparameter = 'pow'; >> cfg.funcolormap = 'jet'; >> cfg.maskparameter = cfg.funparameter; >> ft_sourceplot(cfg, source_int_admit); % (figure attached) >> >> >> >> >> ---------------------------------------------------- >> Thanks for your time, >> Saurabh Kumar >> >> Cognitive Neurology >> Max Planck Institute >> for Human Cognitive and Brain Sciences >> Stephanstr. 1a >> 04103 Leipzig > > >------------------------------ > >Message: 2 >Date: Tue, 24 Feb 2015 16:13:10 +0100 (CET) >From: Saurabh Kumar >To: fieldtrip >Subject: [FieldTrip] source localization only at the edges >Message-ID: > <1761066429.1447014.1424790790305.JavaMail.zimbra at cbs.mpg.de> >Content-Type: text/plain; charset=utf-8 > >Dear Eelke > >I checked again the units of mri, leadfield, electrode positions and the >volume and all seem to be in harmony. >I also think that even though you dont specify them explicitely they are >adjusted to a common one as the results remain exactly the same as I just >checked. > >Do you have any idea what else could be the problem? > >---------------------------------------------------- >Saurabh Kumar > >Cognitive Neurology >Max Planck Institute >for Human Cognitive and Brain Sciences >Stephanstr. 1a >04103 Leipzig > > >------------------------------ > >Message: 3 >Date: Tue, 24 Feb 2015 22:57:00 +0100 >From: Martin Winkels >To: FieldTrip discussion list >Subject: Re: [FieldTrip] ft_clusterstat OUT OF MEMORY - DICS >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Hey Julian, > >thanks for the answer. > >We are using some sort of an Intel iCore i7 with 16 GB of RAM as well as >40 >GB of swap and Fedora 16. > >We do interpolate the data on an MRI. In fact I'm not sure if that is the >source of the problem. We downsampled the data and it did not change >anything. The problem seems to be that there is a number generated that is >too big for MATLAB to process it with the zeros(x) instruction. > >Around 1-2 years ago I did nearly the same thing in fieldtrip but >including >an LCMV-Beamformer, the resulting data structures where much bigger and it >worked without a problem. > >Thanks, Martin > >On Mon, Feb 23, 2015 at 5:14 PM, Julian Keil >wrote: > >> Dear Martin, >> >> what kind of machine are you using? >> Did you interpolate your data to an MRI? >> What is your grid resolution? >> >> You have quite a high number of grid points that you want to compare. >> So in case you run out of memory, I'd suggest not interpolating to an >>MRI >> (in case you have done this) but to stay on the grid-point level for >>your >> stats. Otherwise, you could use a less dense grid which obviously >>results >> in smaller data structures. >> >> Good luck, >> >> Julian >> >> ******************** >> *Dr. Julian Keil* >> >> AG Multisensorische Integration >> Psychiatrische Universit?tsklinik >> der Charit? im St. Hedwig-Krankenhaus >> Gro?e Hamburger Stra?e 5-11, Raum E 307 >> 10115 Berlin >> >> Telefon: +49-30-2311-1879 >> Fax: +49-30-2311-2209 >> >> >>http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integr >>ation >> >> Am 23.02.2015 um 17:00 schrieb Martin Winkels: >> >> Dear Fieldtrippers, >> >> we encountered a problem during our DICS Beamformer-Statistics. >> >> After calculating a beamformer (DICS), normalisation and building >> grandaverages across subjects (here exemplarily 3 subjects) we try to >> calculate cluster based permutation statistic (in this study: between >> groups - one condition). >> >> The code we used is as follows: >> >> cfg = []; >> >> cfg.method = 'montecarlo'; >> %cfg.statistic = 'depsamplesT'; >> cfg.statistic = 'ft_statfun_indepsamplesT'; >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; %ft default 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; %ft hat hier 0,025 >> >> cfg.parameter = 'pow'; >> cfg.dim = grandavgA.dim; >> >> cfg.numrandomization = 1; % number of draws from the >> permutation distribution >> >> design(1,:) = [1 1 1 2 2 2]; >> design(2,:) = [1 1 1 1 1 1]; >> >> cfg.design = design; >> cfg.ivar = 1; >> >> stat = ft_sourcestatistics(cfg, grandavgA, grandavgB); >> >> >> >> The input data structure (grandavgA, grandavgB) is as follows: >> >> grandavgA = >> >> pow: [3x116380 double] >> dim: [46 55 46] >> inside: [116380x1 logical] >> pos: [116380x3 double] >> cfg: [1x1 struct] >> >> grandavgB = >> >> pow: [3x116380 double] >> dim: [46 55 46] >> inside: [116380x1 logical] >> pos: [116380x3 double] >> cfg: [1x1 struct] >> >> >> Fieldtrip version: current (02/23/2015) >> >> >> Thanks, Martin >> >> -- >> >> M.Sc. Martin Winkels >> >> Universit?tsklinikum M?nster >> >> Institut f?r Biomagnetismus & Biosignalanalyse >> >> Malmedyweg 15 >> >> 48149 M?nster >> >> GERMANY >> >> >> Telefon: +49 251 83 56 846 >> Web: http://biomag.uni-muenster.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: >a249f/attachment-0001.html> > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 51, Issue 24 >***************************************** From r.oostenveld at donders.ru.nl Wed Feb 25 17:57:43 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 25 Feb 2015 17:57:43 +0100 Subject: [FieldTrip] job opportunities at NeuroSpin, France References: Message-ID: Dear FieldTrip users On behalf of Aaron Schurger, please find below a number of opportunities for MSc, PhD and PostDoc positions at NeuroSpin. best regards, Robert Contact information: Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ ----------------------------------------------------------------------------- Masters and PhD positions in cognitive neuroscience Neural antecedents of spontaneous self-initiated movement in humans and the perception of personal causation Starting date: Fall 2015 or Spring 2016 Duration: 3 years for PhD, 1 or 2 years for masters The French Institute of Health and Medical Research (INSERM) invites applications for masters and PhD positions in the Cognitive Neuroimaging Group, at the NeuroSpin Research Center near Paris, France, as part of the research team of Dr. Aaron Schurger. The Schurger lab focuses on understanding how decisions are made and actions initiated spontaneously, without an external sensory cue, and how the relevant causal processes in the brain are related to the subjective perception of personal causation and societal concepts of personal responsibility. We pursue this research using a combination of behavioral experiments, neuroimaging, computational modeling, and machine learning techniques. There are no specific requirements other than a bachelors degree (for masters applicants) and a masters degree (for PhD applicants) in a relevant discipline. Previous research experience is a plus. Skills used in the lab include: computer programming (MatLab, Python, C, C++), statistics, signal processing, computational and neural network modeling, neuroimaging techniques (EEG, MEG, fMRI) and data-analysis software tools, behavioral psychophysics. Resources available at NeuroSpin include Siemens 3T and 7T MRI scanners; high-density EEG (EGI Inc.); Elekta NeuroMag 306-channel MEG (allowing for the simultaneous recording of EEG); eye tracking (available for MRI, MEG, and behavioral experiments); an in-house team of experts in signal processing and statistical learning; a dedicated staff handling subject recruitment, scheduling, and payment; various Nespresso devices; and proximity to Paris. The salary is highly competitive. Applicants should send a CV, letter of motivation (max 2 pages), and three letters of recommendation via e-mail to aaron.schurger at gmail.com. Review of applicants will begin on the 1st of April, 2015, and will continue until the positions are filled. The NeuroSpin Research Center is located on the campus of the CEA-Saclay, near Orsay, about 18 km southwest of Paris. For more information on the NeuroSpin Research Center and the Cognitive Neuroimaging Group: http://www-centre-saclay.cea.fr/fr/Visite-guidee-de-NeuroSpin http://meg-france.in2p3.fr/_lesCentres/Neurospin_en.php http://www-dsv.cea.fr/en/institutes/institute-of-biomedical-imaging-i2bm/departments/neurospin-neurospin http://www.unicog.org/pm/pmwiki.php ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Post-doctoral position in cognitive neuroscience Neural antecedents of spontaneous self-initiated movement in humans and the perception of personal causation Starting date: Fall 2015 or Spring 2016 Duration: 2 years (renewable for one additional year) The French Institute of Health and Medical Research (INSERM) invites applications for a post-doctoral position in the Cognitive Neuroimaging Group, at the NeuroSpin Research Center near Paris, France, as part of the research team of Dr. Aaron Schurger. The Schurger lab focuses on understanding how decisions are made and actions initiated spontaneously, without an external sensory cue, and how the relevant causal processes in the brain are related to the subjective perception of personal causation and societal concepts of personal responsibility. We pursue this research using a combination of behavioral experiments, neuroimaging, computational modeling, and machine learning techniques. Applicants should have a obtained a PhD in a relevant discipline prior to the starting date, and should have strong skills in at least some of the following areas: computer programming (MatLab, Python, C, C++), statistics, signal processing, computational and neural network modeling, neuroimaging techniques (EEG, MEG, fMRI) and data-analysis tools, behavioral psychophysics. Resources available at NeuroSpin include Siemens 3T and 7T MRI scanners; high-density EEG (EGI Inc.); Elekta NeuroMag 306-channel MEG (allowing for the simultaneous recording of EEG); eye tracking (available for MRI, MEG, and behavioral experiments); an in-house team of experts in signal processing and statistical learning; a dedicated staff handling subject recruitment, scheduling, and payment; various Nespresso devices; and proximity to Paris. The salary is highly competitive, being aligned with that offered by Marie Curie fellowships. Applicants should send a CV, letter of motivation (max 2 pages), and three letters of recommendation via e-mail to aaron.schurger at gmail.com. Review of applicants will begin on April 1, 2015, and will continue until the positions are filled. The NeuroSpin Research Center is located on the campus of the CEA-Saclay, near Orsay, about 18 km southwest of Paris. For more information on the NeuroSpin Research Center and the Cognitive Neuroimaging Group: http://www-centre-saclay.cea.fr/fr/Visite-guidee-de-NeuroSpin http://meg-france.in2p3.fr/_lesCentres/Neurospin_en.php http://www-dsv.cea.fr/en/institutes/institute-of-biomedical-imaging-i2bm/departments/neurospin-neurospin http://www.unicog.org/pm/pmwiki.php ----------------------------------------------------------------------------- From jim.mckay at candoosys.com Wed Feb 25 22:40:23 2015 From: jim.mckay at candoosys.com (Jim McKay) Date: Wed, 25 Feb 2015 13:40:23 -0800 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit Message-ID: <54EE4147.9090408@candoosys.com> Hello Fieldtrippers, I am consulting with the Sandia Labs on development of an atomic magnetometer based MEG system prototype. One of the areas I am working on is head localization, so I was looking at the code for the realtime head localization in Fieldtrip. I was surprised to see that although the comments talk about using a magnetic dipole forward solution, it actually used the FT dipolefit code which is based on an equivalent current dipole, as far as I can tell. There should be a significant difference in the forward solutions between MD and ECD, so how does this work? Or am I just missing something? Cheers, Jim -- Jim McKay Candoo Systems Inc. - Magnetic field sensors, systems, and site surveys Tel. 778-840-0361 jim.mckay at candoosys.com www.candoosys.com From tyler.grummett at flinders.edu.au Thu Feb 26 00:40:29 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Wed, 25 Feb 2015 23:40:29 +0000 Subject: [FieldTrip] source localization only at the edges In-Reply-To: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> References: <2120947625.1443592.1424788395298.JavaMail.zimbra@cbs.mpg.de> Message-ID: Hello :) I've come across this issue myself a while back and for me it was because there were dipoles located outside the brain, but the code was telling me they were inside. Could this be happening to you? Tyler Sent from my iPhone > On 25 Feb 2015, at 1:06 am, Saurabh Kumar wrote: > > Hello fieldtrippers, > > I have a question which I could not find has been answered. > I am doing source localization for my data and the problem is that no matter the data, (even random numbers) the source always comes out at the edges of the mri. (Figure attached) > > I am using mne to localize the source. > The code in short is attached below which I use. Please have a look and lemme know if you find something that can be changed. > > Code: > > %% load MRI data %%%%%%%% > mri = ft_read_mri('Subject01.mri'); > % convert the coordinate system > mri = ft_convert_coordsys(mri,'mni'); %% convert the coordinate system from the ctf into the mni > mri.coordsys = 'mni'; > > > %% Volume segmentation %%%%%%%% > cfg = []; > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); % it takes some time. > > > %% creating the head model %%%%%%%% > cfg = []; > cfg.method ='bemcp'; > vol = ft_prepare_headmodel(cfg, seg); > > > %% setting the electrodes (have checked the electrodes are in correct positions) %%%%%%%% > %load elec_new > cfg = []; > cfg.method = 'interactive'; > cfg.elec = elec_new; > cfg.headshape = vol.bnd(3); > elec_aligned = ft_electroderealign(cfg); > > %% make grid %%%%%%%% > cfg = []; > cfg.vol = vol; > cfg.elec = elec_aligned; % sa_new_elec; % elec_aligned; > cfg.grid.resolution = 0.8; % a 3D grid with a part of cm resolution > cfg.grid.unit = 'cm'; > grid = ft_prepare_leadfield(cfg); > > > > % %%%%%%%% Check the full model %%%%%%% > % grid.pos = grid.pos * 10; > % elec_aligned.chanpos = elec_aligned.chanpos*100; > % ft_plot_mesh(grid.pos(grid.inside,:));hold on;ft_plot_mesh(vol.bnd(1),'edgecolor','none', 'facealpha',0.5); hold on; ft_plot_sens(elec_aligned); > % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > > %% source analysis %%%%%%%% > cfg = []; > cfg.method = 'mne'; > cfg.vol = vol; > cfg.elec = elec_aligned; % elec_aligned; % sa_new_elec; > cfg.grid = grid; > cfg.mne.lambda = 3; > cfg.mne.prewhiten = 'yes'; > cfg.mne.scalesourcecov = 'yes'; > source = ft_sourceanalysis(cfg,avg_data); % the data is in avg_data > > %% Interpolation of the localized source with the mri %%%%%%%% > mri_reslice = ft_volumereslice([],mri); > cfg=[]; > cfg.parameter = 'pow'; > source_int = ft_sourceinterpolate(cfg, source, mri_reslice); > > %% Visualization (Orthogonal plot) %%%%%%%% > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'pow'; > cfg.funcolormap = 'jet'; > cfg.maskparameter = cfg.funparameter; > ft_sourceplot(cfg, source_int_admit); % (figure attached) > > > > > ---------------------------------------------------- > Thanks for your time, > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig > <03 PM.jpg> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From kumar at cbs.mpg.de Thu Feb 26 12:11:15 2015 From: kumar at cbs.mpg.de (Saurabh Kumar) Date: Thu, 26 Feb 2015 12:11:15 +0100 (CET) Subject: [FieldTrip] source localization only at the edges Message-ID: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> Hello all, The problem may be because of the 'mne' that is used because I have changed the method to 'music' and now I have been able to obtain the sources in the inner parts of the brain too. This may give rise to another question as to which methos to use and I am still pondering on this. So, in short if you are stuck like me knowing that your headmodel is working fine and everything including the units and the electrode positions are fine then just change the method. ---------------------------------------------------- Saurabh Kumar Cognitive Neurology Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a 04103 Leipzig From ayobimpe2004 at hotmail.com Thu Feb 26 12:30:25 2015 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Thu, 26 Feb 2015 12:30:25 +0100 Subject: [FieldTrip] source localization only at the edges In-Reply-To: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> References: <85424010.39973.1424949075116.JavaMail.zimbra@cbs.mpg.de> Message-ID: I may be wrong but I disagree with changing method will locate sources inside the brain. The main problem has to come from head modeling ( lead fields, segmentation, conductivity assignment etc)if the head modeling or forward problem is done right, whatever method you use for inverse problem, it will be similar to one another. please check the forward problem againAzeez > Date: Thu, 26 Feb 2015 12:11:15 +0100 > From: kumar at cbs.mpg.de > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] source localization only at the edges > > Hello all, > > The problem may be because of the 'mne' that is used because I have changed the method to 'music' and now I have been able to obtain the sources in the inner parts of the brain too. > This may give rise to another question as to which methos to use and I am still pondering on this. > > So, in short if you are stuck like me knowing that your headmodel is working fine and everything including the units and the electrode positions are fine then just change the method. > > > ---------------------------------------------------- > Saurabh Kumar > > Cognitive Neurology > Max Planck Institute > for Human Cognitive and Brain Sciences > Stephanstr. 1a > 04103 Leipzig > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.wollbrink at wwu.de Thu Feb 26 15:05:23 2015 From: a.wollbrink at wwu.de (Andreas Wollbrink) Date: Thu, 26 Feb 2015 15:05:23 +0100 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: References: Message-ID: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> Hi Shlomit, I guess your problem is related to the fact the data storage format of EGI data recorded with Netstation 4.5.4 contains time scale values in nano seconds instead of micro seconds. A sanity check for that was missing in the ft_read_header function (after reporting this bug it is supposed to be fixed in the new fieldtrip version by tomorrow). You might give it a try to run your analysis again. At least for me it worked out after the 'bug' was fixed. Thanks, Andreas On Mon, 2015-02-23 at 21:52 +0200, shlomit beker wrote: > Hello Fieldtrippers, > > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use > fieldtrip functions on the mff format. > > > While running ft_read_data on an mff, I've encounter following bug > > > index exceeds matrix dimensions. > > Error in ft_read_data (line 787) > dat{end} = dat{end}(:,begsel:endsel); > > > > Data sampling is 1000 hz. > Would appreciate your help. If any further information is needed, > please ask me. > > > > Thanks, > > > -- > Shlomit Beker, PhD > Postdoctoral fellow, Nir lab > Sackler Faculty of Medicine > Tel Aviv University > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- ############################################# Andreas Wollbrink, Dipl.-Ing. Biomedical Engineer MEG / EEG Lab Manager Institute for Biomagnetism and Biosignalanalysis University Hospital, University of Muenster address: Malmedyweg 15, 48149 Muenster, Germany office: +49-251-83-52546 email: a.wollbrink at wwu.de website: http://biomag.uni-muenster.de From shlomitbeker at gmail.com Thu Feb 26 15:09:32 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Thu, 26 Feb 2015 16:09:32 +0200 Subject: [FieldTrip] problems with ft_read_data In-Reply-To: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> References: <1424959523.2675.71.camel@BIOMAG01.uni-muenster.de> Message-ID: Thanks Andreas, I will give it a try with the new FT version. Shlomit On Thu, Feb 26, 2015 at 4:05 PM, Andreas Wollbrink wrote: > Hi Shlomit, > > I guess your problem is related to the fact the data storage format of > EGI data recorded with Netstation 4.5.4 contains time scale values in > nano seconds instead of micro seconds. > > A sanity check for that was missing in the ft_read_header function > (after reporting this bug it is supposed to be fixed in the new > fieldtrip version by tomorrow). > > You might give it a try to run your analysis again. > At least for me it worked out after the 'bug' was fixed. > > Thanks, > Andreas > > > > > On Mon, 2015-02-23 at 21:52 +0200, shlomit beker wrote: > > Hello Fieldtrippers, > > > > > > I'm using netsataion 4.5.4 of EGI (256 sensors EEG), and use > > fieldtrip functions on the mff format. > > > > > > While running ft_read_data on an mff, I've encounter following bug > > > > > > index exceeds matrix dimensions. > > > > Error in ft_read_data (line 787) > > dat{end} = dat{end}(:,begsel:endsel); > > > > > > > > Data sampling is 1000 hz. > > Would appreciate your help. If any further information is needed, > > please ask me. > > > > > > > > Thanks, > > > > > > -- > > Shlomit Beker, PhD > > Postdoctoral fellow, Nir lab > > Sackler Faculty of Medicine > > Tel Aviv University > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > ############################################# > > Andreas Wollbrink, Dipl.-Ing. > Biomedical Engineer > > MEG / EEG Lab Manager > > Institute for Biomagnetism and Biosignalanalysis > University Hospital, University of Muenster > > address: Malmedyweg 15, 48149 Muenster, Germany > > office: +49-251-83-52546 > > email: a.wollbrink at wwu.de > website: http://biomag.uni-muenster.de > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Shlomit Beker, PhD Postdoctoral fellow, Nir lab Sackler Faculty of Medicine Tel Aviv University -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Thu Feb 26 15:13:51 2015 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Thu, 26 Feb 2015 15:13:51 +0100 Subject: [FieldTrip] Conditional trial definition Message-ID: Dear fieldtrippers, I would like to evaluate a reaction time experiment. Hence for me two types of trigger are of interest: the onset of the stimulus and the reaction to it. I found this function at the fieldtrip homepage: function [trl, event] = mytestfunction(cfg); hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); value = [event(find(strcmp('trigger', {event.type}))).value]'; sample = [event(find(strcmp('trigger', {event.type}))).sample]'; pretrig = -round(cfg.trialdef.pre * hdr.Fs); posttrig = round(cfg.trialdef.post * hdr.Fs); trl = []; for j = 1:(length(value)-1) trl1 = value(j); trl2 = value(j+1); if trl1==3 && trl2==5 trlbegin =sample(j) + pretrig; trlend = sample(j) + posttrig; offset =pretrig; newtrl = [trlbegin trlend offset]; trl = [trl; newtrl]; end end Creating the sample-matrix I get a long string (all values in one field without delimiter). I think it’s because my values are in string format (‘DI11’, ‘DIN1’, …). Does anyone have an idea, for example how to convert the string values to numbers in this case? Or an other advise for a solution of this problem. Looking forward to support! Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gugale at pop.com.br Thu Feb 26 15:27:42 2015 From: gugale at pop.com.br (gugale at pop.com.br) Date: Thu, 26 Feb 2015 11:27:42 -0300 Subject: [FieldTrip] Hemispheric comparison Message-ID: <20150226112742.Horde.xOOb_dns-7f73dqSoqH7zg6@webmail.pop.com.br> Hello, I am new in FieldTrip but I have learnt a lot in the mlast months! I would like to make an estatistical analysis in differences inter hemispheric. It means, compare the differences in ERP between left and right hemispheres, as also between anterior and posterior regiosn. I already have my timelockanalysis data. How should I do that in FieldTrip? Thank you very much for this toolbox and for your attention! Best regard, Gustavo L.E. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sapttrs at gmail.com Fri Feb 27 03:53:25 2015 From: sapttrs at gmail.com (Steve Patterson) Date: Thu, 26 Feb 2015 22:53:25 -0400 Subject: [FieldTrip] inconsistent chanunit for Neuromag data Message-ID: Hello, I noticed that fieldtrip produces inconsistent channel units when I read in Neuromag (vectorview) data. For example: %%%%%%%%%%%%%%%%%%%%%%%% cfg = []; cfg.dataset = 'example.fif'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'STI101'; cfg.trialdef.eventvalue = [17 18 20]; cfg.trialdef.prestim = 0.500; cfg.trialdef.poststim = 1.000; cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); disp(data.hdr.chanunit(1:6)); 'T/m' 'T/m' 'T' 'T/m' 'T/m' 'T' disp(data.grad.chanunit(1:6)); 'T' 'T' 'T' 'T' 'T' 'T' %%%%%%%%%%%%%%%%%%%%%%%% data.hdr.chanunit is correct and data.grad.chanunit is wrong. data.grad.chanunit must take precedence in further analysis, because I've noticed this causes problems downstream. For example, when using ft_dipolesimulation, the simulated data on the gradiometer channels is too small in amplitude by a factor of 1/(16.8E-3) (the distance between the gradiometer coil pair in meters). This is reflected in the grad.tra matrix, whose non-zero values are all 1's and -1's, whereas they should be 1's (magnetometers), and +/- 1/16.8E-3 (gradiometers). If you could fix this, it would be much appreciated! thanks, Steve From dboratyn at u.northwestern.edu Sat Feb 28 02:20:11 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Fri, 27 Feb 2015 19:20:11 -0600 Subject: [FieldTrip] ft_connectivityplot axis lables Message-ID: New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I’d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. Thank you! Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plotex.tiff Type: image/tiff Size: 18948 bytes Desc: not available URL: