From okba.bekhelifi at gmail.com Mon Jun 1 04:07:34 2015 From: okba.bekhelifi at gmail.com (Okba Bekhelifi) Date: Mon, 1 Jun 2015 04:07:34 +0200 Subject: [FieldTrip] Filedtrip Buffer with BCI2000 Message-ID: Hi! I'm working on BCI research projects, and I need to acquire data from gtec amplifiers, I'm trying to use the Fieldtrip buffer to do so, I followed the example tutorial on BCI2000 wiki but I didn't succeed, what I did was changing the SignalProcessing Port in the BCI2000 config to 1972 (same as for the buffer in Maltab) and run both the BCI2000 modules and the sample Matlab code, but I had an error message: Error using buffer ERROR: failed to create socket (1) Any help will be appreciated I'm using the latest version of both BCI2000 and FieldTrip Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathis.kaiser at charite.de Mon Jun 1 17:20:08 2015 From: mathis.kaiser at charite.de (Mathis Kaiser) Date: Mon, 1 Jun 2015 17:20:08 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <5565D5B6.8020805@gmail.com> References: <4E102991-AB38-44E6-AA60-780A723AFCE2@gmail.com> <5565D5B6.8020805@gmail.com> Message-ID: <556C7828.40903@charite.de> Dear Fieldtrip Users, I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? Thanks for any input, best wishes, Mathis Kaiser > %% tfr and wpli per subject > > cfg = []; > cfg.keeptrials = 'yes'; > cfg.output = 'fourier'; > cfg.foi = 2:20; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > > tfr4conn_ill = ft_freqanalysis(cfg, virt_ill); > tfr4conn_noill = ft_freqanalysis(cfg, virt_noill); > > cfg = []; > cfg.method = 'wpli_debiased'; > > wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill); > wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill); ### > % (I then load all individual datasets into two cell arrays - > all_wpli_ill and all_wpli_noill): > >> display(all_wpli_ill{1}) > label: {638x1 cell} > dimord: 'chan_chan_freq' > wpli_debiasedspctrm: [638x638x10 double] > freq: [1x10 double] > elec: [1x1 struct] > cfg: [1x1 struct] > ### > > %% statistics > > cfg = []; > cfg.parameter = 'wpli_debiasedspctrm'; > cfg.statistic = 'depsamplesT'; > cfg.method = 'montecarlo'; > cfg.correctm = 'cluster'; > cfg.frequency = [10 10]; > cfg.neighbours = []; % no spatial clustering > cfg.numrandomization = 1000; > cfg.correcttail = 'alpha'; > nSub = length(subj); > cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)]; > cfg.design(2,1:2*nSub) = [1:nSub 1:nSub]; > cfg.ivar = 1; > cfg.uvar = 2; > > stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:}); ### > >> display(stat) > > stat = > > prob: [638x638 double] > posclusters: [1x4662 struct] > posclusterslabelmat: [638x638 double] > posdistribution: [1x1000 double] > negclusters: [1x12943 struct] > negclusterslabelmat: [638x638 double] > negdistribution: [1x1000 double] > cirange: [638x638 double] > mask: [638x638 logical] > stat: [638x638 double] > ref: [638x638 double] > dimord: 'chan_chan' > label: {638x1 cell} > freq: 9.9602 > cfg: [1x1 struct] > From cmk0803 at hbf.re.kr Mon Jun 1 21:31:08 2015 From: cmk0803 at hbf.re.kr (=?UTF-8?B?7LWc66+46rK9?=) Date: Tue, 2 Jun 2015 04:31:08 +0900 Subject: [FieldTrip] Source localization of MEG resting state data Message-ID: Dear fieldtrip users, I tried using DICS beamforming on MEG resting state data of healthy controls. (e.g. no task, no baseline, eyes opened) I analyzed to localize oscillatory sources using beamformer techniques according to the following tutorial. (link: http://www.fieldtriptoolbox.org/tutorial/beamformer) However, the output image was weird to be considered as resting data. I would like someone to help me through source localization procedure. *Q1. Is there something wrong in my script as below? * cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [8 12]; cfg.tapsmofrq = 2; cfg.channel = {'MEG'}; cfg.keeptrials = 'yes'; fft_rest = ft_freqanalysis(cfg, data_clean); % resting state MEG data (after preprocessing) %% Computing the leadfield matrices cfg = []; cfg.grad = fft_rest.grad; cfg.vol = vol; % head model cfg.grid = grid; % source model cfg.keeptrials = 'yes'; cfg.normalize = 'yes'; cfg.channel = {'MEG'}; rest_grid = ft_prepare_leadfield(cfg); %% Source analysis cfg = []; cfg.frequency = 'all'; cfg.grad = fft_rest.grad; cfg.method = 'dics'; cfg.grid = rest_grid; cfg.vol = vol; cfg.keeptrials = 'yes'; cfg.keepfilter = 'yes'; cfg.dics.lambda = 0; cfg.dics.projectnoise = 'yes'; rest_source = ft_sourceanalysis(cfg, fft_rest); mri_slice = ft_volumereslice([], mri) %mri: volumesegmented mri cfg = []; cfg.parameter = 'avg.pow'; rest_sointer = ft_sourceinterpolate(cfg, rest_source, mri_slice); *Q2. Is there any way to check whether the beamforming is performed well?* Any help would be greatly appreciated. MK CHOE -- Mi Kyung CHOE Department of Brain & Cognitive Sciences, Seoul National University Human Brain Function Laboratory E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Tue Jun 2 10:28:32 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 2 Jun 2015 10:28:32 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556C7828.40903@charite.de> References: <4E102991-AB38-44E6-AA60-780A723AFCE2@gmail.com> <5565D5B6.8020805@gmail.com> <556C7828.40903@charite.de> Message-ID: <96076F4F-EFD9-4382-B128-924F680FD5EA@uni-konstanz.de> Hi Mathis, alternatively you could use ft_sourcestatistics. For this you should reduce your 600 x 600 x freq matrix to freq of interest first. Next, the resulting 600 x 600 matrix you’d reduce to 600 x 1 where each grid point has a mean connectivity value to all possible grid points. >From then on you could use ft_sourcestatistics and ft_sourceinterpolate to visualize. Good luck, Tzvetan > Dear Fieldtrip Users, > > I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: > > I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). > > The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. > > I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? > Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? > > Thanks for any input, best wishes, > Mathis Kaiser > >> %% tfr and wpli per subject >> >> cfg = []; >> cfg.keeptrials = 'yes'; >> cfg.output = 'fourier'; >> cfg.foi = 2:20; >> cfg.method = 'mtmfft'; >> cfg.taper = 'hanning'; >> >> tfr4conn_ill = ft_freqanalysis(cfg, virt_ill); >> tfr4conn_noill = ft_freqanalysis(cfg, virt_noill); >> >> cfg = []; >> cfg.method = 'wpli_debiased'; >> >> wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill); >> wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill); > ### >> % (I then load all individual datasets into two cell arrays - all_wpli_ill and all_wpli_noill): >> >> display(all_wpli_ill{1}) >> label: {638x1 cell} >> dimord: 'chan_chan_freq' >> wpli_debiasedspctrm: [638x638x10 double] >> freq: [1x10 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> > ### >> >> %% statistics >> >> cfg = []; >> cfg.parameter = 'wpli_debiasedspctrm'; >> cfg.statistic = 'depsamplesT'; >> cfg.method = 'montecarlo'; >> cfg.correctm = 'cluster'; >> cfg.frequency = [10 10]; >> cfg.neighbours = []; % no spatial clustering >> cfg.numrandomization = 1000; >> cfg.correcttail = 'alpha'; >> nSub = length(subj); >> cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)]; >> cfg.design(2,1:2*nSub) = [1:nSub 1:nSub]; >> cfg.ivar = 1; >> cfg.uvar = 2; >> >> stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:}); > ### >> >> display(stat) >> >> stat = >> >> prob: [638x638 double] >> posclusters: [1x4662 struct] >> posclusterslabelmat: [638x638 double] >> posdistribution: [1x1000 double] >> negclusters: [1x12943 struct] >> negclusterslabelmat: [638x638 double] >> negdistribution: [1x1000 double] >> cirange: [638x638 double] >> mask: [638x638 logical] >> stat: [638x638 double] >> ref: [638x638 double] >> dimord: 'chan_chan' >> label: {638x1 cell} >> freq: 9.9602 >> cfg: [1x1 struct] >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tzvetan.popov at uni-konstanz.de Tue Jun 2 10:37:09 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 2 Jun 2015 10:37:09 +0200 Subject: [FieldTrip] Source localization of MEG resting state data In-Reply-To: References: Message-ID: Hi MK CHOE, Q1; please call ft_sourcedescriptives before ft_sourceinterpolate or cfg.keeptrials = ’no’; during the call to ft_sourceanalysis. What do you mean by “weird output”? Q2; If you think of GOF and the like, not really. Sometimes one can take the scalp topography into account and compare the sensor and source level outputs. One way to go is also to split the continuous data into high and low signal pseudo epochs and make a beamformer contrast on the high and low power. How to do so is illustrated here: http://www.fieldtriptoolbox.org/tutorial/networkanalysis Good luck, Tzvetan > Dear fieldtrip users, > > I tried using DICS beamforming on MEG resting state data of healthy controls. > (e.g. no task, no baseline, eyes opened) > > I analyzed to localize oscillatory sources using beamformer techniques according to the following tutorial. > (link: http://www.fieldtriptoolbox.org/tutorial/beamformer) > However, the output image was weird to be considered as resting data. I would like someone to help me through source localization procedure. > > > Q1. Is there something wrong in my script as below? > cfg = []; > cfg.output = 'powandcsd'; > cfg.method = 'mtmfft'; > cfg.foilim = [8 12]; > cfg.tapsmofrq = 2; > cfg.channel = {'MEG'}; > cfg.keeptrials = 'yes'; > fft_rest = ft_freqanalysis(cfg, data_clean); % resting state MEG data (after preprocessing) > > %% Computing the leadfield matrices > cfg = []; > cfg.grad = fft_rest.grad; > cfg.vol = vol; % head model > cfg.grid = grid; % source model > cfg.keeptrials = 'yes'; > cfg.normalize = 'yes'; > cfg.channel = {'MEG'}; > rest_grid = ft_prepare_leadfield(cfg); > > %% Source analysis > cfg = []; > cfg.frequency = 'all'; > cfg.grad = fft_rest.grad; > cfg.method = 'dics'; > cfg.grid = rest_grid; > cfg.vol = vol; > cfg.keeptrials = 'yes'; > cfg.keepfilter = 'yes'; > cfg.dics.lambda = 0; > cfg.dics.projectnoise = 'yes'; > rest_source = ft_sourceanalysis(cfg, fft_rest); > > mri_slice = ft_volumereslice([], mri) %mri: volumesegmented mri > cfg = []; > cfg.parameter = 'avg.pow'; > rest_sointer = ft_sourceinterpolate(cfg, rest_source, mri_slice); > > > Q2. Is there any way to check whether the beamforming is performed well? > > Any help would be greatly appreciated. > > MK CHOE > > -- > Mi Kyung CHOE > Department of Brain & Cognitive Sciences, Seoul National University > Human Brain Function Laboratory > E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr > _______________________________________________ > 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 nick.ketz at gmail.com Tue Jun 2 17:53:42 2015 From: nick.ketz at gmail.com (Nick Ketz) Date: Tue, 02 Jun 2015 09:53:42 -0600 Subject: [FieldTrip] fieldtrip Digest, Vol 55, Issue 2 In-Reply-To: References: Message-ID: <556DD186.7070309@gmail.com> Mathis, you have hit on a much larger problem. Tzvetan is right to suggest calculating each grid-point's connectivity with all other grid-points, which gives you a connectivity topography map for each grid-point. The next logical step, which I've been struggling with, is to somehow cluster these topographies together, giving you clusters of neighboring grid-point topographies that are similar. Is there any work being done to solve this problem? I have been struggling with this problem for some time, that is: how to do cluster based permutation statistics in chan x chan bins of connectivity measures. Ideally I want to do this in a full chan x chan x freq x time cluster analysis. I've searched on the list for related topics; posted, probably incoherently, my own issues; and generally scanned the list and the literature for any sort of relevant topics trying to broach this problem, but am still stuck. The standard 3d chan x freq x time clustering uses a neighborhood structure to define what channels are considered neighbors, and uses numeric adjacency to cluster time and frequency. With chan x chan data however, there unfortunately isn't an intuitive way to think about neighborhood for the pairwise connectivity. There are neighbors surrounding the reference grid-point, and there are neighbors in each grid-point's connectivity topography, i.e. neighboring grid-points that have similar/significant connectivity values. How do you combine the two in a sensible way? And even more challenging how do you do statistics on them? I have been considering several approaches, including multi-dimensional scaling of these grid-point connectivity topographies, or just a correlation between topographies, and then using those values to select which reference grid-points to consider as similar enough to average together. This then gives you a reference cluster of grid-points and allows you to do standard cluster permutation statistics on the average of the reference grid-points. How exactly to determine which reference grid-points are 'similar enough' to be consider clusters is the tricky part, i.e. how can you statistically test if they should be considered a cluster or not? I've been working in isolation on this problem for some time, and would love a discussion on the topic. I'm hoping this message spurs other list lurkers to at least commiserate with me, but if possible to also post whatever approaches they have taken to solve the problem of clustering pairwise connectivity data. Nick On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: > Hi Mathis, alternatively you could use ft_sourcestatistics. For this > you should reduce your 600 x 600 x freq matrix to freq of interest > first. Next, the resulting 600 x 600 matrix you?d reduce to 600 x 1 > where each grid point has a mean connectivity value to all possible > grid points. >From then on you could use ft_sourcestatistics and > ft_sourceinterpolate to visualize. Good luck, Tzvetan >> >Dear Fieldtrip Users, >> > >> >I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: >> > >> >I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). >> > >> >The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. >> > >> >I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? >> >Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? >> > >> >Thanks for any input, best wishes, >> >Mathis Kaiser From tomh at kurage.nimh.nih.gov Tue Jun 2 19:33:23 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Tue, 2 Jun 2015 13:33:23 -0400 Subject: [FieldTrip] fieldtrip Digest, Vol 55, Issue 2 In-Reply-To: <556DD186.7070309@gmail.com> References: <556DD186.7070309@gmail.com> Message-ID: <20150602133323.7df2fbe7@kurage.nimh.nih.gov> Several people have been doing things with spectral clustering, involving the graph Laplacian, wherein we say that each voxel of the brain is a node in a graph, and various connectivity measures connect the nodes. The Laplacian of the graph has many interesting properties, and the first K eigenvalues can be used to create clusters. I'm afraid I don't know how to do permutation stats on that, but k-means clustering of the graph eigenvectors can have random starting points ... On Tue, 02 Jun 2015 09:53:42 -0600 Nick Ketz wrote: > Mathis, you have hit on a much larger problem. Tzvetan is right to > suggest calculating each grid-point's connectivity with all other > grid-points, which gives you a connectivity topography map for each > grid-point. The next logical step, which I've been struggling with, > is to somehow cluster these topographies together, giving you > clusters of neighboring grid-point topographies that are similar. Is > there any work being done to solve this problem? > > I have been struggling with this problem for some time, that is: how > to do cluster based permutation statistics in chan x chan bins of > connectivity measures. Ideally I want to do this in a full chan x > chan x freq x time cluster analysis. I've searched on the list for > related topics; posted, probably incoherently, my own issues; and > generally scanned the list and the literature for any sort of > relevant topics trying to broach this problem, but am still stuck. > > The standard 3d chan x freq x time clustering uses a neighborhood > structure to define what channels are considered neighbors, and uses > numeric adjacency to cluster time and frequency. With chan x chan > data however, there unfortunately isn't an intuitive way to think > about neighborhood for the pairwise connectivity. There are > neighbors surrounding the reference grid-point, and there are > neighbors in each grid-point's connectivity topography, i.e. > neighboring grid-points that have similar/significant connectivity > values. How do you combine the two in a sensible way? And even more > challenging how do you do statistics on them? > > I have been considering several approaches, including > multi-dimensional scaling of these grid-point connectivity > topographies, or just a correlation between topographies, and then > using those values to select which reference grid-points to consider > as similar enough to average together. This then gives you a > reference cluster of grid-points and allows you to do standard > cluster permutation statistics on the average of the reference > grid-points. How exactly to determine which reference grid-points > are 'similar enough' to be consider clusters is the tricky part, i.e. > how can you statistically test if they should be considered a cluster > or not? > > I've been working in isolation on this problem for some time, and > would love a discussion on the topic. I'm hoping this message spurs > other list lurkers to at least commiserate with me, but if possible > to also post whatever approaches they have taken to solve the problem > of clustering pairwise connectivity data. > > > > Nick > > > > On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: > > Hi Mathis, alternatively you could use ft_sourcestatistics. For > > this you should reduce your 600 x 600 x freq matrix to freq of > > interest first. Next, the resulting 600 x 600 matrix you?d reduce > > to 600 x 1 where each grid point has a mean connectivity value to > > all possible grid points. >From then on you could use > > ft_sourcestatistics and ft_sourceinterpolate to visualize. Good > > luck, Tzvetan > >> >Dear Fieldtrip Users, > >> > > >> >I am a first-year PhD student and have been lurking here for a > >> >long time (finding lots of useful answers), it's about time I ask > >> >my first question: > >> > > >> >I am trying to compare connectivity in source space (~25 > >> >subjects, between two conditions, ~600 virtual channels on a > >> >1.5cm grid) using ft_freqstatistics with a cluster-based > >> >permutation test (see code below). > >> > > >> >The original input datasets have the dimensions: chan x chan x > >> >freq. I tried restructuring them to chancmb x freq > >> >(seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) > >> >before doing ft_freqstatistics, but the function then takes > >> >forever appending the (admittedly big) datasets. > >> > > >> >I then tried feeding them to ft_freqstatistics without > >> >restructuring, which didn't throw any errors. However, I noticed > >> >that the resulting clusters consist of adjacent cells in the chan > >> >x chan matrix, which doesn't make much sense since channels in > >> >adjacent cells are not necessarily spatially adjacent. I suspect > >> >that ft_freqstatistic assumes the 3-D input to contain a temporal > >> >dimension and therefore tries to build temporally adjacent > >> >clusters. Could any of the fieldtrip developers comment on this? > >> >Does anyone in the FT-community have any advice on how to > >> >statistically evaluate connectivity data using the permutation > >> >approach? > >> > > >> >Thanks for any input, best wishes, > >> >Mathis Kaiser > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tom -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From jb4590 at nyu.edu Tue Jun 2 21:58:18 2015 From: jb4590 at nyu.edu (Julia Basso) Date: Tue, 2 Jun 2015 15:58:18 -0400 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip Message-ID: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia *Julia C. Basso, PhDPost-doctoral Research AssociateNew York UniversityCenter for Neural ScienceSuzuki Laboratorywww.suzukilab.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Tue Jun 2 23:55:07 2015 From: nick.ketz at gmail.com (Nick Ketz) Date: Tue, 02 Jun 2015 15:55:07 -0600 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> Message-ID: <556E263B.4010206@gmail.com> Hi Tom and Jake, thanks very much for adding momentum to this. I haven't yet looked into spectral graph clustering, and really haven't been thinking of it terms of graph theory but it now seems silly that I haven't. If I'm understanding the suggestions correctly, the idea is to use the eigenvectors of the connectivity measure (WPLI in this case) to determine which nodes/voxels to cluster together. So nodes with similar graphs will be clustered together. This would be analogous to the graph bisection problem where k=2. The problem with mixture models is the arbitrary nature of how many clusters to use, and without a way to determine the statistical likelihood of a given cluster this is a real problem for determining the validity of a given cluster. Jake thanks for the resources, I'm beginning to dig into them and they seem promising. My understanding is that graph bisection divides the graph into two groups that have the minimum number of connections between them. So this could be used to cluster nodes that have similar topographies together, but it's not clear the best division would occur in the first bisection, instead possibly in subsequent bisections. Is this where the recursive algorithm comes in? I found this paper of yours ' Spectral Techniques for Graph Bisection in Genetic Algorithms', but it doesn't seem to get past the initial bisection. As I said, I haven't really been thinking of the problem in graph theory terms, but if my understanding is correct the current data set I'm working with could have an adjacency matrix as large as 128x128x70x50 (chan x chan x time x frequency), and as small as 128x128 for a single time x frequency bin. Nick On 6/2/15 12:38 PM, Jacob Martin wrote: > Hi Tom and Nick, > > Here's a paper i wrote which may help give some background on spectral clustering: > > "Ranks and representations for spectral graph bisection" > > I also have a genetic algorithm which uses recursive spectral graph bisection to cluster graphs using the ideas from the above paper. It is written in Java and is quite competitive and fast compared to other algorithms. Nick, perhaps i could lend a hand. > > I suggest looking up Chris Walshaw's partition archive for lots of examples of algorithms. I had a few minimum bisection records in there a while back with an older algorithm, but haven't looked at it in years or tried with my new algorithms yet. > > How big are your adjacency matrices? Note that the minimum bisection problem is NP complete. > > Best > Jake > > -- > Jacob Martin, PhD > Center for Brain and Cognition > CerCo CNRS > Toulouse, France > > > > > > > > > > On 02 Jun 2015, at 13:33, Tom Holroyd wrote: > > Several people have been doing things with spectral clustering, > involving the graph Laplacian, wherein we say that each voxel of the > brain is a node in a graph, and various connectivity measures connect > the nodes. The Laplacian of the graph has many interesting properties, > and the first K eigenvalues can be used to create clusters. > > I'm afraid I don't know how to do permutation stats on that, but > k-means clustering of the graph eigenvectors can have random starting > points ... > > On Tue, 02 Jun 2015 09:53:42 -0600 > Nick Ketz wrote: > >> Mathis, you have hit on a much larger problem. Tzvetan is right to >> suggest calculating each grid-point's connectivity with all other >> grid-points, which gives you a connectivity topography map for each >> grid-point. The next logical step, which I've been struggling with, >> is to somehow cluster these topographies together, giving you >> clusters of neighboring grid-point topographies that are similar. Is >> there any work being done to solve this problem? >> >> I have been struggling with this problem for some time, that is: how >> to do cluster based permutation statistics in chan x chan bins of >> connectivity measures. Ideally I want to do this in a full chan x >> chan x freq x time cluster analysis. I've searched on the list for >> related topics; posted, probably incoherently, my own issues; and >> generally scanned the list and the literature for any sort of >> relevant topics trying to broach this problem, but am still stuck. >> >> The standard 3d chan x freq x time clustering uses a neighborhood >> structure to define what channels are considered neighbors, and uses >> numeric adjacency to cluster time and frequency. With chan x chan >> data however, there unfortunately isn't an intuitive way to think >> about neighborhood for the pairwise connectivity. There are >> neighbors surrounding the reference grid-point, and there are >> neighbors in each grid-point's connectivity topography, i.e. >> neighboring grid-points that have similar/significant connectivity >> values. How do you combine the two in a sensible way? And even more >> challenging how do you do statistics on them? >> >> I have been considering several approaches, including >> multi-dimensional scaling of these grid-point connectivity >> topographies, or just a correlation between topographies, and then >> using those values to select which reference grid-points to consider >> as similar enough to average together. This then gives you a >> reference cluster of grid-points and allows you to do standard >> cluster permutation statistics on the average of the reference >> grid-points. How exactly to determine which reference grid-points >> are 'similar enough' to be consider clusters is the tricky part, i.e. >> how can you statistically test if they should be considered a cluster >> or not? >> >> I've been working in isolation on this problem for some time, and >> would love a discussion on the topic. I'm hoping this message spurs >> other list lurkers to at least commiserate with me, but if possible >> to also post whatever approaches they have taken to solve the problem >> of clustering pairwise connectivity data. >> >> >> >> Nick >> >> >> >>> On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: >>> Hi Mathis, alternatively you could use ft_sourcestatistics. For >>> this you should reduce your 600 x 600 x freq matrix to freq of >>> interest first. Next, the resulting 600 x 600 matrix you?d reduce >>> to 600 x 1 where each grid point has a mean connectivity value to >>> all possible grid points. >From then on you could use >>> ft_sourcestatistics and ft_sourceinterpolate to visualize. Good >>> luck, Tzvetan >>>>> Dear Fieldtrip Users, >>>>> >>>>> I am a first-year PhD student and have been lurking here for a >>>>> long time (finding lots of useful answers), it's about time I ask >>>>> my first question: >>>>> >>>>> I am trying to compare connectivity in source space (~25 >>>>> subjects, between two conditions, ~600 virtual channels on a >>>>> 1.5cm grid) using ft_freqstatistics with a cluster-based >>>>> permutation test (see code below). >>>>> >>>>> The original input datasets have the dimensions: chan x chan x >>>>> freq. I tried restructuring them to chancmb x freq >>>>> (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) >>>>> before doing ft_freqstatistics, but the function then takes >>>>> forever appending the (admittedly big) datasets. >>>>> >>>>> I then tried feeding them to ft_freqstatistics without >>>>> restructuring, which didn't throw any errors. However, I noticed >>>>> that the resulting clusters consist of adjacent cells in the chan >>>>> x chan matrix, which doesn't make much sense since channels in >>>>> adjacent cells are not necessarily spatially adjacent. I suspect >>>>> that ft_freqstatistic assumes the 3-D input to contain a temporal >>>>> dimension and therefore tries to build temporally adjacent >>>>> clusters. Could any of the fieldtrip developers comment on this? >>>>> Does anyone in the FT-community have any advice on how to >>>>> statistically evaluate connectivity data using the permutation >>>>> approach? >>>>> >>>>> Thanks for any input, best wishes, >>>>> Mathis Kaiser >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 3 09:22:51 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 3 Jun 2015 07:22:51 +0000 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip In-Reply-To: References: Message-ID: <68229AB8-0C8B-4BD1-BB61-1A06204EF8FA@fcdonders.ru.nl> Hi Julia, The intantech website mentions the existence of a MATLAB-toolbox to interact with the data (http://intantech.com/RHD2000_matlab_toolbox.html). So, in principle, it is possible to get the data read in into MATLAB, true? It should be then relatively straightforward to convert the data in the MATLAB workspace into a structure that FieldTrip understands (e.g.see: www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat). If you would want to work from the raw datafiles directly, we need to add a set of dedicated low-level functions to FieldTrip (or provide some code-glue that allow interfacing with the commercial matlab-toolbox), as per: www.fieldtriptoolbox.org/faq/how_can_extend_the_reading_functions_with_a_new_dataformat. The FieldTrip team currently lacks the resources to do low-level implementation of fileformats that are not directly relevant to our own scientific work from scratch, but if you are willing to give it a shot, we will certainly do our best to facilitate you. Best wishes, Jan-Mathijs On Jun 2, 2015, at 9:58 PM, Julia Basso > wrote: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia Julia C. Basso, PhD Post-doctoral Research Associate New York University Center for Neural Science Suzuki Laboratory www.suzukilab.com _______________________________________________ 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 tomh at kurage.nimh.nih.gov Wed Jun 3 20:05:42 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Wed, 3 Jun 2015 14:05:42 -0400 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556E263B.4010206@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> <556E263B.4010206@gmail.com> Message-ID: <20150603140542.76d8be0f@kurage.nimh.nih.gov> > The problem with mixture > models is the arbitrary nature of how many clusters to use, and > without a way to determine the statistical likelihood of a given > cluster this is a real problem for determining the validity of a > given cluster. Yea. Given the nature of MEG, with ~300 channels, you look at the eigenvalue spectrum of a typical channel covariance matrix and see that it typically starts to flatten out at around 50 or so, and then figure maybe K=20~25 clusters, so you take the top K (or K-1*) eigenvectors of the Laplacian matrix and use K-means clustering to relabel the nodes (voxels) according to which subnetwork they are in. I tend to sort them by size, and see how they change over conditions. The results are "interesting", but that's different from "publishable". It's a real problem, as you say, to determine the likelihood of a cluster. One approach is to start with random MEG data. Note that passing random MEG data through a beamformer results in almost the same thing as passing real MEG data through a beamformer. Quite a lot of structure is in the weights. So you need to shuffle the beamformers as well. Then do the spectral clustering and look at how things change. This is an open area and I'd welcome any insights anyone may have about how to visualize or work with distributions of clusters in 3D. It is also worth pointing out that all of this depends highly on what your connectivity measure is. Beamformed virtual channels can be quite noisy ... many books have been written about how to estimate spectra, coherence, and the like. This paper is fairly interesting: "A Generalized MVDR Spectrum" Benesty, Chen, and Huang http://externe.emt.inrs.ca/users/benesty/papers/spl_dec2005.pdf * This post is too short to talk about that. -- Dr. Tom -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From M.Nieuwland at ed.ac.uk Wed Jun 3 22:38:27 2015 From: M.Nieuwland at ed.ac.uk (NIEUWLAND Mante) Date: Wed, 3 Jun 2015 20:38:27 +0000 Subject: [FieldTrip] no red color for ft_multiplotTFR Message-ID: Dear all, I'm new to Fieldtrip, so I hope this question isn't too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jorn at artinis.com Thu Jun 4 08:57:22 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Thu, 4 Jun 2015 08:57:22 +0200 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: References: Message-ID: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Dear Mante, most likely you are using a Matlab version >2014a. Mathwork changed the default colormap to Parula instead of Jet, see: http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1 -introduction/ You can change the colormap by using the ‘colormap’ command in Matlab, or if I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same within the ft_ function) 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 NIEUWLAND Mante Sent: Wednesday, June 3, 2015 10:38 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] no red color for ft_multiplotTFR Dear all, I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayobimpe2004 at gmail.com Thu Jun 4 09:03:46 2015 From: ayobimpe2004 at gmail.com (Azeez Adebimpe) Date: Thu, 04 Jun 2015 09:03:46 +0200 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Message-ID: <20150604070346.5251155.71993.2204@gmail.com> An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Jun 4 09:21:10 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 4 Jun 2015 07:21:10 +0000 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB1E9B79@exprd01.hosting.ru.nl> Dear Mante, As a further clarification, if not specified in the configuration as mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig Sent: donderdag 4 juni 2015 8:57 To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] no red color for ft_multiplotTFR Dear Mante, most likely you are using a Matlab version >2014a. Mathwork changed the default colormap to Parula instead of Jet, see: http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/ You can change the colormap by using the 'colormap' command in Matlab, or if I recall correctly, also set cfg.colormap= 'jet' (which is doing the same within the ft_ function) 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 NIEUWLAND Mante Sent: Wednesday, June 3, 2015 10:38 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] no red color for ft_multiplotTFR Dear all, I'm new to Fieldtrip, so I hope this question isn't too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 4 10:10:58 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 4 Jun 2015 09:10:58 +0100 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <556bf2a94ee943e284d0684557a0990f@EXPRD02.hosting.ru.nl> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> <556bf2a94ee943e284d0684557a0990f@EXPRD02.hosting.ru.nl> Message-ID: Dear Mante et al., While indeed you can simply revert to the 'jet' colormap using the mentioned solutions, it's worth noting that rainbow colormaps (such as jet) are considered suboptimal. The two most important arguments against the use of such colormaps are (1) the luminance profile is non-monotonic across the colormap, and (2) the colormap sometimes suggests 'banding' even when the data is smooth. So, the new 'parula' default is definitely an improvement over jet! (At least for sequentially increasing/decreasing values. For data symmetric around some point (e.g. 0) I would recommend neither 'parula' nor 'jet', but a diverging colormap (see below).) For more info, see these links: https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/ http://www.mathworks.com/tagteam/81137_92238v00_RainbowColorMap_57312.pdf Another good luminance-increasing colormap: http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m About diverging colormaps: http://www.sandia.gov/~kmorel/documents/ColorMaps/ And another example: http://www.mathworks.com/matlabcentral/fileexchange/24870-fireice--hot-cold--colormap A good link to understand colormaps and their luminance profile (the link is from the Python library matplotlib, but the ideas apply to Matlab as well of course): http://matplotlib.org/users/colormaps.html Best, Eelke On 4 June 2015 at 08:21, Herring, J.D. (Jim) wrote: > Dear Mante, > > > > As a further clarification, if not specified in the configuration as > mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed > is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards. > > > > Best, > > > > Jim > > > > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig > Sent: donderdag 4 juni 2015 8:57 > > > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] no red color for ft_multiplotTFR > > > > Dear Mante, > > > > most likely you are using a Matlab version >2014a. Mathwork changed the > default colormap to Parula instead of Jet, see: > > http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/ > > You can change the colormap by using the ‘colormap’ command in Matlab, or if > I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same > within the ft_ function) > > > > 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 NIEUWLAND Mante > Sent: Wednesday, June 3, 2015 10:38 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] no red color for ft_multiplotTFR > > > > Dear all, > > > > I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could > not find anything relevant on the previous threads. > > > > When I use the multiplotTFR function (example code pasted below), the hot > color is always yellow and never red, even if I set the zlim to extremely > small values). > > > > I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue > hot-cold colors were standard. Any help is really appreciated! > > > > Cheers, > > Mante > > > > > > > > cfg = []; > > cfg.layout = 'config/biosemi64.lay'; > > cfg.channel = 'all'; > > cfg.baseline = 'no'; > > cfg.xlim = [0 2];%[-0.5 1.5];% > > cfg.ylim = [30 100]; > > cfg.zlim = [-0.1 0.1]; > > cfg.interactive = 'yes'; > > cfg.showlabels = 'yes'; > > cfg.colorbar = 'yes'; > > > > figure; > > ft_multiplotTFR(cfg, grandavg_hi_131_132); > > From david.pedrosa at ndcn.ox.ac.uk Thu Jun 4 12:33:05 2015 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Thu, 4 Jun 2015 10:33:05 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences Message-ID: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Thu Jun 4 12:53:02 2015 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Thu, 4 Jun 2015 10:53:02 +0000 Subject: [FieldTrip] Interactive plot issues Message-ID: Dear all, I have an issue with the interactive plotting function (fieldtrip vers. 20150318; Win7). Interactive plotting doesn't work, neither for ERP nor for TFR data, both by calling the topoplot and singleplot functions. Matlab freezes right after the plot has opened, requiring several 'cancel' commands (Ctrl + c) to become operational again. Below are the error messages that appear after each Ctrl + c. If I set cfg.interactive = 'no'; it works just fine. So somehow, matlab it seems to get stuck somewhere in the ft_select_range function. Note that this occurs not only with my own data, but also with the FT tutorial data. I'd be greatful for any suggestion on how to solve this issue. Kind regards, Ulrich %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ft_topoplotTFR(cfg, data); reading layout from file biosemi64.lay the call to "ft_prepare_layout" took 0 seconds the call to "ft_topoplotTFR" took 1 seconds Operation terminated by user during ft_select_range (line 81) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 82) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 81) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 82) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 84) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 4 13:12:15 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 4 Jun 2015 11:12:15 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: References: Message-ID: <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 nikola.valchev.umcg at gmail.com Thu Jun 4 14:13:42 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Thu, 4 Jun 2015 14:13:42 +0200 Subject: [FieldTrip] importing CNT or EDF data into fieldtrip Message-ID: <557040f6.05aec20a.6661.29e3@mx.google.com> Dear all, I have a possibly rather basic question. I want to read my data with fieldtrip but the formats I can use are either EDF or CNT. That means that I do not have a separate file with my coded triggers (EDF format) or I have a small file NAME.trg (CNT format) which contains information which I can't read. The question is how can I read my triggers from the EDF file or convert the NAME.trg file into something similar to the NAME.vmrk file which is created when data is in EEG format. Any hint is very appreciated. Best regards Nikola -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Jun 4 15:23:01 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 4 Jun 2015 15:23:01 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556E263B.4010206@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> <556E263B.4010206@gmail.com> Message-ID: Dear Nick et al., it is also important to consider alternative possibilities to reduce the degrees of freedom based on the existing knowledge about the data. For example: Case 1- The research question. Consider the case of mid-frontal theta in the context of error related design. Base on what we already know from the existing literature it is probably save to reduce the 128x128x70x50 matrix to a 128x128 where the time-freq tile of interest will be something from .3 to 1 seconds ~6 Hz. Case 2- The data itself. Consider continuous resting state recording and long-range connectivity as a research question. The time dimension doesn’t really make sense and from what we know, or believe to know about long range communication, this is likely to happen in the lower frequency bands. With a peak in the power spectrum as an additional including criterion it is likely that the frequency dimension would be reduced to ~ 10 Hz. Case 3- The preceding analysis Admittedly not always yet more often than not connectivity analysis follows extensive analysis on sensor level where most likely relevant time-frequency tiles were already defined while controlling for MCP. In that case one will go for the connectivity patterns concerning these preceding findings thereby reducing the time-freq dimension again. These are just a few examples where you will have a chan x chan matrix to begin with. Whether you are interested in the mean connective value of a given channel or channel(seed) to all other channels both approaches will give a 128 x 1 matrix that can be further evaluated in the context of a permutation approach or whatever preferred method. Tzvetan > Hi Tom and Jake, thanks very much for adding momentum to this. I haven't yet looked into spectral graph clustering, and really haven't been thinking of it terms of graph theory but it now seems silly that I haven't. > > If I'm understanding the suggestions correctly, the idea is to use the eigenvectors of the connectivity measure (WPLI in this case) to determine which nodes/voxels to cluster together. So nodes with similar graphs will be clustered together. This would be analogous to the graph bisection problem where k=2. The problem with mixture models is the arbitrary nature of how many clusters to use, and without a way to determine the statistical likelihood of a given cluster this is a real problem for determining the validity of a given cluster. > > > Jake thanks for the resources, I'm beginning to dig into them and they seem promising. My understanding is that graph bisection divides the graph into two groups that have the minimum number of connections between them. So this could be used to cluster nodes that have similar topographies together, but it's not clear the best division would occur in the first bisection, instead possibly in subsequent bisections. Is this where the recursive algorithm comes in? I found this paper of yours ' Spectral Techniques for Graph Bisection in Genetic Algorithms', but it doesn't seem to get past the initial bisection. > > > As I said, I haven't really been thinking of the problem in graph theory terms, but if my understanding is correct the current data set I'm working with could have an adjacency matrix as large as 128x128x70x50 (chan x chan x time x frequency), and as small as 128x128 for a single time x frequency bin. > > > Nick > > > On 6/2/15 12:38 PM, Jacob Martin wrote: >> Hi Tom and Nick, >> >> Here's a paper i wrote which may help give some background on spectral clustering: >> >> "Ranks and representations for spectral graph bisection" >> >> I also have a genetic algorithm which uses recursive spectral graph bisection to cluster graphs using the ideas from the above paper. It is written in Java and is quite competitive and fast compared to other algorithms. Nick, perhaps i could lend a hand. >> >> I suggest looking up Chris Walshaw's partition archive for lots of examples of algorithms. I had a few minimum bisection records in there a while back with an older algorithm, but haven't looked at it in years or tried with my new algorithms yet. >> >> How big are your adjacency matrices? Note that the minimum bisection problem is NP complete. >> >> Best >> Jake >> >> -- >> Jacob Martin, PhD >> Center for Brain and Cognition >> CerCo CNRS >> Toulouse, France >> >> >> >> >> >> >> >> >> >> On 02 Jun 2015, at 13:33, Tom Holroyd wrote: >> >> Several people have been doing things with spectral clustering, >> involving the graph Laplacian, wherein we say that each voxel of the >> brain is a node in a graph, and various connectivity measures connect >> the nodes. The Laplacian of the graph has many interesting properties, >> and the first K eigenvalues can be used to create clusters. >> >> I'm afraid I don't know how to do permutation stats on that, but >> k-means clustering of the graph eigenvectors can have random starting >> points ... >> >> On Tue, 02 Jun 2015 09:53:42 -0600 >> Nick Ketz wrote: >> >>> Mathis, you have hit on a much larger problem. Tzvetan is right to >>> suggest calculating each grid-point's connectivity with all other >>> grid-points, which gives you a connectivity topography map for each >>> grid-point. The next logical step, which I've been struggling with, >>> is to somehow cluster these topographies together, giving you >>> clusters of neighboring grid-point topographies that are similar. Is >>> there any work being done to solve this problem? >>> >>> I have been struggling with this problem for some time, that is: how >>> to do cluster based permutation statistics in chan x chan bins of >>> connectivity measures. Ideally I want to do this in a full chan x >>> chan x freq x time cluster analysis. I've searched on the list for >>> related topics; posted, probably incoherently, my own issues; and >>> generally scanned the list and the literature for any sort of >>> relevant topics trying to broach this problem, but am still stuck. >>> >>> The standard 3d chan x freq x time clustering uses a neighborhood >>> structure to define what channels are considered neighbors, and uses >>> numeric adjacency to cluster time and frequency. With chan x chan >>> data however, there unfortunately isn't an intuitive way to think >>> about neighborhood for the pairwise connectivity. There are >>> neighbors surrounding the reference grid-point, and there are >>> neighbors in each grid-point's connectivity topography, i.e. >>> neighboring grid-points that have similar/significant connectivity >>> values. How do you combine the two in a sensible way? And even more >>> challenging how do you do statistics on them? >>> >>> I have been considering several approaches, including >>> multi-dimensional scaling of these grid-point connectivity >>> topographies, or just a correlation between topographies, and then >>> using those values to select which reference grid-points to consider >>> as similar enough to average together. This then gives you a >>> reference cluster of grid-points and allows you to do standard >>> cluster permutation statistics on the average of the reference >>> grid-points. How exactly to determine which reference grid-points >>> are 'similar enough' to be consider clusters is the tricky part, i.e. >>> how can you statistically test if they should be considered a cluster >>> or not? >>> >>> I've been working in isolation on this problem for some time, and >>> would love a discussion on the topic. I'm hoping this message spurs >>> other list lurkers to at least commiserate with me, but if possible >>> to also post whatever approaches they have taken to solve the problem >>> of clustering pairwise connectivity data. >>> >>> >>> >>> Nick >>> >>> >>> >>>> On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: >>>> Hi Mathis, alternatively you could use ft_sourcestatistics. For >>>> this you should reduce your 600 x 600 x freq matrix to freq of >>>> interest first. Next, the resulting 600 x 600 matrix you?d reduce >>>> to 600 x 1 where each grid point has a mean connectivity value to >>>> all possible grid points. >From then on you could use >>>> ft_sourcestatistics and ft_sourceinterpolate to visualize. Good >>>> luck, Tzvetan >>>>>> Dear Fieldtrip Users, >>>>>> >>>>>> I am a first-year PhD student and have been lurking here for a >>>>>> long time (finding lots of useful answers), it's about time I ask >>>>>> my first question: >>>>>> >>>>>> I am trying to compare connectivity in source space (~25 >>>>>> subjects, between two conditions, ~600 virtual channels on a >>>>>> 1.5cm grid) using ft_freqstatistics with a cluster-based >>>>>> permutation test (see code below). >>>>>> >>>>>> The original input datasets have the dimensions: chan x chan x >>>>>> freq. I tried restructuring them to chancmb x freq >>>>>> (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) >>>>>> before doing ft_freqstatistics, but the function then takes >>>>>> forever appending the (admittedly big) datasets. >>>>>> >>>>>> I then tried feeding them to ft_freqstatistics without >>>>>> restructuring, which didn't throw any errors. However, I noticed >>>>>> that the resulting clusters consist of adjacent cells in the chan >>>>>> x chan matrix, which doesn't make much sense since channels in >>>>>> adjacent cells are not necessarily spatially adjacent. I suspect >>>>>> that ft_freqstatistic assumes the 3-D input to contain a temporal >>>>>> dimension and therefore tries to build temporally adjacent >>>>>> clusters. Could any of the fieldtrip developers comment on this? >>>>>> Does anyone in the FT-community have any advice on how to >>>>>> statistically evaluate connectivity data using the permutation >>>>>> approach? >>>>>> >>>>>> Thanks for any input, best wishes, >>>>>> Mathis Kaiser >>> _______________________________________________ >>> 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 asb2226 at gmail.com Thu Jun 4 15:58:35 2015 From: asb2226 at gmail.com (M B) Date: Thu, 4 Jun 2015 13:58:35 +0000 Subject: [FieldTrip] Please remove me Message-ID: <2c5e21c9aaab4b4a94d56328d2db5b9d@EXPRD02.hosting.ru.nl> Can you remove this email: asb2226 at gmail.com from your mailing list? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander.Hunold at tu-ilmenau.de Fri Jun 5 10:47:03 2015 From: Alexander.Hunold at tu-ilmenau.de (Hunold Alexander TU Ilmenau) Date: Fri, 5 Jun 2015 08:47:03 +0000 Subject: [FieldTrip] =?windows-1252?q?7th_International_Summer_School_in_B?= =?windows-1252?q?iomedical_Engineering_=84New_Instrumentation_for_brain_m?= =?windows-1252?q?easurements_and_stimulation=93=2C_17th_-_29th_August_201?= =?windows-1252?q?5_in_Lutherstadt_Wittenberg=2C_Germany?= Message-ID: <5B8562898ECA5A4594C9879007B906703961B1E4@MB1.x.chg> Dear colleagues, we are pleased to announce the 7th International Summer School in Biomedical Engineering on "New Instrumentation for brain measurements and stimulation" August, 17-29, 2015 in Lutherstadt Wittenberg, Germany. This event stands in the tradition of a series of successful summer schools on hot themes in biomedical engineering, dedicated to intense learning in the fruitful atmosphere of tight interaction between students and world-leading specialists. This year’s summer school is devoted to new hardware technologies for measuring and stimulating the brain, such as dry electroencephalography (EEG) electrodes, optically pumped magnetic field sensors, neuronal current imaging based on low-field magnetic resonance and multichannel transcranial current stimulation. In particular, the 7th International Summer School on Biomedical Engineering will focus on ways how these new technical advances may help to overcome current limitations in human neurosciences and medicine. It will cover both theoretical foundations and practical applications. We aim at a thorough understanding of the underlying mechanisms. Thus, we will develop a critical view on current applications and possible future developments. The second important aim of the summer school consists in providing contact with both leading experts in the field and other students with similar interests, thereby facilitating the exchange of ideas on latest developments in the field. Target Group: - PhD students - Advanced Master students - Researchers entering the field of brain measurement and stimulation techniques Further Information about the 7th International Summer School in Biomedical Engineering: www.iss2015.org We would be happy to receive your application. Please pass this announcement to your colleagues who might be interested. Sincerely, Jens Haueisen and Thomas Knösche -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Fri Jun 5 11:37:53 2015 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Fri, 5 Jun 2015 09:37:53 +0000 Subject: [FieldTrip] 50-50 PhD at Aston (Birmingham) and Macquarie (Sydney) Message-ID: Dear All Are you about to finish a Masters and are looking for a PhD abroad, or do you know someone who is looking for such an opportunity? Well this one will get the successful candidate to the UK as well as to Australia. The PhD will start off at Aston University (Birmingham, UK) for 1.5 years using MEG with adults on the autism spectrum (ASD) and will then move to Macquarie University (Sydney, AUS) for another 1.5 years, where research will most likely expand to testing children with ASD in the MEG (using same/similar paradigms). We are particularly interested in theta-gamma coupling and long-range theta phase coupling in ASD, using a selection of perceptual and cognitive paradigms. Some experience with Fieldtrip or another MEG/EEG analysis software would be very helpful, hence, we would really appreciate your help with disseminating this advert. More information is available online: http://www.findaphd.com/search/ProjectDetails.aspx?PJID=64012 Many thanks and looking forward to hearing from you! Klaus Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Jun 5 11:58:50 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 5 Jun 2015 11:58:50 +0200 (CEST) Subject: [FieldTrip] unequal sample number across trials after downsampling Message-ID: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> Dear all, I've encountered an error in my analysis pipeline due to the fact that after calling ft_resampledata I am left with an unequal number of samples across trials. For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 I am speculating that this is due to differences in rounding and wanted to ask if there's a simple way of solving this problem? Any help or suggestions would be highly appreciated. Best, Fred -- Frédéric Roux Postdoctoral Scientist, Marie-Curie fellow BCBL. Basque Center on Cognition, Brain % Language. f.roux at bcbl.eu Tel: +34 943 309 300 Ext 211 Fax: +34 943 309 052 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From jan.schoffelen at donders.ru.nl Fri Jun 5 12:05:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 5 Jun 2015 10:05:05 +0000 Subject: [FieldTrip] unequal sample number across trials after downsampling In-Reply-To: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> References: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> Message-ID: <2092400F-7782-49C7-B192-32331954430B@fcdonders.ru.nl> Hi Fred, You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Assuming the time axes are equal, that is. Otherwise, just remove the last sample from each of the 2401 sample trials :-). JM On Jun 5, 2015, at 11:58 AM, Frédéric Roux wrote: > Dear all, > > I've encountered an error in my analysis pipeline due to the fact > that after calling ft_resampledata I am left with an unequal number > of samples across trials. > > For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 > > I am speculating that this is due to differences in rounding and wanted > to ask if there's a simple way of solving this problem? > > Any help or suggestions would be highly appreciated. > > Best, > > Fred > > -- > Frédéric Roux > Postdoctoral Scientist, Marie-Curie fellow > BCBL. Basque Center on Cognition, Brain % Language. > > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From david.pedrosa at ndcn.ox.ac.uk Fri Jun 5 15:14:17 2015 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Jun 2015 13:14:17 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> References: , <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, thank you for your fast response. To have a comparable grid of course makes sense. I have looked at the link you proposed and I have one more question. Do I undersatand it correctly that I first have to generate a template grid, secodly use it for grid = ft_prepare_sourcemodel(cfg) and finally take grid.pos and grid.dim (but not template_grid.pos and template_grid.dim) for each of my source reconstructions? I am a little irritated as in the link it says: "You can use these single subjects' MNI grids in source analysis. After that you should put .pos and .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Donnerstag, 4. Juni 2015 12:12 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Question on group statistics for coherence differences Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 5 16:00:48 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 5 Jun 2015 14:00:48 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: References: , <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Message-ID: <804A6812-34F5-4C06-9012-79FEC22E3342@fcdonders.ru.nl> Hi David, You should do exactly as the link suggests: the single subject grids should be used for the sourceanalysis (because the coordinates should be defined in the subject specific coordinate system). Afterwards (e.g. for interpolation onto a higher resolution anatomical template image, or prior to doing statistics) you need to redefine the .pos (dim is not needed because it is the same for the template and the warped grids). There’s no need to make your own template grid, we currently have a few of those that come shipped with FieldTrip. See: http://www.fieldtriptoolbox.org/template/sourcemodel Best, Jan-Mathijs On Jun 5, 2015, at 3:14 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thank you for your fast response. To have a comparable grid of course makes sense. I have looked at the link you proposed and I have one more question. Do I undersatand it correctly that I first have to generate a template grid, secodly use it for grid = ft_prepare_sourcemodel(cfg) and finally take grid.pos and grid.dim (but not template_grid.pos and template_grid.dim) for each of my source reconstructions? I am a little irritated as in the link it says: "You can use these single subjects' MNI grids in source analysis. After that you should put .pos and .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Donnerstag, 4. Juni 2015 12:12 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Question on group statistics for coherence differences Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 f.roux at bcbl.eu Fri Jun 5 16:41:41 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 5 Jun 2015 16:41:41 +0200 (CEST) Subject: [FieldTrip] unequal sample number across trials after downsampling In-Reply-To: <2092400F-7782-49C7-B192-32331954430B@fcdonders.ru.nl> Message-ID: <909164792.694051.1433515301126.JavaMail.root@bcbl.eu> You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Thanks JM - I think this will solve my problem! -- FR ----- Original Message ----- From: "J.M. Schoffelen (Jan Mathijs)" To: "FieldTrip discussion list" Sent: Friday, June 5, 2015 12:05:05 PM Subject: Re: [FieldTrip] unequal sample number across trials after downsampling Hi Fred, You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Assuming the time axes are equal, that is. Otherwise, just remove the last sample from each of the 2401 sample trials :-). JM On Jun 5, 2015, at 11:58 AM, Frédéric Roux wrote: > Dear all, > > I've encountered an error in my analysis pipeline due to the fact > that after calling ft_resampledata I am left with an unequal number > of samples across trials. > > For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 > > I am speculating that this is due to differences in rounding and wanted > to ask if there's a simple way of solving this problem? > > Any help or suggestions would be highly appreciated. > > Best, > > Fred > > -- > Frédéric Roux > Postdoctoral Scientist, Marie-Curie fellow > BCBL. Basque Center on Cognition, Brain % Language. > > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > 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 tahere.toosi at gmail.com Fri Jun 5 18:52:52 2015 From: tahere.toosi at gmail.com (Tahereh Toosi) Date: Fri, 5 Jun 2015 21:22:52 +0430 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor Message-ID: Hi fieldtripers, I am trying to do a cluster permutation on Time-frequency data of a single channel (of 64 channel EEG) in a between subject design based on the example provided here . Two weird things happen. First, although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data (to be precise : stat.cfg.frequency =[0.9995 9.9951]). Second, based on the explanation in this paper , I assume cfg.neighbourdist in single-sensor test somehow shows the number of adjacent points, but when I change this number the clusters don't change at all. Here is my code, I would appreciate if anyone could tell me what is happening. Thanks, Tahereh % Time frequency analysis cfg = []; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; f1 = 1;f2 = 15; fstep = 0.1; cfg.foi =f1:fstep:f2; t1 = -1; t2 = 1; cfg.toi = t1:0.02:t2; n_cycles = 5; cfg.t_ftimwin = n_cycles ./cfg.foi; cfg.keeptrials ='no'; [freqdata] = ft_freqanalysis(cfg, data); %store freq data for each condition/subject TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} %Comparing Condition1 and Condition2 cfg = []; Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); % make a dummy structure with the difference between Condition 1 & 2 avgDiff = Condition1_avg; avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; cfg = []; cfg.channel = 'FP2' cfg.frequency = 'all' cfg.neighbourdist = 4; cfg.latency = 'all' cfg.avgovertime = 'no'; cfg.avgoverfreq ='no'; cfg.avgoverchan = 'no'; cfg.clusteralpha = 0.05; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.numrandomization = 500; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.design = [ 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable cfg stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Fri Jun 5 19:41:07 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 5 Jun 2015 19:41:07 +0200 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor In-Reply-To: References: Message-ID: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> Hi Tahereh, Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz Re: second- since you have only one channel you shouldn’t specify ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done along the freq and time dimensions the adjacency of which is defined by the time freq resolution. best tzvetan > Hi fieldtripers, > > I am trying to do a cluster permutation on Time-frequency data of a single channel (of 64 channel EEG) in a between subject design based on the example provided here. Two weird things happen. > First, although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data (to be precise : stat.cfg.frequency =[0.9995 9.9951]). > Second, based on the explanation in this paper, I assume cfg.neighbourdist in single-sensor test somehow shows the number of adjacent points, but when I change this number the clusters don't change at all. > Here is my code, I would appreciate if anyone could tell me what is happening. > > Thanks, > Tahereh > > % Time frequency analysis > cfg = []; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > f1 = 1;f2 = 15; fstep = 0.1; > cfg.foi =f1:fstep:f2; > t1 = -1; t2 = 1; > cfg.toi = t1:0.02:t2; > n_cycles = 5; > cfg.t_ftimwin = n_cycles ./cfg.foi; > cfg.keeptrials ='no'; > > [freqdata] = ft_freqanalysis(cfg, data); > > %store freq data for each condition/subject > TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} > > %Comparing Condition1 and Condition2 > cfg = []; > Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); > Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); > > % make a dummy structure with the difference between Condition 1 & 2 > avgDiff = Condition1_avg; > avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; > > cfg = []; > cfg.channel = 'FP2' > cfg.frequency = 'all' > cfg.neighbourdist = 4; > cfg.latency = 'all' > cfg.avgovertime = 'no'; > cfg.avgoverfreq ='no'; > cfg.avgoverchan = 'no'; > > cfg.clusteralpha = 0.05; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.numrandomization = 500; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number > 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % "condition" is the independent variable > cfg > stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj}); > > > _______________________________________________ > 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 tahere.toosi at gmail.com Sat Jun 6 08:13:37 2015 From: tahere.toosi at gmail.com (Tahereh Toosi) Date: Sat, 6 Jun 2015 10:43:37 +0430 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor In-Reply-To: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> References: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> Message-ID: Thanks Tzvetan for clarification on question 2. I am still dealing with issue 1 ( although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz which I have in my freq data (to be precise it returns : stat.cfg.frequency =[0.9995 9.9951])., However, if I set a smaller higher bound freq, like cfg.frequency = [1 8], it works fine ) Anybody has a clue why? On Fri, Jun 5, 2015 at 10:11 PM, Tzvetan Popov < tzvetan.popov at uni-konstanz.de> wrote: > Hi Tahereh, > Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz > Re: second- since you have only one channel you shouldn’t specify > ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done > along the freq and time dimensions the adjacency of which is defined by the > time freq resolution. > > best > tzvetan > > > Hi fieldtripers, > > I am trying to do a cluster permutation on Time-frequency data of a single > channel (of 64 channel EEG) in a between subject design based on the > example provided here > . > Two weird things happen. > First, although I set cfg.frequency = 'all' for stats, but it always > returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data > (to be precise : stat.cfg.frequency =[0.9995 9.9951]). > Second, based on the explanation in this paper > , I > assume cfg.neighbourdist in single-sensor test somehow shows the number of > adjacent points, but when I change this number the clusters don't change at > all. > Here is my code, I would appreciate if anyone could tell me what is > happening. > > Thanks, > Tahereh > > % Time frequency analysis > cfg = []; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > f1 = 1;f2 = 15; fstep = 0.1; > cfg.foi =f1:fstep:f2; > t1 = -1; t2 = 1; > cfg.toi = t1:0.02:t2; > n_cycles = 5; > cfg.t_ftimwin = n_cycles ./cfg.foi; > cfg.keeptrials ='no'; > > [freqdata] = ft_freqanalysis(cfg, data); > > %store freq data for each condition/subject > TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} > > %Comparing Condition1 and Condition2 > cfg = []; > Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); > Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); > > % make a dummy structure with the difference between Condition 1 & 2 > avgDiff = Condition1_avg; > avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; > > cfg = []; > cfg.channel = 'FP2' > cfg.frequency = 'all' > cfg.neighbourdist = 4; > cfg.latency = 'all' > cfg.avgovertime = 'no'; > cfg.avgoverfreq ='no'; > cfg.avgoverchan = 'no'; > > cfg.clusteralpha = 0.05; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.numrandomization = 500; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number > 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number > cfg.uvar = 1; % "subject" is unit of > observation > cfg.ivar = 2; % "condition" is the > independent variable > cfg > stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, > TFDesc{cond2,selectedSubj}); > > > _______________________________________________ > 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 cmuehl at gmail.com Sat Jun 6 09:12:39 2015 From: cmuehl at gmail.com (Christian Muehl) Date: Sat, 6 Jun 2015 07:12:39 +0000 Subject: [FieldTrip] Deadline Extension and Final Call for Papers - 4th Workshop on Affective Brain-Computer Interfaces @ ACII2015 Message-ID: <509a5753eacd42b1b3e1a98be4969c8b@EXPRD01.hosting.ru.nl> ** Deadline Extension and Final Call for Papers ** *** The submission deadline for the aBCI workshop has been extended to the 14th of June. *** 4th Workshop on Affective Brain-Computer Interfaces (aBCI) Workshop at ACII 2015 (September 21-24), Xi'an, China, September 21, 2015 http://www.affective-sciences.org/aBCI2015 http://www.acii2015.org/ The goal of the aBCI workshop series is to connect researchers from the communities of affective computing, social signal processing, brain-computer interfacing, neuro-ergonomics, and neuroscience around the federating theme of affective brain computer interfaces (aBCI). Affective BCI aim at the development of human-computer interfaces able to react and adapt to users' emotions and related cognitive states as measured from neurophysiological signals. Besides the general solicitation of work toward adaptive HCI applications based on aBCI, this 4th edition of the workshop will focus on two specific aspects of aBCI. Firstly, we welcome papers on ways to alleviate current aBCI limitations, through work on the physiological basis of aBCI, innovative applications resilient to classification error, and methods to increase the robustness of aBCI. Secondly, we would like to explore the social aspects and applications of aBCI by welcoming submissions on topics such as multi-user aBCI and the assessment of social processes from brain signals. The workshop topics include, but are not limited to, * effective emotion elicitation and data collection in social settings; * identification of robust and specific markers of emotional, cognitive and social processes; * methods for the assessment of emotions, cognitive states and social interactions; * methods to measure and process multiple people physiological activity; * applications of central and peripheral signal processing to social situations; * innovative concepts for adaptive interfaces and affective BCI; * demos of affective BCI systems. Submission Instructions: * The papers should feature original empirical work, theoretical work, or a well defendable but arguable position of the authors. * Papers will be published electronically in the proceedings of ACII 2015 by IEEE Xplore. Papers should be limited to 6 pages+1page references. The review is double blind - please remove all author information from the manuscripts. * Further details about the submission instructions and format can be found on the website of ACII 2015. Important Dates: June 14, 2015: Submission of manuscripts (EXTENDED!) July 3, 2015: Acceptance/Rejection notification July 24, 2015: Submission of camera-ready papers September 21, 2015: Date of the Workshop For further information, see our website or contact abci at ewi.utwente.nl Programme Chairs: * Fabien Lotte, Inria Bordeaux Sud-Ouest, Talance, France * Guillaume Chanel, Swiss Center for Affective Sciences, Geneva, Switzerland * Christian Mühl, German Aerospace Center, Cologne, Germany * Anton Nijholt, Universiteit Twente, the Netherlands Programme Committee: Egon L. van den Broek, University of Utrecht, the Netherlands Anne-Marie Brouwer, TNO Perceptual and Cognitive Systems, Soesterberg, the Netherlands Stephen Dunne, Starlab Barcelona, Spain Touradj Ebrahimi, École polytechnique fédérale de Lausanne, Switzerland Stephen Fairclough, John Moores University, Liverpool, UK Tiago H. Falk, Institut National de la Recherche Scientifique (INRS), Montreal, Canada Hayrettin Gürkök, University of Twente, Enschede, the Netherlands Dominic Heger, Karlsruhe Institute of Technology, Germany Klas Ihme, German Aerospace Center, Brunswick, Germany Jonghwa Kim, University of Augsburg, Germany Brent Lance, Army Research Laboratory/TNB, Aberdeen Proving Ground, USA, Grace Leslie, MIT Media Lab, Boston, USA Giulia Liberati, Université catholique de Louvain, Belgium Gary Garcia Molina, Philips Research North America, Briarcliff, USA Ke Liao, Kansas University Medical Center, USA Scott Makeig, University of California San Diego, USA Tim Mullen, University of California San Diego, USA Domen Novak, University of Wyoming, Laramie, USA Ioannis Patras, Queen Mary University, London, UK Evan Peck, Bucknell University, Lewisburg, USA Mannes Poel, University of Twente, Enschede, the Netherlands Alan Pope, NASA Langley Research Center, Norfolk, USA Thierry Pun, University of Geneva, Switzerland Erin Solovey, Drexel University, Philadelphia, USA Mohammad Soleymani, University of Geneva, Switzerland Aureli Soria-Frisch, Starlab Barcelona, Spain Olga Sourina, NanYang Technological University, Singapore Aleksander Valjamae, Linköping University, Sweden Jan van Erp, University of Twente, Enschede, the Netherlands Chi Thanh Vi, University of Bristol, UK Thorsten Zander, Technische Universität Berlin, Germany From jonas at obleser.de Sat Jun 6 11:07:11 2015 From: jonas at obleser.de (Jonas Obleser) Date: Sat, 6 Jun 2015 11:07:11 +0200 Subject: [FieldTrip] =?utf-8?q?Job_offer=3A_Phd_post_=28or_Postdoc_halftim?= =?utf-8?q?e=29_at_the_University_of_L=C3=BCbeck?= Message-ID: Dear colleagues, [sorry for potential crossposting] My new lab at the University of Lübeck (at the baltic sea; near Hamburg; new and old lab site: http://auditorycognition.com ) is beginning to hire. Here is a first post -- officially it’s a Phd position (also interpretable as a half-time postdoctoral if interested in alternative forms of a scientist’s work/life balance). English version: https://www.dropbox.com/s/lqx8e2jiu05hrw2/Ausschreibung_1015_15_Wiss%20MitarbeiterIn_Psychologie_englisch.pdf?dl=0 German version: https://www.uni-luebeck.de/fileadmin/uzl_personal/stellenausschreibungen/Ausschreibung_1015_15_Wiss_MitarbeiterIn_Psychologie.pdf Law-owned EEG, pus centre-wide fMRI (also combined with EEG) are standard routine. Immediate opportunity for MEG recordings will be given through collaboration with Germany-wide sites. Thanks for spreading the word, Jonas Prof. Dr. Jonas Obleser Department of Psychology Universität zu Lübeck Tel +49 451 500 1780 Mobil +49 171 6993337 E-Mail obleser at ipsy.uni-luebeck.de Ratzeburger Allee 160 23562 Lübeck -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 7100 bytes Desc: not available URL: From anne.urai at gmail.com Sun Jun 7 18:57:51 2015 From: anne.urai at gmail.com (Anne Urai) Date: Sun, 7 Jun 2015 18:57:51 +0200 Subject: [FieldTrip] importing CNT or EDF data into fieldtrip In-Reply-To: <557040f6.05aec20a.6661.29e3@mx.google.com> References: <557040f6.05aec20a.6661.29e3@mx.google.com> Message-ID: Dear Nikola, SR research provides edf2asc, a command line tool that lets you convert edf files to simple ASCII documents - these can then be read in by fieldtrip's read_eyelink_asc.m. You can download edf2asc here https://www.sr-support.com/showthread.php?17-EDF2ASC-Conversion-Utility (you need an account on SR's website first). Best, —  Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie | Universitätsklinikum Hamburg-Eppendorf Martinistrasse 52, 20246 Hamburg, Germany | http://anneurai.wordpress.com On 4 Jun 2015 at 14:14:18, Nikola Valchev (nikola.valchev.umcg at gmail.com) wrote: Dear all, I have a possibly rather basic question. I want to read my data with fieldtrip but the formats I can use are either EDF or CNT. That means that I do not have a separate file with my coded triggers (EDF format) or I have a small file NAME.trg (CNT format) which contains information which I can’t read.   The question is how can I read my triggers from the EDF file or convert the NAME.trg file into something similar to the NAME.vmrk file which is created when data is in EEG format.   Any hint is very appreciated.   Best regards Nikola _______________________________________________ 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 melissa.ralston at gmail.com Sun Jun 7 23:36:19 2015 From: melissa.ralston at gmail.com (Melissa Smith) Date: Sun, 7 Jun 2015 14:36:19 -0700 Subject: [FieldTrip] reformat .mat data - example script Message-ID: Hi Fieldtripers! I am a new Fieldtrip user and I believe I need to reformat my data (.mat) so it is compatible with Fieldtrip. I was wondering if anyone has done this and would be willing to pass on your example script that I can reference? I have been referencing this: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat but, it would be really helpful if I could reference someone's script! Best, Melissa -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerome.manson at gmail.com Mon Jun 8 14:44:37 2015 From: gerome.manson at gmail.com (Gerome Manson) Date: Mon, 8 Jun 2015 14:44:37 +0200 Subject: [FieldTrip] Brainstorm Integration Message-ID: Hello All, A colleague of mine has conducted an experiment with EEG (biosemi -64) and they have done all of the preprocessing/ Source Localization in Brainstorm (http://neuroimage.usc.edu/brainstorm/ ). I would like to look at the evoked potentials and conduct some time frequency analysis using Field Trip. Is it possible to import data from brainstorm structures? Possible export parameters include: EXCEL xlsx EEG Cartool (.eph) Brainstorm matrix (.mat) ASCII (csv, space separated) Thank you in Advance, Gerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Jun 8 15:10:33 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 8 Jun 2015 15:10:33 +0200 Subject: [FieldTrip] Brainstorm Integration In-Reply-To: References: Message-ID: <12A53C8A-B033-49F6-82F3-499FD54963D4@uni-konstanz.de> Dear Gerome, I’ve never worked with Brainstorm data matrix (.mat) but I suspect that from this mat file you could easily derive the required information in order to get started with FieldTrip. Please look at this FAQ: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Probably the most relevant part is: “Circumvent the FieldTrip reading funcitons” that provides what type of data is needed and how should it be organized in order to be suitable for analysis in FieldTrip. Good luck tzvetan > Hello All, > > A colleague of mine has conducted an experiment with EEG (biosemi -64) and they have done all of the preprocessing/ Source Localization in Brainstorm (http://neuroimage.usc.edu/brainstorm/). I would like to look at the evoked potentials and conduct some time frequency analysis using Field Trip. Is it possible to import data from brainstorm structures? > > Possible export parameters include: > EXCEL xlsx > EEG Cartool (.eph) > Brainstorm matrix (.mat) > ASCII (csv, space separated) > > Thank you in Advance, > Gerome > _______________________________________________ > 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 rikkert.hindriks at upf.edu Mon Jun 8 16:51:13 2015 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Mon, 8 Jun 2015 16:51:13 +0200 Subject: [FieldTrip] Estimation of noise covariance matrix for resting-state imaging Message-ID: Dear all, I am using a distributed linear inverse method to reconstruct the currents underlying sleep spindles. A proper choice for the regularization parameters, however, requires the noise covariance matrix to be known. I work with EEG (EcoG in fact) so no ghost recordings are possible. Does anyone know how the EEG noise covariance is estimated for resting-state data? Thanks a lot, Kind regards, Rikkert Hindriks -------------- next part -------------- An HTML attachment was scrubbed... URL: From zerr.paul at googlemail.com Tue Jun 9 12:41:54 2015 From: zerr.paul at googlemail.com (Paul Zerr) Date: Tue, 9 Jun 2015 12:41:54 +0200 Subject: [FieldTrip] biosemi bdf >> read_24bit error + no events found Message-ID: Dear Robert, it seems that defining a full path vs. only the filename (even if in current folder) makes the difference. filename = '/file/to/path/name.bdf' %events are found, everything ok filename = 'name.bdf' %file is found and processed by ft_definetrials but NO events are found This is very odd. I don't get a "file not found" error but just "0 events". Greetings, Paul > Hi Paul, > > I suppose it is an incompatibility between your particular BDF file and > the code. I suggest you use MATLAB debugging facilities to check what is > wrong in the lower-level code. See http://tinyurl.com/oy7b496. > > best regards, > Robert > > > > On 25 May 2015, at 15:51, Paul Zerr wrote: > > > I have not. I can read in the header but that's about it. > > I don't have any older matlab versions here to test it with either. > > > > From what I understand ft_preprocessing should be capable of reading > bdf's directly with only the file name as input arg. > > > > Greetings, > > Paul Zerr > > > > > > From: > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] biosemi bdf >> read_24bit error + no events > > found > > Message-ID: <5560dddf.0b91340a.2dab.ffffdae5 at mx.google.com> > > Content-Type: text/plain; charset="utf-8" > > > > Have you resolved this issue? > > > > > > From: Paul Zerr > > Sent: ?Thursday?, ?May? ?14?, ?2015 ?8?:?01? ?AM > > To: FieldTrip discussion list > > > > > > Hi all, > > > > I'm new to fieldtrip so forgive me if my mistake is obvious. > > I want to import my raw, markerless dataset ( > http://www.filedropper.com/1_20) with > > > > cfg = []; > > cfg.dataset = '2.bdf'; > > data = ft_preprocessing(cfg) > > > > However, I get > > > > reading and preprocessing > > error opening file: 2.bdf > > One or more output arguments not assigned during call to "read_24bit". > > > > Error in read_biosemi_bdf>readLowLevel (line 274) > > buf = read_24bit(filename, offset, numwords); > > > > Error in read_biosemi_bdf (line 242) > > buf = readLowLevel(filename, offset, epochlength); % see below in > subfunction > > > > Error in ft_read_data (line 321) > > dat = read_biosemi_bdf(filename, hdr, begsample, endsample, > chanindx); > > > > Error in ft_preprocessing (line 578) > > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, > > 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', > > strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) > > > > Error in Untitled (line 19) > > data = ft_preprocessing(cfg) > > > > Using cfg.trialdef.eventtype = '?'; outputs "no events were found in the > datafile" for ft_definetrial even for datasets with many markers. > Converting to EDF+ did not help as it then says "channels with different > sampling rate not supported". Specifying only one channel makes no > difference. The file itself is fine (opens well in BvA). > > > > Defining only one channel to preprocess gives the same error. > > > > I couldn't find a solution in the archives, the faq, wiki or > documentation. > > > > I'm using debian stable & matlab 2014a. Same issue at DCC computers > running windows & matlab 2013a. > > > > Any ideas? > > > > Much appreciated, > > > > Paul Zerr > > _______________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nikola.valchev.umcg at gmail.com Tue Jun 9 16:48:06 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Tue, 9 Jun 2015 16:48:06 +0200 Subject: [FieldTrip] importing and segmenting CNT and TRG files Message-ID: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Dear all, I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? 2) I can't seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. Any help is appreciated and I'm sorry if I'm not too clear, I'm new to EEG. Nikola -------------- next part -------------- An HTML attachment was scrubbed... URL: From narendra.linguistics at gmail.com Tue Jun 9 19:07:51 2015 From: narendra.linguistics at gmail.com (Narendra Kumar) Date: Tue, 9 Jun 2015 22:37:51 +0530 Subject: [FieldTrip] Warning: Function isequaln has the same name as a MATLAB builtin. Message-ID: Dear fieldtrip users, I am very new to fieldtrip. I've just installed the toolbox on MATLAB 2015a. After installing fieldtrip toolbox as I launch MATLAB, I receive the following warning: * Warning: Function isequal​n​ has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.* When I looked into the fieldtrip folder, I found isequaln.m file in fieldtrip-2015022\compat folder, which is same function as it is in matlabroot. When I tried to rename it I got another error. So please let me know what should I do to get rid of this warning message. Thanks & Regards, Narendra Kumar Research Scholar Department of Humanities and Social Sciences Indian Institute of Technology Ropar Punjab, India - 140001 Contact No.:- +91-8968945650 Homepage:- https://www.sites.google.com/site/narendraiitrpr/ Social Networking Sites: - Researchgate -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 9 20:15:16 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 9 Jun 2015 19:15:16 +0100 Subject: [FieldTrip] Warning: Function isequaln has the same name as a MATLAB builtin. In-Reply-To: References: Message-ID: Dear Narendra, Please make sure you do *not* add FieldTrip with addpath(genpath()), but only add the root folder and let ft_defaults take care of the path. That way, the file should not be added to the path. Best, Eelke On 9 Jun 2015 18:11, "Narendra Kumar" wrote: > Dear fieldtrip users, > > I am very new to fieldtrip. I've just installed the toolbox on MATLAB > 2015a. After installing fieldtrip toolbox as I launch MATLAB, I receive the > following warning: > > * Warning: Function isequal ​n​ has the same name as a MATLAB builtin. We > suggest you rename the function to avoid a potential name conflict.* > > When I looked into the fieldtrip folder, I found isequaln.m file in > fieldtrip-2015022\compat folder, which is same function as it is in > matlabroot. When I tried to rename it I got another error. So please let me > know what should I do to get rid of this warning message. > > Thanks & Regards, > > Narendra Kumar > Research Scholar > Department of Humanities and Social Sciences > Indian Institute of Technology Ropar > Punjab, India - 140001 > Contact No.:- +91-8968945650 > Homepage:- https://www.sites.google.com/site/narendraiitrpr/ > Social Networking Sites: - Researchgate > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From plyons at udel.edu Wed Jun 10 02:00:12 2015 From: plyons at udel.edu (Peter Lyons) Date: Tue, 9 Jun 2015 20:00:12 -0400 Subject: [FieldTrip] No backprojection following ICA Message-ID: Hello All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. I have come across a problem when I attempt to call ft_rejectcomponent following an ICA of my data. The ICA was performed using ft_componentanalysis, and the data was viewed using ft_databrowser to determine unwanted components. Following these steps I ran this code: cfg = [] cfg.component = [3 5] data_clean = ft_rejectcomponent(cfg,data_ica) which returned the following message: "not applying the backprojection matrix to the sensor description" My question is how do I proceed to allow the application of the backprojection matrix? I assume I am leaving some vital piece of code out? Prior to calling ft_componentanalysis my continuous data was bandpass filtered using ft_preprocessing, and the reference was removed using the code: cfg = [] cfg.channel = {'all','-E65'} data_64 = ft_preprocessing(cfg,data_filt) I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 hz. Any advice would be greatly appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From WanjaMoessing at gmx.de Wed Jun 10 14:35:45 2015 From: WanjaMoessing at gmx.de (Wanja Moessing) Date: Wed, 10 Jun 2015 14:35:45 +0200 Subject: [FieldTrip] No backprojection following ICA (Peter Lyons) In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From cprevos at g.clemson.edu Wed Jun 10 16:02:34 2015 From: cprevos at g.clemson.edu (Connor Prevost) Date: Wed, 10 Jun 2015 10:02:34 -0400 Subject: [FieldTrip] Importing Time Markers Message-ID: To whom it may concern, When doing initial testing/ recording of TMS-EEG data, some of the time markers were lost/not recorded properly. I wrote a code in MATLAB which would allow me to find the exact time where the time markers or "triggers" should be placed. However, I do not know how to import and/or convert the found time markers to be able to run through the fieldtrip program. The question is how can I read my time markers from the NAME.mat file or convert it into something similar to the NAME.vmrk file which is created when data is in EEG format. Any help with this matter would be greatly appreciated! -- All the Best, Connor M. Prevost 907-947-7140 Bio-Engineering Clemson University '17 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Wed Jun 10 16:58:33 2015 From: robince at gmail.com (Robin) Date: Wed, 10 Jun 2015 15:58:33 +0100 Subject: [FieldTrip] Variance explained by ICA components Message-ID: Hello, I am looking for a way to calculate the percentage of variance explained by a set of ICA components I have obtained using Fieldtrip. I see this question has been asked before [1,2], but I didn't see any answers so thought I would try asking again. Thanks, Robin [1] http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html [2] http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Wed Jun 10 21:01:17 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Wed, 10 Jun 2015 19:01:17 +0000 Subject: [FieldTrip] Apply atlas to MNE grid Message-ID: Hi Fieldtrippers, Following the MNE-tutorial, I ended up with activation patterns on the cortically restricted grid for each subject in (if I understand it correctly) subject-specific ctf-space. What I want to do next is apply an atlas to these grid points. So far, what I've been doing is interpolate the subject-specific MNE grid to the subject-specific MNI-warped grid (such as the ones used for beamforming), then interpolate this to the subject-specific MRI, and finally normalize that to an MNI-space MRI, which hopefully would be atlas-compatible. However, I am not sure whether this is a) valid, and b) the most elegant and efficient way to impart atlas information on MNE data. a) The reason I doubt the validity of this method is that when I find high activity on the MNE grid in seemingly temporal or occipital sources, the blob on the MRI image tends to end up on the brainstem or cerebellum (an example can be seen in the attached image). Any thoughts on what could cause this? Could there for example be an issue with cerebellar grid points not being included in the MNE grid, but which are present in the beamformer/cubic grid? Do you have any thoughts on the validity of this approach and the resulting effect? b) This pipeline feels rather contrived, with a bit too many interpolations to my liking. Is it somehow possible to shorten this pipeline? For example, is it possible to directly link the vertices of the MNE surface to an atlas? Any thoughts or hints on this would be greatly appreciated. Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MNEToMRI.png Type: image/png Size: 338288 bytes Desc: MNEToMRI.png URL: From cmk0803 at hbf.re.kr Thu Jun 11 03:21:38 2015 From: cmk0803 at hbf.re.kr (=?UTF-8?B?7LWc66+46rK9?=) Date: Thu, 11 Jun 2015 10:21:38 +0900 Subject: [FieldTrip] Source localization of MEG resting state data Message-ID: Hi, Tzvetan. Thank you for your first response. The weird output that you asked in first response is first attached figure 1. I thought It was weird because the sensor level output is so different form the source level output. I revised the script regarding your first advise and following tutorial. The output is second figure. ( http://www.fieldtriptoolbox.org/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ) It is better than first output. However,* the sensor level output correspond with the source level output, exactly.* Is it anything that need to revise? If the data is plotted at the source and sensor level, What the difference between two plots can emerge in general? I really appreciate for your help in advance. Best regards, MK CHOE P.S. The revised script is as follows. %% Calculating the cross spectral density matrix cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [10 10]; % alpha [8 12] cfg.tapsmofrq = 2; cfg.channel = {'MEG'}; cfg.keeptrials = 'yes'; fft_rest = ft_freqanalysis(cfg, data_clean); %% Computing the leadfield matrices cfg = []; cfg.grad = fft_rest.grad; cfg.vol = hdm; cfg.grid = grid; cfg.keeptrials = 'yes'; cfg.normalize = 'yes'; cfg.channel = {'MEG'}; rest_grid = ft_prepare_leadfield(cfg); %% Source analysis cfg = []; cfg.frequency = 'all'; cfg.grad = fft_rest.grad; cfg.method = 'dics'; cfg.grid = rest_grid; cfg.vol = hdm; cfg.keeptrials = 'yes'; cfg.keepfilter = 'yes'; cfg.keepcsd = 'yes'; cfg.feedback = 'textbar'; cfg.dics.lambda = 0.1 cfg.dics.projectnoise = 'yes'; rest_source = ft_sourceanalysis(cfg, fft_rest); %% sourcedescriptive cfg = []; rest_source.dim = rest_grid.dim; descri_source = ft_sourcedescriptives(cfg, rest_source); descri_source.pos = t1grid.pos; %% sourceinterpolating_nai cfg = []; cfg.parameter = 'nai'; cfg.voxelcoord = 'no'; cfg.interpmethod = 'linear'; sdint = ft_sourceinterpolate(cfg, descri_source, norm_mri); %% plot fft results cfgp = []; cfgp.layout = 'neuromag306mag_rev.lay'; cfgp.interactive='yes'; colorbar; ft_topoplotER(cfgp, fft_rest); %% source plot _nai cfg = []; cfg.method = 'slice'; cfg.funparameter = 'nai'; cfg.surfdownsample = 2; cfg.projmethod = 'project'; cfg.funcolormap = 'jet'; ft_sourceplot(cfg, sdint); -- Mi Kyung CHOE Department of Brain & Cognitive Sciences, Seoul National University Human Brain Function Laboratory E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure1.png Type: image/png Size: 227029 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure2.png Type: image/png Size: 271482 bytes Desc: not available URL: From tzvetan.popov at uni-konstanz.de Thu Jun 11 07:58:48 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 11 Jun 2015 07:58:48 +0200 Subject: [FieldTrip] Source localization of MEG resting state data In-Reply-To: References: Message-ID: <00C424A8-4120-4ED7-A02A-B140130E33EE@uni-konstanz.de> Hi MK CHOE, your second attempt look reasonable at least to me. The topography suggest parietal activation and you have peak maxima over parietal regions. > Hi, Tzvetan. > > Thank you for your first response. > > The weird output that you asked in first response is first attached figure 1. > I thought It was weird because the sensor level output is so different form the source level output. > > I revised the script regarding your first advise and following tutorial. The output is second figure. > (http://www.fieldtriptoolbox.org/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > It is better than first output. However, the sensor level output correspond with the source level output, exactly. > > Is it anything that need to revise? > If the data is plotted at the source and sensor level, What the difference between two plots can emerge in general? There isn’t an easy answer to this question. Sometimes you’d use to extract time courses out of your data without “seeing” any patterns on sensor level due to noise. Other times the sensor topography almost perfectly matches the source map. That said sensor/source correspondence is good but if you lack this it doesn’t necessarily invalidates the results you just need to have plausible explanation of why you don’t see things on sensor level while you believe they must be there. This is typically in cases of simultaneous recordings of various types- EEG/fMRI, tAC/DC-MEEG etc. Finally, while your sensor signals are linear superposition of all source activity while your beamformer approach de-mixes those it is a “good sign” that sensor and source results are not mirroring each other. tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.vanEs at donders.ru.nl Thu Jun 11 12:55:40 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Thu, 11 Jun 2015 10:55:40 +0000 Subject: [FieldTrip] error in ft_artifact_zvalue Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7E90@exprd01.hosting.ru.nl> Hi, I just wanted to start processing my MEG data, but when I want to remove the artifacts using ft_artifact_zvalue I get an error. This is my code: % data is preprocessed already %% Find jump artifacts cfg = []; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG'; cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0; cfg.artfctdef.zvalue.fltpadding = 0; % algorithmic parameters cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [~, artifact_jump] = ft_artifact_zvalue(cfg, data); I do get the interactive figure where I can scroll through the trials and I can adjust the threshold, but when I use my mouse (e.g. to click on 'threshold'), I get the following error: Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 701) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback It seems like my mouse isn't recognized (tried different USB ports). Can you help me? (PS: scrolling through trials with the keyboard is working). Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.png Type: image/png Size: 93122 bytes Desc: Untitled.png URL: From eelke.spaak at donders.ru.nl Thu Jun 11 13:03:08 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 11 Jun 2015 12:03:08 +0100 Subject: [FieldTrip] error in ft_artifact_zvalue In-Reply-To: References: Message-ID: Hi Mats, Could you let me know what Matlab version you are using? And if the error also occurs if you use an older version (e.g. 2012a or so (simply use 'matlab2012a' at a DCCN mentat prompt))? Cheers, Eelke On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) wrote: > Hi, I just wanted to start processing my MEG data, but when I want to remove > the artifacts using ft_artifact_zvalue I get an error. > This is my code: > % data is preprocessed already > %% Find jump artifacts > cfg = []; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [~, artifact_jump] = ft_artifact_zvalue(cfg, data); > > I do get the interactive figure where I can scroll through the trials and I > can adjust the threshold, but when I use my mouse (e.g. to click on > 'threshold'), I get the following error: > > Attempt to reference field of non-structure array. > > Error in ft_artifact_zvalue>keyboard_cb (line 701) > curKey=eventdata.Key; > > Error using waitfor > Error while evaluating uicontrol Callback > > It seems like my mouse isn't recognized (tried different USB ports). Can you > help me? (PS: scrolling through trials with the keyboard is working). > > Best, > Mats From wanjamoessing at gmx.de Thu Jun 11 13:14:41 2015 From: wanjamoessing at gmx.de (=?utf-8?Q?Wanja_M=C3=B6=C3=9Fing?=) Date: Thu, 11 Jun 2015 13:14:41 +0200 Subject: [FieldTrip] error in ft_artifact_zvalue In-Reply-To: References: Message-ID: <0MZOan-1YjwxN1mIv-00LGJj@mail.gmx.com> Hi Mats, I recently submitted a bugfix to that function because the keyboard was not working. Now both should be working. Unfortunately, I could only test that on matlab 2015a. So it might be that it's not working on older versions. You could try a ft version from a week ago or so without the bugfix (and hence only mouse functionality). Could you let us know which version of matlab you're using? Best, -Wanja ----- Ursprüngliche Nachricht ----- Von: "Eelke Spaak" Gesendet: ‎11.‎06.‎2015 13:04 An: "FieldTrip discussion list" Betreff: Re: [FieldTrip] error in ft_artifact_zvalue Hi Mats, Could you let me know what Matlab version you are using? And if the error also occurs if you use an older version (e.g. 2012a or so (simply use 'matlab2012a' at a DCCN mentat prompt))? Cheers, Eelke On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) wrote: > Hi, I just wanted to start processing my MEG data, but when I want to remove > the artifacts using ft_artifact_zvalue I get an error. > This is my code: > % data is preprocessed already > %% Find jump artifacts > cfg = []; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [~, artifact_jump] = ft_artifact_zvalue(cfg, data); > > I do get the interactive figure where I can scroll through the trials and I > can adjust the threshold, but when I use my mouse (e.g. to click on > 'threshold'), I get the following error: > > Attempt to reference field of non-structure array. > > Error in ft_artifact_zvalue>keyboard_cb (line 701) > curKey=eventdata.Key; > > Error using waitfor > Error while evaluating uicontrol Callback > > It seems like my mouse isn't recognized (tried different USB ports). Can you > help me? (PS: scrolling through trials with the keyboard is working). > > Best, > Mats _______________________________________________ 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 plyons at udel.edu Thu Jun 11 15:59:59 2015 From: plyons at udel.edu (Peter Lyons) Date: Thu, 11 Jun 2015 09:59:59 -0400 Subject: [FieldTrip] No backprojection following ICA (Peter Lyons) In-Reply-To: References: Message-ID: Hi Wanja, Thanks for your quick response. Just to clarify a few points: We received the message "not applying the backprojection matrix to the sensor description" because we do not have a 'tra' matrix defined. Because we are using EEG data with a one to one relationship between the number of channels and the number of electrodes, and therefore do not have a need to define a 'tra' matrix (?), is it safe to assume that our call to ft_rejectcomponent successfully recomposed our data? If we do need to define a 'tra' matrix, when is the best time to do so? I really appreciate your input. Thanks, Peter On Wed, Jun 10, 2015 at 8:35 AM, Wanja Moessing wrote: > Hi Peter, > > I get the same note. From a look into the code of ft_rejectcomponent it > seems that, for EEG data, this note has to appear as long as you do not > have a 'tra' matrix in your electrode description. > The FAQ [ > http://www.fieldtriptoolbox.org/faq/how_are_electrodes_magnetometers_or_gradiometers_described] > suggests that this 'tra' matrix should only be there if the channels are > not exactly equal to your electrodes. > Please correct me if I am wrong - I am not a FT developer. > I agree that this message could be a little bit clearer. > > Kind regards, > Wanja > > _______________________________________________ > 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 e.caspar at ucl.ac.uk Fri Jun 12 12:53:25 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Jun 2015 10:53:25 +0000 Subject: [FieldTrip] ft_lateralizedpotential question Message-ID: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Dear Fieldrippers, I have a small question about ft_lateralizedpotential. I am currently trying to compute a LRP. Thus, I wrote: avgL = ft_timelockanalysis(cfg, cleandata); avgR = ft_timelockanalysis(cfg, cleandata); cfg = []; cfg.layout = 'biosemi64.lay'; cfg.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfg,avgL,avgR); cfg = []; cfg.xlim = [-2 1]; cfg.ylim = [-12 10]; clf; ft_singleplotER(cfg, lrp.plotlabel) There is apparently something wrong with the plot because I get the following error message: Error using ft_checkdata (line 461) This function requires timelock or freq data as input. I have also tried to add a new avgLRP = ft_timelockanalysis(cfg, lrp); and then to compute the plot based on that, but it is not working. If anyone has an idea! Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer? Thank you in advance for your help! Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Fri Jun 12 13:07:47 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Fri, 12 Jun 2015 11:07:47 +0000 Subject: [FieldTrip] ft_lateralizedpotential question In-Reply-To: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> References: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Message-ID: Hi Emilie, We won't be ripping any fields anytime ("Fieldrippers") ;) (1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER You should probably try: From e.caspar at ucl.ac.uk Fri Jun 12 15:19:26 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Jun 2015 13:19:26 +0000 Subject: [FieldTrip] ft_lateralizedpotential question In-Reply-To: References: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Message-ID: <13F99CA4-FC96-46C3-9361-38935027BA37@live.ucl.ac.uk> Dear Nietzsche, Sorry for the missing letter! Indeed, it slightly changes the meaning x) I have tried with different electrodes for avg Left and Right cfgL = []; cfgL.channel = {'A*'} avgL = ft_timelockanalysis(cfgL, clean_data); cfgR = []; cfgR.channel = {'B*'} avgR = ft_timelockanalysis(cfgR, clean_data); And then I have asked for ft_lateralizedpotential: cfgT = []; cfgT.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfgT,avgL,avgR); cfgT = []; cfgT.xlim = [-2 1]; cfgT.ylim = [-12 10]; clf; ft_singleplotER(cfgT, lrp) I agree that avgL and avgR are more logical now. However, the plot is still not working, with the following error: Error using fixdimord (line 85) the data does not contain a dimord, but it also does not resemble raw or component data I still do not really understand what is wrong. My script/data work very well without the ft_lateralized. I have already looked at the results for the readiness potential. I just want to look now for the lateralized RP. Thanks! Emilie On 12 juin 2015, at 13:07, "Lam, N.H.L. (Nietzsche)" > wrote: Hi Emilie, We won't be ripping any fields anytime ("Fieldrippers") ;) (1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER You should probably try: [fieldtrip-bounces at science.ru.nl] on behalf of Caspar, Emilie [e.caspar at ucl.ac.uk] Sent: 12 June 2015 12:53 To: fieldtrip at science.ru.nl Subject: [FieldTrip] ft_lateralizedpotential question Dear Fieldrippers, I have a small question about ft_lateralizedpotential. I am currently trying to compute a LRP. Thus, I wrote: avgL = ft_timelockanalysis(cfg, cleandata); avgR = ft_timelockanalysis(cfg, cleandata); cfg = []; cfg.layout = 'biosemi64.lay'; cfg.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfg,avgL,avgR); cfg = []; cfg.xlim = [-2 1]; cfg.ylim = [-12 10]; clf; ft_singleplotER(cfg, lrp.plotlabel) There is apparently something wrong with the plot because I get the following error message: Error using ft_checkdata (line 461) This function requires timelock or freq data as input. I have also tried to add a new avgLRP = ft_timelockanalysis(cfg, lrp); and then to compute the plot based on that, but it is not working. If anyone has an idea! Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer? Thank you in advance for your help! Emilie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 12 20:35:04 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 12 Jun 2015 18:35:04 +0000 Subject: [FieldTrip] No backprojection following ICA In-Reply-To: References: Message-ID: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> Dear Peter, Depending on what you want to do, you need or need not worry about the warning you get. Since you mention that in first instance you want to look at connectivity at the channel level, I think you are safe. The warning pertains to the application of the spatial transformation to the low-level description of the channel array (the elec-structure), and not to the actual data. In short, the back projection is applied to the data itself, but there is insufficient information available in the sensor description to be able to apply the same projection to this as well. The latter would be needed if at a later stage you want to do source reconstruction, for which you need to compute leadfield matrices, where the forward model should include information about the spatial topographies that have been removed. Best, Jan-Mathijs On Jun 10, 2015, at 2:00 AM, Peter Lyons > wrote: Hello All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. I have come across a problem when I attempt to call ft_rejectcomponent following an ICA of my data. The ICA was performed using ft_componentanalysis, and the data was viewed using ft_databrowser to determine unwanted components. Following these steps I ran this code: cfg = [] cfg.component = [3 5] data_clean = ft_rejectcomponent(cfg,data_ica) which returned the following message: "not applying the backprojection matrix to the sensor description" My question is how do I proceed to allow the application of the backprojection matrix? I assume I am leaving some vital piece of code out? Prior to calling ft_componentanalysis my continuous data was bandpass filtered using ft_preprocessing, and the reference was removed using the code: cfg = [] cfg.channel = {'all','-E65'} data_64 = ft_preprocessing(cfg,data_filt) I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 hz. Any advice would be greatly appreciated! Thanks, Peter _______________________________________________ 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 plyons at udel.edu Fri Jun 12 21:12:46 2015 From: plyons at udel.edu (Peter Lyons) Date: Fri, 12 Jun 2015 15:12:46 -0400 Subject: [FieldTrip] No backprojection following ICA In-Reply-To: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> References: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> Message-ID: Hello Jan-Mathijs, Thank you for your response, I am glad to know that I needn't worry, and really appreciate your time! If at a later stage in my project I needed to compute leadfield matrices for source localization, what steps would I need to take in order to do so? Thanks, Peter On Fri, Jun 12, 2015 at 2:35 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Dear Peter, > > Depending on what you want to do, you need or need not worry about the > warning you get. Since you mention that in first instance you want to look > at connectivity at the channel level, I think you are safe. The warning > pertains to the application of the spatial transformation to the low-level > description of the channel array (the elec-structure), and not to the > actual data. In short, the back projection *is* applied to the data > itself, but there is insufficient information available in the sensor > description to be able to apply the same projection to this as well. The > latter would be needed if at a later stage you want to do source > reconstruction, for which you need to compute leadfield matrices, where the > forward model should include information about the spatial topographies > that have been removed. > > Best, > Jan-Mathijs > > On Jun 10, 2015, at 2:00 AM, Peter Lyons wrote: > > Hello All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different frequency > bands as well as phase lag index between various sensors. > > I have come across a problem when I attempt to call ft_rejectcomponent > following an ICA of my data. The ICA was performed using > ft_componentanalysis, and the data was viewed using ft_databrowser to > determine unwanted components. Following these steps I ran this code: > > cfg = [] > cfg.component = [3 5] > data_clean = ft_rejectcomponent(cfg,data_ica) > > which returned the following message: > > "not applying the backprojection matrix to the sensor description" > > My question is how do I proceed to allow the application of the > backprojection matrix? > I assume I am leaving some vital piece of code out? > > Prior to calling ft_componentanalysis my continuous data was > bandpass filtered using ft_preprocessing, and the reference was removed > using the code: > > cfg = [] > cfg.channel = {'all','-E65'} > data_64 = ft_preprocessing(cfg,data_filt) > > > I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 > hz. > > Any advice would be greatly appreciated! > > Thanks, > Peter > > > _______________________________________________ > 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 bibi.raquel at gmail.com Fri Jun 12 23:29:39 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Fri, 12 Jun 2015 17:29:39 -0400 Subject: [FieldTrip] importing and segmenting CNT and TRG files In-Reply-To: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> References: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Message-ID: I had to modify one of Fieldtrip's files recently. If you give me yours I can see if my modifications work for your data. Best, Raquel Sent from my iPhone > On Jun 9, 2015, at 10:48 AM, Nikola Valchev wrote: > > Dear all, > I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: > 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? > 2) I can’t seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. > > Any help is appreciated and I’m sorry if I’m not too clear, I’m new to EEG. > > Nikola > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Jun 14 19:49:39 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 14 Jun 2015 17:49:39 +0000 Subject: [FieldTrip] Apply atlas to MNE grid In-Reply-To: References: Message-ID: Hi Marieke, a) The reason I doubt the validity of this method is that when I find high activity on the MNE grid in seemingly temporal or occipital sources, the blob on the MRI image tends to end up on the brainstem or cerebellum (an example can be seen in the attached image). Any thoughts on what could cause this? Could there for example be an issue with cerebellar grid points not being included in the MNE grid, but which are present in the beamformer/cubic grid? Do you have any thoughts on the validity of this approach and the resulting effect? Essentially, when you are reconstructing the source activity on the cotrical sheet, but interpolate onto a 3D grid, you are basically extrapolating data onto voxels that fall outside the cortical sheet. Thus, indeed, cerebellum and brainstrem values need to be taken with a very large pinch of salt. A suggestion here would be to create a voxel-based mask, that masks out all voxels that are too far away from the cortical sheet. b) This pipeline feels rather contrived, with a bit too many interpolations to my liking. Is it somehow possible to shorten this pipeline? For example, is it possible to directly link the vertices of the MNE surface to an atlas? You could consider another route, where you use a surface based atlas (e.g. the Conte 69 atlas, based on Brodmann area labels). This would however require your cortical sheets to be registered in surface space (to a template). This can be done with the Caret package, or better still with some dedicated HCP code. You can google for ‘freesurfer fs to LR’ if you want to go this route and get started. Best, JM Any thoughts or hints on this would be greatly appreciated. Best, Marieke _______________________________________________ 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 M.vanEs at donders.ru.nl Mon Jun 15 13:42:43 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Mon, 15 Jun 2015 11:42:43 +0000 Subject: [FieldTrip] error in ft_artifact_zvalue Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Hi fieldtrippers, thanks for your response. I use matlab2013a. I just checked the function on matlab2012a and I get the same error. I am using an older version of ft_artifact_zvalue right now (version 24-02-15) where the mouse does work (though as mentioned the keyboard does not). Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: From WanjaMoessing at gmx.de Mon Jun 15 19:23:46 2015 From: WanjaMoessing at gmx.de (Wanja Moessing) Date: Mon, 15 Jun 2015 19:23:46 +0200 Subject: [FieldTrip] common ft_freqbaseline for variable length trials In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Message-ID: Dear Fieldtripers, We have EEG data with variable length trials and want to look at the time-frequency response around two triggers. As we want to use the same baseline for both TOIs, we preprocess the complete trials (6-8s) with variable triallength and use ft_freqanalysis with keeptrials = 'yes'. Then baseline with ft_freqbaseline and subsequently we would like to cut out trialwise the +/- 1.5s around each trigger and then average these pieces. Information about the respective triggers is stored in .trialinfo as trigger+sample to be able to locate the triggers. For some reason I cannot seem to find an option to redefine and average the trials after baseline and wavelet analysis. Attached is the code we use. I'd be thankful for any hints. Kind Regards, Wanja ----------------------------CODE--------------------------------------- cfg = []; cfg.keeptrials = 'yes'; cfg.keeptaper = 'no'; cfg.output = 'pow'; cfg.channel = {'FCz','Cz'}; cfg.method = 'wavelet'; cfg.pad = 'maxperlen'; cfg.foi = [1:2:40]; cfg.toi = 'all'; cfg.width = 9; cfg.conditions = [1.7,1.8,1.9,2.7,2.8,2.9]; baselinecfg = []; baselinecfg.baseline = [-1 0]; %1s before trialonset baselinecfg.baselinetype = 'relchange'; baselinecfg.parameter = 'powspctrm'; %loop over subjects and conditions for subject = 1:length(data_all_clean) curcon = 0; for cond = cfg.conditions curcon = curcon+1; idx = 0; cfg.trials = find(data_all_clean(subject).trialinfo(:,1) == cond); %contains info about the condition of each trial data_subj_Wave{1,curcon} = ft_freqanalysis(cfg,data_all_clean(subject)); %Data of subject x in condition y data_subj_Wave{6,curcon} = ft_freqbaseline(baselinecfg,data_subj_Wave{1,curcon}); %...and the baselined data data_subj_Wave{2,curcon} = cond; %pass information about the condition on data_subj_Wave{3,curcon} = length(cfg.trials); % store N trials per condition data_subj_Wave{4,curcon} = data_all_clean(subject).trialinfo(1,2); %SubjectNr data_subj_Wave{5,curcon} = data_all_clean(subject).trialinfo(1,3); %SessionNr end data_all_Wave{1,subject} = data_subj_Wave; data_all_Wave{2,subject} = data_all_clean(subject).trialinfo(1,2); data_all_Wave{3,subject} = data_all_clean(subject).trialinfo(1,3); end From tzvetan.popov at uni-konstanz.de Mon Jun 15 21:37:21 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 15 Jun 2015 21:37:21 +0200 Subject: [FieldTrip] common ft_freqbaseline for variable length trials In-Reply-To: References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Message-ID: Hi Wanja, > For some reason I cannot seem to find an option to redefine and average the trials after baseline and wavelet analysis. I guess what you are after is ft_selectdata for selecting your desired time freq chan. Then you could do ft_freqdescriptives or use cfg.avgoverrpt = ‘yes’; during the call to ft_selectdata. Side note: baseline over the single trials and than averaging vs. average over rpt and then baseline will produce different output. I’m not sure whether you want to do single trial baseline correction or not. In any case the latter is typically done in the literature. Good luck, Tzvetan From isabella.premoli at gmail.com Tue Jun 16 14:33:51 2015 From: isabella.premoli at gmail.com (isabella premoli) Date: Tue, 16 Jun 2015 13:33:51 +0100 Subject: [FieldTrip] Channel repair problem Message-ID: Hi all, I am using ft_channelrepair to delete and interpolate bad channels. However, I noticed that after this process the order of the labels is changed and the interpolated channels are placed at the end of cfg.label list. As you can imagine, this situation differs between subjects and conditions. My question is, when I run ft_timelockgrandaverage to calculate the grand average across subjects and condition, has the fact that each subject/condition has different cfg.labels been taken into account? If not, how can I deal with it? Many thanks! Isabella -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at think-now.com Thu Jun 18 22:21:22 2015 From: greg at think-now.com (Greg Simpson) Date: Thu, 18 Jun 2015 13:21:22 -0700 Subject: [FieldTrip] RA Position Open In-Reply-To: References: Message-ID: Dear Colleagues, I would like to announce that our Research Associate position has been filled. Thank you, Greg Gregory V. Simpson, Ph.D. Founder & CSO Think Now, Inc. On Fri, May 22, 2015 at 5:11 PM, Greg Simpson wrote: > Dear Colleagues, > > I would like to announce an opening for a Research Associate (see ad > below). > > Please spread the word. > > Thank you, > > Greg > > Research Associate – Cognitive Training > > > > Think Now Incorporated is seeking a research associate to work on a NIMH > funded project testing the effects of mobile software training on attention > in adults with ADHD. Duties will include recruiting, screening and testing > (both behavioral tests and EEG tests) of adults with ADHD, before and after > they train their attention with the mobile software. We are seeking > candidates with direct hands-on experience in conducting > cognitive/psychological tests or related experience. Experience with > collecting EEG data is not required but would be great. Also, experience > with MatLab and statistical packages such as SPSS would be a plus. We > prefer strongly self-directed individuals with great people-skills to take > on this work. > > > > The position reports directly to Greg Simpson, Ph.D., a cognitive > neuroscientist and Chief Scientific Officer of Think Now. Think Now is > located in San Francisco and our research partners for this effort are > located at UCLA in Los Angeles. Candidates need to be located in the Los > Angeles area. > > > > Think Now is focused on creating solutions for the diagnosis and > amelioration of neurological disorders with a focus on attention and its > control. Please send your CV to jobs at think-now.com with a letter > describing your prior experience with conducting studies with adults (and > any EEG experience) and your reason for being interested in this position. > > Gregory V. Simpson, Ph.D. > Think Now, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From girwin at uni-osnabrueck.de Fri Jun 19 10:06:15 2015 From: girwin at uni-osnabrueck.de (girwin at uni-osnabrueck.de) Date: Fri, 19 Jun 2015 10:06:15 +0200 (CEST) Subject: [FieldTrip] running tmsidriver with ASA Message-ID: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> Hello mailinglist, I would like to know if anyone has ever attempted to run the tmsidriver(.exe) in parallel to the ASA EEG recording software. If I attempt it one of the two always breaks down, and preferably I would like to stream with the tmsidriver while recording with the ASA software at the same time. If anyone knows a way to do this I would be grateful. Cheers, Gerrit Irwin From M.vanEs at donders.ru.nl Fri Jun 19 12:44:04 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Fri, 19 Jun 2015 10:44:04 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Fri Jun 19 12:59:27 2015 From: robince at gmail.com (Robin) Date: Fri, 19 Jun 2015 11:59:27 +0100 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: I have just updated my FieldTrip version to the current GitHub version and I'm getting the same error with Matlab R2015a. There doesn't seem to be any matlabversion.m in the current GitHub source tree as there was in previous versions. Copying FT/private/matlabversion.m from an earlier version stops the errors for me. Cheers Robin On 19 June 2015 at 11:44, Es, M.W.J. van (Mats) wrote: > Hi fieldtrippers, > > I know this is not the conventional way to report a bug, but it seems I > am not able to create a bugzilla account at this moment. Since today I get > an error using ft_databrowser (data is normal MEG data, preprocessed): > > *cfg = [];* > *cfg.channel = 'MEG';* > *cfg.viewmode = 'vertical';* > *cfg = ft_databrowser(cfg, data);* > > I get the following error many (50+) times: > > > *Undefined function 'matlabversion' for input arguments of type 'char'.* > > *Error in ft_platform_supports (line 58)* > * tf=is_matlab() && matlabversion('2014b', Inf);* > > *Error in ft_select_range (line 81)* > *if ft_platform_supports('graphics_objects')* > > *Error using waitfor* > *Error while evaluating figure WindowButtonMotionFcn* > > I am using matlab2013a on Linux, and I also tried matlab2012a, both show > the error. > > Best, > Mats > > _______________________________________________ > 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 robince at gmail.com Fri Jun 19 13:02:05 2015 From: robince at gmail.com (Robin) Date: Fri, 19 Jun 2015 12:02:05 +0100 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Actually copying the file didn't fix it - the error still comes when the mouse moves over the figure. On 19 June 2015 at 11:59, Robin wrote: > I have just updated my FieldTrip version to the current GitHub version and > I'm getting the same error with Matlab R2015a. > > There doesn't seem to be any matlabversion.m in the current GitHub source > tree as there was in previous versions. > > Copying FT/private/matlabversion.m from an earlier version stops the > errors for me. > > Cheers > > Robin > > On 19 June 2015 at 11:44, Es, M.W.J. van (Mats) > wrote: > >> Hi fieldtrippers, >> >> I know this is not the conventional way to report a bug, but it seems I >> am not able to create a bugzilla account at this moment. Since today I get >> an error using ft_databrowser (data is normal MEG data, preprocessed): >> >> *cfg = [];* >> *cfg.channel = 'MEG';* >> *cfg.viewmode = 'vertical';* >> *cfg = ft_databrowser(cfg, data);* >> >> I get the following error many (50+) times: >> >> >> *Undefined function 'matlabversion' for input arguments of type 'char'.* >> >> *Error in ft_platform_supports (line 58)* >> * tf=is_matlab() && matlabversion('2014b', Inf);* >> >> *Error in ft_select_range (line 81)* >> *if ft_platform_supports('graphics_objects')* >> >> *Error using waitfor* >> *Error while evaluating figure WindowButtonMotionFcn* >> >> I am using matlab2013a on Linux, and I also tried matlab2012a, both >> show the error. >> >> Best, >> Mats >> >> _______________________________________________ >> 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 daniel.haehnke at lrz.tu-muenchen.de Fri Jun 19 13:35:47 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?UTF-8?Q?H=C3=A4hnke=2C_Daniel?=) Date: Fri, 19 Jun 2015 13:35:47 +0200 Subject: [FieldTrip] Tutorial "Preprocessing and analysis of spike and local field potential data": Different STAs Message-ID: <7dc7a0c33a9ebeeb09e0f73a082f0480@roundcube.lrz.de> Dear community, I've been learning how to use FieldTrip by the series of tutorials on the website. While doing the last tutorial "Preprocessing and analysis of spike and local field potential data" I found that my output of spike triggered averages (STAs) isn't the same as in the tutorials. The plots of staPost and staPre are exactly the same for me and are identical to the first STA plot (staPost) in the tutorial. The only difference between the two STAs is cfg.latency, which is [0.3 10] for staPost and [-2.75 0]. If I omit cfg.latency I get the exact same values when running ft_spiketriggeredaverage(). This actually does make sense because the STA just averages LFPs 'around' spikes, so there is no need to specify a latency. I'm still curious, though, what was computed to obtain the plot for staPre in the tutorial. Could anyone clarify that? Kind regards, Daniel Hähnke -- Technische Universität München Daniel Hähnke Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 D-80802 München Tel.: +49 89 4140 3356 daniel.haehnke at lrz.tum.de www.ifn.me.tum.de From jan.schoffelen at donders.ru.nl Fri Jun 19 14:24:34 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Jun 2015 12:24:34 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Hi Mats and Robin, You seem to be running into the same problem as Robin just reported before you. Both error messages point to ft_select_range, which is in fieldtrip/plotting. ft_select_range calls ft_platform_supports (which is a very fresh addition to FieldTrip), which is located in fieldtrip/plotting/private. Now, ft_platform_supports wants to call matlabversion and it cannot find it at this location. Looking into fieldtrip/plotting/private, I see that indeed it is missing there. I will fix this. Best, Jan-Mathijs On Jun 19, 2015, at 12:44 PM, Es, M.W.J. van (Mats) > wrote: Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 19 14:37:33 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Jun 2015 12:37:33 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Hi Mats, I didn’t read Robin’s earlier e-mails in sufficient detail, but she already provided a clue to a solution. I created a bug (2912) for this, if you create an account on bugzilla, and put yourself on the CC list for this bug, you can follow it’s resolution. Best, JM On Jun 19, 2015, at 12:44 PM, Es, M.W.J. van (Mats) > wrote: Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats _______________________________________________ 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 xieyuanj at gmail.com Mon Jun 22 03:20:43 2015 From: xieyuanj at gmail.com (- -) Date: Mon, 22 Jun 2015 01:20:43 +0000 Subject: [FieldTrip] ask help Message-ID: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> Dear community, I load a .set format of file from eeglab, the matlab show an error,that is ''error using load,number of columns on line 2 of ASCII file must be the same as previous lines". but why, is it not compatible with the file format? any suggestion would be appreciated. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Mon Jun 22 09:00:41 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 22 Jun 2015 07:00:41 +0000 Subject: [FieldTrip] ask help In-Reply-To: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> References: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB4E3CA0@exprd01.hosting.ru.nl> Dear Jun, Could you please be a bit more specific as to what fieldtrip functions (and configuration options) you are using in combination with this eeglab file? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of - - Sent: maandag 22 juni 2015 3:21 To: fieldtrip, donders Subject: [FieldTrip] ask help Dear community, I load a .set format of file from eeglab, the matlab show an error,that is ''error using load,number of columns on line 2 of ASCII file must be the same as previous lines". but why, is it not compatible with the file format? any suggestion would be appreciated. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Mon Jun 22 12:42:54 2015 From: robince at gmail.com (Robin) Date: Mon, 22 Jun 2015 11:42:54 +0100 Subject: [FieldTrip] updatesens option with planar gradient Message-ID: Hello, I have selected heartbeat and eye movement ICA components in my MEG data and I would now like to remove them from the data. I saw there is an "updatesens" option in ft_rejectcomponent which seems to update the gradiometer definitions when the components are rejected, but I couldn't find any further description of what this is. After component rejection I would like to calculate the planar gradient with ft_megplanar. In this case should what is the correct setting for updatesens in the ft_rejectcomponent stage? Thanks, Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From russgport at gmail.com Mon Jun 22 17:37:07 2015 From: russgport at gmail.com (russ port) Date: Mon, 22 Jun 2015 11:37:07 -0400 Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots Message-ID: Hi All, After reading the wiki (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests ), it appears that I cannot do a cluster based permutation test on a set of data I have because of the fact that I have two between subject factors (genotype and sex). There has been a lot of discussion on the mailing list about how to run these kinds of analyses, but they have always (or at least what I could find), been about data set containing only 1 between subjects factor. As such, I have a question in two parts A) could I look at the data with a proper test of the between subject factors, and the within subject factor AND their interaction using a permutation test that use holms or bonferroni correction (though I would probably use holms because of bonferroni being to conservative) B) should I set this up by either i) testing geno, sex and their interaction separately like I think the wiki suggests above or ii) try and use the cfg.cvar input as previously suggested else where on this discussion list (though again that was for data with only 1 between subject variable)? Best, Russ Port -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Tue Jun 23 15:22:46 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Tue, 23 Jun 2015 13:22:46 +0000 Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots In-Reply-To: References: Message-ID: Hi Russ, From: russ port > Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots Date: 22 Jun 2015 17:37:07 CEST To: > Reply-To: FieldTrip discussion list > Hi All, After reading the wiki (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), it appears that I cannot do a cluster based permutation test on a set of data I have because of the fact that I have two between subject factors (genotype and sex). There has been a lot of discussion on the mailing list about how to run these kinds of analyses, but they have always (or at least what I could find), been about data set containing only 1 between subjects factor. As such, I have a question in two parts A) could I look at the data with a proper test of the between subject factors, and the within subject factor AND their interaction using a permutation test that use holms or bonferroni correction (though I would probably use holms because of bonferroni being to conservative) B) should I set this up by either i) testing geno, sex and their interaction separately like I think the wiki suggests above or ii) try and use the cfg.cvar input as previously suggested else where on this discussion list (though again that was for data with only 1 between subject variable)? With respect to question A: I hope I understand you correctly here: you want to analyse a 2 (between) x 3 (within) design, separately for the the data selected according to the level of the other between-subjects factor (thus, 2 analyses of a 2x3 design). Yes, this is possible in the permutation framework. Using Bonferroni correction to account for the fact that you perform 2 tests instead of 1 is a good idea. With respect to question B: You cannot test the interaction geno x sex in the permutation framework because these are 2 between-subjects factors. Also, the cfg.cvar option is to be used in a within-subjects design (or a matched-pairs design, which is statistically equivalent to a within-subjects design). Thus, the cvar must be within-subjects variable. best, Eric Maris Best, Russ Port _______________________________________________ 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 xieyuanj at gmail.com Fri Jun 26 04:45:18 2015 From: xieyuanj at gmail.com (- -) Date: Fri, 26 Jun 2015 10:45:18 +0800 Subject: [FieldTrip] (no subject) Message-ID: Hi All I prepossessed some data using eeglab, now how can I load these .set files to matlab by fieldtrip functioni? Any suggestion would be appreciated. Thanks. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Fri Jun 26 06:33:58 2015 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Thu, 25 Jun 2015 21:33:58 -0700 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <6FA83067-15D3-4523-BB63-0D70901C29AB@cerco.ups-tlse.fr> You can use the File-IO importer (separate download from Fieldtrip) which is the default toolbox to import data in Fieldtrip. Best, Arno > On Jun 25, 2015, at 7:45 PM, - - wrote: > > Hi All > > I prepossessed some data using eeglab, now how can I load these .set files to matlab by fieldtrip functioni? > Any suggestion would be appreciated. > > Thanks. > > Best, > > Jun > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From xieyuanj at gmail.com Fri Jun 26 12:55:53 2015 From: xieyuanj at gmail.com (- -) Date: Fri, 26 Jun 2015 18:55:53 +0800 Subject: [FieldTrip] (no subject) Message-ID: Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 26 13:09:58 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 26 Jun 2015 11:09:58 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> Hi! Perhaps you could have a look a this link. It may help. https://www.youtube.com/watch?v=OGyHRhbOG2Y Have a nice day. Jan-Mathijs On Jun 26, 2015, at 12:55 PM, - - wrote: > Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Fri Jun 26 16:45:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 26 Jun 2015 17:45:55 +0300 Subject: [FieldTrip] running tmsidriver with ASA In-Reply-To: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> References: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> Message-ID: <603E0E85-6DB5-41E8-B44A-7E14210CADDC@donders.ru.nl> Hi Gerrit, We don’t have ASA software nor TMSi hardware at the Donders, so we have never tested it ourselves. But ANT has implemented http://www.fieldtriptoolbox.org/development/realtime/neurosdk, which is a FieldTrip buffer interface directly to their acquisition software (instead of to the lower level tmsi driver). Perhaps that might be of use to you. You would have to ask ANT for further details. best regards, Robert On 19 Jun 2015, at 11:06, girwin at uni-osnabrueck.de wrote: > Hello mailinglist, > > I would like to know if anyone has ever attempted to run the > tmsidriver(.exe) in parallel to the ASA EEG recording software. If I > attempt it one of the two always breaks down, and preferably I would > like to stream with the tmsidriver while recording with the ASA software > at the same time. If anyone knows a way to do this I would be grateful. > > Cheers, > Gerrit Irwin > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tzvetan.popov at uni-konstanz.de Fri Jun 26 18:44:06 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 26 Jun 2015 18:44:06 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <694412C9-38DF-4491-964E-D85188360AFA@uni-konstanz.de> Hi - -, I hope you can find some help here before struggling too hard with the new computer. http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 tzvetan > Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nikola.valchev.umcg at gmail.com Sat Jun 27 13:34:54 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Sat, 27 Jun 2015 13:34:54 +0200 Subject: [FieldTrip] importing and segmenting CNT and TRG files In-Reply-To: References: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Message-ID: <558e8a5f.6a3ec20a.edb85.26ff@mx.google.com> Dear Raquel, Thank you very much for the offer. Actually it turned out that the CNT files were too big to preprocess on a normal computer so I exported them differently and then applied the preprocessing. Best Nikola From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Raquel Bibi Sent: 12 June 2015 23:30 To: FieldTrip discussion list Subject: Re: [FieldTrip] importing and segmenting CNT and TRG files I had to modify one of Fieldtrip's files recently. If you give me yours I can see if my modifications work for your data. Best, Raquel Sent from my iPhone On Jun 9, 2015, at 10:48 AM, Nikola Valchev wrote: Dear all, I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? 2) I can’t seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. Any help is appreciated and I’m sorry if I’m not too clear, I’m new to EEG. Nikola _______________________________________________ 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 plyons at udel.edu Mon Jun 29 05:51:19 2015 From: plyons at udel.edu (Peter Lyons) Date: Sun, 28 Jun 2015 23:51:19 -0400 Subject: [FieldTrip] Help Manually Defining Trials Message-ID: Dear All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. My dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do not have any events or triggers in my data. I would like to manually select the cleanest segments of my data following artifact rejection, and define them as trials. Theoretically, I see three ways to segment my data manually: 1. Insert individual triggers throughout my data (at locations determined via ft_databrowser), and then define trials based on these triggers. 2. Define trials based on a beginning and ending sample number. 3. Use ft_databrowser to select segments of data as if they were artifacts, and then define these "artifacts" as trials instead of rejecting them from the dataset. Could anyone advise on how to code one of the above methods? Any help is welcome and appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Mon Jun 29 15:02:00 2015 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Mon, 29 Jun 2015 09:02:00 -0400 Subject: [FieldTrip] Help Manually Defining Trials In-Reply-To: References: Message-ID: Hi Peter, Maybe you can redefine (ft_redefinetrials) your trials (from one whole continue trials to chunks of data) in segments that allow you to properly resolve your frequencies of interest. After that you can perform a trial rejection based on automatic or manual artifact detection...then you can do whatever you need to do. Could be other ways, but this for me looks very straight forward for at least a first exploratory round of analysis. I hope this helps you. Best Rodrigo On Sun, Jun 28, 2015 at 11:51 PM, Peter Lyons wrote: > Dear All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different > frequency bands as well as phase lag index between various sensors. My > dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do > not have any events or triggers in my data. > > I would like to manually select the cleanest segments of my data following > artifact rejection, and define them as trials. > > Theoretically, I see three ways to segment my data manually: > > 1. Insert individual triggers throughout my data (at locations determined > via ft_databrowser), and then define trials based on these triggers. > > 2. Define trials based on a beginning and ending sample number. > > 3. Use ft_databrowser to select segments of data as if they were > artifacts, and then define these "artifacts" as trials instead of rejecting > them from the dataset. > > Could anyone advise on how to code one of the above methods? > > Any help is welcome and appreciated! > > Thanks, > Peter > > > > _______________________________________________ > 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 spa268 at nyu.edu Mon Jun 29 15:31:46 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Mon, 29 Jun 2015 17:31:46 +0400 Subject: [FieldTrip] Help Manually Defining Trials Message-ID: Hi Peter, http://www.fieldtriptoolbox.org/reference/ft_definetrial describes the format of the trial definition matrix; you can simply create a matrix like this using the times that you would like to choose for your epochs, and then run ft_preprocessing() with this matrix as the input for cfg.trl. (This is basically a combination of methods (1) and (2) that you suggested below.) Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Mon, Jun 29, 2015 at 2:00 PM, wrote: > > > Message: 1 > Date: Sun, 28 Jun 2015 23:51:19 -0400 > From: Peter Lyons > To: FieldTrip discussion list > Subject: [FieldTrip] Help Manually Defining Trials > Message-ID: > sw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different frequency > bands as well as phase lag index between various sensors. My dataset is a > continuous recording sampled at 1000 hz for 30 minutes. I do not have any > events or triggers in my data. > > I would like to manually select the cleanest segments of my data following > artifact rejection, and define them as trials. > > Theoretically, I see three ways to segment my data manually: > > 1. Insert individual triggers throughout my data (at locations determined > via ft_databrowser), and then define trials based on these triggers. > > 2. Define trials based on a beginning and ending sample number. > > 3. Use ft_databrowser to select segments of data as if they were > artifacts, and then define these "artifacts" as trials instead of rejecting > them from the dataset. > > Could anyone advise on how to code one of the above methods? > > Any help is welcome and appreciated! > > Thanks, > Peter > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150628/d926ab81/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 55, Issue 26 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Mon Jun 29 16:16:11 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Mon, 29 Jun 2015 14:16:11 +0000 Subject: [FieldTrip] Help Manually Defining Trials In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C17D5AA19@exprd03.hosting.ru.nl> Hi Peter, In addition to Steve’s perfect suggestion, you might want to take a look at this example script, which basically is a data-driven way to define trials: http://www.fieldtriptoolbox.org/example/detect_the_muscle_activity_in_an_emg_channel_and_use_that_as_trial_definition Here, co-recorded EMG-data is used to define trials, but in your case you can use (some parameter in) your MEG data (e.g., some ‘cleaniness’ measure). Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Stephen Politzer-Ahles Sent: maandag 29 juni 2015 15:32 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Help Manually Defining Trials Hi Peter, http://www.fieldtriptoolbox.org/reference/ft_definetrial describes the format of the trial definition matrix; you can simply create a matrix like this using the times that you would like to choose for your epochs, and then run ft_preprocessing() with this matrix as the input for cfg.trl. (This is basically a combination of methods (1) and (2) that you suggested below.) Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Mon, Jun 29, 2015 at 2:00 PM, > wrote: Message: 1 Date: Sun, 28 Jun 2015 23:51:19 -0400 From: Peter Lyons > To: FieldTrip discussion list > Subject: [FieldTrip] Help Manually Defining Trials Message-ID: > Content-Type: text/plain; charset="utf-8" Dear All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. My dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do not have any events or triggers in my data. I would like to manually select the cleanest segments of my data following artifact rejection, and define them as trials. Theoretically, I see three ways to segment my data manually: 1. Insert individual triggers throughout my data (at locations determined via ft_databrowser), and then define trials based on these triggers. 2. Define trials based on a beginning and ending sample number. 3. Use ft_databrowser to select segments of data as if they were artifacts, and then define these "artifacts" as trials instead of rejecting them from the dataset. Could anyone advise on how to code one of the above methods? Any help is welcome and appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 55, Issue 26 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From bqrosen at ucsd.edu Tue Jun 30 04:09:45 2015 From: bqrosen at ucsd.edu (Burke Rosen) Date: Mon, 29 Jun 2015 19:09:45 -0700 Subject: [FieldTrip] wavelet power units and (2/fsample) correction factor Message-ID: <5591FA69.5080203@ucsd.edu> Hello All, I noticed with simulated input that ft_freqanalysis->ft_specest_wavelet yields powspctrm results that are scaled by the sampling rate of the input data. The scaling factor appears to be (fsample/2). Of course, multiplying by (2/fsample) corrects this. Upon investigation I found that freqanalysis_mtmconvol (the predesessor to ft_specest_wavelet (?)) from fieldtrip-20080624 contains this correction factor on line 294. 1. What is this correction factor and why is it no longer applied? 2. Why is in not applied to the fourierspctrm output? 3. What, in general, are the output units of the ft_freqanalysis->ft_specest_wavelet? Thank you, Burke Rosen From S.Hanslmayr at bham.ac.uk Tue Jun 30 10:43:14 2015 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Tue, 30 Jun 2015 08:43:14 +0000 Subject: [FieldTrip] 5 year postdoc position available in Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CED83878A2@EX8.adf.bham.ac.uk> *********************************************** ********* POSTDOC POSITION AVAILABLE *********** *********************************************** Dear all, We are looking for a full-time Postdoctoral Research Fellow to work within the School of Psychology, University of Birmingham. The successful candidate will work on a 5-year project funded within an ERC Consolidator Grant to investigate the role of brain oscillations for human episodic memory. The project focusses on intracranial single-unit recordings in human epilepsy patients and computational modelling of oscillations in memory networks. The postdoctoral researcher will design and conduct experiments with patients in Birmingham and Germany (Erlangen), analyse electrophysiological data and publish the results in international peer reviewed journals. The researcher should also use computational modelling as a tool to generate hypothesis and test the empirical data. The person we are looking for will have demonstrable experience on human or animal electrophysiology and oscillations as measured with EEG/MEG or, ideally, intracranial EEG. They should have a background, or strong interest, in computational modelling of neural networks. They will have an advanced degree (preferably a PhD in Psychology, Computational Neuroscience, or Neuroscience). They must be fluent using Matlab and related toolboxes for analysing brain oscillatory data (i.e. Fieldtrip). We require an individual with very good communication skills. Strong interest in working in a clinical environment is required, and previous clinical experience is a plus. This position will be held in the Memory and Oscillations Lab and will be supervised by Dr Simon Hanslmayr. The lab is a dynamic active group that includes several other Post docs and PhD students and provides a supportive and stimulating environment in which to work. Start date is 1 October 2015. To download the details of this position and submit an electronic application click HERE or visit www.hr.bham.ac.uk/jobs and enter the job reference number 55204 in the search engine. Please send informal enquiries to Dr Simon Hanslmayr (s.hanslmayr at bham.ac.uk). Dr. Simon Hanslmayr Senior Lecturer School of Psychology University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.birmingham.ac.uk/schools/psychology/people/profile.aspx?ReferenceId=70349 -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.bleichner at uni-oldenburg.de Tue Jun 30 10:47:58 2015 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Tue, 30 Jun 2015 10:47:58 +0200 Subject: [FieldTrip] New mailing list for users of Lab Streaming Layer In-Reply-To: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> References: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> Message-ID: <559257BE.2050503@uni-oldenburg.de> Dear fieldtrip users, there is now a dedicated mailing list for those of you who use the lab streaming layer (LSL) to record and synchronize their time series. The list is for users and developers of LSL, to discuss issues, make announcements and disseminate knowledge. Please contribute. https://mailman.ucsd.edu/mailman/listinfo/lsl-l Best Martin (enthusiastic LSL user) -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ From okba.bekhelifi at gmail.com Mon Jun 1 04:07:34 2015 From: okba.bekhelifi at gmail.com (Okba Bekhelifi) Date: Mon, 1 Jun 2015 04:07:34 +0200 Subject: [FieldTrip] Filedtrip Buffer with BCI2000 Message-ID: Hi! I'm working on BCI research projects, and I need to acquire data from gtec amplifiers, I'm trying to use the Fieldtrip buffer to do so, I followed the example tutorial on BCI2000 wiki but I didn't succeed, what I did was changing the SignalProcessing Port in the BCI2000 config to 1972 (same as for the buffer in Maltab) and run both the BCI2000 modules and the sample Matlab code, but I had an error message: Error using buffer ERROR: failed to create socket (1) Any help will be appreciated I'm using the latest version of both BCI2000 and FieldTrip Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathis.kaiser at charite.de Mon Jun 1 17:20:08 2015 From: mathis.kaiser at charite.de (Mathis Kaiser) Date: Mon, 1 Jun 2015 17:20:08 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <5565D5B6.8020805@gmail.com> References: <4E102991-AB38-44E6-AA60-780A723AFCE2@gmail.com> <5565D5B6.8020805@gmail.com> Message-ID: <556C7828.40903@charite.de> Dear Fieldtrip Users, I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? Thanks for any input, best wishes, Mathis Kaiser > %% tfr and wpli per subject > > cfg = []; > cfg.keeptrials = 'yes'; > cfg.output = 'fourier'; > cfg.foi = 2:20; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > > tfr4conn_ill = ft_freqanalysis(cfg, virt_ill); > tfr4conn_noill = ft_freqanalysis(cfg, virt_noill); > > cfg = []; > cfg.method = 'wpli_debiased'; > > wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill); > wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill); ### > % (I then load all individual datasets into two cell arrays - > all_wpli_ill and all_wpli_noill): > >> display(all_wpli_ill{1}) > label: {638x1 cell} > dimord: 'chan_chan_freq' > wpli_debiasedspctrm: [638x638x10 double] > freq: [1x10 double] > elec: [1x1 struct] > cfg: [1x1 struct] > ### > > %% statistics > > cfg = []; > cfg.parameter = 'wpli_debiasedspctrm'; > cfg.statistic = 'depsamplesT'; > cfg.method = 'montecarlo'; > cfg.correctm = 'cluster'; > cfg.frequency = [10 10]; > cfg.neighbours = []; % no spatial clustering > cfg.numrandomization = 1000; > cfg.correcttail = 'alpha'; > nSub = length(subj); > cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)]; > cfg.design(2,1:2*nSub) = [1:nSub 1:nSub]; > cfg.ivar = 1; > cfg.uvar = 2; > > stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:}); ### > >> display(stat) > > stat = > > prob: [638x638 double] > posclusters: [1x4662 struct] > posclusterslabelmat: [638x638 double] > posdistribution: [1x1000 double] > negclusters: [1x12943 struct] > negclusterslabelmat: [638x638 double] > negdistribution: [1x1000 double] > cirange: [638x638 double] > mask: [638x638 logical] > stat: [638x638 double] > ref: [638x638 double] > dimord: 'chan_chan' > label: {638x1 cell} > freq: 9.9602 > cfg: [1x1 struct] > From cmk0803 at hbf.re.kr Mon Jun 1 21:31:08 2015 From: cmk0803 at hbf.re.kr (=?UTF-8?B?7LWc66+46rK9?=) Date: Tue, 2 Jun 2015 04:31:08 +0900 Subject: [FieldTrip] Source localization of MEG resting state data Message-ID: Dear fieldtrip users, I tried using DICS beamforming on MEG resting state data of healthy controls. (e.g. no task, no baseline, eyes opened) I analyzed to localize oscillatory sources using beamformer techniques according to the following tutorial. (link: http://www.fieldtriptoolbox.org/tutorial/beamformer) However, the output image was weird to be considered as resting data. I would like someone to help me through source localization procedure. *Q1. Is there something wrong in my script as below? * cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [8 12]; cfg.tapsmofrq = 2; cfg.channel = {'MEG'}; cfg.keeptrials = 'yes'; fft_rest = ft_freqanalysis(cfg, data_clean); % resting state MEG data (after preprocessing) %% Computing the leadfield matrices cfg = []; cfg.grad = fft_rest.grad; cfg.vol = vol; % head model cfg.grid = grid; % source model cfg.keeptrials = 'yes'; cfg.normalize = 'yes'; cfg.channel = {'MEG'}; rest_grid = ft_prepare_leadfield(cfg); %% Source analysis cfg = []; cfg.frequency = 'all'; cfg.grad = fft_rest.grad; cfg.method = 'dics'; cfg.grid = rest_grid; cfg.vol = vol; cfg.keeptrials = 'yes'; cfg.keepfilter = 'yes'; cfg.dics.lambda = 0; cfg.dics.projectnoise = 'yes'; rest_source = ft_sourceanalysis(cfg, fft_rest); mri_slice = ft_volumereslice([], mri) %mri: volumesegmented mri cfg = []; cfg.parameter = 'avg.pow'; rest_sointer = ft_sourceinterpolate(cfg, rest_source, mri_slice); *Q2. Is there any way to check whether the beamforming is performed well?* Any help would be greatly appreciated. MK CHOE -- Mi Kyung CHOE Department of Brain & Cognitive Sciences, Seoul National University Human Brain Function Laboratory E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Tue Jun 2 10:28:32 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 2 Jun 2015 10:28:32 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556C7828.40903@charite.de> References: <4E102991-AB38-44E6-AA60-780A723AFCE2@gmail.com> <5565D5B6.8020805@gmail.com> <556C7828.40903@charite.de> Message-ID: <96076F4F-EFD9-4382-B128-924F680FD5EA@uni-konstanz.de> Hi Mathis, alternatively you could use ft_sourcestatistics. For this you should reduce your 600 x 600 x freq matrix to freq of interest first. Next, the resulting 600 x 600 matrix you’d reduce to 600 x 1 where each grid point has a mean connectivity value to all possible grid points. >From then on you could use ft_sourcestatistics and ft_sourceinterpolate to visualize. Good luck, Tzvetan > Dear Fieldtrip Users, > > I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: > > I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). > > The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. > > I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? > Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? > > Thanks for any input, best wishes, > Mathis Kaiser > >> %% tfr and wpli per subject >> >> cfg = []; >> cfg.keeptrials = 'yes'; >> cfg.output = 'fourier'; >> cfg.foi = 2:20; >> cfg.method = 'mtmfft'; >> cfg.taper = 'hanning'; >> >> tfr4conn_ill = ft_freqanalysis(cfg, virt_ill); >> tfr4conn_noill = ft_freqanalysis(cfg, virt_noill); >> >> cfg = []; >> cfg.method = 'wpli_debiased'; >> >> wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill); >> wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill); > ### >> % (I then load all individual datasets into two cell arrays - all_wpli_ill and all_wpli_noill): >> >> display(all_wpli_ill{1}) >> label: {638x1 cell} >> dimord: 'chan_chan_freq' >> wpli_debiasedspctrm: [638x638x10 double] >> freq: [1x10 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> > ### >> >> %% statistics >> >> cfg = []; >> cfg.parameter = 'wpli_debiasedspctrm'; >> cfg.statistic = 'depsamplesT'; >> cfg.method = 'montecarlo'; >> cfg.correctm = 'cluster'; >> cfg.frequency = [10 10]; >> cfg.neighbours = []; % no spatial clustering >> cfg.numrandomization = 1000; >> cfg.correcttail = 'alpha'; >> nSub = length(subj); >> cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)]; >> cfg.design(2,1:2*nSub) = [1:nSub 1:nSub]; >> cfg.ivar = 1; >> cfg.uvar = 2; >> >> stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:}); > ### >> >> display(stat) >> >> stat = >> >> prob: [638x638 double] >> posclusters: [1x4662 struct] >> posclusterslabelmat: [638x638 double] >> posdistribution: [1x1000 double] >> negclusters: [1x12943 struct] >> negclusterslabelmat: [638x638 double] >> negdistribution: [1x1000 double] >> cirange: [638x638 double] >> mask: [638x638 logical] >> stat: [638x638 double] >> ref: [638x638 double] >> dimord: 'chan_chan' >> label: {638x1 cell} >> freq: 9.9602 >> cfg: [1x1 struct] >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tzvetan.popov at uni-konstanz.de Tue Jun 2 10:37:09 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 2 Jun 2015 10:37:09 +0200 Subject: [FieldTrip] Source localization of MEG resting state data In-Reply-To: References: Message-ID: Hi MK CHOE, Q1; please call ft_sourcedescriptives before ft_sourceinterpolate or cfg.keeptrials = ’no’; during the call to ft_sourceanalysis. What do you mean by “weird output”? Q2; If you think of GOF and the like, not really. Sometimes one can take the scalp topography into account and compare the sensor and source level outputs. One way to go is also to split the continuous data into high and low signal pseudo epochs and make a beamformer contrast on the high and low power. How to do so is illustrated here: http://www.fieldtriptoolbox.org/tutorial/networkanalysis Good luck, Tzvetan > Dear fieldtrip users, > > I tried using DICS beamforming on MEG resting state data of healthy controls. > (e.g. no task, no baseline, eyes opened) > > I analyzed to localize oscillatory sources using beamformer techniques according to the following tutorial. > (link: http://www.fieldtriptoolbox.org/tutorial/beamformer) > However, the output image was weird to be considered as resting data. I would like someone to help me through source localization procedure. > > > Q1. Is there something wrong in my script as below? > cfg = []; > cfg.output = 'powandcsd'; > cfg.method = 'mtmfft'; > cfg.foilim = [8 12]; > cfg.tapsmofrq = 2; > cfg.channel = {'MEG'}; > cfg.keeptrials = 'yes'; > fft_rest = ft_freqanalysis(cfg, data_clean); % resting state MEG data (after preprocessing) > > %% Computing the leadfield matrices > cfg = []; > cfg.grad = fft_rest.grad; > cfg.vol = vol; % head model > cfg.grid = grid; % source model > cfg.keeptrials = 'yes'; > cfg.normalize = 'yes'; > cfg.channel = {'MEG'}; > rest_grid = ft_prepare_leadfield(cfg); > > %% Source analysis > cfg = []; > cfg.frequency = 'all'; > cfg.grad = fft_rest.grad; > cfg.method = 'dics'; > cfg.grid = rest_grid; > cfg.vol = vol; > cfg.keeptrials = 'yes'; > cfg.keepfilter = 'yes'; > cfg.dics.lambda = 0; > cfg.dics.projectnoise = 'yes'; > rest_source = ft_sourceanalysis(cfg, fft_rest); > > mri_slice = ft_volumereslice([], mri) %mri: volumesegmented mri > cfg = []; > cfg.parameter = 'avg.pow'; > rest_sointer = ft_sourceinterpolate(cfg, rest_source, mri_slice); > > > Q2. Is there any way to check whether the beamforming is performed well? > > Any help would be greatly appreciated. > > MK CHOE > > -- > Mi Kyung CHOE > Department of Brain & Cognitive Sciences, Seoul National University > Human Brain Function Laboratory > E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr > _______________________________________________ > 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 nick.ketz at gmail.com Tue Jun 2 17:53:42 2015 From: nick.ketz at gmail.com (Nick Ketz) Date: Tue, 02 Jun 2015 09:53:42 -0600 Subject: [FieldTrip] fieldtrip Digest, Vol 55, Issue 2 In-Reply-To: References: Message-ID: <556DD186.7070309@gmail.com> Mathis, you have hit on a much larger problem. Tzvetan is right to suggest calculating each grid-point's connectivity with all other grid-points, which gives you a connectivity topography map for each grid-point. The next logical step, which I've been struggling with, is to somehow cluster these topographies together, giving you clusters of neighboring grid-point topographies that are similar. Is there any work being done to solve this problem? I have been struggling with this problem for some time, that is: how to do cluster based permutation statistics in chan x chan bins of connectivity measures. Ideally I want to do this in a full chan x chan x freq x time cluster analysis. I've searched on the list for related topics; posted, probably incoherently, my own issues; and generally scanned the list and the literature for any sort of relevant topics trying to broach this problem, but am still stuck. The standard 3d chan x freq x time clustering uses a neighborhood structure to define what channels are considered neighbors, and uses numeric adjacency to cluster time and frequency. With chan x chan data however, there unfortunately isn't an intuitive way to think about neighborhood for the pairwise connectivity. There are neighbors surrounding the reference grid-point, and there are neighbors in each grid-point's connectivity topography, i.e. neighboring grid-points that have similar/significant connectivity values. How do you combine the two in a sensible way? And even more challenging how do you do statistics on them? I have been considering several approaches, including multi-dimensional scaling of these grid-point connectivity topographies, or just a correlation between topographies, and then using those values to select which reference grid-points to consider as similar enough to average together. This then gives you a reference cluster of grid-points and allows you to do standard cluster permutation statistics on the average of the reference grid-points. How exactly to determine which reference grid-points are 'similar enough' to be consider clusters is the tricky part, i.e. how can you statistically test if they should be considered a cluster or not? I've been working in isolation on this problem for some time, and would love a discussion on the topic. I'm hoping this message spurs other list lurkers to at least commiserate with me, but if possible to also post whatever approaches they have taken to solve the problem of clustering pairwise connectivity data. Nick On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: > Hi Mathis, alternatively you could use ft_sourcestatistics. For this > you should reduce your 600 x 600 x freq matrix to freq of interest > first. Next, the resulting 600 x 600 matrix you?d reduce to 600 x 1 > where each grid point has a mean connectivity value to all possible > grid points. >From then on you could use ft_sourcestatistics and > ft_sourceinterpolate to visualize. Good luck, Tzvetan >> >Dear Fieldtrip Users, >> > >> >I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: >> > >> >I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). >> > >> >The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. >> > >> >I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? >> >Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? >> > >> >Thanks for any input, best wishes, >> >Mathis Kaiser From tomh at kurage.nimh.nih.gov Tue Jun 2 19:33:23 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Tue, 2 Jun 2015 13:33:23 -0400 Subject: [FieldTrip] fieldtrip Digest, Vol 55, Issue 2 In-Reply-To: <556DD186.7070309@gmail.com> References: <556DD186.7070309@gmail.com> Message-ID: <20150602133323.7df2fbe7@kurage.nimh.nih.gov> Several people have been doing things with spectral clustering, involving the graph Laplacian, wherein we say that each voxel of the brain is a node in a graph, and various connectivity measures connect the nodes. The Laplacian of the graph has many interesting properties, and the first K eigenvalues can be used to create clusters. I'm afraid I don't know how to do permutation stats on that, but k-means clustering of the graph eigenvectors can have random starting points ... On Tue, 02 Jun 2015 09:53:42 -0600 Nick Ketz wrote: > Mathis, you have hit on a much larger problem. Tzvetan is right to > suggest calculating each grid-point's connectivity with all other > grid-points, which gives you a connectivity topography map for each > grid-point. The next logical step, which I've been struggling with, > is to somehow cluster these topographies together, giving you > clusters of neighboring grid-point topographies that are similar. Is > there any work being done to solve this problem? > > I have been struggling with this problem for some time, that is: how > to do cluster based permutation statistics in chan x chan bins of > connectivity measures. Ideally I want to do this in a full chan x > chan x freq x time cluster analysis. I've searched on the list for > related topics; posted, probably incoherently, my own issues; and > generally scanned the list and the literature for any sort of > relevant topics trying to broach this problem, but am still stuck. > > The standard 3d chan x freq x time clustering uses a neighborhood > structure to define what channels are considered neighbors, and uses > numeric adjacency to cluster time and frequency. With chan x chan > data however, there unfortunately isn't an intuitive way to think > about neighborhood for the pairwise connectivity. There are > neighbors surrounding the reference grid-point, and there are > neighbors in each grid-point's connectivity topography, i.e. > neighboring grid-points that have similar/significant connectivity > values. How do you combine the two in a sensible way? And even more > challenging how do you do statistics on them? > > I have been considering several approaches, including > multi-dimensional scaling of these grid-point connectivity > topographies, or just a correlation between topographies, and then > using those values to select which reference grid-points to consider > as similar enough to average together. This then gives you a > reference cluster of grid-points and allows you to do standard > cluster permutation statistics on the average of the reference > grid-points. How exactly to determine which reference grid-points > are 'similar enough' to be consider clusters is the tricky part, i.e. > how can you statistically test if they should be considered a cluster > or not? > > I've been working in isolation on this problem for some time, and > would love a discussion on the topic. I'm hoping this message spurs > other list lurkers to at least commiserate with me, but if possible > to also post whatever approaches they have taken to solve the problem > of clustering pairwise connectivity data. > > > > Nick > > > > On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: > > Hi Mathis, alternatively you could use ft_sourcestatistics. For > > this you should reduce your 600 x 600 x freq matrix to freq of > > interest first. Next, the resulting 600 x 600 matrix you?d reduce > > to 600 x 1 where each grid point has a mean connectivity value to > > all possible grid points. >From then on you could use > > ft_sourcestatistics and ft_sourceinterpolate to visualize. Good > > luck, Tzvetan > >> >Dear Fieldtrip Users, > >> > > >> >I am a first-year PhD student and have been lurking here for a > >> >long time (finding lots of useful answers), it's about time I ask > >> >my first question: > >> > > >> >I am trying to compare connectivity in source space (~25 > >> >subjects, between two conditions, ~600 virtual channels on a > >> >1.5cm grid) using ft_freqstatistics with a cluster-based > >> >permutation test (see code below). > >> > > >> >The original input datasets have the dimensions: chan x chan x > >> >freq. I tried restructuring them to chancmb x freq > >> >(seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) > >> >before doing ft_freqstatistics, but the function then takes > >> >forever appending the (admittedly big) datasets. > >> > > >> >I then tried feeding them to ft_freqstatistics without > >> >restructuring, which didn't throw any errors. However, I noticed > >> >that the resulting clusters consist of adjacent cells in the chan > >> >x chan matrix, which doesn't make much sense since channels in > >> >adjacent cells are not necessarily spatially adjacent. I suspect > >> >that ft_freqstatistic assumes the 3-D input to contain a temporal > >> >dimension and therefore tries to build temporally adjacent > >> >clusters. Could any of the fieldtrip developers comment on this? > >> >Does anyone in the FT-community have any advice on how to > >> >statistically evaluate connectivity data using the permutation > >> >approach? > >> > > >> >Thanks for any input, best wishes, > >> >Mathis Kaiser > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tom -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From jb4590 at nyu.edu Tue Jun 2 21:58:18 2015 From: jb4590 at nyu.edu (Julia Basso) Date: Tue, 2 Jun 2015 15:58:18 -0400 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip Message-ID: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia *Julia C. Basso, PhDPost-doctoral Research AssociateNew York UniversityCenter for Neural ScienceSuzuki Laboratorywww.suzukilab.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Tue Jun 2 23:55:07 2015 From: nick.ketz at gmail.com (Nick Ketz) Date: Tue, 02 Jun 2015 15:55:07 -0600 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> Message-ID: <556E263B.4010206@gmail.com> Hi Tom and Jake, thanks very much for adding momentum to this. I haven't yet looked into spectral graph clustering, and really haven't been thinking of it terms of graph theory but it now seems silly that I haven't. If I'm understanding the suggestions correctly, the idea is to use the eigenvectors of the connectivity measure (WPLI in this case) to determine which nodes/voxels to cluster together. So nodes with similar graphs will be clustered together. This would be analogous to the graph bisection problem where k=2. The problem with mixture models is the arbitrary nature of how many clusters to use, and without a way to determine the statistical likelihood of a given cluster this is a real problem for determining the validity of a given cluster. Jake thanks for the resources, I'm beginning to dig into them and they seem promising. My understanding is that graph bisection divides the graph into two groups that have the minimum number of connections between them. So this could be used to cluster nodes that have similar topographies together, but it's not clear the best division would occur in the first bisection, instead possibly in subsequent bisections. Is this where the recursive algorithm comes in? I found this paper of yours ' Spectral Techniques for Graph Bisection in Genetic Algorithms', but it doesn't seem to get past the initial bisection. As I said, I haven't really been thinking of the problem in graph theory terms, but if my understanding is correct the current data set I'm working with could have an adjacency matrix as large as 128x128x70x50 (chan x chan x time x frequency), and as small as 128x128 for a single time x frequency bin. Nick On 6/2/15 12:38 PM, Jacob Martin wrote: > Hi Tom and Nick, > > Here's a paper i wrote which may help give some background on spectral clustering: > > "Ranks and representations for spectral graph bisection" > > I also have a genetic algorithm which uses recursive spectral graph bisection to cluster graphs using the ideas from the above paper. It is written in Java and is quite competitive and fast compared to other algorithms. Nick, perhaps i could lend a hand. > > I suggest looking up Chris Walshaw's partition archive for lots of examples of algorithms. I had a few minimum bisection records in there a while back with an older algorithm, but haven't looked at it in years or tried with my new algorithms yet. > > How big are your adjacency matrices? Note that the minimum bisection problem is NP complete. > > Best > Jake > > -- > Jacob Martin, PhD > Center for Brain and Cognition > CerCo CNRS > Toulouse, France > > > > > > > > > > On 02 Jun 2015, at 13:33, Tom Holroyd wrote: > > Several people have been doing things with spectral clustering, > involving the graph Laplacian, wherein we say that each voxel of the > brain is a node in a graph, and various connectivity measures connect > the nodes. The Laplacian of the graph has many interesting properties, > and the first K eigenvalues can be used to create clusters. > > I'm afraid I don't know how to do permutation stats on that, but > k-means clustering of the graph eigenvectors can have random starting > points ... > > On Tue, 02 Jun 2015 09:53:42 -0600 > Nick Ketz wrote: > >> Mathis, you have hit on a much larger problem. Tzvetan is right to >> suggest calculating each grid-point's connectivity with all other >> grid-points, which gives you a connectivity topography map for each >> grid-point. The next logical step, which I've been struggling with, >> is to somehow cluster these topographies together, giving you >> clusters of neighboring grid-point topographies that are similar. Is >> there any work being done to solve this problem? >> >> I have been struggling with this problem for some time, that is: how >> to do cluster based permutation statistics in chan x chan bins of >> connectivity measures. Ideally I want to do this in a full chan x >> chan x freq x time cluster analysis. I've searched on the list for >> related topics; posted, probably incoherently, my own issues; and >> generally scanned the list and the literature for any sort of >> relevant topics trying to broach this problem, but am still stuck. >> >> The standard 3d chan x freq x time clustering uses a neighborhood >> structure to define what channels are considered neighbors, and uses >> numeric adjacency to cluster time and frequency. With chan x chan >> data however, there unfortunately isn't an intuitive way to think >> about neighborhood for the pairwise connectivity. There are >> neighbors surrounding the reference grid-point, and there are >> neighbors in each grid-point's connectivity topography, i.e. >> neighboring grid-points that have similar/significant connectivity >> values. How do you combine the two in a sensible way? And even more >> challenging how do you do statistics on them? >> >> I have been considering several approaches, including >> multi-dimensional scaling of these grid-point connectivity >> topographies, or just a correlation between topographies, and then >> using those values to select which reference grid-points to consider >> as similar enough to average together. This then gives you a >> reference cluster of grid-points and allows you to do standard >> cluster permutation statistics on the average of the reference >> grid-points. How exactly to determine which reference grid-points >> are 'similar enough' to be consider clusters is the tricky part, i.e. >> how can you statistically test if they should be considered a cluster >> or not? >> >> I've been working in isolation on this problem for some time, and >> would love a discussion on the topic. I'm hoping this message spurs >> other list lurkers to at least commiserate with me, but if possible >> to also post whatever approaches they have taken to solve the problem >> of clustering pairwise connectivity data. >> >> >> >> Nick >> >> >> >>> On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: >>> Hi Mathis, alternatively you could use ft_sourcestatistics. For >>> this you should reduce your 600 x 600 x freq matrix to freq of >>> interest first. Next, the resulting 600 x 600 matrix you?d reduce >>> to 600 x 1 where each grid point has a mean connectivity value to >>> all possible grid points. >From then on you could use >>> ft_sourcestatistics and ft_sourceinterpolate to visualize. Good >>> luck, Tzvetan >>>>> Dear Fieldtrip Users, >>>>> >>>>> I am a first-year PhD student and have been lurking here for a >>>>> long time (finding lots of useful answers), it's about time I ask >>>>> my first question: >>>>> >>>>> I am trying to compare connectivity in source space (~25 >>>>> subjects, between two conditions, ~600 virtual channels on a >>>>> 1.5cm grid) using ft_freqstatistics with a cluster-based >>>>> permutation test (see code below). >>>>> >>>>> The original input datasets have the dimensions: chan x chan x >>>>> freq. I tried restructuring them to chancmb x freq >>>>> (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) >>>>> before doing ft_freqstatistics, but the function then takes >>>>> forever appending the (admittedly big) datasets. >>>>> >>>>> I then tried feeding them to ft_freqstatistics without >>>>> restructuring, which didn't throw any errors. However, I noticed >>>>> that the resulting clusters consist of adjacent cells in the chan >>>>> x chan matrix, which doesn't make much sense since channels in >>>>> adjacent cells are not necessarily spatially adjacent. I suspect >>>>> that ft_freqstatistic assumes the 3-D input to contain a temporal >>>>> dimension and therefore tries to build temporally adjacent >>>>> clusters. Could any of the fieldtrip developers comment on this? >>>>> Does anyone in the FT-community have any advice on how to >>>>> statistically evaluate connectivity data using the permutation >>>>> approach? >>>>> >>>>> Thanks for any input, best wishes, >>>>> Mathis Kaiser >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 3 09:22:51 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 3 Jun 2015 07:22:51 +0000 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip In-Reply-To: References: Message-ID: <68229AB8-0C8B-4BD1-BB61-1A06204EF8FA@fcdonders.ru.nl> Hi Julia, The intantech website mentions the existence of a MATLAB-toolbox to interact with the data (http://intantech.com/RHD2000_matlab_toolbox.html). So, in principle, it is possible to get the data read in into MATLAB, true? It should be then relatively straightforward to convert the data in the MATLAB workspace into a structure that FieldTrip understands (e.g.see: www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat). If you would want to work from the raw datafiles directly, we need to add a set of dedicated low-level functions to FieldTrip (or provide some code-glue that allow interfacing with the commercial matlab-toolbox), as per: www.fieldtriptoolbox.org/faq/how_can_extend_the_reading_functions_with_a_new_dataformat. The FieldTrip team currently lacks the resources to do low-level implementation of fileformats that are not directly relevant to our own scientific work from scratch, but if you are willing to give it a shot, we will certainly do our best to facilitate you. Best wishes, Jan-Mathijs On Jun 2, 2015, at 9:58 PM, Julia Basso > wrote: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia Julia C. Basso, PhD Post-doctoral Research Associate New York University Center for Neural Science Suzuki Laboratory www.suzukilab.com _______________________________________________ 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 tomh at kurage.nimh.nih.gov Wed Jun 3 20:05:42 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Wed, 3 Jun 2015 14:05:42 -0400 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556E263B.4010206@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> <556E263B.4010206@gmail.com> Message-ID: <20150603140542.76d8be0f@kurage.nimh.nih.gov> > The problem with mixture > models is the arbitrary nature of how many clusters to use, and > without a way to determine the statistical likelihood of a given > cluster this is a real problem for determining the validity of a > given cluster. Yea. Given the nature of MEG, with ~300 channels, you look at the eigenvalue spectrum of a typical channel covariance matrix and see that it typically starts to flatten out at around 50 or so, and then figure maybe K=20~25 clusters, so you take the top K (or K-1*) eigenvectors of the Laplacian matrix and use K-means clustering to relabel the nodes (voxels) according to which subnetwork they are in. I tend to sort them by size, and see how they change over conditions. The results are "interesting", but that's different from "publishable". It's a real problem, as you say, to determine the likelihood of a cluster. One approach is to start with random MEG data. Note that passing random MEG data through a beamformer results in almost the same thing as passing real MEG data through a beamformer. Quite a lot of structure is in the weights. So you need to shuffle the beamformers as well. Then do the spectral clustering and look at how things change. This is an open area and I'd welcome any insights anyone may have about how to visualize or work with distributions of clusters in 3D. It is also worth pointing out that all of this depends highly on what your connectivity measure is. Beamformed virtual channels can be quite noisy ... many books have been written about how to estimate spectra, coherence, and the like. This paper is fairly interesting: "A Generalized MVDR Spectrum" Benesty, Chen, and Huang http://externe.emt.inrs.ca/users/benesty/papers/spl_dec2005.pdf * This post is too short to talk about that. -- Dr. Tom -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From M.Nieuwland at ed.ac.uk Wed Jun 3 22:38:27 2015 From: M.Nieuwland at ed.ac.uk (NIEUWLAND Mante) Date: Wed, 3 Jun 2015 20:38:27 +0000 Subject: [FieldTrip] no red color for ft_multiplotTFR Message-ID: Dear all, I'm new to Fieldtrip, so I hope this question isn't too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jorn at artinis.com Thu Jun 4 08:57:22 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Thu, 4 Jun 2015 08:57:22 +0200 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: References: Message-ID: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Dear Mante, most likely you are using a Matlab version >2014a. Mathwork changed the default colormap to Parula instead of Jet, see: http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1 -introduction/ You can change the colormap by using the ‘colormap’ command in Matlab, or if I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same within the ft_ function) 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 NIEUWLAND Mante Sent: Wednesday, June 3, 2015 10:38 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] no red color for ft_multiplotTFR Dear all, I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayobimpe2004 at gmail.com Thu Jun 4 09:03:46 2015 From: ayobimpe2004 at gmail.com (Azeez Adebimpe) Date: Thu, 04 Jun 2015 09:03:46 +0200 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Message-ID: <20150604070346.5251155.71993.2204@gmail.com> An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Jun 4 09:21:10 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 4 Jun 2015 07:21:10 +0000 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB1E9B79@exprd01.hosting.ru.nl> Dear Mante, As a further clarification, if not specified in the configuration as mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig Sent: donderdag 4 juni 2015 8:57 To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] no red color for ft_multiplotTFR Dear Mante, most likely you are using a Matlab version >2014a. Mathwork changed the default colormap to Parula instead of Jet, see: http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/ You can change the colormap by using the 'colormap' command in Matlab, or if I recall correctly, also set cfg.colormap= 'jet' (which is doing the same within the ft_ function) 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 NIEUWLAND Mante Sent: Wednesday, June 3, 2015 10:38 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] no red color for ft_multiplotTFR Dear all, I'm new to Fieldtrip, so I hope this question isn't too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 4 10:10:58 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 4 Jun 2015 09:10:58 +0100 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <556bf2a94ee943e284d0684557a0990f@EXPRD02.hosting.ru.nl> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> <556bf2a94ee943e284d0684557a0990f@EXPRD02.hosting.ru.nl> Message-ID: Dear Mante et al., While indeed you can simply revert to the 'jet' colormap using the mentioned solutions, it's worth noting that rainbow colormaps (such as jet) are considered suboptimal. The two most important arguments against the use of such colormaps are (1) the luminance profile is non-monotonic across the colormap, and (2) the colormap sometimes suggests 'banding' even when the data is smooth. So, the new 'parula' default is definitely an improvement over jet! (At least for sequentially increasing/decreasing values. For data symmetric around some point (e.g. 0) I would recommend neither 'parula' nor 'jet', but a diverging colormap (see below).) For more info, see these links: https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/ http://www.mathworks.com/tagteam/81137_92238v00_RainbowColorMap_57312.pdf Another good luminance-increasing colormap: http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m About diverging colormaps: http://www.sandia.gov/~kmorel/documents/ColorMaps/ And another example: http://www.mathworks.com/matlabcentral/fileexchange/24870-fireice--hot-cold--colormap A good link to understand colormaps and their luminance profile (the link is from the Python library matplotlib, but the ideas apply to Matlab as well of course): http://matplotlib.org/users/colormaps.html Best, Eelke On 4 June 2015 at 08:21, Herring, J.D. (Jim) wrote: > Dear Mante, > > > > As a further clarification, if not specified in the configuration as > mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed > is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards. > > > > Best, > > > > Jim > > > > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig > Sent: donderdag 4 juni 2015 8:57 > > > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] no red color for ft_multiplotTFR > > > > Dear Mante, > > > > most likely you are using a Matlab version >2014a. Mathwork changed the > default colormap to Parula instead of Jet, see: > > http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/ > > You can change the colormap by using the ‘colormap’ command in Matlab, or if > I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same > within the ft_ function) > > > > 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 NIEUWLAND Mante > Sent: Wednesday, June 3, 2015 10:38 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] no red color for ft_multiplotTFR > > > > Dear all, > > > > I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could > not find anything relevant on the previous threads. > > > > When I use the multiplotTFR function (example code pasted below), the hot > color is always yellow and never red, even if I set the zlim to extremely > small values). > > > > I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue > hot-cold colors were standard. Any help is really appreciated! > > > > Cheers, > > Mante > > > > > > > > cfg = []; > > cfg.layout = 'config/biosemi64.lay'; > > cfg.channel = 'all'; > > cfg.baseline = 'no'; > > cfg.xlim = [0 2];%[-0.5 1.5];% > > cfg.ylim = [30 100]; > > cfg.zlim = [-0.1 0.1]; > > cfg.interactive = 'yes'; > > cfg.showlabels = 'yes'; > > cfg.colorbar = 'yes'; > > > > figure; > > ft_multiplotTFR(cfg, grandavg_hi_131_132); > > From david.pedrosa at ndcn.ox.ac.uk Thu Jun 4 12:33:05 2015 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Thu, 4 Jun 2015 10:33:05 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences Message-ID: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Thu Jun 4 12:53:02 2015 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Thu, 4 Jun 2015 10:53:02 +0000 Subject: [FieldTrip] Interactive plot issues Message-ID: Dear all, I have an issue with the interactive plotting function (fieldtrip vers. 20150318; Win7). Interactive plotting doesn't work, neither for ERP nor for TFR data, both by calling the topoplot and singleplot functions. Matlab freezes right after the plot has opened, requiring several 'cancel' commands (Ctrl + c) to become operational again. Below are the error messages that appear after each Ctrl + c. If I set cfg.interactive = 'no'; it works just fine. So somehow, matlab it seems to get stuck somewhere in the ft_select_range function. Note that this occurs not only with my own data, but also with the FT tutorial data. I'd be greatful for any suggestion on how to solve this issue. Kind regards, Ulrich %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ft_topoplotTFR(cfg, data); reading layout from file biosemi64.lay the call to "ft_prepare_layout" took 0 seconds the call to "ft_topoplotTFR" took 1 seconds Operation terminated by user during ft_select_range (line 81) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 82) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 81) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 82) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 84) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 4 13:12:15 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 4 Jun 2015 11:12:15 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: References: Message-ID: <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 nikola.valchev.umcg at gmail.com Thu Jun 4 14:13:42 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Thu, 4 Jun 2015 14:13:42 +0200 Subject: [FieldTrip] importing CNT or EDF data into fieldtrip Message-ID: <557040f6.05aec20a.6661.29e3@mx.google.com> Dear all, I have a possibly rather basic question. I want to read my data with fieldtrip but the formats I can use are either EDF or CNT. That means that I do not have a separate file with my coded triggers (EDF format) or I have a small file NAME.trg (CNT format) which contains information which I can't read. The question is how can I read my triggers from the EDF file or convert the NAME.trg file into something similar to the NAME.vmrk file which is created when data is in EEG format. Any hint is very appreciated. Best regards Nikola -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Jun 4 15:23:01 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 4 Jun 2015 15:23:01 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556E263B.4010206@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> <556E263B.4010206@gmail.com> Message-ID: Dear Nick et al., it is also important to consider alternative possibilities to reduce the degrees of freedom based on the existing knowledge about the data. For example: Case 1- The research question. Consider the case of mid-frontal theta in the context of error related design. Base on what we already know from the existing literature it is probably save to reduce the 128x128x70x50 matrix to a 128x128 where the time-freq tile of interest will be something from .3 to 1 seconds ~6 Hz. Case 2- The data itself. Consider continuous resting state recording and long-range connectivity as a research question. The time dimension doesn’t really make sense and from what we know, or believe to know about long range communication, this is likely to happen in the lower frequency bands. With a peak in the power spectrum as an additional including criterion it is likely that the frequency dimension would be reduced to ~ 10 Hz. Case 3- The preceding analysis Admittedly not always yet more often than not connectivity analysis follows extensive analysis on sensor level where most likely relevant time-frequency tiles were already defined while controlling for MCP. In that case one will go for the connectivity patterns concerning these preceding findings thereby reducing the time-freq dimension again. These are just a few examples where you will have a chan x chan matrix to begin with. Whether you are interested in the mean connective value of a given channel or channel(seed) to all other channels both approaches will give a 128 x 1 matrix that can be further evaluated in the context of a permutation approach or whatever preferred method. Tzvetan > Hi Tom and Jake, thanks very much for adding momentum to this. I haven't yet looked into spectral graph clustering, and really haven't been thinking of it terms of graph theory but it now seems silly that I haven't. > > If I'm understanding the suggestions correctly, the idea is to use the eigenvectors of the connectivity measure (WPLI in this case) to determine which nodes/voxels to cluster together. So nodes with similar graphs will be clustered together. This would be analogous to the graph bisection problem where k=2. The problem with mixture models is the arbitrary nature of how many clusters to use, and without a way to determine the statistical likelihood of a given cluster this is a real problem for determining the validity of a given cluster. > > > Jake thanks for the resources, I'm beginning to dig into them and they seem promising. My understanding is that graph bisection divides the graph into two groups that have the minimum number of connections between them. So this could be used to cluster nodes that have similar topographies together, but it's not clear the best division would occur in the first bisection, instead possibly in subsequent bisections. Is this where the recursive algorithm comes in? I found this paper of yours ' Spectral Techniques for Graph Bisection in Genetic Algorithms', but it doesn't seem to get past the initial bisection. > > > As I said, I haven't really been thinking of the problem in graph theory terms, but if my understanding is correct the current data set I'm working with could have an adjacency matrix as large as 128x128x70x50 (chan x chan x time x frequency), and as small as 128x128 for a single time x frequency bin. > > > Nick > > > On 6/2/15 12:38 PM, Jacob Martin wrote: >> Hi Tom and Nick, >> >> Here's a paper i wrote which may help give some background on spectral clustering: >> >> "Ranks and representations for spectral graph bisection" >> >> I also have a genetic algorithm which uses recursive spectral graph bisection to cluster graphs using the ideas from the above paper. It is written in Java and is quite competitive and fast compared to other algorithms. Nick, perhaps i could lend a hand. >> >> I suggest looking up Chris Walshaw's partition archive for lots of examples of algorithms. I had a few minimum bisection records in there a while back with an older algorithm, but haven't looked at it in years or tried with my new algorithms yet. >> >> How big are your adjacency matrices? Note that the minimum bisection problem is NP complete. >> >> Best >> Jake >> >> -- >> Jacob Martin, PhD >> Center for Brain and Cognition >> CerCo CNRS >> Toulouse, France >> >> >> >> >> >> >> >> >> >> On 02 Jun 2015, at 13:33, Tom Holroyd wrote: >> >> Several people have been doing things with spectral clustering, >> involving the graph Laplacian, wherein we say that each voxel of the >> brain is a node in a graph, and various connectivity measures connect >> the nodes. The Laplacian of the graph has many interesting properties, >> and the first K eigenvalues can be used to create clusters. >> >> I'm afraid I don't know how to do permutation stats on that, but >> k-means clustering of the graph eigenvectors can have random starting >> points ... >> >> On Tue, 02 Jun 2015 09:53:42 -0600 >> Nick Ketz wrote: >> >>> Mathis, you have hit on a much larger problem. Tzvetan is right to >>> suggest calculating each grid-point's connectivity with all other >>> grid-points, which gives you a connectivity topography map for each >>> grid-point. The next logical step, which I've been struggling with, >>> is to somehow cluster these topographies together, giving you >>> clusters of neighboring grid-point topographies that are similar. Is >>> there any work being done to solve this problem? >>> >>> I have been struggling with this problem for some time, that is: how >>> to do cluster based permutation statistics in chan x chan bins of >>> connectivity measures. Ideally I want to do this in a full chan x >>> chan x freq x time cluster analysis. I've searched on the list for >>> related topics; posted, probably incoherently, my own issues; and >>> generally scanned the list and the literature for any sort of >>> relevant topics trying to broach this problem, but am still stuck. >>> >>> The standard 3d chan x freq x time clustering uses a neighborhood >>> structure to define what channels are considered neighbors, and uses >>> numeric adjacency to cluster time and frequency. With chan x chan >>> data however, there unfortunately isn't an intuitive way to think >>> about neighborhood for the pairwise connectivity. There are >>> neighbors surrounding the reference grid-point, and there are >>> neighbors in each grid-point's connectivity topography, i.e. >>> neighboring grid-points that have similar/significant connectivity >>> values. How do you combine the two in a sensible way? And even more >>> challenging how do you do statistics on them? >>> >>> I have been considering several approaches, including >>> multi-dimensional scaling of these grid-point connectivity >>> topographies, or just a correlation between topographies, and then >>> using those values to select which reference grid-points to consider >>> as similar enough to average together. This then gives you a >>> reference cluster of grid-points and allows you to do standard >>> cluster permutation statistics on the average of the reference >>> grid-points. How exactly to determine which reference grid-points >>> are 'similar enough' to be consider clusters is the tricky part, i.e. >>> how can you statistically test if they should be considered a cluster >>> or not? >>> >>> I've been working in isolation on this problem for some time, and >>> would love a discussion on the topic. I'm hoping this message spurs >>> other list lurkers to at least commiserate with me, but if possible >>> to also post whatever approaches they have taken to solve the problem >>> of clustering pairwise connectivity data. >>> >>> >>> >>> Nick >>> >>> >>> >>>> On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: >>>> Hi Mathis, alternatively you could use ft_sourcestatistics. For >>>> this you should reduce your 600 x 600 x freq matrix to freq of >>>> interest first. Next, the resulting 600 x 600 matrix you?d reduce >>>> to 600 x 1 where each grid point has a mean connectivity value to >>>> all possible grid points. >From then on you could use >>>> ft_sourcestatistics and ft_sourceinterpolate to visualize. Good >>>> luck, Tzvetan >>>>>> Dear Fieldtrip Users, >>>>>> >>>>>> I am a first-year PhD student and have been lurking here for a >>>>>> long time (finding lots of useful answers), it's about time I ask >>>>>> my first question: >>>>>> >>>>>> I am trying to compare connectivity in source space (~25 >>>>>> subjects, between two conditions, ~600 virtual channels on a >>>>>> 1.5cm grid) using ft_freqstatistics with a cluster-based >>>>>> permutation test (see code below). >>>>>> >>>>>> The original input datasets have the dimensions: chan x chan x >>>>>> freq. I tried restructuring them to chancmb x freq >>>>>> (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) >>>>>> before doing ft_freqstatistics, but the function then takes >>>>>> forever appending the (admittedly big) datasets. >>>>>> >>>>>> I then tried feeding them to ft_freqstatistics without >>>>>> restructuring, which didn't throw any errors. However, I noticed >>>>>> that the resulting clusters consist of adjacent cells in the chan >>>>>> x chan matrix, which doesn't make much sense since channels in >>>>>> adjacent cells are not necessarily spatially adjacent. I suspect >>>>>> that ft_freqstatistic assumes the 3-D input to contain a temporal >>>>>> dimension and therefore tries to build temporally adjacent >>>>>> clusters. Could any of the fieldtrip developers comment on this? >>>>>> Does anyone in the FT-community have any advice on how to >>>>>> statistically evaluate connectivity data using the permutation >>>>>> approach? >>>>>> >>>>>> Thanks for any input, best wishes, >>>>>> Mathis Kaiser >>> _______________________________________________ >>> 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 asb2226 at gmail.com Thu Jun 4 15:58:35 2015 From: asb2226 at gmail.com (M B) Date: Thu, 4 Jun 2015 13:58:35 +0000 Subject: [FieldTrip] Please remove me Message-ID: <2c5e21c9aaab4b4a94d56328d2db5b9d@EXPRD02.hosting.ru.nl> Can you remove this email: asb2226 at gmail.com from your mailing list? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander.Hunold at tu-ilmenau.de Fri Jun 5 10:47:03 2015 From: Alexander.Hunold at tu-ilmenau.de (Hunold Alexander TU Ilmenau) Date: Fri, 5 Jun 2015 08:47:03 +0000 Subject: [FieldTrip] =?windows-1252?q?7th_International_Summer_School_in_B?= =?windows-1252?q?iomedical_Engineering_=84New_Instrumentation_for_brain_m?= =?windows-1252?q?easurements_and_stimulation=93=2C_17th_-_29th_August_201?= =?windows-1252?q?5_in_Lutherstadt_Wittenberg=2C_Germany?= Message-ID: <5B8562898ECA5A4594C9879007B906703961B1E4@MB1.x.chg> Dear colleagues, we are pleased to announce the 7th International Summer School in Biomedical Engineering on "New Instrumentation for brain measurements and stimulation" August, 17-29, 2015 in Lutherstadt Wittenberg, Germany. This event stands in the tradition of a series of successful summer schools on hot themes in biomedical engineering, dedicated to intense learning in the fruitful atmosphere of tight interaction between students and world-leading specialists. This year’s summer school is devoted to new hardware technologies for measuring and stimulating the brain, such as dry electroencephalography (EEG) electrodes, optically pumped magnetic field sensors, neuronal current imaging based on low-field magnetic resonance and multichannel transcranial current stimulation. In particular, the 7th International Summer School on Biomedical Engineering will focus on ways how these new technical advances may help to overcome current limitations in human neurosciences and medicine. It will cover both theoretical foundations and practical applications. We aim at a thorough understanding of the underlying mechanisms. Thus, we will develop a critical view on current applications and possible future developments. The second important aim of the summer school consists in providing contact with both leading experts in the field and other students with similar interests, thereby facilitating the exchange of ideas on latest developments in the field. Target Group: - PhD students - Advanced Master students - Researchers entering the field of brain measurement and stimulation techniques Further Information about the 7th International Summer School in Biomedical Engineering: www.iss2015.org We would be happy to receive your application. Please pass this announcement to your colleagues who might be interested. Sincerely, Jens Haueisen and Thomas Knösche -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Fri Jun 5 11:37:53 2015 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Fri, 5 Jun 2015 09:37:53 +0000 Subject: [FieldTrip] 50-50 PhD at Aston (Birmingham) and Macquarie (Sydney) Message-ID: Dear All Are you about to finish a Masters and are looking for a PhD abroad, or do you know someone who is looking for such an opportunity? Well this one will get the successful candidate to the UK as well as to Australia. The PhD will start off at Aston University (Birmingham, UK) for 1.5 years using MEG with adults on the autism spectrum (ASD) and will then move to Macquarie University (Sydney, AUS) for another 1.5 years, where research will most likely expand to testing children with ASD in the MEG (using same/similar paradigms). We are particularly interested in theta-gamma coupling and long-range theta phase coupling in ASD, using a selection of perceptual and cognitive paradigms. Some experience with Fieldtrip or another MEG/EEG analysis software would be very helpful, hence, we would really appreciate your help with disseminating this advert. More information is available online: http://www.findaphd.com/search/ProjectDetails.aspx?PJID=64012 Many thanks and looking forward to hearing from you! Klaus Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Jun 5 11:58:50 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 5 Jun 2015 11:58:50 +0200 (CEST) Subject: [FieldTrip] unequal sample number across trials after downsampling Message-ID: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> Dear all, I've encountered an error in my analysis pipeline due to the fact that after calling ft_resampledata I am left with an unequal number of samples across trials. For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 I am speculating that this is due to differences in rounding and wanted to ask if there's a simple way of solving this problem? Any help or suggestions would be highly appreciated. Best, Fred -- Frédéric Roux Postdoctoral Scientist, Marie-Curie fellow BCBL. Basque Center on Cognition, Brain % Language. f.roux at bcbl.eu Tel: +34 943 309 300 Ext 211 Fax: +34 943 309 052 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From jan.schoffelen at donders.ru.nl Fri Jun 5 12:05:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 5 Jun 2015 10:05:05 +0000 Subject: [FieldTrip] unequal sample number across trials after downsampling In-Reply-To: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> References: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> Message-ID: <2092400F-7782-49C7-B192-32331954430B@fcdonders.ru.nl> Hi Fred, You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Assuming the time axes are equal, that is. Otherwise, just remove the last sample from each of the 2401 sample trials :-). JM On Jun 5, 2015, at 11:58 AM, Frédéric Roux wrote: > Dear all, > > I've encountered an error in my analysis pipeline due to the fact > that after calling ft_resampledata I am left with an unequal number > of samples across trials. > > For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 > > I am speculating that this is due to differences in rounding and wanted > to ask if there's a simple way of solving this problem? > > Any help or suggestions would be highly appreciated. > > Best, > > Fred > > -- > Frédéric Roux > Postdoctoral Scientist, Marie-Curie fellow > BCBL. Basque Center on Cognition, Brain % Language. > > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From david.pedrosa at ndcn.ox.ac.uk Fri Jun 5 15:14:17 2015 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Jun 2015 13:14:17 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> References: , <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, thank you for your fast response. To have a comparable grid of course makes sense. I have looked at the link you proposed and I have one more question. Do I undersatand it correctly that I first have to generate a template grid, secodly use it for grid = ft_prepare_sourcemodel(cfg) and finally take grid.pos and grid.dim (but not template_grid.pos and template_grid.dim) for each of my source reconstructions? I am a little irritated as in the link it says: "You can use these single subjects' MNI grids in source analysis. After that you should put .pos and .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Donnerstag, 4. Juni 2015 12:12 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Question on group statistics for coherence differences Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 5 16:00:48 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 5 Jun 2015 14:00:48 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: References: , <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Message-ID: <804A6812-34F5-4C06-9012-79FEC22E3342@fcdonders.ru.nl> Hi David, You should do exactly as the link suggests: the single subject grids should be used for the sourceanalysis (because the coordinates should be defined in the subject specific coordinate system). Afterwards (e.g. for interpolation onto a higher resolution anatomical template image, or prior to doing statistics) you need to redefine the .pos (dim is not needed because it is the same for the template and the warped grids). There’s no need to make your own template grid, we currently have a few of those that come shipped with FieldTrip. See: http://www.fieldtriptoolbox.org/template/sourcemodel Best, Jan-Mathijs On Jun 5, 2015, at 3:14 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thank you for your fast response. To have a comparable grid of course makes sense. I have looked at the link you proposed and I have one more question. Do I undersatand it correctly that I first have to generate a template grid, secodly use it for grid = ft_prepare_sourcemodel(cfg) and finally take grid.pos and grid.dim (but not template_grid.pos and template_grid.dim) for each of my source reconstructions? I am a little irritated as in the link it says: "You can use these single subjects' MNI grids in source analysis. After that you should put .pos and .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Donnerstag, 4. Juni 2015 12:12 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Question on group statistics for coherence differences Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 f.roux at bcbl.eu Fri Jun 5 16:41:41 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 5 Jun 2015 16:41:41 +0200 (CEST) Subject: [FieldTrip] unequal sample number across trials after downsampling In-Reply-To: <2092400F-7782-49C7-B192-32331954430B@fcdonders.ru.nl> Message-ID: <909164792.694051.1433515301126.JavaMail.root@bcbl.eu> You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Thanks JM - I think this will solve my problem! -- FR ----- Original Message ----- From: "J.M. Schoffelen (Jan Mathijs)" To: "FieldTrip discussion list" Sent: Friday, June 5, 2015 12:05:05 PM Subject: Re: [FieldTrip] unequal sample number across trials after downsampling Hi Fred, You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Assuming the time axes are equal, that is. Otherwise, just remove the last sample from each of the 2401 sample trials :-). JM On Jun 5, 2015, at 11:58 AM, Frédéric Roux wrote: > Dear all, > > I've encountered an error in my analysis pipeline due to the fact > that after calling ft_resampledata I am left with an unequal number > of samples across trials. > > For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 > > I am speculating that this is due to differences in rounding and wanted > to ask if there's a simple way of solving this problem? > > Any help or suggestions would be highly appreciated. > > Best, > > Fred > > -- > Frédéric Roux > Postdoctoral Scientist, Marie-Curie fellow > BCBL. Basque Center on Cognition, Brain % Language. > > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > 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 tahere.toosi at gmail.com Fri Jun 5 18:52:52 2015 From: tahere.toosi at gmail.com (Tahereh Toosi) Date: Fri, 5 Jun 2015 21:22:52 +0430 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor Message-ID: Hi fieldtripers, I am trying to do a cluster permutation on Time-frequency data of a single channel (of 64 channel EEG) in a between subject design based on the example provided here . Two weird things happen. First, although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data (to be precise : stat.cfg.frequency =[0.9995 9.9951]). Second, based on the explanation in this paper , I assume cfg.neighbourdist in single-sensor test somehow shows the number of adjacent points, but when I change this number the clusters don't change at all. Here is my code, I would appreciate if anyone could tell me what is happening. Thanks, Tahereh % Time frequency analysis cfg = []; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; f1 = 1;f2 = 15; fstep = 0.1; cfg.foi =f1:fstep:f2; t1 = -1; t2 = 1; cfg.toi = t1:0.02:t2; n_cycles = 5; cfg.t_ftimwin = n_cycles ./cfg.foi; cfg.keeptrials ='no'; [freqdata] = ft_freqanalysis(cfg, data); %store freq data for each condition/subject TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} %Comparing Condition1 and Condition2 cfg = []; Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); % make a dummy structure with the difference between Condition 1 & 2 avgDiff = Condition1_avg; avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; cfg = []; cfg.channel = 'FP2' cfg.frequency = 'all' cfg.neighbourdist = 4; cfg.latency = 'all' cfg.avgovertime = 'no'; cfg.avgoverfreq ='no'; cfg.avgoverchan = 'no'; cfg.clusteralpha = 0.05; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.numrandomization = 500; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.design = [ 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable cfg stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Fri Jun 5 19:41:07 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 5 Jun 2015 19:41:07 +0200 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor In-Reply-To: References: Message-ID: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> Hi Tahereh, Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz Re: second- since you have only one channel you shouldn’t specify ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done along the freq and time dimensions the adjacency of which is defined by the time freq resolution. best tzvetan > Hi fieldtripers, > > I am trying to do a cluster permutation on Time-frequency data of a single channel (of 64 channel EEG) in a between subject design based on the example provided here. Two weird things happen. > First, although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data (to be precise : stat.cfg.frequency =[0.9995 9.9951]). > Second, based on the explanation in this paper, I assume cfg.neighbourdist in single-sensor test somehow shows the number of adjacent points, but when I change this number the clusters don't change at all. > Here is my code, I would appreciate if anyone could tell me what is happening. > > Thanks, > Tahereh > > % Time frequency analysis > cfg = []; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > f1 = 1;f2 = 15; fstep = 0.1; > cfg.foi =f1:fstep:f2; > t1 = -1; t2 = 1; > cfg.toi = t1:0.02:t2; > n_cycles = 5; > cfg.t_ftimwin = n_cycles ./cfg.foi; > cfg.keeptrials ='no'; > > [freqdata] = ft_freqanalysis(cfg, data); > > %store freq data for each condition/subject > TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} > > %Comparing Condition1 and Condition2 > cfg = []; > Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); > Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); > > % make a dummy structure with the difference between Condition 1 & 2 > avgDiff = Condition1_avg; > avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; > > cfg = []; > cfg.channel = 'FP2' > cfg.frequency = 'all' > cfg.neighbourdist = 4; > cfg.latency = 'all' > cfg.avgovertime = 'no'; > cfg.avgoverfreq ='no'; > cfg.avgoverchan = 'no'; > > cfg.clusteralpha = 0.05; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.numrandomization = 500; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number > 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % "condition" is the independent variable > cfg > stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj}); > > > _______________________________________________ > 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 tahere.toosi at gmail.com Sat Jun 6 08:13:37 2015 From: tahere.toosi at gmail.com (Tahereh Toosi) Date: Sat, 6 Jun 2015 10:43:37 +0430 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor In-Reply-To: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> References: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> Message-ID: Thanks Tzvetan for clarification on question 2. I am still dealing with issue 1 ( although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz which I have in my freq data (to be precise it returns : stat.cfg.frequency =[0.9995 9.9951])., However, if I set a smaller higher bound freq, like cfg.frequency = [1 8], it works fine ) Anybody has a clue why? On Fri, Jun 5, 2015 at 10:11 PM, Tzvetan Popov < tzvetan.popov at uni-konstanz.de> wrote: > Hi Tahereh, > Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz > Re: second- since you have only one channel you shouldn’t specify > ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done > along the freq and time dimensions the adjacency of which is defined by the > time freq resolution. > > best > tzvetan > > > Hi fieldtripers, > > I am trying to do a cluster permutation on Time-frequency data of a single > channel (of 64 channel EEG) in a between subject design based on the > example provided here > . > Two weird things happen. > First, although I set cfg.frequency = 'all' for stats, but it always > returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data > (to be precise : stat.cfg.frequency =[0.9995 9.9951]). > Second, based on the explanation in this paper > , I > assume cfg.neighbourdist in single-sensor test somehow shows the number of > adjacent points, but when I change this number the clusters don't change at > all. > Here is my code, I would appreciate if anyone could tell me what is > happening. > > Thanks, > Tahereh > > % Time frequency analysis > cfg = []; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > f1 = 1;f2 = 15; fstep = 0.1; > cfg.foi =f1:fstep:f2; > t1 = -1; t2 = 1; > cfg.toi = t1:0.02:t2; > n_cycles = 5; > cfg.t_ftimwin = n_cycles ./cfg.foi; > cfg.keeptrials ='no'; > > [freqdata] = ft_freqanalysis(cfg, data); > > %store freq data for each condition/subject > TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} > > %Comparing Condition1 and Condition2 > cfg = []; > Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); > Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); > > % make a dummy structure with the difference between Condition 1 & 2 > avgDiff = Condition1_avg; > avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; > > cfg = []; > cfg.channel = 'FP2' > cfg.frequency = 'all' > cfg.neighbourdist = 4; > cfg.latency = 'all' > cfg.avgovertime = 'no'; > cfg.avgoverfreq ='no'; > cfg.avgoverchan = 'no'; > > cfg.clusteralpha = 0.05; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.numrandomization = 500; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number > 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number > cfg.uvar = 1; % "subject" is unit of > observation > cfg.ivar = 2; % "condition" is the > independent variable > cfg > stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, > TFDesc{cond2,selectedSubj}); > > > _______________________________________________ > 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 cmuehl at gmail.com Sat Jun 6 09:12:39 2015 From: cmuehl at gmail.com (Christian Muehl) Date: Sat, 6 Jun 2015 07:12:39 +0000 Subject: [FieldTrip] Deadline Extension and Final Call for Papers - 4th Workshop on Affective Brain-Computer Interfaces @ ACII2015 Message-ID: <509a5753eacd42b1b3e1a98be4969c8b@EXPRD01.hosting.ru.nl> ** Deadline Extension and Final Call for Papers ** *** The submission deadline for the aBCI workshop has been extended to the 14th of June. *** 4th Workshop on Affective Brain-Computer Interfaces (aBCI) Workshop at ACII 2015 (September 21-24), Xi'an, China, September 21, 2015 http://www.affective-sciences.org/aBCI2015 http://www.acii2015.org/ The goal of the aBCI workshop series is to connect researchers from the communities of affective computing, social signal processing, brain-computer interfacing, neuro-ergonomics, and neuroscience around the federating theme of affective brain computer interfaces (aBCI). Affective BCI aim at the development of human-computer interfaces able to react and adapt to users' emotions and related cognitive states as measured from neurophysiological signals. Besides the general solicitation of work toward adaptive HCI applications based on aBCI, this 4th edition of the workshop will focus on two specific aspects of aBCI. Firstly, we welcome papers on ways to alleviate current aBCI limitations, through work on the physiological basis of aBCI, innovative applications resilient to classification error, and methods to increase the robustness of aBCI. Secondly, we would like to explore the social aspects and applications of aBCI by welcoming submissions on topics such as multi-user aBCI and the assessment of social processes from brain signals. The workshop topics include, but are not limited to, * effective emotion elicitation and data collection in social settings; * identification of robust and specific markers of emotional, cognitive and social processes; * methods for the assessment of emotions, cognitive states and social interactions; * methods to measure and process multiple people physiological activity; * applications of central and peripheral signal processing to social situations; * innovative concepts for adaptive interfaces and affective BCI; * demos of affective BCI systems. Submission Instructions: * The papers should feature original empirical work, theoretical work, or a well defendable but arguable position of the authors. * Papers will be published electronically in the proceedings of ACII 2015 by IEEE Xplore. Papers should be limited to 6 pages+1page references. The review is double blind - please remove all author information from the manuscripts. * Further details about the submission instructions and format can be found on the website of ACII 2015. Important Dates: June 14, 2015: Submission of manuscripts (EXTENDED!) July 3, 2015: Acceptance/Rejection notification July 24, 2015: Submission of camera-ready papers September 21, 2015: Date of the Workshop For further information, see our website or contact abci at ewi.utwente.nl Programme Chairs: * Fabien Lotte, Inria Bordeaux Sud-Ouest, Talance, France * Guillaume Chanel, Swiss Center for Affective Sciences, Geneva, Switzerland * Christian Mühl, German Aerospace Center, Cologne, Germany * Anton Nijholt, Universiteit Twente, the Netherlands Programme Committee: Egon L. van den Broek, University of Utrecht, the Netherlands Anne-Marie Brouwer, TNO Perceptual and Cognitive Systems, Soesterberg, the Netherlands Stephen Dunne, Starlab Barcelona, Spain Touradj Ebrahimi, École polytechnique fédérale de Lausanne, Switzerland Stephen Fairclough, John Moores University, Liverpool, UK Tiago H. Falk, Institut National de la Recherche Scientifique (INRS), Montreal, Canada Hayrettin Gürkök, University of Twente, Enschede, the Netherlands Dominic Heger, Karlsruhe Institute of Technology, Germany Klas Ihme, German Aerospace Center, Brunswick, Germany Jonghwa Kim, University of Augsburg, Germany Brent Lance, Army Research Laboratory/TNB, Aberdeen Proving Ground, USA, Grace Leslie, MIT Media Lab, Boston, USA Giulia Liberati, Université catholique de Louvain, Belgium Gary Garcia Molina, Philips Research North America, Briarcliff, USA Ke Liao, Kansas University Medical Center, USA Scott Makeig, University of California San Diego, USA Tim Mullen, University of California San Diego, USA Domen Novak, University of Wyoming, Laramie, USA Ioannis Patras, Queen Mary University, London, UK Evan Peck, Bucknell University, Lewisburg, USA Mannes Poel, University of Twente, Enschede, the Netherlands Alan Pope, NASA Langley Research Center, Norfolk, USA Thierry Pun, University of Geneva, Switzerland Erin Solovey, Drexel University, Philadelphia, USA Mohammad Soleymani, University of Geneva, Switzerland Aureli Soria-Frisch, Starlab Barcelona, Spain Olga Sourina, NanYang Technological University, Singapore Aleksander Valjamae, Linköping University, Sweden Jan van Erp, University of Twente, Enschede, the Netherlands Chi Thanh Vi, University of Bristol, UK Thorsten Zander, Technische Universität Berlin, Germany From jonas at obleser.de Sat Jun 6 11:07:11 2015 From: jonas at obleser.de (Jonas Obleser) Date: Sat, 6 Jun 2015 11:07:11 +0200 Subject: [FieldTrip] =?utf-8?q?Job_offer=3A_Phd_post_=28or_Postdoc_halftim?= =?utf-8?q?e=29_at_the_University_of_L=C3=BCbeck?= Message-ID: Dear colleagues, [sorry for potential crossposting] My new lab at the University of Lübeck (at the baltic sea; near Hamburg; new and old lab site: http://auditorycognition.com ) is beginning to hire. Here is a first post -- officially it’s a Phd position (also interpretable as a half-time postdoctoral if interested in alternative forms of a scientist’s work/life balance). English version: https://www.dropbox.com/s/lqx8e2jiu05hrw2/Ausschreibung_1015_15_Wiss%20MitarbeiterIn_Psychologie_englisch.pdf?dl=0 German version: https://www.uni-luebeck.de/fileadmin/uzl_personal/stellenausschreibungen/Ausschreibung_1015_15_Wiss_MitarbeiterIn_Psychologie.pdf Law-owned EEG, pus centre-wide fMRI (also combined with EEG) are standard routine. Immediate opportunity for MEG recordings will be given through collaboration with Germany-wide sites. Thanks for spreading the word, Jonas Prof. Dr. Jonas Obleser Department of Psychology Universität zu Lübeck Tel +49 451 500 1780 Mobil +49 171 6993337 E-Mail obleser at ipsy.uni-luebeck.de Ratzeburger Allee 160 23562 Lübeck -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 7100 bytes Desc: not available URL: From anne.urai at gmail.com Sun Jun 7 18:57:51 2015 From: anne.urai at gmail.com (Anne Urai) Date: Sun, 7 Jun 2015 18:57:51 +0200 Subject: [FieldTrip] importing CNT or EDF data into fieldtrip In-Reply-To: <557040f6.05aec20a.6661.29e3@mx.google.com> References: <557040f6.05aec20a.6661.29e3@mx.google.com> Message-ID: Dear Nikola, SR research provides edf2asc, a command line tool that lets you convert edf files to simple ASCII documents - these can then be read in by fieldtrip's read_eyelink_asc.m. You can download edf2asc here https://www.sr-support.com/showthread.php?17-EDF2ASC-Conversion-Utility (you need an account on SR's website first). Best, —  Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie | Universitätsklinikum Hamburg-Eppendorf Martinistrasse 52, 20246 Hamburg, Germany | http://anneurai.wordpress.com On 4 Jun 2015 at 14:14:18, Nikola Valchev (nikola.valchev.umcg at gmail.com) wrote: Dear all, I have a possibly rather basic question. I want to read my data with fieldtrip but the formats I can use are either EDF or CNT. That means that I do not have a separate file with my coded triggers (EDF format) or I have a small file NAME.trg (CNT format) which contains information which I can’t read.   The question is how can I read my triggers from the EDF file or convert the NAME.trg file into something similar to the NAME.vmrk file which is created when data is in EEG format.   Any hint is very appreciated.   Best regards Nikola _______________________________________________ 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 melissa.ralston at gmail.com Sun Jun 7 23:36:19 2015 From: melissa.ralston at gmail.com (Melissa Smith) Date: Sun, 7 Jun 2015 14:36:19 -0700 Subject: [FieldTrip] reformat .mat data - example script Message-ID: Hi Fieldtripers! I am a new Fieldtrip user and I believe I need to reformat my data (.mat) so it is compatible with Fieldtrip. I was wondering if anyone has done this and would be willing to pass on your example script that I can reference? I have been referencing this: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat but, it would be really helpful if I could reference someone's script! Best, Melissa -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerome.manson at gmail.com Mon Jun 8 14:44:37 2015 From: gerome.manson at gmail.com (Gerome Manson) Date: Mon, 8 Jun 2015 14:44:37 +0200 Subject: [FieldTrip] Brainstorm Integration Message-ID: Hello All, A colleague of mine has conducted an experiment with EEG (biosemi -64) and they have done all of the preprocessing/ Source Localization in Brainstorm (http://neuroimage.usc.edu/brainstorm/ ). I would like to look at the evoked potentials and conduct some time frequency analysis using Field Trip. Is it possible to import data from brainstorm structures? Possible export parameters include: EXCEL xlsx EEG Cartool (.eph) Brainstorm matrix (.mat) ASCII (csv, space separated) Thank you in Advance, Gerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Jun 8 15:10:33 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 8 Jun 2015 15:10:33 +0200 Subject: [FieldTrip] Brainstorm Integration In-Reply-To: References: Message-ID: <12A53C8A-B033-49F6-82F3-499FD54963D4@uni-konstanz.de> Dear Gerome, I’ve never worked with Brainstorm data matrix (.mat) but I suspect that from this mat file you could easily derive the required information in order to get started with FieldTrip. Please look at this FAQ: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Probably the most relevant part is: “Circumvent the FieldTrip reading funcitons” that provides what type of data is needed and how should it be organized in order to be suitable for analysis in FieldTrip. Good luck tzvetan > Hello All, > > A colleague of mine has conducted an experiment with EEG (biosemi -64) and they have done all of the preprocessing/ Source Localization in Brainstorm (http://neuroimage.usc.edu/brainstorm/). I would like to look at the evoked potentials and conduct some time frequency analysis using Field Trip. Is it possible to import data from brainstorm structures? > > Possible export parameters include: > EXCEL xlsx > EEG Cartool (.eph) > Brainstorm matrix (.mat) > ASCII (csv, space separated) > > Thank you in Advance, > Gerome > _______________________________________________ > 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 rikkert.hindriks at upf.edu Mon Jun 8 16:51:13 2015 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Mon, 8 Jun 2015 16:51:13 +0200 Subject: [FieldTrip] Estimation of noise covariance matrix for resting-state imaging Message-ID: Dear all, I am using a distributed linear inverse method to reconstruct the currents underlying sleep spindles. A proper choice for the regularization parameters, however, requires the noise covariance matrix to be known. I work with EEG (EcoG in fact) so no ghost recordings are possible. Does anyone know how the EEG noise covariance is estimated for resting-state data? Thanks a lot, Kind regards, Rikkert Hindriks -------------- next part -------------- An HTML attachment was scrubbed... URL: From zerr.paul at googlemail.com Tue Jun 9 12:41:54 2015 From: zerr.paul at googlemail.com (Paul Zerr) Date: Tue, 9 Jun 2015 12:41:54 +0200 Subject: [FieldTrip] biosemi bdf >> read_24bit error + no events found Message-ID: Dear Robert, it seems that defining a full path vs. only the filename (even if in current folder) makes the difference. filename = '/file/to/path/name.bdf' %events are found, everything ok filename = 'name.bdf' %file is found and processed by ft_definetrials but NO events are found This is very odd. I don't get a "file not found" error but just "0 events". Greetings, Paul > Hi Paul, > > I suppose it is an incompatibility between your particular BDF file and > the code. I suggest you use MATLAB debugging facilities to check what is > wrong in the lower-level code. See http://tinyurl.com/oy7b496. > > best regards, > Robert > > > > On 25 May 2015, at 15:51, Paul Zerr wrote: > > > I have not. I can read in the header but that's about it. > > I don't have any older matlab versions here to test it with either. > > > > From what I understand ft_preprocessing should be capable of reading > bdf's directly with only the file name as input arg. > > > > Greetings, > > Paul Zerr > > > > > > From: > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] biosemi bdf >> read_24bit error + no events > > found > > Message-ID: <5560dddf.0b91340a.2dab.ffffdae5 at mx.google.com> > > Content-Type: text/plain; charset="utf-8" > > > > Have you resolved this issue? > > > > > > From: Paul Zerr > > Sent: ?Thursday?, ?May? ?14?, ?2015 ?8?:?01? ?AM > > To: FieldTrip discussion list > > > > > > Hi all, > > > > I'm new to fieldtrip so forgive me if my mistake is obvious. > > I want to import my raw, markerless dataset ( > http://www.filedropper.com/1_20) with > > > > cfg = []; > > cfg.dataset = '2.bdf'; > > data = ft_preprocessing(cfg) > > > > However, I get > > > > reading and preprocessing > > error opening file: 2.bdf > > One or more output arguments not assigned during call to "read_24bit". > > > > Error in read_biosemi_bdf>readLowLevel (line 274) > > buf = read_24bit(filename, offset, numwords); > > > > Error in read_biosemi_bdf (line 242) > > buf = readLowLevel(filename, offset, epochlength); % see below in > subfunction > > > > Error in ft_read_data (line 321) > > dat = read_biosemi_bdf(filename, hdr, begsample, endsample, > chanindx); > > > > Error in ft_preprocessing (line 578) > > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, > > 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', > > strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) > > > > Error in Untitled (line 19) > > data = ft_preprocessing(cfg) > > > > Using cfg.trialdef.eventtype = '?'; outputs "no events were found in the > datafile" for ft_definetrial even for datasets with many markers. > Converting to EDF+ did not help as it then says "channels with different > sampling rate not supported". Specifying only one channel makes no > difference. The file itself is fine (opens well in BvA). > > > > Defining only one channel to preprocess gives the same error. > > > > I couldn't find a solution in the archives, the faq, wiki or > documentation. > > > > I'm using debian stable & matlab 2014a. Same issue at DCC computers > running windows & matlab 2013a. > > > > Any ideas? > > > > Much appreciated, > > > > Paul Zerr > > _______________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nikola.valchev.umcg at gmail.com Tue Jun 9 16:48:06 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Tue, 9 Jun 2015 16:48:06 +0200 Subject: [FieldTrip] importing and segmenting CNT and TRG files Message-ID: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Dear all, I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? 2) I can't seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. Any help is appreciated and I'm sorry if I'm not too clear, I'm new to EEG. Nikola -------------- next part -------------- An HTML attachment was scrubbed... URL: From narendra.linguistics at gmail.com Tue Jun 9 19:07:51 2015 From: narendra.linguistics at gmail.com (Narendra Kumar) Date: Tue, 9 Jun 2015 22:37:51 +0530 Subject: [FieldTrip] Warning: Function isequaln has the same name as a MATLAB builtin. Message-ID: Dear fieldtrip users, I am very new to fieldtrip. I've just installed the toolbox on MATLAB 2015a. After installing fieldtrip toolbox as I launch MATLAB, I receive the following warning: * Warning: Function isequal​n​ has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.* When I looked into the fieldtrip folder, I found isequaln.m file in fieldtrip-2015022\compat folder, which is same function as it is in matlabroot. When I tried to rename it I got another error. So please let me know what should I do to get rid of this warning message. Thanks & Regards, Narendra Kumar Research Scholar Department of Humanities and Social Sciences Indian Institute of Technology Ropar Punjab, India - 140001 Contact No.:- +91-8968945650 Homepage:- https://www.sites.google.com/site/narendraiitrpr/ Social Networking Sites: - Researchgate -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 9 20:15:16 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 9 Jun 2015 19:15:16 +0100 Subject: [FieldTrip] Warning: Function isequaln has the same name as a MATLAB builtin. In-Reply-To: References: Message-ID: Dear Narendra, Please make sure you do *not* add FieldTrip with addpath(genpath()), but only add the root folder and let ft_defaults take care of the path. That way, the file should not be added to the path. Best, Eelke On 9 Jun 2015 18:11, "Narendra Kumar" wrote: > Dear fieldtrip users, > > I am very new to fieldtrip. I've just installed the toolbox on MATLAB > 2015a. After installing fieldtrip toolbox as I launch MATLAB, I receive the > following warning: > > * Warning: Function isequal ​n​ has the same name as a MATLAB builtin. We > suggest you rename the function to avoid a potential name conflict.* > > When I looked into the fieldtrip folder, I found isequaln.m file in > fieldtrip-2015022\compat folder, which is same function as it is in > matlabroot. When I tried to rename it I got another error. So please let me > know what should I do to get rid of this warning message. > > Thanks & Regards, > > Narendra Kumar > Research Scholar > Department of Humanities and Social Sciences > Indian Institute of Technology Ropar > Punjab, India - 140001 > Contact No.:- +91-8968945650 > Homepage:- https://www.sites.google.com/site/narendraiitrpr/ > Social Networking Sites: - Researchgate > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From plyons at udel.edu Wed Jun 10 02:00:12 2015 From: plyons at udel.edu (Peter Lyons) Date: Tue, 9 Jun 2015 20:00:12 -0400 Subject: [FieldTrip] No backprojection following ICA Message-ID: Hello All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. I have come across a problem when I attempt to call ft_rejectcomponent following an ICA of my data. The ICA was performed using ft_componentanalysis, and the data was viewed using ft_databrowser to determine unwanted components. Following these steps I ran this code: cfg = [] cfg.component = [3 5] data_clean = ft_rejectcomponent(cfg,data_ica) which returned the following message: "not applying the backprojection matrix to the sensor description" My question is how do I proceed to allow the application of the backprojection matrix? I assume I am leaving some vital piece of code out? Prior to calling ft_componentanalysis my continuous data was bandpass filtered using ft_preprocessing, and the reference was removed using the code: cfg = [] cfg.channel = {'all','-E65'} data_64 = ft_preprocessing(cfg,data_filt) I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 hz. Any advice would be greatly appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From WanjaMoessing at gmx.de Wed Jun 10 14:35:45 2015 From: WanjaMoessing at gmx.de (Wanja Moessing) Date: Wed, 10 Jun 2015 14:35:45 +0200 Subject: [FieldTrip] No backprojection following ICA (Peter Lyons) In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From cprevos at g.clemson.edu Wed Jun 10 16:02:34 2015 From: cprevos at g.clemson.edu (Connor Prevost) Date: Wed, 10 Jun 2015 10:02:34 -0400 Subject: [FieldTrip] Importing Time Markers Message-ID: To whom it may concern, When doing initial testing/ recording of TMS-EEG data, some of the time markers were lost/not recorded properly. I wrote a code in MATLAB which would allow me to find the exact time where the time markers or "triggers" should be placed. However, I do not know how to import and/or convert the found time markers to be able to run through the fieldtrip program. The question is how can I read my time markers from the NAME.mat file or convert it into something similar to the NAME.vmrk file which is created when data is in EEG format. Any help with this matter would be greatly appreciated! -- All the Best, Connor M. Prevost 907-947-7140 Bio-Engineering Clemson University '17 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Wed Jun 10 16:58:33 2015 From: robince at gmail.com (Robin) Date: Wed, 10 Jun 2015 15:58:33 +0100 Subject: [FieldTrip] Variance explained by ICA components Message-ID: Hello, I am looking for a way to calculate the percentage of variance explained by a set of ICA components I have obtained using Fieldtrip. I see this question has been asked before [1,2], but I didn't see any answers so thought I would try asking again. Thanks, Robin [1] http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html [2] http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Wed Jun 10 21:01:17 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Wed, 10 Jun 2015 19:01:17 +0000 Subject: [FieldTrip] Apply atlas to MNE grid Message-ID: Hi Fieldtrippers, Following the MNE-tutorial, I ended up with activation patterns on the cortically restricted grid for each subject in (if I understand it correctly) subject-specific ctf-space. What I want to do next is apply an atlas to these grid points. So far, what I've been doing is interpolate the subject-specific MNE grid to the subject-specific MNI-warped grid (such as the ones used for beamforming), then interpolate this to the subject-specific MRI, and finally normalize that to an MNI-space MRI, which hopefully would be atlas-compatible. However, I am not sure whether this is a) valid, and b) the most elegant and efficient way to impart atlas information on MNE data. a) The reason I doubt the validity of this method is that when I find high activity on the MNE grid in seemingly temporal or occipital sources, the blob on the MRI image tends to end up on the brainstem or cerebellum (an example can be seen in the attached image). Any thoughts on what could cause this? Could there for example be an issue with cerebellar grid points not being included in the MNE grid, but which are present in the beamformer/cubic grid? Do you have any thoughts on the validity of this approach and the resulting effect? b) This pipeline feels rather contrived, with a bit too many interpolations to my liking. Is it somehow possible to shorten this pipeline? For example, is it possible to directly link the vertices of the MNE surface to an atlas? Any thoughts or hints on this would be greatly appreciated. Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MNEToMRI.png Type: image/png Size: 338288 bytes Desc: MNEToMRI.png URL: From cmk0803 at hbf.re.kr Thu Jun 11 03:21:38 2015 From: cmk0803 at hbf.re.kr (=?UTF-8?B?7LWc66+46rK9?=) Date: Thu, 11 Jun 2015 10:21:38 +0900 Subject: [FieldTrip] Source localization of MEG resting state data Message-ID: Hi, Tzvetan. Thank you for your first response. The weird output that you asked in first response is first attached figure 1. I thought It was weird because the sensor level output is so different form the source level output. I revised the script regarding your first advise and following tutorial. The output is second figure. ( http://www.fieldtriptoolbox.org/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ) It is better than first output. However,* the sensor level output correspond with the source level output, exactly.* Is it anything that need to revise? If the data is plotted at the source and sensor level, What the difference between two plots can emerge in general? I really appreciate for your help in advance. Best regards, MK CHOE P.S. The revised script is as follows. %% Calculating the cross spectral density matrix cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [10 10]; % alpha [8 12] cfg.tapsmofrq = 2; cfg.channel = {'MEG'}; cfg.keeptrials = 'yes'; fft_rest = ft_freqanalysis(cfg, data_clean); %% Computing the leadfield matrices cfg = []; cfg.grad = fft_rest.grad; cfg.vol = hdm; cfg.grid = grid; cfg.keeptrials = 'yes'; cfg.normalize = 'yes'; cfg.channel = {'MEG'}; rest_grid = ft_prepare_leadfield(cfg); %% Source analysis cfg = []; cfg.frequency = 'all'; cfg.grad = fft_rest.grad; cfg.method = 'dics'; cfg.grid = rest_grid; cfg.vol = hdm; cfg.keeptrials = 'yes'; cfg.keepfilter = 'yes'; cfg.keepcsd = 'yes'; cfg.feedback = 'textbar'; cfg.dics.lambda = 0.1 cfg.dics.projectnoise = 'yes'; rest_source = ft_sourceanalysis(cfg, fft_rest); %% sourcedescriptive cfg = []; rest_source.dim = rest_grid.dim; descri_source = ft_sourcedescriptives(cfg, rest_source); descri_source.pos = t1grid.pos; %% sourceinterpolating_nai cfg = []; cfg.parameter = 'nai'; cfg.voxelcoord = 'no'; cfg.interpmethod = 'linear'; sdint = ft_sourceinterpolate(cfg, descri_source, norm_mri); %% plot fft results cfgp = []; cfgp.layout = 'neuromag306mag_rev.lay'; cfgp.interactive='yes'; colorbar; ft_topoplotER(cfgp, fft_rest); %% source plot _nai cfg = []; cfg.method = 'slice'; cfg.funparameter = 'nai'; cfg.surfdownsample = 2; cfg.projmethod = 'project'; cfg.funcolormap = 'jet'; ft_sourceplot(cfg, sdint); -- Mi Kyung CHOE Department of Brain & Cognitive Sciences, Seoul National University Human Brain Function Laboratory E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure1.png Type: image/png Size: 227029 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure2.png Type: image/png Size: 271482 bytes Desc: not available URL: From tzvetan.popov at uni-konstanz.de Thu Jun 11 07:58:48 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 11 Jun 2015 07:58:48 +0200 Subject: [FieldTrip] Source localization of MEG resting state data In-Reply-To: References: Message-ID: <00C424A8-4120-4ED7-A02A-B140130E33EE@uni-konstanz.de> Hi MK CHOE, your second attempt look reasonable at least to me. The topography suggest parietal activation and you have peak maxima over parietal regions. > Hi, Tzvetan. > > Thank you for your first response. > > The weird output that you asked in first response is first attached figure 1. > I thought It was weird because the sensor level output is so different form the source level output. > > I revised the script regarding your first advise and following tutorial. The output is second figure. > (http://www.fieldtriptoolbox.org/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > It is better than first output. However, the sensor level output correspond with the source level output, exactly. > > Is it anything that need to revise? > If the data is plotted at the source and sensor level, What the difference between two plots can emerge in general? There isn’t an easy answer to this question. Sometimes you’d use to extract time courses out of your data without “seeing” any patterns on sensor level due to noise. Other times the sensor topography almost perfectly matches the source map. That said sensor/source correspondence is good but if you lack this it doesn’t necessarily invalidates the results you just need to have plausible explanation of why you don’t see things on sensor level while you believe they must be there. This is typically in cases of simultaneous recordings of various types- EEG/fMRI, tAC/DC-MEEG etc. Finally, while your sensor signals are linear superposition of all source activity while your beamformer approach de-mixes those it is a “good sign” that sensor and source results are not mirroring each other. tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.vanEs at donders.ru.nl Thu Jun 11 12:55:40 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Thu, 11 Jun 2015 10:55:40 +0000 Subject: [FieldTrip] error in ft_artifact_zvalue Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7E90@exprd01.hosting.ru.nl> Hi, I just wanted to start processing my MEG data, but when I want to remove the artifacts using ft_artifact_zvalue I get an error. This is my code: % data is preprocessed already %% Find jump artifacts cfg = []; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG'; cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0; cfg.artfctdef.zvalue.fltpadding = 0; % algorithmic parameters cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [~, artifact_jump] = ft_artifact_zvalue(cfg, data); I do get the interactive figure where I can scroll through the trials and I can adjust the threshold, but when I use my mouse (e.g. to click on 'threshold'), I get the following error: Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 701) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback It seems like my mouse isn't recognized (tried different USB ports). Can you help me? (PS: scrolling through trials with the keyboard is working). Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.png Type: image/png Size: 93122 bytes Desc: Untitled.png URL: From eelke.spaak at donders.ru.nl Thu Jun 11 13:03:08 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 11 Jun 2015 12:03:08 +0100 Subject: [FieldTrip] error in ft_artifact_zvalue In-Reply-To: References: Message-ID: Hi Mats, Could you let me know what Matlab version you are using? And if the error also occurs if you use an older version (e.g. 2012a or so (simply use 'matlab2012a' at a DCCN mentat prompt))? Cheers, Eelke On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) wrote: > Hi, I just wanted to start processing my MEG data, but when I want to remove > the artifacts using ft_artifact_zvalue I get an error. > This is my code: > % data is preprocessed already > %% Find jump artifacts > cfg = []; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [~, artifact_jump] = ft_artifact_zvalue(cfg, data); > > I do get the interactive figure where I can scroll through the trials and I > can adjust the threshold, but when I use my mouse (e.g. to click on > 'threshold'), I get the following error: > > Attempt to reference field of non-structure array. > > Error in ft_artifact_zvalue>keyboard_cb (line 701) > curKey=eventdata.Key; > > Error using waitfor > Error while evaluating uicontrol Callback > > It seems like my mouse isn't recognized (tried different USB ports). Can you > help me? (PS: scrolling through trials with the keyboard is working). > > Best, > Mats From wanjamoessing at gmx.de Thu Jun 11 13:14:41 2015 From: wanjamoessing at gmx.de (=?utf-8?Q?Wanja_M=C3=B6=C3=9Fing?=) Date: Thu, 11 Jun 2015 13:14:41 +0200 Subject: [FieldTrip] error in ft_artifact_zvalue In-Reply-To: References: Message-ID: <0MZOan-1YjwxN1mIv-00LGJj@mail.gmx.com> Hi Mats, I recently submitted a bugfix to that function because the keyboard was not working. Now both should be working. Unfortunately, I could only test that on matlab 2015a. So it might be that it's not working on older versions. You could try a ft version from a week ago or so without the bugfix (and hence only mouse functionality). Could you let us know which version of matlab you're using? Best, -Wanja ----- Ursprüngliche Nachricht ----- Von: "Eelke Spaak" Gesendet: ‎11.‎06.‎2015 13:04 An: "FieldTrip discussion list" Betreff: Re: [FieldTrip] error in ft_artifact_zvalue Hi Mats, Could you let me know what Matlab version you are using? And if the error also occurs if you use an older version (e.g. 2012a or so (simply use 'matlab2012a' at a DCCN mentat prompt))? Cheers, Eelke On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) wrote: > Hi, I just wanted to start processing my MEG data, but when I want to remove > the artifacts using ft_artifact_zvalue I get an error. > This is my code: > % data is preprocessed already > %% Find jump artifacts > cfg = []; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [~, artifact_jump] = ft_artifact_zvalue(cfg, data); > > I do get the interactive figure where I can scroll through the trials and I > can adjust the threshold, but when I use my mouse (e.g. to click on > 'threshold'), I get the following error: > > Attempt to reference field of non-structure array. > > Error in ft_artifact_zvalue>keyboard_cb (line 701) > curKey=eventdata.Key; > > Error using waitfor > Error while evaluating uicontrol Callback > > It seems like my mouse isn't recognized (tried different USB ports). Can you > help me? (PS: scrolling through trials with the keyboard is working). > > Best, > Mats _______________________________________________ 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 plyons at udel.edu Thu Jun 11 15:59:59 2015 From: plyons at udel.edu (Peter Lyons) Date: Thu, 11 Jun 2015 09:59:59 -0400 Subject: [FieldTrip] No backprojection following ICA (Peter Lyons) In-Reply-To: References: Message-ID: Hi Wanja, Thanks for your quick response. Just to clarify a few points: We received the message "not applying the backprojection matrix to the sensor description" because we do not have a 'tra' matrix defined. Because we are using EEG data with a one to one relationship between the number of channels and the number of electrodes, and therefore do not have a need to define a 'tra' matrix (?), is it safe to assume that our call to ft_rejectcomponent successfully recomposed our data? If we do need to define a 'tra' matrix, when is the best time to do so? I really appreciate your input. Thanks, Peter On Wed, Jun 10, 2015 at 8:35 AM, Wanja Moessing wrote: > Hi Peter, > > I get the same note. From a look into the code of ft_rejectcomponent it > seems that, for EEG data, this note has to appear as long as you do not > have a 'tra' matrix in your electrode description. > The FAQ [ > http://www.fieldtriptoolbox.org/faq/how_are_electrodes_magnetometers_or_gradiometers_described] > suggests that this 'tra' matrix should only be there if the channels are > not exactly equal to your electrodes. > Please correct me if I am wrong - I am not a FT developer. > I agree that this message could be a little bit clearer. > > Kind regards, > Wanja > > _______________________________________________ > 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 e.caspar at ucl.ac.uk Fri Jun 12 12:53:25 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Jun 2015 10:53:25 +0000 Subject: [FieldTrip] ft_lateralizedpotential question Message-ID: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Dear Fieldrippers, I have a small question about ft_lateralizedpotential. I am currently trying to compute a LRP. Thus, I wrote: avgL = ft_timelockanalysis(cfg, cleandata); avgR = ft_timelockanalysis(cfg, cleandata); cfg = []; cfg.layout = 'biosemi64.lay'; cfg.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfg,avgL,avgR); cfg = []; cfg.xlim = [-2 1]; cfg.ylim = [-12 10]; clf; ft_singleplotER(cfg, lrp.plotlabel) There is apparently something wrong with the plot because I get the following error message: Error using ft_checkdata (line 461) This function requires timelock or freq data as input. I have also tried to add a new avgLRP = ft_timelockanalysis(cfg, lrp); and then to compute the plot based on that, but it is not working. If anyone has an idea! Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer? Thank you in advance for your help! Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Fri Jun 12 13:07:47 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Fri, 12 Jun 2015 11:07:47 +0000 Subject: [FieldTrip] ft_lateralizedpotential question In-Reply-To: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> References: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Message-ID: Hi Emilie, We won't be ripping any fields anytime ("Fieldrippers") ;) (1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER You should probably try: From e.caspar at ucl.ac.uk Fri Jun 12 15:19:26 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Jun 2015 13:19:26 +0000 Subject: [FieldTrip] ft_lateralizedpotential question In-Reply-To: References: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Message-ID: <13F99CA4-FC96-46C3-9361-38935027BA37@live.ucl.ac.uk> Dear Nietzsche, Sorry for the missing letter! Indeed, it slightly changes the meaning x) I have tried with different electrodes for avg Left and Right cfgL = []; cfgL.channel = {'A*'} avgL = ft_timelockanalysis(cfgL, clean_data); cfgR = []; cfgR.channel = {'B*'} avgR = ft_timelockanalysis(cfgR, clean_data); And then I have asked for ft_lateralizedpotential: cfgT = []; cfgT.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfgT,avgL,avgR); cfgT = []; cfgT.xlim = [-2 1]; cfgT.ylim = [-12 10]; clf; ft_singleplotER(cfgT, lrp) I agree that avgL and avgR are more logical now. However, the plot is still not working, with the following error: Error using fixdimord (line 85) the data does not contain a dimord, but it also does not resemble raw or component data I still do not really understand what is wrong. My script/data work very well without the ft_lateralized. I have already looked at the results for the readiness potential. I just want to look now for the lateralized RP. Thanks! Emilie On 12 juin 2015, at 13:07, "Lam, N.H.L. (Nietzsche)" > wrote: Hi Emilie, We won't be ripping any fields anytime ("Fieldrippers") ;) (1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER You should probably try: [fieldtrip-bounces at science.ru.nl] on behalf of Caspar, Emilie [e.caspar at ucl.ac.uk] Sent: 12 June 2015 12:53 To: fieldtrip at science.ru.nl Subject: [FieldTrip] ft_lateralizedpotential question Dear Fieldrippers, I have a small question about ft_lateralizedpotential. I am currently trying to compute a LRP. Thus, I wrote: avgL = ft_timelockanalysis(cfg, cleandata); avgR = ft_timelockanalysis(cfg, cleandata); cfg = []; cfg.layout = 'biosemi64.lay'; cfg.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfg,avgL,avgR); cfg = []; cfg.xlim = [-2 1]; cfg.ylim = [-12 10]; clf; ft_singleplotER(cfg, lrp.plotlabel) There is apparently something wrong with the plot because I get the following error message: Error using ft_checkdata (line 461) This function requires timelock or freq data as input. I have also tried to add a new avgLRP = ft_timelockanalysis(cfg, lrp); and then to compute the plot based on that, but it is not working. If anyone has an idea! Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer? Thank you in advance for your help! Emilie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 12 20:35:04 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 12 Jun 2015 18:35:04 +0000 Subject: [FieldTrip] No backprojection following ICA In-Reply-To: References: Message-ID: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> Dear Peter, Depending on what you want to do, you need or need not worry about the warning you get. Since you mention that in first instance you want to look at connectivity at the channel level, I think you are safe. The warning pertains to the application of the spatial transformation to the low-level description of the channel array (the elec-structure), and not to the actual data. In short, the back projection is applied to the data itself, but there is insufficient information available in the sensor description to be able to apply the same projection to this as well. The latter would be needed if at a later stage you want to do source reconstruction, for which you need to compute leadfield matrices, where the forward model should include information about the spatial topographies that have been removed. Best, Jan-Mathijs On Jun 10, 2015, at 2:00 AM, Peter Lyons > wrote: Hello All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. I have come across a problem when I attempt to call ft_rejectcomponent following an ICA of my data. The ICA was performed using ft_componentanalysis, and the data was viewed using ft_databrowser to determine unwanted components. Following these steps I ran this code: cfg = [] cfg.component = [3 5] data_clean = ft_rejectcomponent(cfg,data_ica) which returned the following message: "not applying the backprojection matrix to the sensor description" My question is how do I proceed to allow the application of the backprojection matrix? I assume I am leaving some vital piece of code out? Prior to calling ft_componentanalysis my continuous data was bandpass filtered using ft_preprocessing, and the reference was removed using the code: cfg = [] cfg.channel = {'all','-E65'} data_64 = ft_preprocessing(cfg,data_filt) I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 hz. Any advice would be greatly appreciated! Thanks, Peter _______________________________________________ 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 plyons at udel.edu Fri Jun 12 21:12:46 2015 From: plyons at udel.edu (Peter Lyons) Date: Fri, 12 Jun 2015 15:12:46 -0400 Subject: [FieldTrip] No backprojection following ICA In-Reply-To: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> References: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> Message-ID: Hello Jan-Mathijs, Thank you for your response, I am glad to know that I needn't worry, and really appreciate your time! If at a later stage in my project I needed to compute leadfield matrices for source localization, what steps would I need to take in order to do so? Thanks, Peter On Fri, Jun 12, 2015 at 2:35 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Dear Peter, > > Depending on what you want to do, you need or need not worry about the > warning you get. Since you mention that in first instance you want to look > at connectivity at the channel level, I think you are safe. The warning > pertains to the application of the spatial transformation to the low-level > description of the channel array (the elec-structure), and not to the > actual data. In short, the back projection *is* applied to the data > itself, but there is insufficient information available in the sensor > description to be able to apply the same projection to this as well. The > latter would be needed if at a later stage you want to do source > reconstruction, for which you need to compute leadfield matrices, where the > forward model should include information about the spatial topographies > that have been removed. > > Best, > Jan-Mathijs > > On Jun 10, 2015, at 2:00 AM, Peter Lyons wrote: > > Hello All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different frequency > bands as well as phase lag index between various sensors. > > I have come across a problem when I attempt to call ft_rejectcomponent > following an ICA of my data. The ICA was performed using > ft_componentanalysis, and the data was viewed using ft_databrowser to > determine unwanted components. Following these steps I ran this code: > > cfg = [] > cfg.component = [3 5] > data_clean = ft_rejectcomponent(cfg,data_ica) > > which returned the following message: > > "not applying the backprojection matrix to the sensor description" > > My question is how do I proceed to allow the application of the > backprojection matrix? > I assume I am leaving some vital piece of code out? > > Prior to calling ft_componentanalysis my continuous data was > bandpass filtered using ft_preprocessing, and the reference was removed > using the code: > > cfg = [] > cfg.channel = {'all','-E65'} > data_64 = ft_preprocessing(cfg,data_filt) > > > I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 > hz. > > Any advice would be greatly appreciated! > > Thanks, > Peter > > > _______________________________________________ > 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 bibi.raquel at gmail.com Fri Jun 12 23:29:39 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Fri, 12 Jun 2015 17:29:39 -0400 Subject: [FieldTrip] importing and segmenting CNT and TRG files In-Reply-To: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> References: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Message-ID: I had to modify one of Fieldtrip's files recently. If you give me yours I can see if my modifications work for your data. Best, Raquel Sent from my iPhone > On Jun 9, 2015, at 10:48 AM, Nikola Valchev wrote: > > Dear all, > I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: > 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? > 2) I can’t seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. > > Any help is appreciated and I’m sorry if I’m not too clear, I’m new to EEG. > > Nikola > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Jun 14 19:49:39 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 14 Jun 2015 17:49:39 +0000 Subject: [FieldTrip] Apply atlas to MNE grid In-Reply-To: References: Message-ID: Hi Marieke, a) The reason I doubt the validity of this method is that when I find high activity on the MNE grid in seemingly temporal or occipital sources, the blob on the MRI image tends to end up on the brainstem or cerebellum (an example can be seen in the attached image). Any thoughts on what could cause this? Could there for example be an issue with cerebellar grid points not being included in the MNE grid, but which are present in the beamformer/cubic grid? Do you have any thoughts on the validity of this approach and the resulting effect? Essentially, when you are reconstructing the source activity on the cotrical sheet, but interpolate onto a 3D grid, you are basically extrapolating data onto voxels that fall outside the cortical sheet. Thus, indeed, cerebellum and brainstrem values need to be taken with a very large pinch of salt. A suggestion here would be to create a voxel-based mask, that masks out all voxels that are too far away from the cortical sheet. b) This pipeline feels rather contrived, with a bit too many interpolations to my liking. Is it somehow possible to shorten this pipeline? For example, is it possible to directly link the vertices of the MNE surface to an atlas? You could consider another route, where you use a surface based atlas (e.g. the Conte 69 atlas, based on Brodmann area labels). This would however require your cortical sheets to be registered in surface space (to a template). This can be done with the Caret package, or better still with some dedicated HCP code. You can google for ‘freesurfer fs to LR’ if you want to go this route and get started. Best, JM Any thoughts or hints on this would be greatly appreciated. Best, Marieke _______________________________________________ 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 M.vanEs at donders.ru.nl Mon Jun 15 13:42:43 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Mon, 15 Jun 2015 11:42:43 +0000 Subject: [FieldTrip] error in ft_artifact_zvalue Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Hi fieldtrippers, thanks for your response. I use matlab2013a. I just checked the function on matlab2012a and I get the same error. I am using an older version of ft_artifact_zvalue right now (version 24-02-15) where the mouse does work (though as mentioned the keyboard does not). Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: From WanjaMoessing at gmx.de Mon Jun 15 19:23:46 2015 From: WanjaMoessing at gmx.de (Wanja Moessing) Date: Mon, 15 Jun 2015 19:23:46 +0200 Subject: [FieldTrip] common ft_freqbaseline for variable length trials In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Message-ID: Dear Fieldtripers, We have EEG data with variable length trials and want to look at the time-frequency response around two triggers. As we want to use the same baseline for both TOIs, we preprocess the complete trials (6-8s) with variable triallength and use ft_freqanalysis with keeptrials = 'yes'. Then baseline with ft_freqbaseline and subsequently we would like to cut out trialwise the +/- 1.5s around each trigger and then average these pieces. Information about the respective triggers is stored in .trialinfo as trigger+sample to be able to locate the triggers. For some reason I cannot seem to find an option to redefine and average the trials after baseline and wavelet analysis. Attached is the code we use. I'd be thankful for any hints. Kind Regards, Wanja ----------------------------CODE--------------------------------------- cfg = []; cfg.keeptrials = 'yes'; cfg.keeptaper = 'no'; cfg.output = 'pow'; cfg.channel = {'FCz','Cz'}; cfg.method = 'wavelet'; cfg.pad = 'maxperlen'; cfg.foi = [1:2:40]; cfg.toi = 'all'; cfg.width = 9; cfg.conditions = [1.7,1.8,1.9,2.7,2.8,2.9]; baselinecfg = []; baselinecfg.baseline = [-1 0]; %1s before trialonset baselinecfg.baselinetype = 'relchange'; baselinecfg.parameter = 'powspctrm'; %loop over subjects and conditions for subject = 1:length(data_all_clean) curcon = 0; for cond = cfg.conditions curcon = curcon+1; idx = 0; cfg.trials = find(data_all_clean(subject).trialinfo(:,1) == cond); %contains info about the condition of each trial data_subj_Wave{1,curcon} = ft_freqanalysis(cfg,data_all_clean(subject)); %Data of subject x in condition y data_subj_Wave{6,curcon} = ft_freqbaseline(baselinecfg,data_subj_Wave{1,curcon}); %...and the baselined data data_subj_Wave{2,curcon} = cond; %pass information about the condition on data_subj_Wave{3,curcon} = length(cfg.trials); % store N trials per condition data_subj_Wave{4,curcon} = data_all_clean(subject).trialinfo(1,2); %SubjectNr data_subj_Wave{5,curcon} = data_all_clean(subject).trialinfo(1,3); %SessionNr end data_all_Wave{1,subject} = data_subj_Wave; data_all_Wave{2,subject} = data_all_clean(subject).trialinfo(1,2); data_all_Wave{3,subject} = data_all_clean(subject).trialinfo(1,3); end From tzvetan.popov at uni-konstanz.de Mon Jun 15 21:37:21 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 15 Jun 2015 21:37:21 +0200 Subject: [FieldTrip] common ft_freqbaseline for variable length trials In-Reply-To: References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Message-ID: Hi Wanja, > For some reason I cannot seem to find an option to redefine and average the trials after baseline and wavelet analysis. I guess what you are after is ft_selectdata for selecting your desired time freq chan. Then you could do ft_freqdescriptives or use cfg.avgoverrpt = ‘yes’; during the call to ft_selectdata. Side note: baseline over the single trials and than averaging vs. average over rpt and then baseline will produce different output. I’m not sure whether you want to do single trial baseline correction or not. In any case the latter is typically done in the literature. Good luck, Tzvetan From isabella.premoli at gmail.com Tue Jun 16 14:33:51 2015 From: isabella.premoli at gmail.com (isabella premoli) Date: Tue, 16 Jun 2015 13:33:51 +0100 Subject: [FieldTrip] Channel repair problem Message-ID: Hi all, I am using ft_channelrepair to delete and interpolate bad channels. However, I noticed that after this process the order of the labels is changed and the interpolated channels are placed at the end of cfg.label list. As you can imagine, this situation differs between subjects and conditions. My question is, when I run ft_timelockgrandaverage to calculate the grand average across subjects and condition, has the fact that each subject/condition has different cfg.labels been taken into account? If not, how can I deal with it? Many thanks! Isabella -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at think-now.com Thu Jun 18 22:21:22 2015 From: greg at think-now.com (Greg Simpson) Date: Thu, 18 Jun 2015 13:21:22 -0700 Subject: [FieldTrip] RA Position Open In-Reply-To: References: Message-ID: Dear Colleagues, I would like to announce that our Research Associate position has been filled. Thank you, Greg Gregory V. Simpson, Ph.D. Founder & CSO Think Now, Inc. On Fri, May 22, 2015 at 5:11 PM, Greg Simpson wrote: > Dear Colleagues, > > I would like to announce an opening for a Research Associate (see ad > below). > > Please spread the word. > > Thank you, > > Greg > > Research Associate – Cognitive Training > > > > Think Now Incorporated is seeking a research associate to work on a NIMH > funded project testing the effects of mobile software training on attention > in adults with ADHD. Duties will include recruiting, screening and testing > (both behavioral tests and EEG tests) of adults with ADHD, before and after > they train their attention with the mobile software. We are seeking > candidates with direct hands-on experience in conducting > cognitive/psychological tests or related experience. Experience with > collecting EEG data is not required but would be great. Also, experience > with MatLab and statistical packages such as SPSS would be a plus. We > prefer strongly self-directed individuals with great people-skills to take > on this work. > > > > The position reports directly to Greg Simpson, Ph.D., a cognitive > neuroscientist and Chief Scientific Officer of Think Now. Think Now is > located in San Francisco and our research partners for this effort are > located at UCLA in Los Angeles. Candidates need to be located in the Los > Angeles area. > > > > Think Now is focused on creating solutions for the diagnosis and > amelioration of neurological disorders with a focus on attention and its > control. Please send your CV to jobs at think-now.com with a letter > describing your prior experience with conducting studies with adults (and > any EEG experience) and your reason for being interested in this position. > > Gregory V. Simpson, Ph.D. > Think Now, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From girwin at uni-osnabrueck.de Fri Jun 19 10:06:15 2015 From: girwin at uni-osnabrueck.de (girwin at uni-osnabrueck.de) Date: Fri, 19 Jun 2015 10:06:15 +0200 (CEST) Subject: [FieldTrip] running tmsidriver with ASA Message-ID: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> Hello mailinglist, I would like to know if anyone has ever attempted to run the tmsidriver(.exe) in parallel to the ASA EEG recording software. If I attempt it one of the two always breaks down, and preferably I would like to stream with the tmsidriver while recording with the ASA software at the same time. If anyone knows a way to do this I would be grateful. Cheers, Gerrit Irwin From M.vanEs at donders.ru.nl Fri Jun 19 12:44:04 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Fri, 19 Jun 2015 10:44:04 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Fri Jun 19 12:59:27 2015 From: robince at gmail.com (Robin) Date: Fri, 19 Jun 2015 11:59:27 +0100 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: I have just updated my FieldTrip version to the current GitHub version and I'm getting the same error with Matlab R2015a. There doesn't seem to be any matlabversion.m in the current GitHub source tree as there was in previous versions. Copying FT/private/matlabversion.m from an earlier version stops the errors for me. Cheers Robin On 19 June 2015 at 11:44, Es, M.W.J. van (Mats) wrote: > Hi fieldtrippers, > > I know this is not the conventional way to report a bug, but it seems I > am not able to create a bugzilla account at this moment. Since today I get > an error using ft_databrowser (data is normal MEG data, preprocessed): > > *cfg = [];* > *cfg.channel = 'MEG';* > *cfg.viewmode = 'vertical';* > *cfg = ft_databrowser(cfg, data);* > > I get the following error many (50+) times: > > > *Undefined function 'matlabversion' for input arguments of type 'char'.* > > *Error in ft_platform_supports (line 58)* > * tf=is_matlab() && matlabversion('2014b', Inf);* > > *Error in ft_select_range (line 81)* > *if ft_platform_supports('graphics_objects')* > > *Error using waitfor* > *Error while evaluating figure WindowButtonMotionFcn* > > I am using matlab2013a on Linux, and I also tried matlab2012a, both show > the error. > > Best, > Mats > > _______________________________________________ > 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 robince at gmail.com Fri Jun 19 13:02:05 2015 From: robince at gmail.com (Robin) Date: Fri, 19 Jun 2015 12:02:05 +0100 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Actually copying the file didn't fix it - the error still comes when the mouse moves over the figure. On 19 June 2015 at 11:59, Robin wrote: > I have just updated my FieldTrip version to the current GitHub version and > I'm getting the same error with Matlab R2015a. > > There doesn't seem to be any matlabversion.m in the current GitHub source > tree as there was in previous versions. > > Copying FT/private/matlabversion.m from an earlier version stops the > errors for me. > > Cheers > > Robin > > On 19 June 2015 at 11:44, Es, M.W.J. van (Mats) > wrote: > >> Hi fieldtrippers, >> >> I know this is not the conventional way to report a bug, but it seems I >> am not able to create a bugzilla account at this moment. Since today I get >> an error using ft_databrowser (data is normal MEG data, preprocessed): >> >> *cfg = [];* >> *cfg.channel = 'MEG';* >> *cfg.viewmode = 'vertical';* >> *cfg = ft_databrowser(cfg, data);* >> >> I get the following error many (50+) times: >> >> >> *Undefined function 'matlabversion' for input arguments of type 'char'.* >> >> *Error in ft_platform_supports (line 58)* >> * tf=is_matlab() && matlabversion('2014b', Inf);* >> >> *Error in ft_select_range (line 81)* >> *if ft_platform_supports('graphics_objects')* >> >> *Error using waitfor* >> *Error while evaluating figure WindowButtonMotionFcn* >> >> I am using matlab2013a on Linux, and I also tried matlab2012a, both >> show the error. >> >> Best, >> Mats >> >> _______________________________________________ >> 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 daniel.haehnke at lrz.tu-muenchen.de Fri Jun 19 13:35:47 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?UTF-8?Q?H=C3=A4hnke=2C_Daniel?=) Date: Fri, 19 Jun 2015 13:35:47 +0200 Subject: [FieldTrip] Tutorial "Preprocessing and analysis of spike and local field potential data": Different STAs Message-ID: <7dc7a0c33a9ebeeb09e0f73a082f0480@roundcube.lrz.de> Dear community, I've been learning how to use FieldTrip by the series of tutorials on the website. While doing the last tutorial "Preprocessing and analysis of spike and local field potential data" I found that my output of spike triggered averages (STAs) isn't the same as in the tutorials. The plots of staPost and staPre are exactly the same for me and are identical to the first STA plot (staPost) in the tutorial. The only difference between the two STAs is cfg.latency, which is [0.3 10] for staPost and [-2.75 0]. If I omit cfg.latency I get the exact same values when running ft_spiketriggeredaverage(). This actually does make sense because the STA just averages LFPs 'around' spikes, so there is no need to specify a latency. I'm still curious, though, what was computed to obtain the plot for staPre in the tutorial. Could anyone clarify that? Kind regards, Daniel Hähnke -- Technische Universität München Daniel Hähnke Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 D-80802 München Tel.: +49 89 4140 3356 daniel.haehnke at lrz.tum.de www.ifn.me.tum.de From jan.schoffelen at donders.ru.nl Fri Jun 19 14:24:34 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Jun 2015 12:24:34 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Hi Mats and Robin, You seem to be running into the same problem as Robin just reported before you. Both error messages point to ft_select_range, which is in fieldtrip/plotting. ft_select_range calls ft_platform_supports (which is a very fresh addition to FieldTrip), which is located in fieldtrip/plotting/private. Now, ft_platform_supports wants to call matlabversion and it cannot find it at this location. Looking into fieldtrip/plotting/private, I see that indeed it is missing there. I will fix this. Best, Jan-Mathijs On Jun 19, 2015, at 12:44 PM, Es, M.W.J. van (Mats) > wrote: Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 19 14:37:33 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Jun 2015 12:37:33 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Hi Mats, I didn’t read Robin’s earlier e-mails in sufficient detail, but she already provided a clue to a solution. I created a bug (2912) for this, if you create an account on bugzilla, and put yourself on the CC list for this bug, you can follow it’s resolution. Best, JM On Jun 19, 2015, at 12:44 PM, Es, M.W.J. van (Mats) > wrote: Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats _______________________________________________ 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 xieyuanj at gmail.com Mon Jun 22 03:20:43 2015 From: xieyuanj at gmail.com (- -) Date: Mon, 22 Jun 2015 01:20:43 +0000 Subject: [FieldTrip] ask help Message-ID: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> Dear community, I load a .set format of file from eeglab, the matlab show an error,that is ''error using load,number of columns on line 2 of ASCII file must be the same as previous lines". but why, is it not compatible with the file format? any suggestion would be appreciated. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Mon Jun 22 09:00:41 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 22 Jun 2015 07:00:41 +0000 Subject: [FieldTrip] ask help In-Reply-To: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> References: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB4E3CA0@exprd01.hosting.ru.nl> Dear Jun, Could you please be a bit more specific as to what fieldtrip functions (and configuration options) you are using in combination with this eeglab file? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of - - Sent: maandag 22 juni 2015 3:21 To: fieldtrip, donders Subject: [FieldTrip] ask help Dear community, I load a .set format of file from eeglab, the matlab show an error,that is ''error using load,number of columns on line 2 of ASCII file must be the same as previous lines". but why, is it not compatible with the file format? any suggestion would be appreciated. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Mon Jun 22 12:42:54 2015 From: robince at gmail.com (Robin) Date: Mon, 22 Jun 2015 11:42:54 +0100 Subject: [FieldTrip] updatesens option with planar gradient Message-ID: Hello, I have selected heartbeat and eye movement ICA components in my MEG data and I would now like to remove them from the data. I saw there is an "updatesens" option in ft_rejectcomponent which seems to update the gradiometer definitions when the components are rejected, but I couldn't find any further description of what this is. After component rejection I would like to calculate the planar gradient with ft_megplanar. In this case should what is the correct setting for updatesens in the ft_rejectcomponent stage? Thanks, Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From russgport at gmail.com Mon Jun 22 17:37:07 2015 From: russgport at gmail.com (russ port) Date: Mon, 22 Jun 2015 11:37:07 -0400 Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots Message-ID: Hi All, After reading the wiki (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests ), it appears that I cannot do a cluster based permutation test on a set of data I have because of the fact that I have two between subject factors (genotype and sex). There has been a lot of discussion on the mailing list about how to run these kinds of analyses, but they have always (or at least what I could find), been about data set containing only 1 between subjects factor. As such, I have a question in two parts A) could I look at the data with a proper test of the between subject factors, and the within subject factor AND their interaction using a permutation test that use holms or bonferroni correction (though I would probably use holms because of bonferroni being to conservative) B) should I set this up by either i) testing geno, sex and their interaction separately like I think the wiki suggests above or ii) try and use the cfg.cvar input as previously suggested else where on this discussion list (though again that was for data with only 1 between subject variable)? Best, Russ Port -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Tue Jun 23 15:22:46 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Tue, 23 Jun 2015 13:22:46 +0000 Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots In-Reply-To: References: Message-ID: Hi Russ, From: russ port > Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots Date: 22 Jun 2015 17:37:07 CEST To: > Reply-To: FieldTrip discussion list > Hi All, After reading the wiki (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), it appears that I cannot do a cluster based permutation test on a set of data I have because of the fact that I have two between subject factors (genotype and sex). There has been a lot of discussion on the mailing list about how to run these kinds of analyses, but they have always (or at least what I could find), been about data set containing only 1 between subjects factor. As such, I have a question in two parts A) could I look at the data with a proper test of the between subject factors, and the within subject factor AND their interaction using a permutation test that use holms or bonferroni correction (though I would probably use holms because of bonferroni being to conservative) B) should I set this up by either i) testing geno, sex and their interaction separately like I think the wiki suggests above or ii) try and use the cfg.cvar input as previously suggested else where on this discussion list (though again that was for data with only 1 between subject variable)? With respect to question A: I hope I understand you correctly here: you want to analyse a 2 (between) x 3 (within) design, separately for the the data selected according to the level of the other between-subjects factor (thus, 2 analyses of a 2x3 design). Yes, this is possible in the permutation framework. Using Bonferroni correction to account for the fact that you perform 2 tests instead of 1 is a good idea. With respect to question B: You cannot test the interaction geno x sex in the permutation framework because these are 2 between-subjects factors. Also, the cfg.cvar option is to be used in a within-subjects design (or a matched-pairs design, which is statistically equivalent to a within-subjects design). Thus, the cvar must be within-subjects variable. best, Eric Maris Best, Russ Port _______________________________________________ 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 xieyuanj at gmail.com Fri Jun 26 04:45:18 2015 From: xieyuanj at gmail.com (- -) Date: Fri, 26 Jun 2015 10:45:18 +0800 Subject: [FieldTrip] (no subject) Message-ID: Hi All I prepossessed some data using eeglab, now how can I load these .set files to matlab by fieldtrip functioni? Any suggestion would be appreciated. Thanks. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Fri Jun 26 06:33:58 2015 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Thu, 25 Jun 2015 21:33:58 -0700 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <6FA83067-15D3-4523-BB63-0D70901C29AB@cerco.ups-tlse.fr> You can use the File-IO importer (separate download from Fieldtrip) which is the default toolbox to import data in Fieldtrip. Best, Arno > On Jun 25, 2015, at 7:45 PM, - - wrote: > > Hi All > > I prepossessed some data using eeglab, now how can I load these .set files to matlab by fieldtrip functioni? > Any suggestion would be appreciated. > > Thanks. > > Best, > > Jun > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From xieyuanj at gmail.com Fri Jun 26 12:55:53 2015 From: xieyuanj at gmail.com (- -) Date: Fri, 26 Jun 2015 18:55:53 +0800 Subject: [FieldTrip] (no subject) Message-ID: Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 26 13:09:58 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 26 Jun 2015 11:09:58 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> Hi! Perhaps you could have a look a this link. It may help. https://www.youtube.com/watch?v=OGyHRhbOG2Y Have a nice day. Jan-Mathijs On Jun 26, 2015, at 12:55 PM, - - wrote: > Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Fri Jun 26 16:45:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 26 Jun 2015 17:45:55 +0300 Subject: [FieldTrip] running tmsidriver with ASA In-Reply-To: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> References: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> Message-ID: <603E0E85-6DB5-41E8-B44A-7E14210CADDC@donders.ru.nl> Hi Gerrit, We don’t have ASA software nor TMSi hardware at the Donders, so we have never tested it ourselves. But ANT has implemented http://www.fieldtriptoolbox.org/development/realtime/neurosdk, which is a FieldTrip buffer interface directly to their acquisition software (instead of to the lower level tmsi driver). Perhaps that might be of use to you. You would have to ask ANT for further details. best regards, Robert On 19 Jun 2015, at 11:06, girwin at uni-osnabrueck.de wrote: > Hello mailinglist, > > I would like to know if anyone has ever attempted to run the > tmsidriver(.exe) in parallel to the ASA EEG recording software. If I > attempt it one of the two always breaks down, and preferably I would > like to stream with the tmsidriver while recording with the ASA software > at the same time. If anyone knows a way to do this I would be grateful. > > Cheers, > Gerrit Irwin > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tzvetan.popov at uni-konstanz.de Fri Jun 26 18:44:06 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 26 Jun 2015 18:44:06 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <694412C9-38DF-4491-964E-D85188360AFA@uni-konstanz.de> Hi - -, I hope you can find some help here before struggling too hard with the new computer. http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 tzvetan > Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nikola.valchev.umcg at gmail.com Sat Jun 27 13:34:54 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Sat, 27 Jun 2015 13:34:54 +0200 Subject: [FieldTrip] importing and segmenting CNT and TRG files In-Reply-To: References: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Message-ID: <558e8a5f.6a3ec20a.edb85.26ff@mx.google.com> Dear Raquel, Thank you very much for the offer. Actually it turned out that the CNT files were too big to preprocess on a normal computer so I exported them differently and then applied the preprocessing. Best Nikola From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Raquel Bibi Sent: 12 June 2015 23:30 To: FieldTrip discussion list Subject: Re: [FieldTrip] importing and segmenting CNT and TRG files I had to modify one of Fieldtrip's files recently. If you give me yours I can see if my modifications work for your data. Best, Raquel Sent from my iPhone On Jun 9, 2015, at 10:48 AM, Nikola Valchev wrote: Dear all, I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? 2) I can’t seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. Any help is appreciated and I’m sorry if I’m not too clear, I’m new to EEG. Nikola _______________________________________________ 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 plyons at udel.edu Mon Jun 29 05:51:19 2015 From: plyons at udel.edu (Peter Lyons) Date: Sun, 28 Jun 2015 23:51:19 -0400 Subject: [FieldTrip] Help Manually Defining Trials Message-ID: Dear All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. My dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do not have any events or triggers in my data. I would like to manually select the cleanest segments of my data following artifact rejection, and define them as trials. Theoretically, I see three ways to segment my data manually: 1. Insert individual triggers throughout my data (at locations determined via ft_databrowser), and then define trials based on these triggers. 2. Define trials based on a beginning and ending sample number. 3. Use ft_databrowser to select segments of data as if they were artifacts, and then define these "artifacts" as trials instead of rejecting them from the dataset. Could anyone advise on how to code one of the above methods? Any help is welcome and appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Mon Jun 29 15:02:00 2015 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Mon, 29 Jun 2015 09:02:00 -0400 Subject: [FieldTrip] Help Manually Defining Trials In-Reply-To: References: Message-ID: Hi Peter, Maybe you can redefine (ft_redefinetrials) your trials (from one whole continue trials to chunks of data) in segments that allow you to properly resolve your frequencies of interest. After that you can perform a trial rejection based on automatic or manual artifact detection...then you can do whatever you need to do. Could be other ways, but this for me looks very straight forward for at least a first exploratory round of analysis. I hope this helps you. Best Rodrigo On Sun, Jun 28, 2015 at 11:51 PM, Peter Lyons wrote: > Dear All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different > frequency bands as well as phase lag index between various sensors. My > dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do > not have any events or triggers in my data. > > I would like to manually select the cleanest segments of my data following > artifact rejection, and define them as trials. > > Theoretically, I see three ways to segment my data manually: > > 1. Insert individual triggers throughout my data (at locations determined > via ft_databrowser), and then define trials based on these triggers. > > 2. Define trials based on a beginning and ending sample number. > > 3. Use ft_databrowser to select segments of data as if they were > artifacts, and then define these "artifacts" as trials instead of rejecting > them from the dataset. > > Could anyone advise on how to code one of the above methods? > > Any help is welcome and appreciated! > > Thanks, > Peter > > > > _______________________________________________ > 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 spa268 at nyu.edu Mon Jun 29 15:31:46 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Mon, 29 Jun 2015 17:31:46 +0400 Subject: [FieldTrip] Help Manually Defining Trials Message-ID: Hi Peter, http://www.fieldtriptoolbox.org/reference/ft_definetrial describes the format of the trial definition matrix; you can simply create a matrix like this using the times that you would like to choose for your epochs, and then run ft_preprocessing() with this matrix as the input for cfg.trl. (This is basically a combination of methods (1) and (2) that you suggested below.) Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Mon, Jun 29, 2015 at 2:00 PM, wrote: > > > Message: 1 > Date: Sun, 28 Jun 2015 23:51:19 -0400 > From: Peter Lyons > To: FieldTrip discussion list > Subject: [FieldTrip] Help Manually Defining Trials > Message-ID: > sw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different frequency > bands as well as phase lag index between various sensors. My dataset is a > continuous recording sampled at 1000 hz for 30 minutes. I do not have any > events or triggers in my data. > > I would like to manually select the cleanest segments of my data following > artifact rejection, and define them as trials. > > Theoretically, I see three ways to segment my data manually: > > 1. Insert individual triggers throughout my data (at locations determined > via ft_databrowser), and then define trials based on these triggers. > > 2. Define trials based on a beginning and ending sample number. > > 3. Use ft_databrowser to select segments of data as if they were > artifacts, and then define these "artifacts" as trials instead of rejecting > them from the dataset. > > Could anyone advise on how to code one of the above methods? > > Any help is welcome and appreciated! > > Thanks, > Peter > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150628/d926ab81/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 55, Issue 26 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Mon Jun 29 16:16:11 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Mon, 29 Jun 2015 14:16:11 +0000 Subject: [FieldTrip] Help Manually Defining Trials In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C17D5AA19@exprd03.hosting.ru.nl> Hi Peter, In addition to Steve’s perfect suggestion, you might want to take a look at this example script, which basically is a data-driven way to define trials: http://www.fieldtriptoolbox.org/example/detect_the_muscle_activity_in_an_emg_channel_and_use_that_as_trial_definition Here, co-recorded EMG-data is used to define trials, but in your case you can use (some parameter in) your MEG data (e.g., some ‘cleaniness’ measure). Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Stephen Politzer-Ahles Sent: maandag 29 juni 2015 15:32 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Help Manually Defining Trials Hi Peter, http://www.fieldtriptoolbox.org/reference/ft_definetrial describes the format of the trial definition matrix; you can simply create a matrix like this using the times that you would like to choose for your epochs, and then run ft_preprocessing() with this matrix as the input for cfg.trl. (This is basically a combination of methods (1) and (2) that you suggested below.) Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Mon, Jun 29, 2015 at 2:00 PM, > wrote: Message: 1 Date: Sun, 28 Jun 2015 23:51:19 -0400 From: Peter Lyons > To: FieldTrip discussion list > Subject: [FieldTrip] Help Manually Defining Trials Message-ID: > Content-Type: text/plain; charset="utf-8" Dear All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. My dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do not have any events or triggers in my data. I would like to manually select the cleanest segments of my data following artifact rejection, and define them as trials. Theoretically, I see three ways to segment my data manually: 1. Insert individual triggers throughout my data (at locations determined via ft_databrowser), and then define trials based on these triggers. 2. Define trials based on a beginning and ending sample number. 3. Use ft_databrowser to select segments of data as if they were artifacts, and then define these "artifacts" as trials instead of rejecting them from the dataset. Could anyone advise on how to code one of the above methods? Any help is welcome and appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 55, Issue 26 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From bqrosen at ucsd.edu Tue Jun 30 04:09:45 2015 From: bqrosen at ucsd.edu (Burke Rosen) Date: Mon, 29 Jun 2015 19:09:45 -0700 Subject: [FieldTrip] wavelet power units and (2/fsample) correction factor Message-ID: <5591FA69.5080203@ucsd.edu> Hello All, I noticed with simulated input that ft_freqanalysis->ft_specest_wavelet yields powspctrm results that are scaled by the sampling rate of the input data. The scaling factor appears to be (fsample/2). Of course, multiplying by (2/fsample) corrects this. Upon investigation I found that freqanalysis_mtmconvol (the predesessor to ft_specest_wavelet (?)) from fieldtrip-20080624 contains this correction factor on line 294. 1. What is this correction factor and why is it no longer applied? 2. Why is in not applied to the fourierspctrm output? 3. What, in general, are the output units of the ft_freqanalysis->ft_specest_wavelet? Thank you, Burke Rosen From S.Hanslmayr at bham.ac.uk Tue Jun 30 10:43:14 2015 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Tue, 30 Jun 2015 08:43:14 +0000 Subject: [FieldTrip] 5 year postdoc position available in Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CED83878A2@EX8.adf.bham.ac.uk> *********************************************** ********* POSTDOC POSITION AVAILABLE *********** *********************************************** Dear all, We are looking for a full-time Postdoctoral Research Fellow to work within the School of Psychology, University of Birmingham. The successful candidate will work on a 5-year project funded within an ERC Consolidator Grant to investigate the role of brain oscillations for human episodic memory. The project focusses on intracranial single-unit recordings in human epilepsy patients and computational modelling of oscillations in memory networks. The postdoctoral researcher will design and conduct experiments with patients in Birmingham and Germany (Erlangen), analyse electrophysiological data and publish the results in international peer reviewed journals. The researcher should also use computational modelling as a tool to generate hypothesis and test the empirical data. The person we are looking for will have demonstrable experience on human or animal electrophysiology and oscillations as measured with EEG/MEG or, ideally, intracranial EEG. They should have a background, or strong interest, in computational modelling of neural networks. They will have an advanced degree (preferably a PhD in Psychology, Computational Neuroscience, or Neuroscience). They must be fluent using Matlab and related toolboxes for analysing brain oscillatory data (i.e. Fieldtrip). We require an individual with very good communication skills. Strong interest in working in a clinical environment is required, and previous clinical experience is a plus. This position will be held in the Memory and Oscillations Lab and will be supervised by Dr Simon Hanslmayr. The lab is a dynamic active group that includes several other Post docs and PhD students and provides a supportive and stimulating environment in which to work. Start date is 1 October 2015. To download the details of this position and submit an electronic application click HERE or visit www.hr.bham.ac.uk/jobs and enter the job reference number 55204 in the search engine. Please send informal enquiries to Dr Simon Hanslmayr (s.hanslmayr at bham.ac.uk). Dr. Simon Hanslmayr Senior Lecturer School of Psychology University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.birmingham.ac.uk/schools/psychology/people/profile.aspx?ReferenceId=70349 -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.bleichner at uni-oldenburg.de Tue Jun 30 10:47:58 2015 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Tue, 30 Jun 2015 10:47:58 +0200 Subject: [FieldTrip] New mailing list for users of Lab Streaming Layer In-Reply-To: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> References: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> Message-ID: <559257BE.2050503@uni-oldenburg.de> Dear fieldtrip users, there is now a dedicated mailing list for those of you who use the lab streaming layer (LSL) to record and synchronize their time series. The list is for users and developers of LSL, to discuss issues, make announcements and disseminate knowledge. Please contribute. https://mailman.ucsd.edu/mailman/listinfo/lsl-l Best Martin (enthusiastic LSL user) -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ From okba.bekhelifi at gmail.com Mon Jun 1 04:07:34 2015 From: okba.bekhelifi at gmail.com (Okba Bekhelifi) Date: Mon, 1 Jun 2015 04:07:34 +0200 Subject: [FieldTrip] Filedtrip Buffer with BCI2000 Message-ID: Hi! I'm working on BCI research projects, and I need to acquire data from gtec amplifiers, I'm trying to use the Fieldtrip buffer to do so, I followed the example tutorial on BCI2000 wiki but I didn't succeed, what I did was changing the SignalProcessing Port in the BCI2000 config to 1972 (same as for the buffer in Maltab) and run both the BCI2000 modules and the sample Matlab code, but I had an error message: Error using buffer ERROR: failed to create socket (1) Any help will be appreciated I'm using the latest version of both BCI2000 and FieldTrip Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathis.kaiser at charite.de Mon Jun 1 17:20:08 2015 From: mathis.kaiser at charite.de (Mathis Kaiser) Date: Mon, 1 Jun 2015 17:20:08 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <5565D5B6.8020805@gmail.com> References: <4E102991-AB38-44E6-AA60-780A723AFCE2@gmail.com> <5565D5B6.8020805@gmail.com> Message-ID: <556C7828.40903@charite.de> Dear Fieldtrip Users, I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? Thanks for any input, best wishes, Mathis Kaiser > %% tfr and wpli per subject > > cfg = []; > cfg.keeptrials = 'yes'; > cfg.output = 'fourier'; > cfg.foi = 2:20; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > > tfr4conn_ill = ft_freqanalysis(cfg, virt_ill); > tfr4conn_noill = ft_freqanalysis(cfg, virt_noill); > > cfg = []; > cfg.method = 'wpli_debiased'; > > wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill); > wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill); ### > % (I then load all individual datasets into two cell arrays - > all_wpli_ill and all_wpli_noill): > >> display(all_wpli_ill{1}) > label: {638x1 cell} > dimord: 'chan_chan_freq' > wpli_debiasedspctrm: [638x638x10 double] > freq: [1x10 double] > elec: [1x1 struct] > cfg: [1x1 struct] > ### > > %% statistics > > cfg = []; > cfg.parameter = 'wpli_debiasedspctrm'; > cfg.statistic = 'depsamplesT'; > cfg.method = 'montecarlo'; > cfg.correctm = 'cluster'; > cfg.frequency = [10 10]; > cfg.neighbours = []; % no spatial clustering > cfg.numrandomization = 1000; > cfg.correcttail = 'alpha'; > nSub = length(subj); > cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)]; > cfg.design(2,1:2*nSub) = [1:nSub 1:nSub]; > cfg.ivar = 1; > cfg.uvar = 2; > > stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:}); ### > >> display(stat) > > stat = > > prob: [638x638 double] > posclusters: [1x4662 struct] > posclusterslabelmat: [638x638 double] > posdistribution: [1x1000 double] > negclusters: [1x12943 struct] > negclusterslabelmat: [638x638 double] > negdistribution: [1x1000 double] > cirange: [638x638 double] > mask: [638x638 logical] > stat: [638x638 double] > ref: [638x638 double] > dimord: 'chan_chan' > label: {638x1 cell} > freq: 9.9602 > cfg: [1x1 struct] > From cmk0803 at hbf.re.kr Mon Jun 1 21:31:08 2015 From: cmk0803 at hbf.re.kr (=?UTF-8?B?7LWc66+46rK9?=) Date: Tue, 2 Jun 2015 04:31:08 +0900 Subject: [FieldTrip] Source localization of MEG resting state data Message-ID: Dear fieldtrip users, I tried using DICS beamforming on MEG resting state data of healthy controls. (e.g. no task, no baseline, eyes opened) I analyzed to localize oscillatory sources using beamformer techniques according to the following tutorial. (link: http://www.fieldtriptoolbox.org/tutorial/beamformer) However, the output image was weird to be considered as resting data. I would like someone to help me through source localization procedure. *Q1. Is there something wrong in my script as below? * cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [8 12]; cfg.tapsmofrq = 2; cfg.channel = {'MEG'}; cfg.keeptrials = 'yes'; fft_rest = ft_freqanalysis(cfg, data_clean); % resting state MEG data (after preprocessing) %% Computing the leadfield matrices cfg = []; cfg.grad = fft_rest.grad; cfg.vol = vol; % head model cfg.grid = grid; % source model cfg.keeptrials = 'yes'; cfg.normalize = 'yes'; cfg.channel = {'MEG'}; rest_grid = ft_prepare_leadfield(cfg); %% Source analysis cfg = []; cfg.frequency = 'all'; cfg.grad = fft_rest.grad; cfg.method = 'dics'; cfg.grid = rest_grid; cfg.vol = vol; cfg.keeptrials = 'yes'; cfg.keepfilter = 'yes'; cfg.dics.lambda = 0; cfg.dics.projectnoise = 'yes'; rest_source = ft_sourceanalysis(cfg, fft_rest); mri_slice = ft_volumereslice([], mri) %mri: volumesegmented mri cfg = []; cfg.parameter = 'avg.pow'; rest_sointer = ft_sourceinterpolate(cfg, rest_source, mri_slice); *Q2. Is there any way to check whether the beamforming is performed well?* Any help would be greatly appreciated. MK CHOE -- Mi Kyung CHOE Department of Brain & Cognitive Sciences, Seoul National University Human Brain Function Laboratory E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Tue Jun 2 10:28:32 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 2 Jun 2015 10:28:32 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556C7828.40903@charite.de> References: <4E102991-AB38-44E6-AA60-780A723AFCE2@gmail.com> <5565D5B6.8020805@gmail.com> <556C7828.40903@charite.de> Message-ID: <96076F4F-EFD9-4382-B128-924F680FD5EA@uni-konstanz.de> Hi Mathis, alternatively you could use ft_sourcestatistics. For this you should reduce your 600 x 600 x freq matrix to freq of interest first. Next, the resulting 600 x 600 matrix you’d reduce to 600 x 1 where each grid point has a mean connectivity value to all possible grid points. >From then on you could use ft_sourcestatistics and ft_sourceinterpolate to visualize. Good luck, Tzvetan > Dear Fieldtrip Users, > > I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: > > I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). > > The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (see http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. > > I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? > Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? > > Thanks for any input, best wishes, > Mathis Kaiser > >> %% tfr and wpli per subject >> >> cfg = []; >> cfg.keeptrials = 'yes'; >> cfg.output = 'fourier'; >> cfg.foi = 2:20; >> cfg.method = 'mtmfft'; >> cfg.taper = 'hanning'; >> >> tfr4conn_ill = ft_freqanalysis(cfg, virt_ill); >> tfr4conn_noill = ft_freqanalysis(cfg, virt_noill); >> >> cfg = []; >> cfg.method = 'wpli_debiased'; >> >> wpli_tfr_ill = ft_connectivityanalysis(cfg, tfr4conn_ill); >> wpli_tfr_noill = ft_connectivityanalysis(cfg, tfr4conn_noill); > ### >> % (I then load all individual datasets into two cell arrays - all_wpli_ill and all_wpli_noill): >> >> display(all_wpli_ill{1}) >> label: {638x1 cell} >> dimord: 'chan_chan_freq' >> wpli_debiasedspctrm: [638x638x10 double] >> freq: [1x10 double] >> elec: [1x1 struct] >> cfg: [1x1 struct] >> > ### >> >> %% statistics >> >> cfg = []; >> cfg.parameter = 'wpli_debiasedspctrm'; >> cfg.statistic = 'depsamplesT'; >> cfg.method = 'montecarlo'; >> cfg.correctm = 'cluster'; >> cfg.frequency = [10 10]; >> cfg.neighbours = []; % no spatial clustering >> cfg.numrandomization = 1000; >> cfg.correcttail = 'alpha'; >> nSub = length(subj); >> cfg.design(1,1:2*nSub) = [ones(1,nSub) 2*ones(1,nSub)]; >> cfg.design(2,1:2*nSub) = [1:nSub 1:nSub]; >> cfg.ivar = 1; >> cfg.uvar = 2; >> >> stat = ft_freqstatistics(cfg, all_wpli_ill{:}, all_wpli_noill{:}); > ### >> >> display(stat) >> >> stat = >> >> prob: [638x638 double] >> posclusters: [1x4662 struct] >> posclusterslabelmat: [638x638 double] >> posdistribution: [1x1000 double] >> negclusters: [1x12943 struct] >> negclusterslabelmat: [638x638 double] >> negdistribution: [1x1000 double] >> cirange: [638x638 double] >> mask: [638x638 logical] >> stat: [638x638 double] >> ref: [638x638 double] >> dimord: 'chan_chan' >> label: {638x1 cell} >> freq: 9.9602 >> cfg: [1x1 struct] >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tzvetan.popov at uni-konstanz.de Tue Jun 2 10:37:09 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 2 Jun 2015 10:37:09 +0200 Subject: [FieldTrip] Source localization of MEG resting state data In-Reply-To: References: Message-ID: Hi MK CHOE, Q1; please call ft_sourcedescriptives before ft_sourceinterpolate or cfg.keeptrials = ’no’; during the call to ft_sourceanalysis. What do you mean by “weird output”? Q2; If you think of GOF and the like, not really. Sometimes one can take the scalp topography into account and compare the sensor and source level outputs. One way to go is also to split the continuous data into high and low signal pseudo epochs and make a beamformer contrast on the high and low power. How to do so is illustrated here: http://www.fieldtriptoolbox.org/tutorial/networkanalysis Good luck, Tzvetan > Dear fieldtrip users, > > I tried using DICS beamforming on MEG resting state data of healthy controls. > (e.g. no task, no baseline, eyes opened) > > I analyzed to localize oscillatory sources using beamformer techniques according to the following tutorial. > (link: http://www.fieldtriptoolbox.org/tutorial/beamformer) > However, the output image was weird to be considered as resting data. I would like someone to help me through source localization procedure. > > > Q1. Is there something wrong in my script as below? > cfg = []; > cfg.output = 'powandcsd'; > cfg.method = 'mtmfft'; > cfg.foilim = [8 12]; > cfg.tapsmofrq = 2; > cfg.channel = {'MEG'}; > cfg.keeptrials = 'yes'; > fft_rest = ft_freqanalysis(cfg, data_clean); % resting state MEG data (after preprocessing) > > %% Computing the leadfield matrices > cfg = []; > cfg.grad = fft_rest.grad; > cfg.vol = vol; % head model > cfg.grid = grid; % source model > cfg.keeptrials = 'yes'; > cfg.normalize = 'yes'; > cfg.channel = {'MEG'}; > rest_grid = ft_prepare_leadfield(cfg); > > %% Source analysis > cfg = []; > cfg.frequency = 'all'; > cfg.grad = fft_rest.grad; > cfg.method = 'dics'; > cfg.grid = rest_grid; > cfg.vol = vol; > cfg.keeptrials = 'yes'; > cfg.keepfilter = 'yes'; > cfg.dics.lambda = 0; > cfg.dics.projectnoise = 'yes'; > rest_source = ft_sourceanalysis(cfg, fft_rest); > > mri_slice = ft_volumereslice([], mri) %mri: volumesegmented mri > cfg = []; > cfg.parameter = 'avg.pow'; > rest_sointer = ft_sourceinterpolate(cfg, rest_source, mri_slice); > > > Q2. Is there any way to check whether the beamforming is performed well? > > Any help would be greatly appreciated. > > MK CHOE > > -- > Mi Kyung CHOE > Department of Brain & Cognitive Sciences, Seoul National University > Human Brain Function Laboratory > E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr > _______________________________________________ > 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 nick.ketz at gmail.com Tue Jun 2 17:53:42 2015 From: nick.ketz at gmail.com (Nick Ketz) Date: Tue, 02 Jun 2015 09:53:42 -0600 Subject: [FieldTrip] fieldtrip Digest, Vol 55, Issue 2 In-Reply-To: References: Message-ID: <556DD186.7070309@gmail.com> Mathis, you have hit on a much larger problem. Tzvetan is right to suggest calculating each grid-point's connectivity with all other grid-points, which gives you a connectivity topography map for each grid-point. The next logical step, which I've been struggling with, is to somehow cluster these topographies together, giving you clusters of neighboring grid-point topographies that are similar. Is there any work being done to solve this problem? I have been struggling with this problem for some time, that is: how to do cluster based permutation statistics in chan x chan bins of connectivity measures. Ideally I want to do this in a full chan x chan x freq x time cluster analysis. I've searched on the list for related topics; posted, probably incoherently, my own issues; and generally scanned the list and the literature for any sort of relevant topics trying to broach this problem, but am still stuck. The standard 3d chan x freq x time clustering uses a neighborhood structure to define what channels are considered neighbors, and uses numeric adjacency to cluster time and frequency. With chan x chan data however, there unfortunately isn't an intuitive way to think about neighborhood for the pairwise connectivity. There are neighbors surrounding the reference grid-point, and there are neighbors in each grid-point's connectivity topography, i.e. neighboring grid-points that have similar/significant connectivity values. How do you combine the two in a sensible way? And even more challenging how do you do statistics on them? I have been considering several approaches, including multi-dimensional scaling of these grid-point connectivity topographies, or just a correlation between topographies, and then using those values to select which reference grid-points to consider as similar enough to average together. This then gives you a reference cluster of grid-points and allows you to do standard cluster permutation statistics on the average of the reference grid-points. How exactly to determine which reference grid-points are 'similar enough' to be consider clusters is the tricky part, i.e. how can you statistically test if they should be considered a cluster or not? I've been working in isolation on this problem for some time, and would love a discussion on the topic. I'm hoping this message spurs other list lurkers to at least commiserate with me, but if possible to also post whatever approaches they have taken to solve the problem of clustering pairwise connectivity data. Nick On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: > Hi Mathis, alternatively you could use ft_sourcestatistics. For this > you should reduce your 600 x 600 x freq matrix to freq of interest > first. Next, the resulting 600 x 600 matrix you?d reduce to 600 x 1 > where each grid point has a mean connectivity value to all possible > grid points. >From then on you could use ft_sourcestatistics and > ft_sourceinterpolate to visualize. Good luck, Tzvetan >> >Dear Fieldtrip Users, >> > >> >I am a first-year PhD student and have been lurking here for a long time (finding lots of useful answers), it's about time I ask my first question: >> > >> >I am trying to compare connectivity in source space (~25 subjects, between two conditions, ~600 virtual channels on a 1.5cm grid) using ft_freqstatistics with a cluster-based permutation test (see code below). >> > >> >The original input datasets have the dimensions: chan x chan x freq. I tried restructuring them to chancmb x freq (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) before doing ft_freqstatistics, but the function then takes forever appending the (admittedly big) datasets. >> > >> >I then tried feeding them to ft_freqstatistics without restructuring, which didn't throw any errors. However, I noticed that the resulting clusters consist of adjacent cells in the chan x chan matrix, which doesn't make much sense since channels in adjacent cells are not necessarily spatially adjacent. I suspect that ft_freqstatistic assumes the 3-D input to contain a temporal dimension and therefore tries to build temporally adjacent clusters. Could any of the fieldtrip developers comment on this? >> >Does anyone in the FT-community have any advice on how to statistically evaluate connectivity data using the permutation approach? >> > >> >Thanks for any input, best wishes, >> >Mathis Kaiser From tomh at kurage.nimh.nih.gov Tue Jun 2 19:33:23 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Tue, 2 Jun 2015 13:33:23 -0400 Subject: [FieldTrip] fieldtrip Digest, Vol 55, Issue 2 In-Reply-To: <556DD186.7070309@gmail.com> References: <556DD186.7070309@gmail.com> Message-ID: <20150602133323.7df2fbe7@kurage.nimh.nih.gov> Several people have been doing things with spectral clustering, involving the graph Laplacian, wherein we say that each voxel of the brain is a node in a graph, and various connectivity measures connect the nodes. The Laplacian of the graph has many interesting properties, and the first K eigenvalues can be used to create clusters. I'm afraid I don't know how to do permutation stats on that, but k-means clustering of the graph eigenvectors can have random starting points ... On Tue, 02 Jun 2015 09:53:42 -0600 Nick Ketz wrote: > Mathis, you have hit on a much larger problem. Tzvetan is right to > suggest calculating each grid-point's connectivity with all other > grid-points, which gives you a connectivity topography map for each > grid-point. The next logical step, which I've been struggling with, > is to somehow cluster these topographies together, giving you > clusters of neighboring grid-point topographies that are similar. Is > there any work being done to solve this problem? > > I have been struggling with this problem for some time, that is: how > to do cluster based permutation statistics in chan x chan bins of > connectivity measures. Ideally I want to do this in a full chan x > chan x freq x time cluster analysis. I've searched on the list for > related topics; posted, probably incoherently, my own issues; and > generally scanned the list and the literature for any sort of > relevant topics trying to broach this problem, but am still stuck. > > The standard 3d chan x freq x time clustering uses a neighborhood > structure to define what channels are considered neighbors, and uses > numeric adjacency to cluster time and frequency. With chan x chan > data however, there unfortunately isn't an intuitive way to think > about neighborhood for the pairwise connectivity. There are > neighbors surrounding the reference grid-point, and there are > neighbors in each grid-point's connectivity topography, i.e. > neighboring grid-points that have similar/significant connectivity > values. How do you combine the two in a sensible way? And even more > challenging how do you do statistics on them? > > I have been considering several approaches, including > multi-dimensional scaling of these grid-point connectivity > topographies, or just a correlation between topographies, and then > using those values to select which reference grid-points to consider > as similar enough to average together. This then gives you a > reference cluster of grid-points and allows you to do standard > cluster permutation statistics on the average of the reference > grid-points. How exactly to determine which reference grid-points > are 'similar enough' to be consider clusters is the tricky part, i.e. > how can you statistically test if they should be considered a cluster > or not? > > I've been working in isolation on this problem for some time, and > would love a discussion on the topic. I'm hoping this message spurs > other list lurkers to at least commiserate with me, but if possible > to also post whatever approaches they have taken to solve the problem > of clustering pairwise connectivity data. > > > > Nick > > > > On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: > > Hi Mathis, alternatively you could use ft_sourcestatistics. For > > this you should reduce your 600 x 600 x freq matrix to freq of > > interest first. Next, the resulting 600 x 600 matrix you?d reduce > > to 600 x 1 where each grid point has a mean connectivity value to > > all possible grid points. >From then on you could use > > ft_sourcestatistics and ft_sourceinterpolate to visualize. Good > > luck, Tzvetan > >> >Dear Fieldtrip Users, > >> > > >> >I am a first-year PhD student and have been lurking here for a > >> >long time (finding lots of useful answers), it's about time I ask > >> >my first question: > >> > > >> >I am trying to compare connectivity in source space (~25 > >> >subjects, between two conditions, ~600 virtual channels on a > >> >1.5cm grid) using ft_freqstatistics with a cluster-based > >> >permutation test (see code below). > >> > > >> >The original input datasets have the dimensions: chan x chan x > >> >freq. I tried restructuring them to chancmb x freq > >> >(seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) > >> >before doing ft_freqstatistics, but the function then takes > >> >forever appending the (admittedly big) datasets. > >> > > >> >I then tried feeding them to ft_freqstatistics without > >> >restructuring, which didn't throw any errors. However, I noticed > >> >that the resulting clusters consist of adjacent cells in the chan > >> >x chan matrix, which doesn't make much sense since channels in > >> >adjacent cells are not necessarily spatially adjacent. I suspect > >> >that ft_freqstatistic assumes the 3-D input to contain a temporal > >> >dimension and therefore tries to build temporally adjacent > >> >clusters. Could any of the fieldtrip developers comment on this? > >> >Does anyone in the FT-community have any advice on how to > >> >statistically evaluate connectivity data using the permutation > >> >approach? > >> > > >> >Thanks for any input, best wishes, > >> >Mathis Kaiser > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tom -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From jb4590 at nyu.edu Tue Jun 2 21:58:18 2015 From: jb4590 at nyu.edu (Julia Basso) Date: Tue, 2 Jun 2015 15:58:18 -0400 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip Message-ID: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia *Julia C. Basso, PhDPost-doctoral Research AssociateNew York UniversityCenter for Neural ScienceSuzuki Laboratorywww.suzukilab.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Tue Jun 2 23:55:07 2015 From: nick.ketz at gmail.com (Nick Ketz) Date: Tue, 02 Jun 2015 15:55:07 -0600 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> Message-ID: <556E263B.4010206@gmail.com> Hi Tom and Jake, thanks very much for adding momentum to this. I haven't yet looked into spectral graph clustering, and really haven't been thinking of it terms of graph theory but it now seems silly that I haven't. If I'm understanding the suggestions correctly, the idea is to use the eigenvectors of the connectivity measure (WPLI in this case) to determine which nodes/voxels to cluster together. So nodes with similar graphs will be clustered together. This would be analogous to the graph bisection problem where k=2. The problem with mixture models is the arbitrary nature of how many clusters to use, and without a way to determine the statistical likelihood of a given cluster this is a real problem for determining the validity of a given cluster. Jake thanks for the resources, I'm beginning to dig into them and they seem promising. My understanding is that graph bisection divides the graph into two groups that have the minimum number of connections between them. So this could be used to cluster nodes that have similar topographies together, but it's not clear the best division would occur in the first bisection, instead possibly in subsequent bisections. Is this where the recursive algorithm comes in? I found this paper of yours ' Spectral Techniques for Graph Bisection in Genetic Algorithms', but it doesn't seem to get past the initial bisection. As I said, I haven't really been thinking of the problem in graph theory terms, but if my understanding is correct the current data set I'm working with could have an adjacency matrix as large as 128x128x70x50 (chan x chan x time x frequency), and as small as 128x128 for a single time x frequency bin. Nick On 6/2/15 12:38 PM, Jacob Martin wrote: > Hi Tom and Nick, > > Here's a paper i wrote which may help give some background on spectral clustering: > > "Ranks and representations for spectral graph bisection" > > I also have a genetic algorithm which uses recursive spectral graph bisection to cluster graphs using the ideas from the above paper. It is written in Java and is quite competitive and fast compared to other algorithms. Nick, perhaps i could lend a hand. > > I suggest looking up Chris Walshaw's partition archive for lots of examples of algorithms. I had a few minimum bisection records in there a while back with an older algorithm, but haven't looked at it in years or tried with my new algorithms yet. > > How big are your adjacency matrices? Note that the minimum bisection problem is NP complete. > > Best > Jake > > -- > Jacob Martin, PhD > Center for Brain and Cognition > CerCo CNRS > Toulouse, France > > > > > > > > > > On 02 Jun 2015, at 13:33, Tom Holroyd wrote: > > Several people have been doing things with spectral clustering, > involving the graph Laplacian, wherein we say that each voxel of the > brain is a node in a graph, and various connectivity measures connect > the nodes. The Laplacian of the graph has many interesting properties, > and the first K eigenvalues can be used to create clusters. > > I'm afraid I don't know how to do permutation stats on that, but > k-means clustering of the graph eigenvectors can have random starting > points ... > > On Tue, 02 Jun 2015 09:53:42 -0600 > Nick Ketz wrote: > >> Mathis, you have hit on a much larger problem. Tzvetan is right to >> suggest calculating each grid-point's connectivity with all other >> grid-points, which gives you a connectivity topography map for each >> grid-point. The next logical step, which I've been struggling with, >> is to somehow cluster these topographies together, giving you >> clusters of neighboring grid-point topographies that are similar. Is >> there any work being done to solve this problem? >> >> I have been struggling with this problem for some time, that is: how >> to do cluster based permutation statistics in chan x chan bins of >> connectivity measures. Ideally I want to do this in a full chan x >> chan x freq x time cluster analysis. I've searched on the list for >> related topics; posted, probably incoherently, my own issues; and >> generally scanned the list and the literature for any sort of >> relevant topics trying to broach this problem, but am still stuck. >> >> The standard 3d chan x freq x time clustering uses a neighborhood >> structure to define what channels are considered neighbors, and uses >> numeric adjacency to cluster time and frequency. With chan x chan >> data however, there unfortunately isn't an intuitive way to think >> about neighborhood for the pairwise connectivity. There are >> neighbors surrounding the reference grid-point, and there are >> neighbors in each grid-point's connectivity topography, i.e. >> neighboring grid-points that have similar/significant connectivity >> values. How do you combine the two in a sensible way? And even more >> challenging how do you do statistics on them? >> >> I have been considering several approaches, including >> multi-dimensional scaling of these grid-point connectivity >> topographies, or just a correlation between topographies, and then >> using those values to select which reference grid-points to consider >> as similar enough to average together. This then gives you a >> reference cluster of grid-points and allows you to do standard >> cluster permutation statistics on the average of the reference >> grid-points. How exactly to determine which reference grid-points >> are 'similar enough' to be consider clusters is the tricky part, i.e. >> how can you statistically test if they should be considered a cluster >> or not? >> >> I've been working in isolation on this problem for some time, and >> would love a discussion on the topic. I'm hoping this message spurs >> other list lurkers to at least commiserate with me, but if possible >> to also post whatever approaches they have taken to solve the problem >> of clustering pairwise connectivity data. >> >> >> >> Nick >> >> >> >>> On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: >>> Hi Mathis, alternatively you could use ft_sourcestatistics. For >>> this you should reduce your 600 x 600 x freq matrix to freq of >>> interest first. Next, the resulting 600 x 600 matrix you?d reduce >>> to 600 x 1 where each grid point has a mean connectivity value to >>> all possible grid points. >From then on you could use >>> ft_sourcestatistics and ft_sourceinterpolate to visualize. Good >>> luck, Tzvetan >>>>> Dear Fieldtrip Users, >>>>> >>>>> I am a first-year PhD student and have been lurking here for a >>>>> long time (finding lots of useful answers), it's about time I ask >>>>> my first question: >>>>> >>>>> I am trying to compare connectivity in source space (~25 >>>>> subjects, between two conditions, ~600 virtual channels on a >>>>> 1.5cm grid) using ft_freqstatistics with a cluster-based >>>>> permutation test (see code below). >>>>> >>>>> The original input datasets have the dimensions: chan x chan x >>>>> freq. I tried restructuring them to chancmb x freq >>>>> (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) >>>>> before doing ft_freqstatistics, but the function then takes >>>>> forever appending the (admittedly big) datasets. >>>>> >>>>> I then tried feeding them to ft_freqstatistics without >>>>> restructuring, which didn't throw any errors. However, I noticed >>>>> that the resulting clusters consist of adjacent cells in the chan >>>>> x chan matrix, which doesn't make much sense since channels in >>>>> adjacent cells are not necessarily spatially adjacent. I suspect >>>>> that ft_freqstatistic assumes the 3-D input to contain a temporal >>>>> dimension and therefore tries to build temporally adjacent >>>>> clusters. Could any of the fieldtrip developers comment on this? >>>>> Does anyone in the FT-community have any advice on how to >>>>> statistically evaluate connectivity data using the permutation >>>>> approach? >>>>> >>>>> Thanks for any input, best wishes, >>>>> Mathis Kaiser >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 3 09:22:51 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 3 Jun 2015 07:22:51 +0000 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip In-Reply-To: References: Message-ID: <68229AB8-0C8B-4BD1-BB61-1A06204EF8FA@fcdonders.ru.nl> Hi Julia, The intantech website mentions the existence of a MATLAB-toolbox to interact with the data (http://intantech.com/RHD2000_matlab_toolbox.html). So, in principle, it is possible to get the data read in into MATLAB, true? It should be then relatively straightforward to convert the data in the MATLAB workspace into a structure that FieldTrip understands (e.g.see: www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat). If you would want to work from the raw datafiles directly, we need to add a set of dedicated low-level functions to FieldTrip (or provide some code-glue that allow interfacing with the commercial matlab-toolbox), as per: www.fieldtriptoolbox.org/faq/how_can_extend_the_reading_functions_with_a_new_dataformat. The FieldTrip team currently lacks the resources to do low-level implementation of fileformats that are not directly relevant to our own scientific work from scratch, but if you are willing to give it a shot, we will certainly do our best to facilitate you. Best wishes, Jan-Mathijs On Jun 2, 2015, at 9:58 PM, Julia Basso > wrote: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia Julia C. Basso, PhD Post-doctoral Research Associate New York University Center for Neural Science Suzuki Laboratory www.suzukilab.com _______________________________________________ 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 tomh at kurage.nimh.nih.gov Wed Jun 3 20:05:42 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Wed, 3 Jun 2015 14:05:42 -0400 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556E263B.4010206@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> <556E263B.4010206@gmail.com> Message-ID: <20150603140542.76d8be0f@kurage.nimh.nih.gov> > The problem with mixture > models is the arbitrary nature of how many clusters to use, and > without a way to determine the statistical likelihood of a given > cluster this is a real problem for determining the validity of a > given cluster. Yea. Given the nature of MEG, with ~300 channels, you look at the eigenvalue spectrum of a typical channel covariance matrix and see that it typically starts to flatten out at around 50 or so, and then figure maybe K=20~25 clusters, so you take the top K (or K-1*) eigenvectors of the Laplacian matrix and use K-means clustering to relabel the nodes (voxels) according to which subnetwork they are in. I tend to sort them by size, and see how they change over conditions. The results are "interesting", but that's different from "publishable". It's a real problem, as you say, to determine the likelihood of a cluster. One approach is to start with random MEG data. Note that passing random MEG data through a beamformer results in almost the same thing as passing real MEG data through a beamformer. Quite a lot of structure is in the weights. So you need to shuffle the beamformers as well. Then do the spectral clustering and look at how things change. This is an open area and I'd welcome any insights anyone may have about how to visualize or work with distributions of clusters in 3D. It is also worth pointing out that all of this depends highly on what your connectivity measure is. Beamformed virtual channels can be quite noisy ... many books have been written about how to estimate spectra, coherence, and the like. This paper is fairly interesting: "A Generalized MVDR Spectrum" Benesty, Chen, and Huang http://externe.emt.inrs.ca/users/benesty/papers/spl_dec2005.pdf * This post is too short to talk about that. -- Dr. Tom -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From M.Nieuwland at ed.ac.uk Wed Jun 3 22:38:27 2015 From: M.Nieuwland at ed.ac.uk (NIEUWLAND Mante) Date: Wed, 3 Jun 2015 20:38:27 +0000 Subject: [FieldTrip] no red color for ft_multiplotTFR Message-ID: Dear all, I'm new to Fieldtrip, so I hope this question isn't too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jorn at artinis.com Thu Jun 4 08:57:22 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Thu, 4 Jun 2015 08:57:22 +0200 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: References: Message-ID: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Dear Mante, most likely you are using a Matlab version >2014a. Mathwork changed the default colormap to Parula instead of Jet, see: http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1 -introduction/ You can change the colormap by using the ‘colormap’ command in Matlab, or if I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same within the ft_ function) 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 NIEUWLAND Mante Sent: Wednesday, June 3, 2015 10:38 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] no red color for ft_multiplotTFR Dear all, I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayobimpe2004 at gmail.com Thu Jun 4 09:03:46 2015 From: ayobimpe2004 at gmail.com (Azeez Adebimpe) Date: Thu, 04 Jun 2015 09:03:46 +0200 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Message-ID: <20150604070346.5251155.71993.2204@gmail.com> An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Jun 4 09:21:10 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 4 Jun 2015 07:21:10 +0000 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB1E9B79@exprd01.hosting.ru.nl> Dear Mante, As a further clarification, if not specified in the configuration as mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig Sent: donderdag 4 juni 2015 8:57 To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] no red color for ft_multiplotTFR Dear Mante, most likely you are using a Matlab version >2014a. Mathwork changed the default colormap to Parula instead of Jet, see: http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/ You can change the colormap by using the 'colormap' command in Matlab, or if I recall correctly, also set cfg.colormap= 'jet' (which is doing the same within the ft_ function) 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 NIEUWLAND Mante Sent: Wednesday, June 3, 2015 10:38 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] no red color for ft_multiplotTFR Dear all, I'm new to Fieldtrip, so I hope this question isn't too stupid :-D. I could not find anything relevant on the previous threads. When I use the multiplotTFR function (example code pasted below), the hot color is always yellow and never red, even if I set the zlim to extremely small values). I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue hot-cold colors were standard. Any help is really appreciated! Cheers, Mante cfg = []; cfg.layout = 'config/biosemi64.lay'; cfg.channel = 'all'; cfg.baseline = 'no'; cfg.xlim = [0 2];%[-0.5 1.5];% cfg.ylim = [30 100]; cfg.zlim = [-0.1 0.1]; cfg.interactive = 'yes'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotTFR(cfg, grandavg_hi_131_132); -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 4 10:10:58 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 4 Jun 2015 09:10:58 +0100 Subject: [FieldTrip] no red color for ft_multiplotTFR In-Reply-To: <556bf2a94ee943e284d0684557a0990f@EXPRD02.hosting.ru.nl> References: <000e01d09e93$b5244aa0$1f6cdfe0$@artinis.com> <556bf2a94ee943e284d0684557a0990f@EXPRD02.hosting.ru.nl> Message-ID: Dear Mante et al., While indeed you can simply revert to the 'jet' colormap using the mentioned solutions, it's worth noting that rainbow colormaps (such as jet) are considered suboptimal. The two most important arguments against the use of such colormaps are (1) the luminance profile is non-monotonic across the colormap, and (2) the colormap sometimes suggests 'banding' even when the data is smooth. So, the new 'parula' default is definitely an improvement over jet! (At least for sequentially increasing/decreasing values. For data symmetric around some point (e.g. 0) I would recommend neither 'parula' nor 'jet', but a diverging colormap (see below).) For more info, see these links: https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/ http://www.mathworks.com/tagteam/81137_92238v00_RainbowColorMap_57312.pdf Another good luminance-increasing colormap: http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m About diverging colormaps: http://www.sandia.gov/~kmorel/documents/ColorMaps/ And another example: http://www.mathworks.com/matlabcentral/fileexchange/24870-fireice--hot-cold--colormap A good link to understand colormaps and their luminance profile (the link is from the Python library matplotlib, but the ideas apply to Matlab as well of course): http://matplotlib.org/users/colormaps.html Best, Eelke On 4 June 2015 at 08:21, Herring, J.D. (Jim) wrote: > Dear Mante, > > > > As a further clarification, if not specified in the configuration as > mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed > is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards. > > > > Best, > > > > Jim > > > > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig > Sent: donderdag 4 juni 2015 8:57 > > > To: 'FieldTrip discussion list' > Subject: Re: [FieldTrip] no red color for ft_multiplotTFR > > > > Dear Mante, > > > > most likely you are using a Matlab version >2014a. Mathwork changed the > default colormap to Parula instead of Jet, see: > > http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/ > > You can change the colormap by using the ‘colormap’ command in Matlab, or if > I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same > within the ft_ function) > > > > 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 NIEUWLAND Mante > Sent: Wednesday, June 3, 2015 10:38 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] no red color for ft_multiplotTFR > > > > Dear all, > > > > I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could > not find anything relevant on the previous threads. > > > > When I use the multiplotTFR function (example code pasted below), the hot > color is always yellow and never red, even if I set the zlim to extremely > small values). > > > > I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue > hot-cold colors were standard. Any help is really appreciated! > > > > Cheers, > > Mante > > > > > > > > cfg = []; > > cfg.layout = 'config/biosemi64.lay'; > > cfg.channel = 'all'; > > cfg.baseline = 'no'; > > cfg.xlim = [0 2];%[-0.5 1.5];% > > cfg.ylim = [30 100]; > > cfg.zlim = [-0.1 0.1]; > > cfg.interactive = 'yes'; > > cfg.showlabels = 'yes'; > > cfg.colorbar = 'yes'; > > > > figure; > > ft_multiplotTFR(cfg, grandavg_hi_131_132); > > From david.pedrosa at ndcn.ox.ac.uk Thu Jun 4 12:33:05 2015 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Thu, 4 Jun 2015 10:33:05 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences Message-ID: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Thu Jun 4 12:53:02 2015 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Thu, 4 Jun 2015 10:53:02 +0000 Subject: [FieldTrip] Interactive plot issues Message-ID: Dear all, I have an issue with the interactive plotting function (fieldtrip vers. 20150318; Win7). Interactive plotting doesn't work, neither for ERP nor for TFR data, both by calling the topoplot and singleplot functions. Matlab freezes right after the plot has opened, requiring several 'cancel' commands (Ctrl + c) to become operational again. Below are the error messages that appear after each Ctrl + c. If I set cfg.interactive = 'no'; it works just fine. So somehow, matlab it seems to get stuck somewhere in the ft_select_range function. Note that this occurs not only with my own data, but also with the FT tutorial data. I'd be greatful for any suggestion on how to solve this issue. Kind regards, Ulrich %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ft_topoplotTFR(cfg, data); reading layout from file biosemi64.lay the call to "ft_prepare_layout" took 0 seconds the call to "ft_topoplotTFR" took 1 seconds Operation terminated by user during ft_select_range (line 81) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 82) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 81) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 82) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 84) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonDownFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonUpFcn. Operation terminated by user during ft_select_range (line 83) Interrupt while evaluating Figure WindowButtonMotionFcn. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 4 13:12:15 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 4 Jun 2015 11:12:15 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: References: Message-ID: <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 nikola.valchev.umcg at gmail.com Thu Jun 4 14:13:42 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Thu, 4 Jun 2015 14:13:42 +0200 Subject: [FieldTrip] importing CNT or EDF data into fieldtrip Message-ID: <557040f6.05aec20a.6661.29e3@mx.google.com> Dear all, I have a possibly rather basic question. I want to read my data with fieldtrip but the formats I can use are either EDF or CNT. That means that I do not have a separate file with my coded triggers (EDF format) or I have a small file NAME.trg (CNT format) which contains information which I can't read. The question is how can I read my triggers from the EDF file or convert the NAME.trg file into something similar to the NAME.vmrk file which is created when data is in EEG format. Any hint is very appreciated. Best regards Nikola -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Jun 4 15:23:01 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 4 Jun 2015 15:23:01 +0200 Subject: [FieldTrip] Cluster-Statistics on wPLI data In-Reply-To: <556E263B.4010206@gmail.com> References: <556DD186.7070309@gmail.com> <20150602133323.7df2fbe7@kurage.nimh.nih.gov> <4529C3E1-8A08-4558-B79C-B7E426233AD4@gmail.com> <556E263B.4010206@gmail.com> Message-ID: Dear Nick et al., it is also important to consider alternative possibilities to reduce the degrees of freedom based on the existing knowledge about the data. For example: Case 1- The research question. Consider the case of mid-frontal theta in the context of error related design. Base on what we already know from the existing literature it is probably save to reduce the 128x128x70x50 matrix to a 128x128 where the time-freq tile of interest will be something from .3 to 1 seconds ~6 Hz. Case 2- The data itself. Consider continuous resting state recording and long-range connectivity as a research question. The time dimension doesn’t really make sense and from what we know, or believe to know about long range communication, this is likely to happen in the lower frequency bands. With a peak in the power spectrum as an additional including criterion it is likely that the frequency dimension would be reduced to ~ 10 Hz. Case 3- The preceding analysis Admittedly not always yet more often than not connectivity analysis follows extensive analysis on sensor level where most likely relevant time-frequency tiles were already defined while controlling for MCP. In that case one will go for the connectivity patterns concerning these preceding findings thereby reducing the time-freq dimension again. These are just a few examples where you will have a chan x chan matrix to begin with. Whether you are interested in the mean connective value of a given channel or channel(seed) to all other channels both approaches will give a 128 x 1 matrix that can be further evaluated in the context of a permutation approach or whatever preferred method. Tzvetan > Hi Tom and Jake, thanks very much for adding momentum to this. I haven't yet looked into spectral graph clustering, and really haven't been thinking of it terms of graph theory but it now seems silly that I haven't. > > If I'm understanding the suggestions correctly, the idea is to use the eigenvectors of the connectivity measure (WPLI in this case) to determine which nodes/voxels to cluster together. So nodes with similar graphs will be clustered together. This would be analogous to the graph bisection problem where k=2. The problem with mixture models is the arbitrary nature of how many clusters to use, and without a way to determine the statistical likelihood of a given cluster this is a real problem for determining the validity of a given cluster. > > > Jake thanks for the resources, I'm beginning to dig into them and they seem promising. My understanding is that graph bisection divides the graph into two groups that have the minimum number of connections between them. So this could be used to cluster nodes that have similar topographies together, but it's not clear the best division would occur in the first bisection, instead possibly in subsequent bisections. Is this where the recursive algorithm comes in? I found this paper of yours ' Spectral Techniques for Graph Bisection in Genetic Algorithms', but it doesn't seem to get past the initial bisection. > > > As I said, I haven't really been thinking of the problem in graph theory terms, but if my understanding is correct the current data set I'm working with could have an adjacency matrix as large as 128x128x70x50 (chan x chan x time x frequency), and as small as 128x128 for a single time x frequency bin. > > > Nick > > > On 6/2/15 12:38 PM, Jacob Martin wrote: >> Hi Tom and Nick, >> >> Here's a paper i wrote which may help give some background on spectral clustering: >> >> "Ranks and representations for spectral graph bisection" >> >> I also have a genetic algorithm which uses recursive spectral graph bisection to cluster graphs using the ideas from the above paper. It is written in Java and is quite competitive and fast compared to other algorithms. Nick, perhaps i could lend a hand. >> >> I suggest looking up Chris Walshaw's partition archive for lots of examples of algorithms. I had a few minimum bisection records in there a while back with an older algorithm, but haven't looked at it in years or tried with my new algorithms yet. >> >> How big are your adjacency matrices? Note that the minimum bisection problem is NP complete. >> >> Best >> Jake >> >> -- >> Jacob Martin, PhD >> Center for Brain and Cognition >> CerCo CNRS >> Toulouse, France >> >> >> >> >> >> >> >> >> >> On 02 Jun 2015, at 13:33, Tom Holroyd wrote: >> >> Several people have been doing things with spectral clustering, >> involving the graph Laplacian, wherein we say that each voxel of the >> brain is a node in a graph, and various connectivity measures connect >> the nodes. The Laplacian of the graph has many interesting properties, >> and the first K eigenvalues can be used to create clusters. >> >> I'm afraid I don't know how to do permutation stats on that, but >> k-means clustering of the graph eigenvectors can have random starting >> points ... >> >> On Tue, 02 Jun 2015 09:53:42 -0600 >> Nick Ketz wrote: >> >>> Mathis, you have hit on a much larger problem. Tzvetan is right to >>> suggest calculating each grid-point's connectivity with all other >>> grid-points, which gives you a connectivity topography map for each >>> grid-point. The next logical step, which I've been struggling with, >>> is to somehow cluster these topographies together, giving you >>> clusters of neighboring grid-point topographies that are similar. Is >>> there any work being done to solve this problem? >>> >>> I have been struggling with this problem for some time, that is: how >>> to do cluster based permutation statistics in chan x chan bins of >>> connectivity measures. Ideally I want to do this in a full chan x >>> chan x freq x time cluster analysis. I've searched on the list for >>> related topics; posted, probably incoherently, my own issues; and >>> generally scanned the list and the literature for any sort of >>> relevant topics trying to broach this problem, but am still stuck. >>> >>> The standard 3d chan x freq x time clustering uses a neighborhood >>> structure to define what channels are considered neighbors, and uses >>> numeric adjacency to cluster time and frequency. With chan x chan >>> data however, there unfortunately isn't an intuitive way to think >>> about neighborhood for the pairwise connectivity. There are >>> neighbors surrounding the reference grid-point, and there are >>> neighbors in each grid-point's connectivity topography, i.e. >>> neighboring grid-points that have similar/significant connectivity >>> values. How do you combine the two in a sensible way? And even more >>> challenging how do you do statistics on them? >>> >>> I have been considering several approaches, including >>> multi-dimensional scaling of these grid-point connectivity >>> topographies, or just a correlation between topographies, and then >>> using those values to select which reference grid-points to consider >>> as similar enough to average together. This then gives you a >>> reference cluster of grid-points and allows you to do standard >>> cluster permutation statistics on the average of the reference >>> grid-points. How exactly to determine which reference grid-points >>> are 'similar enough' to be consider clusters is the tricky part, i.e. >>> how can you statistically test if they should be considered a cluster >>> or not? >>> >>> I've been working in isolation on this problem for some time, and >>> would love a discussion on the topic. I'm hoping this message spurs >>> other list lurkers to at least commiserate with me, but if possible >>> to also post whatever approaches they have taken to solve the problem >>> of clustering pairwise connectivity data. >>> >>> >>> >>> Nick >>> >>> >>> >>>> On 6/2/15 4:00 AM, fieldtrip-request at science.ru.nl wrote: >>>> Hi Mathis, alternatively you could use ft_sourcestatistics. For >>>> this you should reduce your 600 x 600 x freq matrix to freq of >>>> interest first. Next, the resulting 600 x 600 matrix you?d reduce >>>> to 600 x 1 where each grid point has a mean connectivity value to >>>> all possible grid points. >From then on you could use >>>> ft_sourcestatistics and ft_sourceinterpolate to visualize. Good >>>> luck, Tzvetan >>>>>> Dear Fieldtrip Users, >>>>>> >>>>>> I am a first-year PhD student and have been lurking here for a >>>>>> long time (finding lots of useful answers), it's about time I ask >>>>>> my first question: >>>>>> >>>>>> I am trying to compare connectivity in source space (~25 >>>>>> subjects, between two conditions, ~600 virtual channels on a >>>>>> 1.5cm grid) using ft_freqstatistics with a cluster-based >>>>>> permutation test (see code below). >>>>>> >>>>>> The original input datasets have the dimensions: chan x chan x >>>>>> freq. I tried restructuring them to chancmb x freq >>>>>> (seehttp://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007620.html) >>>>>> before doing ft_freqstatistics, but the function then takes >>>>>> forever appending the (admittedly big) datasets. >>>>>> >>>>>> I then tried feeding them to ft_freqstatistics without >>>>>> restructuring, which didn't throw any errors. However, I noticed >>>>>> that the resulting clusters consist of adjacent cells in the chan >>>>>> x chan matrix, which doesn't make much sense since channels in >>>>>> adjacent cells are not necessarily spatially adjacent. I suspect >>>>>> that ft_freqstatistic assumes the 3-D input to contain a temporal >>>>>> dimension and therefore tries to build temporally adjacent >>>>>> clusters. Could any of the fieldtrip developers comment on this? >>>>>> Does anyone in the FT-community have any advice on how to >>>>>> statistically evaluate connectivity data using the permutation >>>>>> approach? >>>>>> >>>>>> Thanks for any input, best wishes, >>>>>> Mathis Kaiser >>> _______________________________________________ >>> 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 asb2226 at gmail.com Thu Jun 4 15:58:35 2015 From: asb2226 at gmail.com (M B) Date: Thu, 4 Jun 2015 13:58:35 +0000 Subject: [FieldTrip] Please remove me Message-ID: <2c5e21c9aaab4b4a94d56328d2db5b9d@EXPRD02.hosting.ru.nl> Can you remove this email: asb2226 at gmail.com from your mailing list? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander.Hunold at tu-ilmenau.de Fri Jun 5 10:47:03 2015 From: Alexander.Hunold at tu-ilmenau.de (Hunold Alexander TU Ilmenau) Date: Fri, 5 Jun 2015 08:47:03 +0000 Subject: [FieldTrip] =?windows-1252?q?7th_International_Summer_School_in_B?= =?windows-1252?q?iomedical_Engineering_=84New_Instrumentation_for_brain_m?= =?windows-1252?q?easurements_and_stimulation=93=2C_17th_-_29th_August_201?= =?windows-1252?q?5_in_Lutherstadt_Wittenberg=2C_Germany?= Message-ID: <5B8562898ECA5A4594C9879007B906703961B1E4@MB1.x.chg> Dear colleagues, we are pleased to announce the 7th International Summer School in Biomedical Engineering on "New Instrumentation for brain measurements and stimulation" August, 17-29, 2015 in Lutherstadt Wittenberg, Germany. This event stands in the tradition of a series of successful summer schools on hot themes in biomedical engineering, dedicated to intense learning in the fruitful atmosphere of tight interaction between students and world-leading specialists. This year’s summer school is devoted to new hardware technologies for measuring and stimulating the brain, such as dry electroencephalography (EEG) electrodes, optically pumped magnetic field sensors, neuronal current imaging based on low-field magnetic resonance and multichannel transcranial current stimulation. In particular, the 7th International Summer School on Biomedical Engineering will focus on ways how these new technical advances may help to overcome current limitations in human neurosciences and medicine. It will cover both theoretical foundations and practical applications. We aim at a thorough understanding of the underlying mechanisms. Thus, we will develop a critical view on current applications and possible future developments. The second important aim of the summer school consists in providing contact with both leading experts in the field and other students with similar interests, thereby facilitating the exchange of ideas on latest developments in the field. Target Group: - PhD students - Advanced Master students - Researchers entering the field of brain measurement and stimulation techniques Further Information about the 7th International Summer School in Biomedical Engineering: www.iss2015.org We would be happy to receive your application. Please pass this announcement to your colleagues who might be interested. Sincerely, Jens Haueisen and Thomas Knösche -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.kessler at aston.ac.uk Fri Jun 5 11:37:53 2015 From: k.kessler at aston.ac.uk (Kessler, Klaus) Date: Fri, 5 Jun 2015 09:37:53 +0000 Subject: [FieldTrip] 50-50 PhD at Aston (Birmingham) and Macquarie (Sydney) Message-ID: Dear All Are you about to finish a Masters and are looking for a PhD abroad, or do you know someone who is looking for such an opportunity? Well this one will get the successful candidate to the UK as well as to Australia. The PhD will start off at Aston University (Birmingham, UK) for 1.5 years using MEG with adults on the autism spectrum (ASD) and will then move to Macquarie University (Sydney, AUS) for another 1.5 years, where research will most likely expand to testing children with ASD in the MEG (using same/similar paradigms). We are particularly interested in theta-gamma coupling and long-range theta phase coupling in ASD, using a selection of perceptual and cognitive paradigms. Some experience with Fieldtrip or another MEG/EEG analysis software would be very helpful, hence, we would really appreciate your help with disseminating this advert. More information is available online: http://www.findaphd.com/search/ProjectDetails.aspx?PJID=64012 Many thanks and looking forward to hearing from you! Klaus Professor Klaus Kessler Aston Brain Centre School of Life and Health Sciences Aston University Aston Triangle Birmingham, B4 7ET Phone: +44 (0)121 204 3187 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Jun 5 11:58:50 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 5 Jun 2015 11:58:50 +0200 (CEST) Subject: [FieldTrip] unequal sample number across trials after downsampling Message-ID: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> Dear all, I've encountered an error in my analysis pipeline due to the fact that after calling ft_resampledata I am left with an unequal number of samples across trials. For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 I am speculating that this is due to differences in rounding and wanted to ask if there's a simple way of solving this problem? Any help or suggestions would be highly appreciated. Best, Fred -- Frédéric Roux Postdoctoral Scientist, Marie-Curie fellow BCBL. Basque Center on Cognition, Brain % Language. f.roux at bcbl.eu Tel: +34 943 309 300 Ext 211 Fax: +34 943 309 052 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From jan.schoffelen at donders.ru.nl Fri Jun 5 12:05:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 5 Jun 2015 10:05:05 +0000 Subject: [FieldTrip] unequal sample number across trials after downsampling In-Reply-To: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> References: <182451435.686753.1433498330788.JavaMail.root@bcbl.eu> Message-ID: <2092400F-7782-49C7-B192-32331954430B@fcdonders.ru.nl> Hi Fred, You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Assuming the time axes are equal, that is. Otherwise, just remove the last sample from each of the 2401 sample trials :-). JM On Jun 5, 2015, at 11:58 AM, Frédéric Roux wrote: > Dear all, > > I've encountered an error in my analysis pipeline due to the fact > that after calling ft_resampledata I am left with an unequal number > of samples across trials. > > For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 > > I am speculating that this is due to differences in rounding and wanted > to ask if there's a simple way of solving this problem? > > Any help or suggestions would be highly appreciated. > > Best, > > Fred > > -- > Frédéric Roux > Postdoctoral Scientist, Marie-Curie fellow > BCBL. Basque Center on Cognition, Brain % Language. > > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From david.pedrosa at ndcn.ox.ac.uk Fri Jun 5 15:14:17 2015 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Jun 2015 13:14:17 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> References: , <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, thank you for your fast response. To have a comparable grid of course makes sense. I have looked at the link you proposed and I have one more question. Do I undersatand it correctly that I first have to generate a template grid, secodly use it for grid = ft_prepare_sourcemodel(cfg) and finally take grid.pos and grid.dim (but not template_grid.pos and template_grid.dim) for each of my source reconstructions? I am a little irritated as in the link it says: "You can use these single subjects' MNI grids in source analysis. After that you should put .pos and .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Donnerstag, 4. Juni 2015 12:12 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Question on group statistics for coherence differences Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 5 16:00:48 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 5 Jun 2015 14:00:48 +0000 Subject: [FieldTrip] Question on group statistics for coherence differences In-Reply-To: References: , <290CF6A1-EB97-4D2E-98C9-5099DC7CF3D8@fcdonders.ru.nl> Message-ID: <804A6812-34F5-4C06-9012-79FEC22E3342@fcdonders.ru.nl> Hi David, You should do exactly as the link suggests: the single subject grids should be used for the sourceanalysis (because the coordinates should be defined in the subject specific coordinate system). Afterwards (e.g. for interpolation onto a higher resolution anatomical template image, or prior to doing statistics) you need to redefine the .pos (dim is not needed because it is the same for the template and the warped grids). There’s no need to make your own template grid, we currently have a few of those that come shipped with FieldTrip. See: http://www.fieldtriptoolbox.org/template/sourcemodel Best, Jan-Mathijs On Jun 5, 2015, at 3:14 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thank you for your fast response. To have a comparable grid of course makes sense. I have looked at the link you proposed and I have one more question. Do I undersatand it correctly that I first have to generate a template grid, secodly use it for grid = ft_prepare_sourcemodel(cfg) and finally take grid.pos and grid.dim (but not template_grid.pos and template_grid.dim) for each of my source reconstructions? I am a little irritated as in the link it says: "You can use these single subjects' MNI grids in source analysis. After that you should put .pos and .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Donnerstag, 4. Juni 2015 12:12 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Question on group statistics for coherence differences Hi David, This rather uninformative error suggests, that the positions at which you estimated the source activity is not consistent across participants. FieldTrip’s data bookkeeping machinery checks for this, and the aim is to continue working only on those data-points (spatial locations, channels, frequency bins, time points) that all datasets have in common. This check and bookkeeping operation is performed by FieldTrip’s intermediate level function ft_selectdata, and the error you get relates to the fact that the function as of yet lacks functionality to compare and prune spatial locations (as opposed to channels, frequency bins and time points). Yet, to make a somewhat tedious and boring story short, for your purpose you probably shouldn't want to need this subselection, at least when ensuring that across participants the spatial locations are comparable for all of your ordinal dipole locations (for instance, even though the physical location expressed in 3D cartesian coordinates of a dipole location in the left motor cortex has different numbers for a subject with a large head, compared to a subject with a small head, if they are both represented in say the 100th row of your data matrix, they can be still used together). In the code you pasted below it doesn’t seem that the grid positions for the individual subjects are directly comparable, and I suggest to look at the below link to build such a step into your own pipeline: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Once you have the data represented such that equivalent dipole positions are comparable across participants, you can fool ft_sourcestatistics by replacing the sourceAct_all{x}.pos field with a set of positions that is the same for all subjects, e.g. using the positions defined on a ‘template grid’. Best, Jan-Mathijs On Jun 4, 2015, at 12:33 PM, David Pedrosa > wrote: Dear List, I adressed a similar issue before (http://mailman.science.ru.nl/pipermail/fieldtrip/2015-May/009237.html), which I would like to extend with some more information and the used code. I am interested in computing a permutation test for coherence between two conditions based on cluster statistics. The conditions are rest and activation. However I do not manage to get the source statistics to work, as it gives me an error stating: Error using ft_selectdata>getselection_pos (line 1123) not yet implemented Error in ft_selectdata (line 263) if haspos, [selpos, cfg] = getselection_pos (cfg, varargin{:}, cfg.tolerance, cfg.select); end Error in ft_sourcestatistics (line 119) [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); I assume my design for the stats is not correct, but I'm not sure what this error is actually telling me and I would appreciate any help. Thanks in advance. %% computing cross-spectral density matrices cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'dpss'; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.frequency = 5.5; cfg.keeptrials = 'yes'; cfg.channel = {'EEG', 'EMG'}; cfg.channelcmb = {'EEG' 'EEG'; 'EMG' 'EEG'}; freqRest = ft_freqanalysis(cfg, data_rest); freqAct = ft_freqanalysis(cfg, data_act); %% computation of common filter dataAll = ft_appenddata([], data_rest, data_act); freqAll = ft_freqanalysis(cfg, dataAll); %% Leadfield matrix generation cfg = []; cfg.elec = sens; cfg.vol = vol; % vol from individual MRI (computed before) cfg.reducerank = 3; cfg.channel = {'EEG'}; cfg.grid.resolution = 5; % use a 3-D grid with a 5 mm resolution cfg.grid.unit = 'mm'; cfg.normalize = 'yes'; [grid] = ft_prepare_leadfield(cfg); %% Source analysis with DICS beamformer cfg = []; cfg.frequency = 5.5; cfg.grid = grid; cfg.method = 'dics'; cfg.refchan = 'EMG'; cfg.channel = {'EEG' 'EMG'}; cfg.tapsmofrq = 0.5*(abs(diff([3 8]))); cfg.vol = vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'no'; sourceAll = ft_sourceanalysis(cfg, freqAll); cfg.grid.filter = sourceAll.avg.filter; % common flter as computed before sourceAct = ft_sourceanalysis(cfg, freqAct); sourceRest = ft_sourceanalysis(cfg, freqRest); sourceRest.time = data_rest.time; sourceAct.time = data_act.time; % At this point, data is concatenated into two structures, where each cell includes data of one subject for both rest (=baseline, sourceRest_all) and activation (sourceAct_all). %% Group statistics cfg = []; cfg.channel = 'all'; cfg.avgovertime = 'yes'; cfg.parameter = 'avg.coh'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; nsubj=numel(sourceAct_all); cfg.design(1,1:2*nsubj) = [ones(1,nsubj) 2*ones(1,nsubj)]; cfg.design(2,1:2*nsubj) = [1:nsubj 1:nsubj]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = ft_sourcestatistics(cfg,sourceAct_all{:},sourceRest_all{:}); ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 f.roux at bcbl.eu Fri Jun 5 16:41:41 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 5 Jun 2015 16:41:41 +0200 (CEST) Subject: [FieldTrip] unequal sample number across trials after downsampling In-Reply-To: <2092400F-7782-49C7-B192-32331954430B@fcdonders.ru.nl> Message-ID: <909164792.694051.1433515301126.JavaMail.root@bcbl.eu> You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Thanks JM - I think this will solve my problem! -- FR ----- Original Message ----- From: "J.M. Schoffelen (Jan Mathijs)" To: "FieldTrip discussion list" Sent: Friday, June 5, 2015 12:05:05 PM Subject: Re: [FieldTrip] unequal sample number across trials after downsampling Hi Fred, You could explicitly equate all time axes in your data structure prior to resampling: data.time(1:end) = data.time(1); (or so). Assuming the time axes are equal, that is. Otherwise, just remove the last sample from each of the 2401 sample trials :-). JM On Jun 5, 2015, at 11:58 AM, Frédéric Roux wrote: > Dear all, > > I've encountered an error in my analysis pipeline due to the fact > that after calling ft_resampledata I am left with an unequal number > of samples across trials. > > For example length(meg_data.trial{1}) = 2401 whereas length(meg_data.trial{2}) = 2400 > > I am speculating that this is due to differences in rounding and wanted > to ask if there's a simple way of solving this problem? > > Any help or suggestions would be highly appreciated. > > Best, > > Fred > > -- > Frédéric Roux > Postdoctoral Scientist, Marie-Curie fellow > BCBL. Basque Center on Cognition, Brain % Language. > > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > 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 tahere.toosi at gmail.com Fri Jun 5 18:52:52 2015 From: tahere.toosi at gmail.com (Tahereh Toosi) Date: Fri, 5 Jun 2015 21:22:52 +0430 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor Message-ID: Hi fieldtripers, I am trying to do a cluster permutation on Time-frequency data of a single channel (of 64 channel EEG) in a between subject design based on the example provided here . Two weird things happen. First, although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data (to be precise : stat.cfg.frequency =[0.9995 9.9951]). Second, based on the explanation in this paper , I assume cfg.neighbourdist in single-sensor test somehow shows the number of adjacent points, but when I change this number the clusters don't change at all. Here is my code, I would appreciate if anyone could tell me what is happening. Thanks, Tahereh % Time frequency analysis cfg = []; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; f1 = 1;f2 = 15; fstep = 0.1; cfg.foi =f1:fstep:f2; t1 = -1; t2 = 1; cfg.toi = t1:0.02:t2; n_cycles = 5; cfg.t_ftimwin = n_cycles ./cfg.foi; cfg.keeptrials ='no'; [freqdata] = ft_freqanalysis(cfg, data); %store freq data for each condition/subject TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} %Comparing Condition1 and Condition2 cfg = []; Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); % make a dummy structure with the difference between Condition 1 & 2 avgDiff = Condition1_avg; avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; cfg = []; cfg.channel = 'FP2' cfg.frequency = 'all' cfg.neighbourdist = 4; cfg.latency = 'all' cfg.avgovertime = 'no'; cfg.avgoverfreq ='no'; cfg.avgoverchan = 'no'; cfg.clusteralpha = 0.05; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.numrandomization = 500; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.design = [ 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable cfg stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Fri Jun 5 19:41:07 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 5 Jun 2015 19:41:07 +0200 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor In-Reply-To: References: Message-ID: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> Hi Tahereh, Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz Re: second- since you have only one channel you shouldn’t specify ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done along the freq and time dimensions the adjacency of which is defined by the time freq resolution. best tzvetan > Hi fieldtripers, > > I am trying to do a cluster permutation on Time-frequency data of a single channel (of 64 channel EEG) in a between subject design based on the example provided here. Two weird things happen. > First, although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data (to be precise : stat.cfg.frequency =[0.9995 9.9951]). > Second, based on the explanation in this paper, I assume cfg.neighbourdist in single-sensor test somehow shows the number of adjacent points, but when I change this number the clusters don't change at all. > Here is my code, I would appreciate if anyone could tell me what is happening. > > Thanks, > Tahereh > > % Time frequency analysis > cfg = []; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > f1 = 1;f2 = 15; fstep = 0.1; > cfg.foi =f1:fstep:f2; > t1 = -1; t2 = 1; > cfg.toi = t1:0.02:t2; > n_cycles = 5; > cfg.t_ftimwin = n_cycles ./cfg.foi; > cfg.keeptrials ='no'; > > [freqdata] = ft_freqanalysis(cfg, data); > > %store freq data for each condition/subject > TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} > > %Comparing Condition1 and Condition2 > cfg = []; > Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); > Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); > > % make a dummy structure with the difference between Condition 1 & 2 > avgDiff = Condition1_avg; > avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; > > cfg = []; > cfg.channel = 'FP2' > cfg.frequency = 'all' > cfg.neighbourdist = 4; > cfg.latency = 'all' > cfg.avgovertime = 'no'; > cfg.avgoverfreq ='no'; > cfg.avgoverchan = 'no'; > > cfg.clusteralpha = 0.05; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.numrandomization = 500; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number > 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % "condition" is the independent variable > cfg > stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj}); > > > _______________________________________________ > 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 tahere.toosi at gmail.com Sat Jun 6 08:13:37 2015 From: tahere.toosi at gmail.com (Tahereh Toosi) Date: Sat, 6 Jun 2015 10:43:37 +0430 Subject: [FieldTrip] TFR Cluster permutation on Single-sensor In-Reply-To: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> References: <9688D99B-3742-43A3-B732-F4734D4D6478@uni-konstanz.de> Message-ID: Thanks Tzvetan for clarification on question 2. I am still dealing with issue 1 ( although I set cfg.frequency = 'all' for stats, but it always returns results for only ~1-10Hz instead of 1:15 Hz which I have in my freq data (to be precise it returns : stat.cfg.frequency =[0.9995 9.9951])., However, if I set a smaller higher bound freq, like cfg.frequency = [1 8], it works fine ) Anybody has a clue why? On Fri, Jun 5, 2015 at 10:11 PM, Tzvetan Popov < tzvetan.popov at uni-konstanz.de> wrote: > Hi Tahereh, > Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz > Re: second- since you have only one channel you shouldn’t specify > ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done > along the freq and time dimensions the adjacency of which is defined by the > time freq resolution. > > best > tzvetan > > > Hi fieldtripers, > > I am trying to do a cluster permutation on Time-frequency data of a single > channel (of 64 channel EEG) in a between subject design based on the > example provided here > . > Two weird things happen. > First, although I set cfg.frequency = 'all' for stats, but it always > returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data > (to be precise : stat.cfg.frequency =[0.9995 9.9951]). > Second, based on the explanation in this paper > , I > assume cfg.neighbourdist in single-sensor test somehow shows the number of > adjacent points, but when I change this number the clusters don't change at > all. > Here is my code, I would appreciate if anyone could tell me what is > happening. > > Thanks, > Tahereh > > % Time frequency analysis > cfg = []; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > f1 = 1;f2 = 15; fstep = 0.1; > cfg.foi =f1:fstep:f2; > t1 = -1; t2 = 1; > cfg.toi = t1:0.02:t2; > n_cycles = 5; > cfg.t_ftimwin = n_cycles ./cfg.foi; > cfg.keeptrials ='no'; > > [freqdata] = ft_freqanalysis(cfg, data); > > %store freq data for each condition/subject > TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)} > > %Comparing Condition1 and Condition2 > cfg = []; > Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: }); > Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: }); > > % make a dummy structure with the difference between Condition 1 & 2 > avgDiff = Condition1_avg; > avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm; > > cfg = []; > cfg.channel = 'FP2' > cfg.frequency = 'all' > cfg.neighbourdist = 4; > cfg.latency = 'all' > cfg.avgovertime = 'no'; > cfg.avgoverfreq ='no'; > cfg.avgoverchan = 'no'; > > cfg.clusteralpha = 0.05; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.numrandomization = 500; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number > 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number > cfg.uvar = 1; % "subject" is unit of > observation > cfg.ivar = 2; % "condition" is the > independent variable > cfg > stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, > TFDesc{cond2,selectedSubj}); > > > _______________________________________________ > 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 cmuehl at gmail.com Sat Jun 6 09:12:39 2015 From: cmuehl at gmail.com (Christian Muehl) Date: Sat, 6 Jun 2015 07:12:39 +0000 Subject: [FieldTrip] Deadline Extension and Final Call for Papers - 4th Workshop on Affective Brain-Computer Interfaces @ ACII2015 Message-ID: <509a5753eacd42b1b3e1a98be4969c8b@EXPRD01.hosting.ru.nl> ** Deadline Extension and Final Call for Papers ** *** The submission deadline for the aBCI workshop has been extended to the 14th of June. *** 4th Workshop on Affective Brain-Computer Interfaces (aBCI) Workshop at ACII 2015 (September 21-24), Xi'an, China, September 21, 2015 http://www.affective-sciences.org/aBCI2015 http://www.acii2015.org/ The goal of the aBCI workshop series is to connect researchers from the communities of affective computing, social signal processing, brain-computer interfacing, neuro-ergonomics, and neuroscience around the federating theme of affective brain computer interfaces (aBCI). Affective BCI aim at the development of human-computer interfaces able to react and adapt to users' emotions and related cognitive states as measured from neurophysiological signals. Besides the general solicitation of work toward adaptive HCI applications based on aBCI, this 4th edition of the workshop will focus on two specific aspects of aBCI. Firstly, we welcome papers on ways to alleviate current aBCI limitations, through work on the physiological basis of aBCI, innovative applications resilient to classification error, and methods to increase the robustness of aBCI. Secondly, we would like to explore the social aspects and applications of aBCI by welcoming submissions on topics such as multi-user aBCI and the assessment of social processes from brain signals. The workshop topics include, but are not limited to, * effective emotion elicitation and data collection in social settings; * identification of robust and specific markers of emotional, cognitive and social processes; * methods for the assessment of emotions, cognitive states and social interactions; * methods to measure and process multiple people physiological activity; * applications of central and peripheral signal processing to social situations; * innovative concepts for adaptive interfaces and affective BCI; * demos of affective BCI systems. Submission Instructions: * The papers should feature original empirical work, theoretical work, or a well defendable but arguable position of the authors. * Papers will be published electronically in the proceedings of ACII 2015 by IEEE Xplore. Papers should be limited to 6 pages+1page references. The review is double blind - please remove all author information from the manuscripts. * Further details about the submission instructions and format can be found on the website of ACII 2015. Important Dates: June 14, 2015: Submission of manuscripts (EXTENDED!) July 3, 2015: Acceptance/Rejection notification July 24, 2015: Submission of camera-ready papers September 21, 2015: Date of the Workshop For further information, see our website or contact abci at ewi.utwente.nl Programme Chairs: * Fabien Lotte, Inria Bordeaux Sud-Ouest, Talance, France * Guillaume Chanel, Swiss Center for Affective Sciences, Geneva, Switzerland * Christian Mühl, German Aerospace Center, Cologne, Germany * Anton Nijholt, Universiteit Twente, the Netherlands Programme Committee: Egon L. van den Broek, University of Utrecht, the Netherlands Anne-Marie Brouwer, TNO Perceptual and Cognitive Systems, Soesterberg, the Netherlands Stephen Dunne, Starlab Barcelona, Spain Touradj Ebrahimi, École polytechnique fédérale de Lausanne, Switzerland Stephen Fairclough, John Moores University, Liverpool, UK Tiago H. Falk, Institut National de la Recherche Scientifique (INRS), Montreal, Canada Hayrettin Gürkök, University of Twente, Enschede, the Netherlands Dominic Heger, Karlsruhe Institute of Technology, Germany Klas Ihme, German Aerospace Center, Brunswick, Germany Jonghwa Kim, University of Augsburg, Germany Brent Lance, Army Research Laboratory/TNB, Aberdeen Proving Ground, USA, Grace Leslie, MIT Media Lab, Boston, USA Giulia Liberati, Université catholique de Louvain, Belgium Gary Garcia Molina, Philips Research North America, Briarcliff, USA Ke Liao, Kansas University Medical Center, USA Scott Makeig, University of California San Diego, USA Tim Mullen, University of California San Diego, USA Domen Novak, University of Wyoming, Laramie, USA Ioannis Patras, Queen Mary University, London, UK Evan Peck, Bucknell University, Lewisburg, USA Mannes Poel, University of Twente, Enschede, the Netherlands Alan Pope, NASA Langley Research Center, Norfolk, USA Thierry Pun, University of Geneva, Switzerland Erin Solovey, Drexel University, Philadelphia, USA Mohammad Soleymani, University of Geneva, Switzerland Aureli Soria-Frisch, Starlab Barcelona, Spain Olga Sourina, NanYang Technological University, Singapore Aleksander Valjamae, Linköping University, Sweden Jan van Erp, University of Twente, Enschede, the Netherlands Chi Thanh Vi, University of Bristol, UK Thorsten Zander, Technische Universität Berlin, Germany From jonas at obleser.de Sat Jun 6 11:07:11 2015 From: jonas at obleser.de (Jonas Obleser) Date: Sat, 6 Jun 2015 11:07:11 +0200 Subject: [FieldTrip] =?utf-8?q?Job_offer=3A_Phd_post_=28or_Postdoc_halftim?= =?utf-8?q?e=29_at_the_University_of_L=C3=BCbeck?= Message-ID: Dear colleagues, [sorry for potential crossposting] My new lab at the University of Lübeck (at the baltic sea; near Hamburg; new and old lab site: http://auditorycognition.com ) is beginning to hire. Here is a first post -- officially it’s a Phd position (also interpretable as a half-time postdoctoral if interested in alternative forms of a scientist’s work/life balance). English version: https://www.dropbox.com/s/lqx8e2jiu05hrw2/Ausschreibung_1015_15_Wiss%20MitarbeiterIn_Psychologie_englisch.pdf?dl=0 German version: https://www.uni-luebeck.de/fileadmin/uzl_personal/stellenausschreibungen/Ausschreibung_1015_15_Wiss_MitarbeiterIn_Psychologie.pdf Law-owned EEG, pus centre-wide fMRI (also combined with EEG) are standard routine. Immediate opportunity for MEG recordings will be given through collaboration with Germany-wide sites. Thanks for spreading the word, Jonas Prof. Dr. Jonas Obleser Department of Psychology Universität zu Lübeck Tel +49 451 500 1780 Mobil +49 171 6993337 E-Mail obleser at ipsy.uni-luebeck.de Ratzeburger Allee 160 23562 Lübeck -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 7100 bytes Desc: not available URL: From anne.urai at gmail.com Sun Jun 7 18:57:51 2015 From: anne.urai at gmail.com (Anne Urai) Date: Sun, 7 Jun 2015 18:57:51 +0200 Subject: [FieldTrip] importing CNT or EDF data into fieldtrip In-Reply-To: <557040f6.05aec20a.6661.29e3@mx.google.com> References: <557040f6.05aec20a.6661.29e3@mx.google.com> Message-ID: Dear Nikola, SR research provides edf2asc, a command line tool that lets you convert edf files to simple ASCII documents - these can then be read in by fieldtrip's read_eyelink_asc.m. You can download edf2asc here https://www.sr-support.com/showthread.php?17-EDF2ASC-Conversion-Utility (you need an account on SR's website first). Best, —  Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie | Universitätsklinikum Hamburg-Eppendorf Martinistrasse 52, 20246 Hamburg, Germany | http://anneurai.wordpress.com On 4 Jun 2015 at 14:14:18, Nikola Valchev (nikola.valchev.umcg at gmail.com) wrote: Dear all, I have a possibly rather basic question. I want to read my data with fieldtrip but the formats I can use are either EDF or CNT. That means that I do not have a separate file with my coded triggers (EDF format) or I have a small file NAME.trg (CNT format) which contains information which I can’t read.   The question is how can I read my triggers from the EDF file or convert the NAME.trg file into something similar to the NAME.vmrk file which is created when data is in EEG format.   Any hint is very appreciated.   Best regards Nikola _______________________________________________ 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 melissa.ralston at gmail.com Sun Jun 7 23:36:19 2015 From: melissa.ralston at gmail.com (Melissa Smith) Date: Sun, 7 Jun 2015 14:36:19 -0700 Subject: [FieldTrip] reformat .mat data - example script Message-ID: Hi Fieldtripers! I am a new Fieldtrip user and I believe I need to reformat my data (.mat) so it is compatible with Fieldtrip. I was wondering if anyone has done this and would be willing to pass on your example script that I can reference? I have been referencing this: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat but, it would be really helpful if I could reference someone's script! Best, Melissa -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerome.manson at gmail.com Mon Jun 8 14:44:37 2015 From: gerome.manson at gmail.com (Gerome Manson) Date: Mon, 8 Jun 2015 14:44:37 +0200 Subject: [FieldTrip] Brainstorm Integration Message-ID: Hello All, A colleague of mine has conducted an experiment with EEG (biosemi -64) and they have done all of the preprocessing/ Source Localization in Brainstorm (http://neuroimage.usc.edu/brainstorm/ ). I would like to look at the evoked potentials and conduct some time frequency analysis using Field Trip. Is it possible to import data from brainstorm structures? Possible export parameters include: EXCEL xlsx EEG Cartool (.eph) Brainstorm matrix (.mat) ASCII (csv, space separated) Thank you in Advance, Gerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Jun 8 15:10:33 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 8 Jun 2015 15:10:33 +0200 Subject: [FieldTrip] Brainstorm Integration In-Reply-To: References: Message-ID: <12A53C8A-B033-49F6-82F3-499FD54963D4@uni-konstanz.de> Dear Gerome, I’ve never worked with Brainstorm data matrix (.mat) but I suspect that from this mat file you could easily derive the required information in order to get started with FieldTrip. Please look at this FAQ: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Probably the most relevant part is: “Circumvent the FieldTrip reading funcitons” that provides what type of data is needed and how should it be organized in order to be suitable for analysis in FieldTrip. Good luck tzvetan > Hello All, > > A colleague of mine has conducted an experiment with EEG (biosemi -64) and they have done all of the preprocessing/ Source Localization in Brainstorm (http://neuroimage.usc.edu/brainstorm/). I would like to look at the evoked potentials and conduct some time frequency analysis using Field Trip. Is it possible to import data from brainstorm structures? > > Possible export parameters include: > EXCEL xlsx > EEG Cartool (.eph) > Brainstorm matrix (.mat) > ASCII (csv, space separated) > > Thank you in Advance, > Gerome > _______________________________________________ > 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 rikkert.hindriks at upf.edu Mon Jun 8 16:51:13 2015 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Mon, 8 Jun 2015 16:51:13 +0200 Subject: [FieldTrip] Estimation of noise covariance matrix for resting-state imaging Message-ID: Dear all, I am using a distributed linear inverse method to reconstruct the currents underlying sleep spindles. A proper choice for the regularization parameters, however, requires the noise covariance matrix to be known. I work with EEG (EcoG in fact) so no ghost recordings are possible. Does anyone know how the EEG noise covariance is estimated for resting-state data? Thanks a lot, Kind regards, Rikkert Hindriks -------------- next part -------------- An HTML attachment was scrubbed... URL: From zerr.paul at googlemail.com Tue Jun 9 12:41:54 2015 From: zerr.paul at googlemail.com (Paul Zerr) Date: Tue, 9 Jun 2015 12:41:54 +0200 Subject: [FieldTrip] biosemi bdf >> read_24bit error + no events found Message-ID: Dear Robert, it seems that defining a full path vs. only the filename (even if in current folder) makes the difference. filename = '/file/to/path/name.bdf' %events are found, everything ok filename = 'name.bdf' %file is found and processed by ft_definetrials but NO events are found This is very odd. I don't get a "file not found" error but just "0 events". Greetings, Paul > Hi Paul, > > I suppose it is an incompatibility between your particular BDF file and > the code. I suggest you use MATLAB debugging facilities to check what is > wrong in the lower-level code. See http://tinyurl.com/oy7b496. > > best regards, > Robert > > > > On 25 May 2015, at 15:51, Paul Zerr wrote: > > > I have not. I can read in the header but that's about it. > > I don't have any older matlab versions here to test it with either. > > > > From what I understand ft_preprocessing should be capable of reading > bdf's directly with only the file name as input arg. > > > > Greetings, > > Paul Zerr > > > > > > From: > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] biosemi bdf >> read_24bit error + no events > > found > > Message-ID: <5560dddf.0b91340a.2dab.ffffdae5 at mx.google.com> > > Content-Type: text/plain; charset="utf-8" > > > > Have you resolved this issue? > > > > > > From: Paul Zerr > > Sent: ?Thursday?, ?May? ?14?, ?2015 ?8?:?01? ?AM > > To: FieldTrip discussion list > > > > > > Hi all, > > > > I'm new to fieldtrip so forgive me if my mistake is obvious. > > I want to import my raw, markerless dataset ( > http://www.filedropper.com/1_20) with > > > > cfg = []; > > cfg.dataset = '2.bdf'; > > data = ft_preprocessing(cfg) > > > > However, I get > > > > reading and preprocessing > > error opening file: 2.bdf > > One or more output arguments not assigned during call to "read_24bit". > > > > Error in read_biosemi_bdf>readLowLevel (line 274) > > buf = read_24bit(filename, offset, numwords); > > > > Error in read_biosemi_bdf (line 242) > > buf = readLowLevel(filename, offset, epochlength); % see below in > subfunction > > > > Error in ft_read_data (line 321) > > dat = read_biosemi_bdf(filename, hdr, begsample, endsample, > chanindx); > > > > Error in ft_preprocessing (line 578) > > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, > > 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', > > strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) > > > > Error in Untitled (line 19) > > data = ft_preprocessing(cfg) > > > > Using cfg.trialdef.eventtype = '?'; outputs "no events were found in the > datafile" for ft_definetrial even for datasets with many markers. > Converting to EDF+ did not help as it then says "channels with different > sampling rate not supported". Specifying only one channel makes no > difference. The file itself is fine (opens well in BvA). > > > > Defining only one channel to preprocess gives the same error. > > > > I couldn't find a solution in the archives, the faq, wiki or > documentation. > > > > I'm using debian stable & matlab 2014a. Same issue at DCC computers > running windows & matlab 2013a. > > > > Any ideas? > > > > Much appreciated, > > > > Paul Zerr > > _______________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nikola.valchev.umcg at gmail.com Tue Jun 9 16:48:06 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Tue, 9 Jun 2015 16:48:06 +0200 Subject: [FieldTrip] importing and segmenting CNT and TRG files Message-ID: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Dear all, I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? 2) I can't seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. Any help is appreciated and I'm sorry if I'm not too clear, I'm new to EEG. Nikola -------------- next part -------------- An HTML attachment was scrubbed... URL: From narendra.linguistics at gmail.com Tue Jun 9 19:07:51 2015 From: narendra.linguistics at gmail.com (Narendra Kumar) Date: Tue, 9 Jun 2015 22:37:51 +0530 Subject: [FieldTrip] Warning: Function isequaln has the same name as a MATLAB builtin. Message-ID: Dear fieldtrip users, I am very new to fieldtrip. I've just installed the toolbox on MATLAB 2015a. After installing fieldtrip toolbox as I launch MATLAB, I receive the following warning: * Warning: Function isequal​n​ has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.* When I looked into the fieldtrip folder, I found isequaln.m file in fieldtrip-2015022\compat folder, which is same function as it is in matlabroot. When I tried to rename it I got another error. So please let me know what should I do to get rid of this warning message. Thanks & Regards, Narendra Kumar Research Scholar Department of Humanities and Social Sciences Indian Institute of Technology Ropar Punjab, India - 140001 Contact No.:- +91-8968945650 Homepage:- https://www.sites.google.com/site/narendraiitrpr/ Social Networking Sites: - Researchgate -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 9 20:15:16 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 9 Jun 2015 19:15:16 +0100 Subject: [FieldTrip] Warning: Function isequaln has the same name as a MATLAB builtin. In-Reply-To: References: Message-ID: Dear Narendra, Please make sure you do *not* add FieldTrip with addpath(genpath()), but only add the root folder and let ft_defaults take care of the path. That way, the file should not be added to the path. Best, Eelke On 9 Jun 2015 18:11, "Narendra Kumar" wrote: > Dear fieldtrip users, > > I am very new to fieldtrip. I've just installed the toolbox on MATLAB > 2015a. After installing fieldtrip toolbox as I launch MATLAB, I receive the > following warning: > > * Warning: Function isequal ​n​ has the same name as a MATLAB builtin. We > suggest you rename the function to avoid a potential name conflict.* > > When I looked into the fieldtrip folder, I found isequaln.m file in > fieldtrip-2015022\compat folder, which is same function as it is in > matlabroot. When I tried to rename it I got another error. So please let me > know what should I do to get rid of this warning message. > > Thanks & Regards, > > Narendra Kumar > Research Scholar > Department of Humanities and Social Sciences > Indian Institute of Technology Ropar > Punjab, India - 140001 > Contact No.:- +91-8968945650 > Homepage:- https://www.sites.google.com/site/narendraiitrpr/ > Social Networking Sites: - Researchgate > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From plyons at udel.edu Wed Jun 10 02:00:12 2015 From: plyons at udel.edu (Peter Lyons) Date: Tue, 9 Jun 2015 20:00:12 -0400 Subject: [FieldTrip] No backprojection following ICA Message-ID: Hello All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. I have come across a problem when I attempt to call ft_rejectcomponent following an ICA of my data. The ICA was performed using ft_componentanalysis, and the data was viewed using ft_databrowser to determine unwanted components. Following these steps I ran this code: cfg = [] cfg.component = [3 5] data_clean = ft_rejectcomponent(cfg,data_ica) which returned the following message: "not applying the backprojection matrix to the sensor description" My question is how do I proceed to allow the application of the backprojection matrix? I assume I am leaving some vital piece of code out? Prior to calling ft_componentanalysis my continuous data was bandpass filtered using ft_preprocessing, and the reference was removed using the code: cfg = [] cfg.channel = {'all','-E65'} data_64 = ft_preprocessing(cfg,data_filt) I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 hz. Any advice would be greatly appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From WanjaMoessing at gmx.de Wed Jun 10 14:35:45 2015 From: WanjaMoessing at gmx.de (Wanja Moessing) Date: Wed, 10 Jun 2015 14:35:45 +0200 Subject: [FieldTrip] No backprojection following ICA (Peter Lyons) In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From cprevos at g.clemson.edu Wed Jun 10 16:02:34 2015 From: cprevos at g.clemson.edu (Connor Prevost) Date: Wed, 10 Jun 2015 10:02:34 -0400 Subject: [FieldTrip] Importing Time Markers Message-ID: To whom it may concern, When doing initial testing/ recording of TMS-EEG data, some of the time markers were lost/not recorded properly. I wrote a code in MATLAB which would allow me to find the exact time where the time markers or "triggers" should be placed. However, I do not know how to import and/or convert the found time markers to be able to run through the fieldtrip program. The question is how can I read my time markers from the NAME.mat file or convert it into something similar to the NAME.vmrk file which is created when data is in EEG format. Any help with this matter would be greatly appreciated! -- All the Best, Connor M. Prevost 907-947-7140 Bio-Engineering Clemson University '17 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Wed Jun 10 16:58:33 2015 From: robince at gmail.com (Robin) Date: Wed, 10 Jun 2015 15:58:33 +0100 Subject: [FieldTrip] Variance explained by ICA components Message-ID: Hello, I am looking for a way to calculate the percentage of variance explained by a set of ICA components I have obtained using Fieldtrip. I see this question has been asked before [1,2], but I didn't see any answers so thought I would try asking again. Thanks, Robin [1] http://mailman.science.ru.nl/pipermail/fieldtrip/2012-July/005409.html [2] http://mailman.science.ru.nl/pipermail/fieldtrip/2012-January/004706.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Wed Jun 10 21:01:17 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Wed, 10 Jun 2015 19:01:17 +0000 Subject: [FieldTrip] Apply atlas to MNE grid Message-ID: Hi Fieldtrippers, Following the MNE-tutorial, I ended up with activation patterns on the cortically restricted grid for each subject in (if I understand it correctly) subject-specific ctf-space. What I want to do next is apply an atlas to these grid points. So far, what I've been doing is interpolate the subject-specific MNE grid to the subject-specific MNI-warped grid (such as the ones used for beamforming), then interpolate this to the subject-specific MRI, and finally normalize that to an MNI-space MRI, which hopefully would be atlas-compatible. However, I am not sure whether this is a) valid, and b) the most elegant and efficient way to impart atlas information on MNE data. a) The reason I doubt the validity of this method is that when I find high activity on the MNE grid in seemingly temporal or occipital sources, the blob on the MRI image tends to end up on the brainstem or cerebellum (an example can be seen in the attached image). Any thoughts on what could cause this? Could there for example be an issue with cerebellar grid points not being included in the MNE grid, but which are present in the beamformer/cubic grid? Do you have any thoughts on the validity of this approach and the resulting effect? b) This pipeline feels rather contrived, with a bit too many interpolations to my liking. Is it somehow possible to shorten this pipeline? For example, is it possible to directly link the vertices of the MNE surface to an atlas? Any thoughts or hints on this would be greatly appreciated. Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MNEToMRI.png Type: image/png Size: 338288 bytes Desc: MNEToMRI.png URL: From cmk0803 at hbf.re.kr Thu Jun 11 03:21:38 2015 From: cmk0803 at hbf.re.kr (=?UTF-8?B?7LWc66+46rK9?=) Date: Thu, 11 Jun 2015 10:21:38 +0900 Subject: [FieldTrip] Source localization of MEG resting state data Message-ID: Hi, Tzvetan. Thank you for your first response. The weird output that you asked in first response is first attached figure 1. I thought It was weird because the sensor level output is so different form the source level output. I revised the script regarding your first advise and following tutorial. The output is second figure. ( http://www.fieldtriptoolbox.org/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ) It is better than first output. However,* the sensor level output correspond with the source level output, exactly.* Is it anything that need to revise? If the data is plotted at the source and sensor level, What the difference between two plots can emerge in general? I really appreciate for your help in advance. Best regards, MK CHOE P.S. The revised script is as follows. %% Calculating the cross spectral density matrix cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmfft'; cfg.foilim = [10 10]; % alpha [8 12] cfg.tapsmofrq = 2; cfg.channel = {'MEG'}; cfg.keeptrials = 'yes'; fft_rest = ft_freqanalysis(cfg, data_clean); %% Computing the leadfield matrices cfg = []; cfg.grad = fft_rest.grad; cfg.vol = hdm; cfg.grid = grid; cfg.keeptrials = 'yes'; cfg.normalize = 'yes'; cfg.channel = {'MEG'}; rest_grid = ft_prepare_leadfield(cfg); %% Source analysis cfg = []; cfg.frequency = 'all'; cfg.grad = fft_rest.grad; cfg.method = 'dics'; cfg.grid = rest_grid; cfg.vol = hdm; cfg.keeptrials = 'yes'; cfg.keepfilter = 'yes'; cfg.keepcsd = 'yes'; cfg.feedback = 'textbar'; cfg.dics.lambda = 0.1 cfg.dics.projectnoise = 'yes'; rest_source = ft_sourceanalysis(cfg, fft_rest); %% sourcedescriptive cfg = []; rest_source.dim = rest_grid.dim; descri_source = ft_sourcedescriptives(cfg, rest_source); descri_source.pos = t1grid.pos; %% sourceinterpolating_nai cfg = []; cfg.parameter = 'nai'; cfg.voxelcoord = 'no'; cfg.interpmethod = 'linear'; sdint = ft_sourceinterpolate(cfg, descri_source, norm_mri); %% plot fft results cfgp = []; cfgp.layout = 'neuromag306mag_rev.lay'; cfgp.interactive='yes'; colorbar; ft_topoplotER(cfgp, fft_rest); %% source plot _nai cfg = []; cfg.method = 'slice'; cfg.funparameter = 'nai'; cfg.surfdownsample = 2; cfg.projmethod = 'project'; cfg.funcolormap = 'jet'; ft_sourceplot(cfg, sdint); -- Mi Kyung CHOE Department of Brain & Cognitive Sciences, Seoul National University Human Brain Function Laboratory E-mail : cmk0803 at hbf.re.kr, cmk0803 at meg.re.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure1.png Type: image/png Size: 227029 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure2.png Type: image/png Size: 271482 bytes Desc: not available URL: From tzvetan.popov at uni-konstanz.de Thu Jun 11 07:58:48 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 11 Jun 2015 07:58:48 +0200 Subject: [FieldTrip] Source localization of MEG resting state data In-Reply-To: References: Message-ID: <00C424A8-4120-4ED7-A02A-B140130E33EE@uni-konstanz.de> Hi MK CHOE, your second attempt look reasonable at least to me. The topography suggest parietal activation and you have peak maxima over parietal regions. > Hi, Tzvetan. > > Thank you for your first response. > > The weird output that you asked in first response is first attached figure 1. > I thought It was weird because the sensor level output is so different form the source level output. > > I revised the script regarding your first advise and following tutorial. The output is second figure. > (http://www.fieldtriptoolbox.org/example/read_neuromag_mri_and_create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > It is better than first output. However, the sensor level output correspond with the source level output, exactly. > > Is it anything that need to revise? > If the data is plotted at the source and sensor level, What the difference between two plots can emerge in general? There isn’t an easy answer to this question. Sometimes you’d use to extract time courses out of your data without “seeing” any patterns on sensor level due to noise. Other times the sensor topography almost perfectly matches the source map. That said sensor/source correspondence is good but if you lack this it doesn’t necessarily invalidates the results you just need to have plausible explanation of why you don’t see things on sensor level while you believe they must be there. This is typically in cases of simultaneous recordings of various types- EEG/fMRI, tAC/DC-MEEG etc. Finally, while your sensor signals are linear superposition of all source activity while your beamformer approach de-mixes those it is a “good sign” that sensor and source results are not mirroring each other. tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.vanEs at donders.ru.nl Thu Jun 11 12:55:40 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Thu, 11 Jun 2015 10:55:40 +0000 Subject: [FieldTrip] error in ft_artifact_zvalue Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7E90@exprd01.hosting.ru.nl> Hi, I just wanted to start processing my MEG data, but when I want to remove the artifacts using ft_artifact_zvalue I get an error. This is my code: % data is preprocessed already %% Find jump artifacts cfg = []; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG'; cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0; cfg.artfctdef.zvalue.fltpadding = 0; % algorithmic parameters cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [~, artifact_jump] = ft_artifact_zvalue(cfg, data); I do get the interactive figure where I can scroll through the trials and I can adjust the threshold, but when I use my mouse (e.g. to click on 'threshold'), I get the following error: Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 701) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback It seems like my mouse isn't recognized (tried different USB ports). Can you help me? (PS: scrolling through trials with the keyboard is working). Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.png Type: image/png Size: 93122 bytes Desc: Untitled.png URL: From eelke.spaak at donders.ru.nl Thu Jun 11 13:03:08 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 11 Jun 2015 12:03:08 +0100 Subject: [FieldTrip] error in ft_artifact_zvalue In-Reply-To: References: Message-ID: Hi Mats, Could you let me know what Matlab version you are using? And if the error also occurs if you use an older version (e.g. 2012a or so (simply use 'matlab2012a' at a DCCN mentat prompt))? Cheers, Eelke On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) wrote: > Hi, I just wanted to start processing my MEG data, but when I want to remove > the artifacts using ft_artifact_zvalue I get an error. > This is my code: > % data is preprocessed already > %% Find jump artifacts > cfg = []; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [~, artifact_jump] = ft_artifact_zvalue(cfg, data); > > I do get the interactive figure where I can scroll through the trials and I > can adjust the threshold, but when I use my mouse (e.g. to click on > 'threshold'), I get the following error: > > Attempt to reference field of non-structure array. > > Error in ft_artifact_zvalue>keyboard_cb (line 701) > curKey=eventdata.Key; > > Error using waitfor > Error while evaluating uicontrol Callback > > It seems like my mouse isn't recognized (tried different USB ports). Can you > help me? (PS: scrolling through trials with the keyboard is working). > > Best, > Mats From wanjamoessing at gmx.de Thu Jun 11 13:14:41 2015 From: wanjamoessing at gmx.de (=?utf-8?Q?Wanja_M=C3=B6=C3=9Fing?=) Date: Thu, 11 Jun 2015 13:14:41 +0200 Subject: [FieldTrip] error in ft_artifact_zvalue In-Reply-To: References: Message-ID: <0MZOan-1YjwxN1mIv-00LGJj@mail.gmx.com> Hi Mats, I recently submitted a bugfix to that function because the keyboard was not working. Now both should be working. Unfortunately, I could only test that on matlab 2015a. So it might be that it's not working on older versions. You could try a ft version from a week ago or so without the bugfix (and hence only mouse functionality). Could you let us know which version of matlab you're using? Best, -Wanja ----- Ursprüngliche Nachricht ----- Von: "Eelke Spaak" Gesendet: ‎11.‎06.‎2015 13:04 An: "FieldTrip discussion list" Betreff: Re: [FieldTrip] error in ft_artifact_zvalue Hi Mats, Could you let me know what Matlab version you are using? And if the error also occurs if you use an older version (e.g. 2012a or so (simply use 'matlab2012a' at a DCCN mentat prompt))? Cheers, Eelke On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) wrote: > Hi, I just wanted to start processing my MEG data, but when I want to remove > the artifacts using ft_artifact_zvalue I get an error. > This is my code: > % data is preprocessed already > %% Find jump artifacts > cfg = []; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [~, artifact_jump] = ft_artifact_zvalue(cfg, data); > > I do get the interactive figure where I can scroll through the trials and I > can adjust the threshold, but when I use my mouse (e.g. to click on > 'threshold'), I get the following error: > > Attempt to reference field of non-structure array. > > Error in ft_artifact_zvalue>keyboard_cb (line 701) > curKey=eventdata.Key; > > Error using waitfor > Error while evaluating uicontrol Callback > > It seems like my mouse isn't recognized (tried different USB ports). Can you > help me? (PS: scrolling through trials with the keyboard is working). > > Best, > Mats _______________________________________________ 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 plyons at udel.edu Thu Jun 11 15:59:59 2015 From: plyons at udel.edu (Peter Lyons) Date: Thu, 11 Jun 2015 09:59:59 -0400 Subject: [FieldTrip] No backprojection following ICA (Peter Lyons) In-Reply-To: References: Message-ID: Hi Wanja, Thanks for your quick response. Just to clarify a few points: We received the message "not applying the backprojection matrix to the sensor description" because we do not have a 'tra' matrix defined. Because we are using EEG data with a one to one relationship between the number of channels and the number of electrodes, and therefore do not have a need to define a 'tra' matrix (?), is it safe to assume that our call to ft_rejectcomponent successfully recomposed our data? If we do need to define a 'tra' matrix, when is the best time to do so? I really appreciate your input. Thanks, Peter On Wed, Jun 10, 2015 at 8:35 AM, Wanja Moessing wrote: > Hi Peter, > > I get the same note. From a look into the code of ft_rejectcomponent it > seems that, for EEG data, this note has to appear as long as you do not > have a 'tra' matrix in your electrode description. > The FAQ [ > http://www.fieldtriptoolbox.org/faq/how_are_electrodes_magnetometers_or_gradiometers_described] > suggests that this 'tra' matrix should only be there if the channels are > not exactly equal to your electrodes. > Please correct me if I am wrong - I am not a FT developer. > I agree that this message could be a little bit clearer. > > Kind regards, > Wanja > > _______________________________________________ > 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 e.caspar at ucl.ac.uk Fri Jun 12 12:53:25 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Jun 2015 10:53:25 +0000 Subject: [FieldTrip] ft_lateralizedpotential question Message-ID: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Dear Fieldrippers, I have a small question about ft_lateralizedpotential. I am currently trying to compute a LRP. Thus, I wrote: avgL = ft_timelockanalysis(cfg, cleandata); avgR = ft_timelockanalysis(cfg, cleandata); cfg = []; cfg.layout = 'biosemi64.lay'; cfg.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfg,avgL,avgR); cfg = []; cfg.xlim = [-2 1]; cfg.ylim = [-12 10]; clf; ft_singleplotER(cfg, lrp.plotlabel) There is apparently something wrong with the plot because I get the following error message: Error using ft_checkdata (line 461) This function requires timelock or freq data as input. I have also tried to add a new avgLRP = ft_timelockanalysis(cfg, lrp); and then to compute the plot based on that, but it is not working. If anyone has an idea! Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer? Thank you in advance for your help! Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Fri Jun 12 13:07:47 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Fri, 12 Jun 2015 11:07:47 +0000 Subject: [FieldTrip] ft_lateralizedpotential question In-Reply-To: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> References: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Message-ID: Hi Emilie, We won't be ripping any fields anytime ("Fieldrippers") ;) (1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER You should probably try: From e.caspar at ucl.ac.uk Fri Jun 12 15:19:26 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Jun 2015 13:19:26 +0000 Subject: [FieldTrip] ft_lateralizedpotential question In-Reply-To: References: <0DD88EF1-BF19-4E69-901E-0284B25FF30B@live.ucl.ac.uk> Message-ID: <13F99CA4-FC96-46C3-9361-38935027BA37@live.ucl.ac.uk> Dear Nietzsche, Sorry for the missing letter! Indeed, it slightly changes the meaning x) I have tried with different electrodes for avg Left and Right cfgL = []; cfgL.channel = {'A*'} avgL = ft_timelockanalysis(cfgL, clean_data); cfgR = []; cfgR.channel = {'B*'} avgR = ft_timelockanalysis(cfgR, clean_data); And then I have asked for ft_lateralizedpotential: cfgT = []; cfgT.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfgT,avgL,avgR); cfgT = []; cfgT.xlim = [-2 1]; cfgT.ylim = [-12 10]; clf; ft_singleplotER(cfgT, lrp) I agree that avgL and avgR are more logical now. However, the plot is still not working, with the following error: Error using fixdimord (line 85) the data does not contain a dimord, but it also does not resemble raw or component data I still do not really understand what is wrong. My script/data work very well without the ft_lateralized. I have already looked at the results for the readiness potential. I just want to look now for the lateralized RP. Thanks! Emilie On 12 juin 2015, at 13:07, "Lam, N.H.L. (Nietzsche)" > wrote: Hi Emilie, We won't be ripping any fields anytime ("Fieldrippers") ;) (1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER You should probably try: [fieldtrip-bounces at science.ru.nl] on behalf of Caspar, Emilie [e.caspar at ucl.ac.uk] Sent: 12 June 2015 12:53 To: fieldtrip at science.ru.nl Subject: [FieldTrip] ft_lateralizedpotential question Dear Fieldrippers, I have a small question about ft_lateralizedpotential. I am currently trying to compute a LRP. Thus, I wrote: avgL = ft_timelockanalysis(cfg, cleandata); avgR = ft_timelockanalysis(cfg, cleandata); cfg = []; cfg.layout = 'biosemi64.lay'; cfg.channelcmb={'A13' 'B18'}; lrp=ft_lateralizedpotential(cfg,avgL,avgR); cfg = []; cfg.xlim = [-2 1]; cfg.ylim = [-12 10]; clf; ft_singleplotER(cfg, lrp.plotlabel) There is apparently something wrong with the plot because I get the following error message: Error using ft_checkdata (line 461) This function requires timelock or freq data as input. I have also tried to add a new avgLRP = ft_timelockanalysis(cfg, lrp); and then to compute the plot based on that, but it is not working. If anyone has an idea! Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer? Thank you in advance for your help! Emilie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 12 20:35:04 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 12 Jun 2015 18:35:04 +0000 Subject: [FieldTrip] No backprojection following ICA In-Reply-To: References: Message-ID: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> Dear Peter, Depending on what you want to do, you need or need not worry about the warning you get. Since you mention that in first instance you want to look at connectivity at the channel level, I think you are safe. The warning pertains to the application of the spatial transformation to the low-level description of the channel array (the elec-structure), and not to the actual data. In short, the back projection is applied to the data itself, but there is insufficient information available in the sensor description to be able to apply the same projection to this as well. The latter would be needed if at a later stage you want to do source reconstruction, for which you need to compute leadfield matrices, where the forward model should include information about the spatial topographies that have been removed. Best, Jan-Mathijs On Jun 10, 2015, at 2:00 AM, Peter Lyons > wrote: Hello All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. I have come across a problem when I attempt to call ft_rejectcomponent following an ICA of my data. The ICA was performed using ft_componentanalysis, and the data was viewed using ft_databrowser to determine unwanted components. Following these steps I ran this code: cfg = [] cfg.component = [3 5] data_clean = ft_rejectcomponent(cfg,data_ica) which returned the following message: "not applying the backprojection matrix to the sensor description" My question is how do I proceed to allow the application of the backprojection matrix? I assume I am leaving some vital piece of code out? Prior to calling ft_componentanalysis my continuous data was bandpass filtered using ft_preprocessing, and the reference was removed using the code: cfg = [] cfg.channel = {'all','-E65'} data_64 = ft_preprocessing(cfg,data_filt) I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 hz. Any advice would be greatly appreciated! Thanks, Peter _______________________________________________ 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 plyons at udel.edu Fri Jun 12 21:12:46 2015 From: plyons at udel.edu (Peter Lyons) Date: Fri, 12 Jun 2015 15:12:46 -0400 Subject: [FieldTrip] No backprojection following ICA In-Reply-To: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> References: <919FAB59-5345-45A6-B579-C18E9A1F3D03@fcdonders.ru.nl> Message-ID: Hello Jan-Mathijs, Thank you for your response, I am glad to know that I needn't worry, and really appreciate your time! If at a later stage in my project I needed to compute leadfield matrices for source localization, what steps would I need to take in order to do so? Thanks, Peter On Fri, Jun 12, 2015 at 2:35 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Dear Peter, > > Depending on what you want to do, you need or need not worry about the > warning you get. Since you mention that in first instance you want to look > at connectivity at the channel level, I think you are safe. The warning > pertains to the application of the spatial transformation to the low-level > description of the channel array (the elec-structure), and not to the > actual data. In short, the back projection *is* applied to the data > itself, but there is insufficient information available in the sensor > description to be able to apply the same projection to this as well. The > latter would be needed if at a later stage you want to do source > reconstruction, for which you need to compute leadfield matrices, where the > forward model should include information about the spatial topographies > that have been removed. > > Best, > Jan-Mathijs > > On Jun 10, 2015, at 2:00 AM, Peter Lyons wrote: > > Hello All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different frequency > bands as well as phase lag index between various sensors. > > I have come across a problem when I attempt to call ft_rejectcomponent > following an ICA of my data. The ICA was performed using > ft_componentanalysis, and the data was viewed using ft_databrowser to > determine unwanted components. Following these steps I ran this code: > > cfg = [] > cfg.component = [3 5] > data_clean = ft_rejectcomponent(cfg,data_ica) > > which returned the following message: > > "not applying the backprojection matrix to the sensor description" > > My question is how do I proceed to allow the application of the > backprojection matrix? > I assume I am leaving some vital piece of code out? > > Prior to calling ft_componentanalysis my continuous data was > bandpass filtered using ft_preprocessing, and the reference was removed > using the code: > > cfg = [] > cfg.channel = {'all','-E65'} > data_64 = ft_preprocessing(cfg,data_filt) > > > I am using an EGI Hydrocel 64 electrode Sensor Net and sampling at 1000 > hz. > > Any advice would be greatly appreciated! > > Thanks, > Peter > > > _______________________________________________ > 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 bibi.raquel at gmail.com Fri Jun 12 23:29:39 2015 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Fri, 12 Jun 2015 17:29:39 -0400 Subject: [FieldTrip] importing and segmenting CNT and TRG files In-Reply-To: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> References: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Message-ID: I had to modify one of Fieldtrip's files recently. If you give me yours I can see if my modifications work for your data. Best, Raquel Sent from my iPhone > On Jun 9, 2015, at 10:48 AM, Nikola Valchev wrote: > > Dear all, > I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: > 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? > 2) I can’t seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. > > Any help is appreciated and I’m sorry if I’m not too clear, I’m new to EEG. > > Nikola > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Jun 14 19:49:39 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 14 Jun 2015 17:49:39 +0000 Subject: [FieldTrip] Apply atlas to MNE grid In-Reply-To: References: Message-ID: Hi Marieke, a) The reason I doubt the validity of this method is that when I find high activity on the MNE grid in seemingly temporal or occipital sources, the blob on the MRI image tends to end up on the brainstem or cerebellum (an example can be seen in the attached image). Any thoughts on what could cause this? Could there for example be an issue with cerebellar grid points not being included in the MNE grid, but which are present in the beamformer/cubic grid? Do you have any thoughts on the validity of this approach and the resulting effect? Essentially, when you are reconstructing the source activity on the cotrical sheet, but interpolate onto a 3D grid, you are basically extrapolating data onto voxels that fall outside the cortical sheet. Thus, indeed, cerebellum and brainstrem values need to be taken with a very large pinch of salt. A suggestion here would be to create a voxel-based mask, that masks out all voxels that are too far away from the cortical sheet. b) This pipeline feels rather contrived, with a bit too many interpolations to my liking. Is it somehow possible to shorten this pipeline? For example, is it possible to directly link the vertices of the MNE surface to an atlas? You could consider another route, where you use a surface based atlas (e.g. the Conte 69 atlas, based on Brodmann area labels). This would however require your cortical sheets to be registered in surface space (to a template). This can be done with the Caret package, or better still with some dedicated HCP code. You can google for ‘freesurfer fs to LR’ if you want to go this route and get started. Best, JM Any thoughts or hints on this would be greatly appreciated. Best, Marieke _______________________________________________ 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 M.vanEs at donders.ru.nl Mon Jun 15 13:42:43 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Mon, 15 Jun 2015 11:42:43 +0000 Subject: [FieldTrip] error in ft_artifact_zvalue Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Hi fieldtrippers, thanks for your response. I use matlab2013a. I just checked the function on matlab2012a and I get the same error. I am using an older version of ft_artifact_zvalue right now (version 24-02-15) where the mouse does work (though as mentioned the keyboard does not). Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: From WanjaMoessing at gmx.de Mon Jun 15 19:23:46 2015 From: WanjaMoessing at gmx.de (Wanja Moessing) Date: Mon, 15 Jun 2015 19:23:46 +0200 Subject: [FieldTrip] common ft_freqbaseline for variable length trials In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Message-ID: Dear Fieldtripers, We have EEG data with variable length trials and want to look at the time-frequency response around two triggers. As we want to use the same baseline for both TOIs, we preprocess the complete trials (6-8s) with variable triallength and use ft_freqanalysis with keeptrials = 'yes'. Then baseline with ft_freqbaseline and subsequently we would like to cut out trialwise the +/- 1.5s around each trigger and then average these pieces. Information about the respective triggers is stored in .trialinfo as trigger+sample to be able to locate the triggers. For some reason I cannot seem to find an option to redefine and average the trials after baseline and wavelet analysis. Attached is the code we use. I'd be thankful for any hints. Kind Regards, Wanja ----------------------------CODE--------------------------------------- cfg = []; cfg.keeptrials = 'yes'; cfg.keeptaper = 'no'; cfg.output = 'pow'; cfg.channel = {'FCz','Cz'}; cfg.method = 'wavelet'; cfg.pad = 'maxperlen'; cfg.foi = [1:2:40]; cfg.toi = 'all'; cfg.width = 9; cfg.conditions = [1.7,1.8,1.9,2.7,2.8,2.9]; baselinecfg = []; baselinecfg.baseline = [-1 0]; %1s before trialonset baselinecfg.baselinetype = 'relchange'; baselinecfg.parameter = 'powspctrm'; %loop over subjects and conditions for subject = 1:length(data_all_clean) curcon = 0; for cond = cfg.conditions curcon = curcon+1; idx = 0; cfg.trials = find(data_all_clean(subject).trialinfo(:,1) == cond); %contains info about the condition of each trial data_subj_Wave{1,curcon} = ft_freqanalysis(cfg,data_all_clean(subject)); %Data of subject x in condition y data_subj_Wave{6,curcon} = ft_freqbaseline(baselinecfg,data_subj_Wave{1,curcon}); %...and the baselined data data_subj_Wave{2,curcon} = cond; %pass information about the condition on data_subj_Wave{3,curcon} = length(cfg.trials); % store N trials per condition data_subj_Wave{4,curcon} = data_all_clean(subject).trialinfo(1,2); %SubjectNr data_subj_Wave{5,curcon} = data_all_clean(subject).trialinfo(1,3); %SessionNr end data_all_Wave{1,subject} = data_subj_Wave; data_all_Wave{2,subject} = data_all_clean(subject).trialinfo(1,2); data_all_Wave{3,subject} = data_all_clean(subject).trialinfo(1,3); end From tzvetan.popov at uni-konstanz.de Mon Jun 15 21:37:21 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 15 Jun 2015 21:37:21 +0200 Subject: [FieldTrip] common ft_freqbaseline for variable length trials In-Reply-To: References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF5F7EB4@exprd01.hosting.ru.nl> Message-ID: Hi Wanja, > For some reason I cannot seem to find an option to redefine and average the trials after baseline and wavelet analysis. I guess what you are after is ft_selectdata for selecting your desired time freq chan. Then you could do ft_freqdescriptives or use cfg.avgoverrpt = ‘yes’; during the call to ft_selectdata. Side note: baseline over the single trials and than averaging vs. average over rpt and then baseline will produce different output. I’m not sure whether you want to do single trial baseline correction or not. In any case the latter is typically done in the literature. Good luck, Tzvetan From isabella.premoli at gmail.com Tue Jun 16 14:33:51 2015 From: isabella.premoli at gmail.com (isabella premoli) Date: Tue, 16 Jun 2015 13:33:51 +0100 Subject: [FieldTrip] Channel repair problem Message-ID: Hi all, I am using ft_channelrepair to delete and interpolate bad channels. However, I noticed that after this process the order of the labels is changed and the interpolated channels are placed at the end of cfg.label list. As you can imagine, this situation differs between subjects and conditions. My question is, when I run ft_timelockgrandaverage to calculate the grand average across subjects and condition, has the fact that each subject/condition has different cfg.labels been taken into account? If not, how can I deal with it? Many thanks! Isabella -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at think-now.com Thu Jun 18 22:21:22 2015 From: greg at think-now.com (Greg Simpson) Date: Thu, 18 Jun 2015 13:21:22 -0700 Subject: [FieldTrip] RA Position Open In-Reply-To: References: Message-ID: Dear Colleagues, I would like to announce that our Research Associate position has been filled. Thank you, Greg Gregory V. Simpson, Ph.D. Founder & CSO Think Now, Inc. On Fri, May 22, 2015 at 5:11 PM, Greg Simpson wrote: > Dear Colleagues, > > I would like to announce an opening for a Research Associate (see ad > below). > > Please spread the word. > > Thank you, > > Greg > > Research Associate – Cognitive Training > > > > Think Now Incorporated is seeking a research associate to work on a NIMH > funded project testing the effects of mobile software training on attention > in adults with ADHD. Duties will include recruiting, screening and testing > (both behavioral tests and EEG tests) of adults with ADHD, before and after > they train their attention with the mobile software. We are seeking > candidates with direct hands-on experience in conducting > cognitive/psychological tests or related experience. Experience with > collecting EEG data is not required but would be great. Also, experience > with MatLab and statistical packages such as SPSS would be a plus. We > prefer strongly self-directed individuals with great people-skills to take > on this work. > > > > The position reports directly to Greg Simpson, Ph.D., a cognitive > neuroscientist and Chief Scientific Officer of Think Now. Think Now is > located in San Francisco and our research partners for this effort are > located at UCLA in Los Angeles. Candidates need to be located in the Los > Angeles area. > > > > Think Now is focused on creating solutions for the diagnosis and > amelioration of neurological disorders with a focus on attention and its > control. Please send your CV to jobs at think-now.com with a letter > describing your prior experience with conducting studies with adults (and > any EEG experience) and your reason for being interested in this position. > > Gregory V. Simpson, Ph.D. > Think Now, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From girwin at uni-osnabrueck.de Fri Jun 19 10:06:15 2015 From: girwin at uni-osnabrueck.de (girwin at uni-osnabrueck.de) Date: Fri, 19 Jun 2015 10:06:15 +0200 (CEST) Subject: [FieldTrip] running tmsidriver with ASA Message-ID: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> Hello mailinglist, I would like to know if anyone has ever attempted to run the tmsidriver(.exe) in parallel to the ASA EEG recording software. If I attempt it one of the two always breaks down, and preferably I would like to stream with the tmsidriver while recording with the ASA software at the same time. If anyone knows a way to do this I would be grateful. Cheers, Gerrit Irwin From M.vanEs at donders.ru.nl Fri Jun 19 12:44:04 2015 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Fri, 19 Jun 2015 10:44:04 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Fri Jun 19 12:59:27 2015 From: robince at gmail.com (Robin) Date: Fri, 19 Jun 2015 11:59:27 +0100 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: I have just updated my FieldTrip version to the current GitHub version and I'm getting the same error with Matlab R2015a. There doesn't seem to be any matlabversion.m in the current GitHub source tree as there was in previous versions. Copying FT/private/matlabversion.m from an earlier version stops the errors for me. Cheers Robin On 19 June 2015 at 11:44, Es, M.W.J. van (Mats) wrote: > Hi fieldtrippers, > > I know this is not the conventional way to report a bug, but it seems I > am not able to create a bugzilla account at this moment. Since today I get > an error using ft_databrowser (data is normal MEG data, preprocessed): > > *cfg = [];* > *cfg.channel = 'MEG';* > *cfg.viewmode = 'vertical';* > *cfg = ft_databrowser(cfg, data);* > > I get the following error many (50+) times: > > > *Undefined function 'matlabversion' for input arguments of type 'char'.* > > *Error in ft_platform_supports (line 58)* > * tf=is_matlab() && matlabversion('2014b', Inf);* > > *Error in ft_select_range (line 81)* > *if ft_platform_supports('graphics_objects')* > > *Error using waitfor* > *Error while evaluating figure WindowButtonMotionFcn* > > I am using matlab2013a on Linux, and I also tried matlab2012a, both show > the error. > > Best, > Mats > > _______________________________________________ > 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 robince at gmail.com Fri Jun 19 13:02:05 2015 From: robince at gmail.com (Robin) Date: Fri, 19 Jun 2015 12:02:05 +0100 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Actually copying the file didn't fix it - the error still comes when the mouse moves over the figure. On 19 June 2015 at 11:59, Robin wrote: > I have just updated my FieldTrip version to the current GitHub version and > I'm getting the same error with Matlab R2015a. > > There doesn't seem to be any matlabversion.m in the current GitHub source > tree as there was in previous versions. > > Copying FT/private/matlabversion.m from an earlier version stops the > errors for me. > > Cheers > > Robin > > On 19 June 2015 at 11:44, Es, M.W.J. van (Mats) > wrote: > >> Hi fieldtrippers, >> >> I know this is not the conventional way to report a bug, but it seems I >> am not able to create a bugzilla account at this moment. Since today I get >> an error using ft_databrowser (data is normal MEG data, preprocessed): >> >> *cfg = [];* >> *cfg.channel = 'MEG';* >> *cfg.viewmode = 'vertical';* >> *cfg = ft_databrowser(cfg, data);* >> >> I get the following error many (50+) times: >> >> >> *Undefined function 'matlabversion' for input arguments of type 'char'.* >> >> *Error in ft_platform_supports (line 58)* >> * tf=is_matlab() && matlabversion('2014b', Inf);* >> >> *Error in ft_select_range (line 81)* >> *if ft_platform_supports('graphics_objects')* >> >> *Error using waitfor* >> *Error while evaluating figure WindowButtonMotionFcn* >> >> I am using matlab2013a on Linux, and I also tried matlab2012a, both >> show the error. >> >> Best, >> Mats >> >> _______________________________________________ >> 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 daniel.haehnke at lrz.tu-muenchen.de Fri Jun 19 13:35:47 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?UTF-8?Q?H=C3=A4hnke=2C_Daniel?=) Date: Fri, 19 Jun 2015 13:35:47 +0200 Subject: [FieldTrip] Tutorial "Preprocessing and analysis of spike and local field potential data": Different STAs Message-ID: <7dc7a0c33a9ebeeb09e0f73a082f0480@roundcube.lrz.de> Dear community, I've been learning how to use FieldTrip by the series of tutorials on the website. While doing the last tutorial "Preprocessing and analysis of spike and local field potential data" I found that my output of spike triggered averages (STAs) isn't the same as in the tutorials. The plots of staPost and staPre are exactly the same for me and are identical to the first STA plot (staPost) in the tutorial. The only difference between the two STAs is cfg.latency, which is [0.3 10] for staPost and [-2.75 0]. If I omit cfg.latency I get the exact same values when running ft_spiketriggeredaverage(). This actually does make sense because the STA just averages LFPs 'around' spikes, so there is no need to specify a latency. I'm still curious, though, what was computed to obtain the plot for staPre in the tutorial. Could anyone clarify that? Kind regards, Daniel Hähnke -- Technische Universität München Daniel Hähnke Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 D-80802 München Tel.: +49 89 4140 3356 daniel.haehnke at lrz.tum.de www.ifn.me.tum.de From jan.schoffelen at donders.ru.nl Fri Jun 19 14:24:34 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Jun 2015 12:24:34 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Hi Mats and Robin, You seem to be running into the same problem as Robin just reported before you. Both error messages point to ft_select_range, which is in fieldtrip/plotting. ft_select_range calls ft_platform_supports (which is a very fresh addition to FieldTrip), which is located in fieldtrip/plotting/private. Now, ft_platform_supports wants to call matlabversion and it cannot find it at this location. Looking into fieldtrip/plotting/private, I see that indeed it is missing there. I will fix this. Best, Jan-Mathijs On Jun 19, 2015, at 12:44 PM, Es, M.W.J. van (Mats) > wrote: Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 19 14:37:33 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Jun 2015 12:37:33 +0000 Subject: [FieldTrip] error using ft_databrowser (bug) In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF8DF4DA@exprd01.hosting.ru.nl> Message-ID: Hi Mats, I didn’t read Robin’s earlier e-mails in sufficient detail, but she already provided a clue to a solution. I created a bug (2912) for this, if you create an account on bugzilla, and put yourself on the CC list for this bug, you can follow it’s resolution. Best, JM On Jun 19, 2015, at 12:44 PM, Es, M.W.J. van (Mats) > wrote: Hi fieldtrippers, I know this is not the conventional way to report a bug, but it seems I am not able to create a bugzilla account at this moment. Since today I get an error using ft_databrowser (data is normal MEG data, preprocessed): cfg = []; cfg.channel = 'MEG'; cfg.viewmode = 'vertical'; cfg = ft_databrowser(cfg, data); I get the following error many (50+) times: Undefined function 'matlabversion' for input arguments of type 'char'. Error in ft_platform_supports (line 58) tf=is_matlab() && matlabversion('2014b', Inf); Error in ft_select_range (line 81) if ft_platform_supports('graphics_objects') Error using waitfor Error while evaluating figure WindowButtonMotionFcn I am using matlab2013a on Linux, and I also tried matlab2012a, both show the error. Best, Mats _______________________________________________ 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 xieyuanj at gmail.com Mon Jun 22 03:20:43 2015 From: xieyuanj at gmail.com (- -) Date: Mon, 22 Jun 2015 01:20:43 +0000 Subject: [FieldTrip] ask help Message-ID: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> Dear community, I load a .set format of file from eeglab, the matlab show an error,that is ''error using load,number of columns on line 2 of ASCII file must be the same as previous lines". but why, is it not compatible with the file format? any suggestion would be appreciated. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Mon Jun 22 09:00:41 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 22 Jun 2015 07:00:41 +0000 Subject: [FieldTrip] ask help In-Reply-To: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> References: <8174e048662547c9a8ab110d6dc402e3@EXPRD03.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB4E3CA0@exprd01.hosting.ru.nl> Dear Jun, Could you please be a bit more specific as to what fieldtrip functions (and configuration options) you are using in combination with this eeglab file? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of - - Sent: maandag 22 juni 2015 3:21 To: fieldtrip, donders Subject: [FieldTrip] ask help Dear community, I load a .set format of file from eeglab, the matlab show an error,that is ''error using load,number of columns on line 2 of ASCII file must be the same as previous lines". but why, is it not compatible with the file format? any suggestion would be appreciated. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Mon Jun 22 12:42:54 2015 From: robince at gmail.com (Robin) Date: Mon, 22 Jun 2015 11:42:54 +0100 Subject: [FieldTrip] updatesens option with planar gradient Message-ID: Hello, I have selected heartbeat and eye movement ICA components in my MEG data and I would now like to remove them from the data. I saw there is an "updatesens" option in ft_rejectcomponent which seems to update the gradiometer definitions when the components are rejected, but I couldn't find any further description of what this is. After component rejection I would like to calculate the planar gradient with ft_megplanar. In this case should what is the correct setting for updatesens in the ft_rejectcomponent stage? Thanks, Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From russgport at gmail.com Mon Jun 22 17:37:07 2015 From: russgport at gmail.com (russ port) Date: Mon, 22 Jun 2015 11:37:07 -0400 Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots Message-ID: Hi All, After reading the wiki (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests ), it appears that I cannot do a cluster based permutation test on a set of data I have because of the fact that I have two between subject factors (genotype and sex). There has been a lot of discussion on the mailing list about how to run these kinds of analyses, but they have always (or at least what I could find), been about data set containing only 1 between subjects factor. As such, I have a question in two parts A) could I look at the data with a proper test of the between subject factors, and the within subject factor AND their interaction using a permutation test that use holms or bonferroni correction (though I would probably use holms because of bonferroni being to conservative) B) should I set this up by either i) testing geno, sex and their interaction separately like I think the wiki suggests above or ii) try and use the cfg.cvar input as previously suggested else where on this discussion list (though again that was for data with only 1 between subject variable)? Best, Russ Port -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Tue Jun 23 15:22:46 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Tue, 23 Jun 2015 13:22:46 +0000 Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots In-Reply-To: References: Message-ID: Hi Russ, From: russ port > Subject: [FieldTrip] 2 (between subject) x 2 (between subject) x 3 (within subject) ANOVA for Time Frequency Plots Date: 22 Jun 2015 17:37:07 CEST To: > Reply-To: FieldTrip discussion list > Hi All, After reading the wiki (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), it appears that I cannot do a cluster based permutation test on a set of data I have because of the fact that I have two between subject factors (genotype and sex). There has been a lot of discussion on the mailing list about how to run these kinds of analyses, but they have always (or at least what I could find), been about data set containing only 1 between subjects factor. As such, I have a question in two parts A) could I look at the data with a proper test of the between subject factors, and the within subject factor AND their interaction using a permutation test that use holms or bonferroni correction (though I would probably use holms because of bonferroni being to conservative) B) should I set this up by either i) testing geno, sex and their interaction separately like I think the wiki suggests above or ii) try and use the cfg.cvar input as previously suggested else where on this discussion list (though again that was for data with only 1 between subject variable)? With respect to question A: I hope I understand you correctly here: you want to analyse a 2 (between) x 3 (within) design, separately for the the data selected according to the level of the other between-subjects factor (thus, 2 analyses of a 2x3 design). Yes, this is possible in the permutation framework. Using Bonferroni correction to account for the fact that you perform 2 tests instead of 1 is a good idea. With respect to question B: You cannot test the interaction geno x sex in the permutation framework because these are 2 between-subjects factors. Also, the cfg.cvar option is to be used in a within-subjects design (or a matched-pairs design, which is statistically equivalent to a within-subjects design). Thus, the cvar must be within-subjects variable. best, Eric Maris Best, Russ Port _______________________________________________ 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 xieyuanj at gmail.com Fri Jun 26 04:45:18 2015 From: xieyuanj at gmail.com (- -) Date: Fri, 26 Jun 2015 10:45:18 +0800 Subject: [FieldTrip] (no subject) Message-ID: Hi All I prepossessed some data using eeglab, now how can I load these .set files to matlab by fieldtrip functioni? Any suggestion would be appreciated. Thanks. Best, Jun -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Fri Jun 26 06:33:58 2015 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Thu, 25 Jun 2015 21:33:58 -0700 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <6FA83067-15D3-4523-BB63-0D70901C29AB@cerco.ups-tlse.fr> You can use the File-IO importer (separate download from Fieldtrip) which is the default toolbox to import data in Fieldtrip. Best, Arno > On Jun 25, 2015, at 7:45 PM, - - wrote: > > Hi All > > I prepossessed some data using eeglab, now how can I load these .set files to matlab by fieldtrip functioni? > Any suggestion would be appreciated. > > Thanks. > > Best, > > Jun > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From xieyuanj at gmail.com Fri Jun 26 12:55:53 2015 From: xieyuanj at gmail.com (- -) Date: Fri, 26 Jun 2015 18:55:53 +0800 Subject: [FieldTrip] (no subject) Message-ID: Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 26 13:09:58 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 26 Jun 2015 11:09:58 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> Hi! Perhaps you could have a look a this link. It may help. https://www.youtube.com/watch?v=OGyHRhbOG2Y Have a nice day. Jan-Mathijs On Jun 26, 2015, at 12:55 PM, - - wrote: > Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Fri Jun 26 16:45:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 26 Jun 2015 17:45:55 +0300 Subject: [FieldTrip] running tmsidriver with ASA In-Reply-To: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> References: <49711.131.173.184.96.1434701175.squirrel@myuos.uni-osnabrueck.de> Message-ID: <603E0E85-6DB5-41E8-B44A-7E14210CADDC@donders.ru.nl> Hi Gerrit, We don’t have ASA software nor TMSi hardware at the Donders, so we have never tested it ourselves. But ANT has implemented http://www.fieldtriptoolbox.org/development/realtime/neurosdk, which is a FieldTrip buffer interface directly to their acquisition software (instead of to the lower level tmsi driver). Perhaps that might be of use to you. You would have to ask ANT for further details. best regards, Robert On 19 Jun 2015, at 11:06, girwin at uni-osnabrueck.de wrote: > Hello mailinglist, > > I would like to know if anyone has ever attempted to run the > tmsidriver(.exe) in parallel to the ASA EEG recording software. If I > attempt it one of the two always breaks down, and preferably I would > like to stream with the tmsidriver while recording with the ASA software > at the same time. If anyone knows a way to do this I would be grateful. > > Cheers, > Gerrit Irwin > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tzvetan.popov at uni-konstanz.de Fri Jun 26 18:44:06 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 26 Jun 2015 18:44:06 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <694412C9-38DF-4491-964E-D85188360AFA@uni-konstanz.de> Hi - -, I hope you can find some help here before struggling too hard with the new computer. http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 tzvetan > Is the fieldtrip toolbox a rubbish? why do not processing .set files? The same example and the same script always from the wiki run errors in the computer! > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nikola.valchev.umcg at gmail.com Sat Jun 27 13:34:54 2015 From: nikola.valchev.umcg at gmail.com (Nikola Valchev) Date: Sat, 27 Jun 2015 13:34:54 +0200 Subject: [FieldTrip] importing and segmenting CNT and TRG files In-Reply-To: References: <5576fca6.0150b40a.6faa.1f1e@mx.google.com> Message-ID: <558e8a5f.6a3ec20a.edb85.26ff@mx.google.com> Dear Raquel, Thank you very much for the offer. Actually it turned out that the CNT files were too big to preprocess on a normal computer so I exported them differently and then applied the preprocessing. Best Nikola From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Raquel Bibi Sent: 12 June 2015 23:30 To: FieldTrip discussion list Subject: Re: [FieldTrip] importing and segmenting CNT and TRG files I had to modify one of Fieldtrip's files recently. If you give me yours I can see if my modifications work for your data. Best, Raquel Sent from my iPhone On Jun 9, 2015, at 10:48 AM, Nikola Valchev wrote: Dear all, I am struggling to find a way to import my data into fieldtrip. It is in CNT format and it comes with the CNT, EVT, SEG, SEN, and TRG files. I have two problems for which I would like to ask you for some hints: 1) I use ft_read_data to read my CNT data files and it all works fine, I have my data in 67(channels)*N(data points). How can I read and use the SEG file to segment it? 2) I can’t seem to find a way to read my TRG files and thus use the triggers. I found the way to read the file (read_eep_trg function), but I have more triggers than the ones I know there should be and I have no way of knowing how to select the good ones. Any help is appreciated and I’m sorry if I’m not too clear, I’m new to EEG. Nikola _______________________________________________ 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 plyons at udel.edu Mon Jun 29 05:51:19 2015 From: plyons at udel.edu (Peter Lyons) Date: Sun, 28 Jun 2015 23:51:19 -0400 Subject: [FieldTrip] Help Manually Defining Trials Message-ID: Dear All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. My dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do not have any events or triggers in my data. I would like to manually select the cleanest segments of my data following artifact rejection, and define them as trials. Theoretically, I see three ways to segment my data manually: 1. Insert individual triggers throughout my data (at locations determined via ft_databrowser), and then define trials based on these triggers. 2. Define trials based on a beginning and ending sample number. 3. Use ft_databrowser to select segments of data as if they were artifacts, and then define these "artifacts" as trials instead of rejecting them from the dataset. Could anyone advise on how to code one of the above methods? Any help is welcome and appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Mon Jun 29 15:02:00 2015 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Mon, 29 Jun 2015 09:02:00 -0400 Subject: [FieldTrip] Help Manually Defining Trials In-Reply-To: References: Message-ID: Hi Peter, Maybe you can redefine (ft_redefinetrials) your trials (from one whole continue trials to chunks of data) in segments that allow you to properly resolve your frequencies of interest. After that you can perform a trial rejection based on automatic or manual artifact detection...then you can do whatever you need to do. Could be other ways, but this for me looks very straight forward for at least a first exploratory round of analysis. I hope this helps you. Best Rodrigo On Sun, Jun 28, 2015 at 11:51 PM, Peter Lyons wrote: > Dear All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different > frequency bands as well as phase lag index between various sensors. My > dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do > not have any events or triggers in my data. > > I would like to manually select the cleanest segments of my data following > artifact rejection, and define them as trials. > > Theoretically, I see three ways to segment my data manually: > > 1. Insert individual triggers throughout my data (at locations determined > via ft_databrowser), and then define trials based on these triggers. > > 2. Define trials based on a beginning and ending sample number. > > 3. Use ft_databrowser to select segments of data as if they were > artifacts, and then define these "artifacts" as trials instead of rejecting > them from the dataset. > > Could anyone advise on how to code one of the above methods? > > Any help is welcome and appreciated! > > Thanks, > Peter > > > > _______________________________________________ > 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 spa268 at nyu.edu Mon Jun 29 15:31:46 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Mon, 29 Jun 2015 17:31:46 +0400 Subject: [FieldTrip] Help Manually Defining Trials Message-ID: Hi Peter, http://www.fieldtriptoolbox.org/reference/ft_definetrial describes the format of the trial definition matrix; you can simply create a matrix like this using the times that you would like to choose for your epochs, and then run ft_preprocessing() with this matrix as the input for cfg.trl. (This is basically a combination of methods (1) and (2) that you suggested below.) Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Mon, Jun 29, 2015 at 2:00 PM, wrote: > > > Message: 1 > Date: Sun, 28 Jun 2015 23:51:19 -0400 > From: Peter Lyons > To: FieldTrip discussion list > Subject: [FieldTrip] Help Manually Defining Trials > Message-ID: > sw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear All, > > My name is Peter Lyons, and I am a researcher at the University of > Delaware. Currently, I am conducting resting state EEG research with the > intention of using Fieldtrip to calculate the power of different frequency > bands as well as phase lag index between various sensors. My dataset is a > continuous recording sampled at 1000 hz for 30 minutes. I do not have any > events or triggers in my data. > > I would like to manually select the cleanest segments of my data following > artifact rejection, and define them as trials. > > Theoretically, I see three ways to segment my data manually: > > 1. Insert individual triggers throughout my data (at locations determined > via ft_databrowser), and then define trials based on these triggers. > > 2. Define trials based on a beginning and ending sample number. > > 3. Use ft_databrowser to select segments of data as if they were > artifacts, and then define these "artifacts" as trials instead of rejecting > them from the dataset. > > Could anyone advise on how to code one of the above methods? > > Any help is welcome and appreciated! > > Thanks, > Peter > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150628/d926ab81/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 55, Issue 26 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Mon Jun 29 16:16:11 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Mon, 29 Jun 2015 14:16:11 +0000 Subject: [FieldTrip] Help Manually Defining Trials In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C17D5AA19@exprd03.hosting.ru.nl> Hi Peter, In addition to Steve’s perfect suggestion, you might want to take a look at this example script, which basically is a data-driven way to define trials: http://www.fieldtriptoolbox.org/example/detect_the_muscle_activity_in_an_emg_channel_and_use_that_as_trial_definition Here, co-recorded EMG-data is used to define trials, but in your case you can use (some parameter in) your MEG data (e.g., some ‘cleaniness’ measure). Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Stephen Politzer-Ahles Sent: maandag 29 juni 2015 15:32 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Help Manually Defining Trials Hi Peter, http://www.fieldtriptoolbox.org/reference/ft_definetrial describes the format of the trial definition matrix; you can simply create a matrix like this using the times that you would like to choose for your epochs, and then run ft_preprocessing() with this matrix as the input for cfg.trl. (This is basically a combination of methods (1) and (2) that you suggested below.) Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Mon, Jun 29, 2015 at 2:00 PM, > wrote: Message: 1 Date: Sun, 28 Jun 2015 23:51:19 -0400 From: Peter Lyons > To: FieldTrip discussion list > Subject: [FieldTrip] Help Manually Defining Trials Message-ID: > Content-Type: text/plain; charset="utf-8" Dear All, My name is Peter Lyons, and I am a researcher at the University of Delaware. Currently, I am conducting resting state EEG research with the intention of using Fieldtrip to calculate the power of different frequency bands as well as phase lag index between various sensors. My dataset is a continuous recording sampled at 1000 hz for 30 minutes. I do not have any events or triggers in my data. I would like to manually select the cleanest segments of my data following artifact rejection, and define them as trials. Theoretically, I see three ways to segment my data manually: 1. Insert individual triggers throughout my data (at locations determined via ft_databrowser), and then define trials based on these triggers. 2. Define trials based on a beginning and ending sample number. 3. Use ft_databrowser to select segments of data as if they were artifacts, and then define these "artifacts" as trials instead of rejecting them from the dataset. Could anyone advise on how to code one of the above methods? Any help is welcome and appreciated! Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 55, Issue 26 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From bqrosen at ucsd.edu Tue Jun 30 04:09:45 2015 From: bqrosen at ucsd.edu (Burke Rosen) Date: Mon, 29 Jun 2015 19:09:45 -0700 Subject: [FieldTrip] wavelet power units and (2/fsample) correction factor Message-ID: <5591FA69.5080203@ucsd.edu> Hello All, I noticed with simulated input that ft_freqanalysis->ft_specest_wavelet yields powspctrm results that are scaled by the sampling rate of the input data. The scaling factor appears to be (fsample/2). Of course, multiplying by (2/fsample) corrects this. Upon investigation I found that freqanalysis_mtmconvol (the predesessor to ft_specest_wavelet (?)) from fieldtrip-20080624 contains this correction factor on line 294. 1. What is this correction factor and why is it no longer applied? 2. Why is in not applied to the fourierspctrm output? 3. What, in general, are the output units of the ft_freqanalysis->ft_specest_wavelet? Thank you, Burke Rosen From S.Hanslmayr at bham.ac.uk Tue Jun 30 10:43:14 2015 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Tue, 30 Jun 2015 08:43:14 +0000 Subject: [FieldTrip] 5 year postdoc position available in Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CED83878A2@EX8.adf.bham.ac.uk> *********************************************** ********* POSTDOC POSITION AVAILABLE *********** *********************************************** Dear all, We are looking for a full-time Postdoctoral Research Fellow to work within the School of Psychology, University of Birmingham. The successful candidate will work on a 5-year project funded within an ERC Consolidator Grant to investigate the role of brain oscillations for human episodic memory. The project focusses on intracranial single-unit recordings in human epilepsy patients and computational modelling of oscillations in memory networks. The postdoctoral researcher will design and conduct experiments with patients in Birmingham and Germany (Erlangen), analyse electrophysiological data and publish the results in international peer reviewed journals. The researcher should also use computational modelling as a tool to generate hypothesis and test the empirical data. The person we are looking for will have demonstrable experience on human or animal electrophysiology and oscillations as measured with EEG/MEG or, ideally, intracranial EEG. They should have a background, or strong interest, in computational modelling of neural networks. They will have an advanced degree (preferably a PhD in Psychology, Computational Neuroscience, or Neuroscience). They must be fluent using Matlab and related toolboxes for analysing brain oscillatory data (i.e. Fieldtrip). We require an individual with very good communication skills. Strong interest in working in a clinical environment is required, and previous clinical experience is a plus. This position will be held in the Memory and Oscillations Lab and will be supervised by Dr Simon Hanslmayr. The lab is a dynamic active group that includes several other Post docs and PhD students and provides a supportive and stimulating environment in which to work. Start date is 1 October 2015. To download the details of this position and submit an electronic application click HERE or visit www.hr.bham.ac.uk/jobs and enter the job reference number 55204 in the search engine. Please send informal enquiries to Dr Simon Hanslmayr (s.hanslmayr at bham.ac.uk). Dr. Simon Hanslmayr Senior Lecturer School of Psychology University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.birmingham.ac.uk/schools/psychology/people/profile.aspx?ReferenceId=70349 -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.bleichner at uni-oldenburg.de Tue Jun 30 10:47:58 2015 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Tue, 30 Jun 2015 10:47:58 +0200 Subject: [FieldTrip] New mailing list for users of Lab Streaming Layer In-Reply-To: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> References: <8E307B47-1A13-4447-ABCA-D6270FA46913@fcdonders.ru.nl> Message-ID: <559257BE.2050503@uni-oldenburg.de> Dear fieldtrip users, there is now a dedicated mailing list for those of you who use the lab streaming layer (LSL) to record and synchronize their time series. The list is for users and developers of LSL, to discuss issues, make announcements and disseminate knowledge. Please contribute. https://mailman.ucsd.edu/mailman/listinfo/lsl-l Best Martin (enthusiastic LSL user) -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/