From pmetzak at gmail.com Tue Nov 3 00:34:52 2015 From: pmetzak at gmail.com (Paul Metzak) Date: Mon, 2 Nov 2015 15:34:52 -0800 Subject: [FieldTrip] ft_sourcestatistics: cfg.design and memory issues Message-ID: Hello, I am new to FieldTrip (and MEG) and I have been working through the walkthroughs and tutorials in an attempt to use beamforming to source localize my MEG data. In this experiment, there are 3 conditions and 2 groups. I have been following the Example: Source Statistics ( http://www.fieldtriptoolbox.org/example/source_statistics) tutorial but I have encountered a couple of difficulties. 1) The first issue is in the choice of design matrix for the analyses I would like to run. The tutorial offers a very clear example of how to assess differences between conditions within a single group, but it is less straightforward (to me at least) how to run an analysis of the differences between two groups on a single condition. In my case, I have 17 participants from group 1 and 14 participants from group 2. I have created 17x1 and 14x1 cell array containing the output from each subject's beamform (at the individual subject level, I contrasted a period of interest from condition 1 with an equivalent length of time from the prestim baseline). My call to ft_sourcestatistics is below. Is this the proper way to set up the design matrix to run this analysis? I know that participants are not true 'independent variables' but it seems to me that treating them as such will randomise group assignment to produce the monte carlo distribution that I am looking for. cfg=[]; cfg.dim=cond1_h{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; % note that this only implies single-sided testing cfg.tail = 0; nsubj=17; cfg2.design(1,:) = [ones(1,nsubj) ones(1,nsubj)*2]; %create over-large desmtx cfg.design=cfg.design(:,1:31); %trim desmtx to correct specs cfg.ivar = 1; % row of design matrix that contains independent variable (the participants) stat = ft_sourcestatistics(cfg, cond1_h{:}, cond1_s{:}); 2) The second issue is that it appears I have been inefficient in my memory use as matlab crashes when I attempt to run this analysis ( FYI I have 16GB of RAM and 16GB of swap space). I have employed the -nojvm flag when starting matlab, and I have used struct2single to try and reduce the memory load but matlab still crashes out (without message) when I attempt to run this analysis. This code will run on my computer with a maximum of 4 subjects from each group and 50 randomizations, which is obviously not ideal for me. Please find the contents of a single cell from one of the groups below. Is there something that is obviously problematic in what I have so far? inside: [256x256x256 logical] pow: [256x256x256 single] dim: [256 256 256] transform: [4x4 single] anatomy: [256x256x256 single] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Thank you very much for any help you can offer me with this! If any further information or clarifications would be useful to help diagnose or overcome this issue, please let me know. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Tue Nov 3 10:06:25 2015 From: anne.urai at gmail.com (Anne Urai) Date: Tue, 3 Nov 2015 10:06:25 +0100 Subject: [FieldTrip] ft_sourcestatistics: cfg.design and memory issues In-Reply-To: References: Message-ID: Hi Paul, in my experience, the cfg field can get rather big as it accumulates information about previous steps in the pipeline. source = rmfield(source, 'cfg') might help a bit. Cheers, Anne On 3 November 2015 at 00:34, Paul Metzak wrote: > Hello, > > I am new to FieldTrip (and MEG) and I have been working through the > walkthroughs and tutorials in an attempt to use beamforming to source > localize my MEG data. In this experiment, there are 3 conditions and 2 > groups. I have been following the Example: Source Statistics ( > http://www.fieldtriptoolbox.org/example/source_statistics) tutorial but I > have encountered a couple of difficulties. > > 1) The first issue is in the choice of design matrix for the analyses I > would like to run. The tutorial offers a very clear example of how to > assess differences between conditions within a single group, but it is less > straightforward (to me at least) how to run an analysis of the differences > between two groups on a single condition. In my case, I have 17 > participants from group 1 and 14 participants from group 2. I have created > 17x1 and 14x1 cell array containing the output from each subject's beamform > (at the individual subject level, I contrasted a period of interest from > condition 1 with an equivalent length of time from the prestim baseline). > My call to ft_sourcestatistics is below. Is this the proper way to set up > the design matrix to run this analysis? I know that participants are not > true 'independent variables' but it seems to me that treating them as such > will randomise group assignment to produce the monte carlo distribution > that I am looking for. > > cfg=[]; > cfg.dim=cond1_h{1}.dim; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.parameter = 'pow'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; % note that this only implies single-sided testing > cfg.tail = 0; > > nsubj=17; > cfg2.design(1,:) = [ones(1,nsubj) ones(1,nsubj)*2]; %create over-large > desmtx > cfg.design=cfg.design(:,1:31); %trim desmtx to correct specs > cfg.ivar = 1; % row of design matrix that contains independent > variable (the participants) > > stat = ft_sourcestatistics(cfg, cond1_h{:}, cond1_s{:}); > > 2) The second issue is that it appears I have been inefficient in my > memory use as matlab crashes when I attempt to run this analysis ( FYI I > have 16GB of RAM and 16GB of swap space). I have employed the -nojvm flag > when starting matlab, and I have used struct2single to try and reduce the > memory load but matlab still crashes out (without message) when I attempt > to run this analysis. This code will run on my computer with a maximum of 4 > subjects from each group and 50 randomizations, which is obviously not > ideal for me. Please find the contents of a single cell from one of the > groups below. Is there something that is obviously problematic in what I > have so far? > > inside: [256x256x256 logical] > pow: [256x256x256 single] > dim: [256 256 256] > transform: [4x4 single] > anatomy: [256x256x256 single] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > Thank you very much for any help you can offer me with this! If any > further information or clarifications would be useful to help diagnose or > overcome this issue, please let me know. > > Paul > > > > > _______________________________________________ > 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 Holger.Krause at med.uni-duesseldorf.de Tue Nov 3 16:45:55 2015 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Tue, 3 Nov 2015 16:45:55 +0100 Subject: [FieldTrip] No daily releases on ftp-server since two weeks? Message-ID: <4718281.hncb08gLrJ@metta> Hi, the newest version I can find on ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/ dates from "Tue Oct 20 21:03:00 2015". Will newer versions still be made available here? Thanks in advance! Holger From mikexcohen at gmail.com Tue Nov 3 17:33:22 2015 From: mikexcohen at gmail.com (Mike X Cohen) Date: Tue, 3 Nov 2015 17:33:22 +0100 Subject: [FieldTrip] Conference announcement: ICON (August 2017, Amsterdam) Message-ID: We are happy to make the first announcement for the ICON XIII conference, which will take place on 5-9 August 2017 in Amsterdam (the Netherlands). Amsterdam is an easily-accessible and progressive city. ICON will take place at the Beurs van Berlage, located in downtown Amsterdam and one of the most beautiful conference venues in Europe! Visit the website: http://www.icon2017.org ICON stands for International Conference for Cognitive Neuroscience. ICON has taken place every 2-3 years since 1980. This conference brings together researchers from diverse backgrounds, joined by their interest in studying the relationships amongst brain, mind, and behavior. ICON conferences are always a big success, and 2017 in Amsterdam will follow this same tradition! Symposia and poster submissions will be open from early summer 2016, with deadlines in August/October (precise dates to be announced in the future). Plan your research accordingly! PRE-CONFERENCE WORKSHOPS/SATELLITES We welcome pre-conference satellites, and will be happy to advertise them on the ICON website. Note that satellites are independent from ICON in terms of organization, registration, and costs. If you have any questions or would like to discuss ideas for your satellite, please contact Mike Cohen (mikexcohen at gmail.com) and Birte Forstmann (buforstmann at gmail.com). FOLLOW US ON TWITTER For up-to-date announcements before and during the ICON meeting, follow @icon2017 (see also "Media" tab on the website). http://www.icon2017.org We look forward to seeing you in beautiful Amsterdam! Mike X Cohen and Birte Forstmann -- Mike X Cohen, PhD mikexcohen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Tue Nov 3 21:21:51 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Tue, 3 Nov 2015 15:21:51 -0500 Subject: [FieldTrip] one-dimensional cluster stats Message-ID: hi all, I'm trying to trick Fieldtrip into doing cluster stats on "one-dimensional" EEG data. What I mean by that is that for every subject, and every electrode, I have only one value (average density of sleep spindles). So no time dimension, just a spatial one. I assumed (but I'm not sure) that Fieldtrip always requires a time dimension, so I'm essentially copying the data over to a second sample, and set 'avgovertime' to yes. I have a simple between-subjects design (at least for a first pass) with 16 and 20 subjects respectively. my code: cfg=[]; *%I get my chanlocs from eeglab* cfg=eeglab2fieldtrip(myeeg,'chanloc'); cfg.rotate=90; %because eeglab and fieldtrip have different orientations cfg.layout=ft_prepare_layout(cfg); cfg.label=cfg.elec.label; cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,cfg.elec); cfg.channel = {'EEG'}; cfg.latency = 'all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.alpha = 0.05; cfg.tail = 2; cfg.numrandomization = 1000; cfg.avgovertime = 'yes'; cfg.design: [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] cfg.ivar: 1 *%data to compare* spindledata.dimord='subj_chan_time'; % spindledata.time=[0 1]; %pretend I have two timepoints spindledata.label=cfg.label; %*paste data (and use repmat to make a copy for the second timepoint)* spindledata1=spindledata; spindledata2=spindledata; spindledata1.avg=repmat(allData(allLabels==1,:),[1 1 2]); spindledata2.avg=repmat(allData(allLabels==2,:),[1 1 2]); [statT] = ft_timelockstatistics(cfg,spindledata1,spindledata2); Matlab's output: total number of measurements = 36 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parametric threshold for clustering Reference to non-existent field 'critval'. Error using ft_statistics_montecarlo (line 250) could not determine the parametric critical value for clustering Error in ft_timelockstatistics (line 181) [stat, cfg] = statmethod(cfg, dat, design); Error in spindlestats (line 149) [statT] = ft_timelockstatistics(cfg,spindledata1,spindledata2); When I step into the ft_timelockstatistics to figure out what's happening, I notice that the cfg.channel field holds only 32 channels (while I have 58). Similarly, right before it crashes the "dat" variable is also a 32x36 matrix while I'd expect a 58x36. All my data are free of Nans, so that's not it. It's a great mystery to me so any suggestions are welcome. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Nov 4 00:00:35 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 4 Nov 2015 00:00:35 +0100 Subject: [FieldTrip] bemcp vs dipoli Message-ID: Hi Fieldtrip users, When constructing a volume conduction model for EEG using the boundary element method (BEM), there are two methods available: 'dipoli' and 'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), are there any differences that you know of/have experienced that make one method better (more reliable, more accurate, or anything else that makes you prefer one rather) than the other? For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During processing with 'bemcp' there is a "warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the end result being that vol.mat contains NaNs. The input in both cases, besides the method chosen, is identical. Taking one step back in the processing pipeline, I am aware that a poor segmentation outcome might be a/the cause of the warnings and eventual errors when constructing a volume conduction model. But in general this should hold equally for both methods. What I am wondering about is why one method might deal more successfully than the other with the same input. Best, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailtome.2113 at gmail.com Wed Nov 4 00:49:36 2015 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Wed, 4 Nov 2015 10:49:36 +1100 Subject: [FieldTrip] Re referencing Message-ID: Dear fieldtrip community, I am working with 128 channel EEG data recorded with EGI system. The data was recorded with Cz reference. I want to re-reference to average reference and get the data from the original reference channel Cz. When I run the following code, I still can't get the data from Cz. Could you please suggest a fix? Thanks, Arti cfg = []; cfg.reref = 'yes'; cfg.implicitref = 'Cz'; cfg.refchannel = 'all'; data_reref= ft_preprocessing(cfg, data_clean); -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.aurtenetxe at bcbl.eu Wed Nov 4 09:51:00 2015 From: s.aurtenetxe at bcbl.eu (Sara Aurtenetxe) Date: Wed, 4 Nov 2015 09:51:00 +0100 (CET) Subject: [FieldTrip] Combineplanars and timelockstatistics Message-ID: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> Dear all, I would highly appreciate if an expert on the field could comment on the following questions, or highlight a reference, since as far as I am aware of, there are different opinions on it. When doing timelockstatistics (ERFs) at the gradiometers level: - Do the gradiometers need to be combined (ft_combineplanar) before the stats? And/or do they need to be combined for visualization of effects? - Which is the (mathematical) explanation for the answer/s? - Does apply the same when doing source analysis with 'lcmv'? Thanks a lot in advance, All the best, Sara From alexandre.gramfort at telecom-paristech.fr Wed Nov 4 10:05:53 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 4 Nov 2015 10:05:53 +0100 Subject: [FieldTrip] bemcp vs dipoli In-Reply-To: References: Message-ID: hi Maris, you can have a look at: http://www.hindawi.com/journals/cin/2011/923703/ especially: http://www.hindawi.com/journals/cin/2011/923703/fig12/ LC (linear collocation) is bemcp and LCISA is dipoli. When using ISA (isolated skull approach) accuracy is better. In summary use dipoli if you can. Hope this helps, Best, Alex On Wed, Nov 4, 2015 at 12:00 AM, Maris Skujevskis wrote: > Hi Fieldtrip users, > > When constructing a volume conduction model for EEG using the boundary > element method (BEM), there are two methods available: 'dipoli' and 'bemcp'. > Besides technicalities (i.e., 'dipoli' only available on Linux), are there > any differences that you know of/have experienced that make one method > better (more reliable, more accurate, or anything else that makes you prefer > one rather) than the other? > > For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During > processing with 'bemcp' there is a "warning: Matrix is singular, close to > singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the > end result being that vol.mat contains NaNs. > The input in both cases, besides the method chosen, is identical. > > Taking one step back in the processing pipeline, I am aware that a poor > segmentation outcome might be a/the cause of the warnings and eventual > errors when constructing a volume conduction model. But in general this > should hold equally for both methods. What I am wondering about is why one > method might deal more successfully than the other with the same input. > > Best, > Maris > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From thomas.hartmann at th-ht.de Wed Nov 4 11:19:45 2015 From: thomas.hartmann at th-ht.de (Thomas Hartmann) Date: Wed, 4 Nov 2015 11:19:45 +0100 Subject: [FieldTrip] Combineplanars and timelockstatistics In-Reply-To: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> References: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> Message-ID: <5639DBC1.5070502@th-ht.de> dear sara, Am 2015-11-04 um 09:51 schrieb Sara Aurtenetxe: > When doing timelockstatistics (ERFs) at the gradiometers level: > > - Do the gradiometers need to be combined (ft_combineplanar) before the stats? > And/or do they need to be combined for visualization of effects? > > - Which is the (mathematical) explanation for the answer/s? let me answer both questions at the same time: the two planar gradiometers that make up the set of two that you find at each sensor location point into orthogonal directions. you can imagine one pointing along the x-axis, the other pointing along the y-axis of a 2d coordinate system. so, the gradiometer pointing along the x-axis would pick up 100% percent of an activity that increases or decreases in that direction. if the activity increases or decreases along the y-axis, the x-axis gradiometer would not pick up anything. instead, the other gradiometer would pick up the whole energy. if there is activity that increases or decreases in an angle 45° to both gradiometers, both would pick up half the energy. this works accordingly for any orientation of the underlying source. i.e. the two gradiometers pick up the x and the y part of the signal. this means, that the activity at the x-gradiometer is meaningless without the activity at the y-gradiometer. and as the orientations of the respective gradiometers with respect to the head are arbitrary, it does not make sense to compare, let's say the x-gradiometer at one spot with the x-gradiometer at another one. mathematically speaking: instead of looking at the coordinates of your vector, you want the length of it. so, in order to get that, you need to do: sqrt(x^2 + y^2). so, long story short: yes, you need to to ft_combineplanar before sensor level stats. > - Does apply the same when doing source analysis with 'lcmv'? no, this is a different story. it is quite the opposite: the activity at a voxel (or grid point) is the linear combination (i.e. a weighed sum) of the activity at all the sensors. the weighing coefficients are what you calculate when you first do your forward and the then the inverse model (e.g., bem modelling as forward model, LCMV for the inverse solution). the forward modelling takes into account the orientation of the sensors and also knows, where the head is, i.e. how the brain is oriented with respect to the sensor. so, no need to do ft_combineplanar here. best, thomas > > Thanks a lot in advance, > All the best, > > Sara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email:thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From RICHARDS at mailbox.sc.edu Wed Nov 4 14:36:00 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 4 Nov 2015 13:36:00 +0000 Subject: [FieldTrip] bemcp vs dipoli Message-ID: In addition to the answer given by Alexandre Gramfort. I have compared BEMCP, Dipoli, Sim-bio FEM, and spherical models. My tests use an individual head model with that individuals data, and then head models based on other participants, age-appropriate MRI templates, and age-inappropriate MRI templates; with infants. The BEMCP is the three-compartment model, the Dipoli is a four-compartment model, the Simbio is a full segmented head model with 10 different materials, the spherical is four spheres. 1—I sometimes have issues getting the forward model / source analysis with BEMCP. It appears to have singularities on the borders of the compartments and gives the same answer as you report. Or does not even compute. Using the same (or similar) head model mesh with Dipole, it works. 2—I have been using the Dipoli with four compartments. I am comparing the four methods with a set of empirical data and simulated data. I have found that the dipole solutions on a single individual(s) for the BEMCP and the spherical models are closer in solution, and the Dipoli and the SimBio-FEM are closer in the solution. 3—I also have been using head models from different individuals to solve the forward model for the EEG from a single individual, comparing the solutions across head models. Both the SimBio-FEM and Dipoli show the greatest change in solution across individuals with different head sizes or ages (using age-appropriate and age-inappropriate heads), whereas the BEMCP and spherical model show the least change. Interesting, the larger change for the two models occurs because its theoretical fit when the head comes from the individual is better than the fit when the head comes from an inappropriate age, whereas the age-appropriate head model are not as important for BEMCP and spherical models because they fit poorer. The results from 2 and 3 are being analyzed now, eventually will reach publication. John >------------------------------ > >Message: 4 >Date: Wed, 4 Nov 2015 00:00:35 +0100 >From: Maris Skujevskis >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] bemcp vs dipoli >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Hi Fieldtrip users, > >When constructing a volume conduction model for EEG using the boundary >element method (BEM), there are two methods available: 'dipoli' and >'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), >are there any differences that you know of/have experienced that make one >method better (more reliable, more accurate, or anything else that makes >you prefer one rather) than the other? > >For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During >processing with 'bemcp' there is a "warning: Matrix is singular, close to >singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the >end result being that vol.mat contains NaNs. >The input in both cases, besides the method chosen, is identical. > >Taking one step back in the processing pipeline, I am aware that a poor >segmentation outcome might be a/the cause of the warnings and eventual >errors when constructing a volume conduction model. But in general this >should hold equally for both methods. What I am wondering about is why one >method might deal more successfully than the other with the same input. > >Best, >Maris >-------------- next part -------------- From litvak.vladimir at gmail.com Wed Nov 4 14:51:14 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Wed, 4 Nov 2015 13:51:14 +0000 Subject: [FieldTrip] bemcp vs dipoli In-Reply-To: References: Message-ID: Dear all, I have also looked at this in a different context and found that bemcp computation breaks down at distances smaller than mean triangle side length from the boundary (for meshes used in SPM that's about 6mm). So you can avoid numerical problems by making sure your sources are never closer than that to the inner skull boundary. This can be done with cfg.inwardshift (for grids) or cfg.moveinward (for meshes) arguments of ft_prepare_sourcemodel, In SPM12 this is done automatically for the forward models we generate. Best, Vladimir On Wed, Nov 4, 2015 at 1:36 PM, RICHARDS, JOHN wrote: > In addition to the answer given by Alexandre Gramfort. > > I have compared BEMCP, Dipoli, Sim-bio FEM, and spherical models. My > tests use an individual head model with that individuals data, and then > head models based on other participants, age-appropriate MRI templates, and > age-inappropriate MRI templates; with infants. The BEMCP is the > three-compartment model, the Dipoli is a four-compartment model, the Simbio > is a full segmented head model with 10 different materials, the spherical > is four spheres. > > 1—I sometimes have issues getting the forward model / source analysis with > BEMCP. It appears to have singularities on the borders of the compartments > and gives the same answer as you report. Or does not even compute. Using > the same (or similar) head model mesh with Dipole, it works. > > 2—I have been using the Dipoli with four compartments. I am comparing the > four methods with a set of empirical data and simulated data. I have found > that the dipole solutions on a single individual(s) for the BEMCP and the > spherical models are closer in solution, and the Dipoli and the SimBio-FEM > are closer in the solution. > > 3—I also have been using head models from different individuals to solve > the forward model for the EEG from a single individual, comparing the > solutions across head models. Both the SimBio-FEM and Dipoli show the > greatest change in solution across individuals with different head sizes or > ages (using age-appropriate and age-inappropriate heads), whereas the BEMCP > and spherical model show the least change. Interesting, the larger change > for the two models occurs because its theoretical fit when the head comes > from the individual is better than the fit when the head comes from an > inappropriate age, whereas the age-appropriate head model are not as > important for BEMCP and spherical models because they fit poorer. > > The results from 2 and 3 are being analyzed now, eventually will reach > publication. > > John > > > >------------------------------ > > > >Message: 4 > >Date: Wed, 4 Nov 2015 00:00:35 +0100 > >From: Maris Skujevskis > >To: fieldtrip at science.ru.nl > >Subject: [FieldTrip] bemcp vs dipoli > >Message-ID: > > dQimv7Q at mail.gmail.com> > >Content-Type: text/plain; charset="utf-8" > > > >Hi Fieldtrip users, > > > >When constructing a volume conduction model for EEG using the boundary > >element method (BEM), there are two methods available: 'dipoli' and > >'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), > >are there any differences that you know of/have experienced that make one > >method better (more reliable, more accurate, or anything else that makes > >you prefer one rather) than the other? > > > >For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During > >processing with 'bemcp' there is a "warning: Matrix is singular, close to > >singular or badly scaled. Results may be inaccurate. RCOND = NaN", with > the > >end result being that vol.mat contains NaNs. > >The input in both cases, besides the method chosen, is identical. > > > >Taking one step back in the processing pipeline, I am aware that a poor > >segmentation outcome might be a/the cause of the warnings and eventual > >errors when constructing a volume conduction model. But in general this > >should hold equally for both methods. What I am wondering about is why one > >method might deal more successfully than the other with the same input. > > > >Best, > >Maris > >-------------- next part -------------- > > _______________________________________________ > 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 inouereo0406 at gmail.com Thu Nov 5 00:15:50 2015 From: inouereo0406 at gmail.com (Reo Inoue) Date: Wed, 04 Nov 2015 23:15:50 +0000 Subject: [FieldTrip] How to obtain all trials data? Message-ID: <1446678950846-66347c9d-4c1fc339-4b7068ac@mixmax.com> Dear all, I use function; ft_sourceanalysis following. [source] = ft_sourceanalysis(cfg, timelock) And I want to obtain the all trials data, not average. But I could not understand why i obtain the average. My config is following. Are there any problems? cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' jackknife resampling of trials cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = ft_sourceanalysis(cfg,timelock); Thanks a lot in advance, All the best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Thu Nov 5 12:06:26 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Thu, 5 Nov 2015 11:06:26 +0000 Subject: [FieldTrip] How to obtain all trials data? Message-ID: Hello Reo, What was the format of the timelock data structure you supplied to ft_sourceanalysis()? i.e., when you called ft_timelockanalysis() to create the timelock structure earlier, did you also use cfg.keeptrials='yes' there? If not, then your timelock structure would be an average (rather than all trials), and thus the source data you get would also be averaged across trials. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 3 > Date: Wed, 04 Nov 2015 23:15:50 +0000 > From: Reo Inoue > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] How to obtain all trials data? > Message-ID: <1446678950846-66347c9d-4c1fc339-4b7068ac at mixmax.com> > Content-Type: text/plain; charset="us-ascii"; Format="flowed" > > Dear all, > > I use function; ft_sourceanalysis following. [source] = > ft_sourceanalysis(cfg, timelock) > And I want to obtain the all trials data, not average. But I could not > understand why i obtain the average. My config is following. Are there any > problems? > cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' > jackknife resampling of trials > cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials > cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials > cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of > original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with > volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure > with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = > ft_sourceanalysis(cfg,timelock); > > > Thanks a lot in advance, > All the best, > -------------- next part -------------- An HTML attachment was scrubbed... URL: From inouereo0406 at gmail.com Thu Nov 5 13:11:58 2015 From: inouereo0406 at gmail.com (Reo Inoue) Date: Thu, 05 Nov 2015 12:11:58 +0000 Subject: [FieldTrip] How to obtain all trials data? In-Reply-To: References: Message-ID: <1446725518503-9830d601-c4877279-85e07c59@mixmax.com> Dear all, Steve I use ft_timelockanalysis before ft_sourceanalysis. I also use cfg.keeptrials='yes' there. All the best 2015-11-05 20:06 GMT+09:00 Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk > : Hello Reo, What was the format of the timelock data structure you supplied to ft_sourceanalysis()? i.e., when you called ft_timelockanalysis() to create the timelock structure earlier, did you also use cfg.keeptrials='yes' there? If not, then your timelock structure would be an average (rather than all trials), and thus the source data you get would also be averaged across trials. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~ cpgl0080/ Message: 3 Date: Wed, 04 Nov 2015 23:15:50 +0000 From: Reo Inoue < inouereo0406 at gmail.com > To: fieldtrip at science.ru.nl Subject: [FieldTrip] How to obtain all trials data? Message-ID: < 1446678950846-66347c9d- 4c1fc339-4b7068ac at mixmax.com > Content-Type: text/plain; charset="us-ascii"; Format="flowed" Dear all, I use function; ft_sourceanalysis following. [source] = ft_sourceanalysis(cfg, timelock) And I want to obtain the all trials data, not average. But I could not understand why i obtain the average. My config is following. Are there any problems? cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' jackknife resampling of trials cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = ft_sourceanalysis(cfg, timelock); Thanks a lot in advance, All the best, ______________________________ _________________ 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 s.aurtenetxe at bcbl.eu Thu Nov 5 15:39:14 2015 From: s.aurtenetxe at bcbl.eu (Sara Aurtenetxe) Date: Thu, 5 Nov 2015 15:39:14 +0100 (CET) Subject: [FieldTrip] Combineplanars and timelockstatistics In-Reply-To: <5639DBC1.5070502@th-ht.de> References: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> <5639DBC1.5070502@th-ht.de> Message-ID: <1226445767.1122841.1446734354736.JavaMail.zimbra@bcbl.eu> Dear Thomas, Thanks a lot for your answer. It makes sense that the non-combined planars may not be ideally suited for sensor-level statistics if sources are not equally measured by the same planar gradiometers across participants. Similarly, I can see how dipoles with changing orientation could produce fields with opposite polarity, that is one with a negative peak and another one with a positive peak. In the non-combined case, these would cancel out to zero in the average, whereas in the combined case both components would sum up to a non-zero average. In fact, by doing some further research I found a relevant post by Eric Marris and Michael Wibral on this topic: http://mailman.science.ru.nl/pipermail/fieldtrip/2010-March/002668.html I now clearly see your point about the combined planar gradients providing a better basis for comparisons across participants, especially for the scenario where the dipole would be shifting its orientation or position relative to the helmet across participants. I also imagine that source analysis would provide important additional information here, as it would allow to test the hypothesis that the fields have similar sources across participants. The question that remains to me, however, is whether it is acceptable to ignore the shifts in the dipole orientation from a neurophysiological perspective. Is it legitimate to assume that although the dipoles presumably have the same source but different orientations, they reflect the same process if their orientations differ? Some biophysical insights on this would be very helpful I guess. Looking forward to receive further advice on this. Thanks! Sara Sara Aurtenetxe ----- Original Message ----- From: "Thomas Hartmann" To: fieldtrip at science.ru.nl Sent: Wednesday, November 4, 2015 11:19:45 AM Subject: Re: [FieldTrip] Combineplanars and timelockstatistics dear sara, Am 2015-11-04 um 09:51 schrieb Sara Aurtenetxe: > When doing timelockstatistics (ERFs) at the gradiometers level: > > - Do the gradiometers need to be combined (ft_combineplanar) before the stats? > And/or do they need to be combined for visualization of effects? > > - Which is the (mathematical) explanation for the answer/s? let me answer both questions at the same time: the two planar gradiometers that make up the set of two that you find at each sensor location point into orthogonal directions. you can imagine one pointing along the x-axis, the other pointing along the y-axis of a 2d coordinate system. so, the gradiometer pointing along the x-axis would pick up 100% percent of an activity that increases or decreases in that direction. if the activity increases or decreases along the y-axis, the x-axis gradiometer would not pick up anything. instead, the other gradiometer would pick up the whole energy. if there is activity that increases or decreases in an angle 45° to both gradiometers, both would pick up half the energy. this works accordingly for any orientation of the underlying source. i.e. the two gradiometers pick up the x and the y part of the signal. this means, that the activity at the x-gradiometer is meaningless without the activity at the y-gradiometer. and as the orientations of the respective gradiometers with respect to the head are arbitrary, it does not make sense to compare, let's say the x-gradiometer at one spot with the x-gradiometer at another one. mathematically speaking: instead of looking at the coordinates of your vector, you want the length of it. so, in order to get that, you need to do: sqrt(x^2 + y^2). so, long story short: yes, you need to to ft_combineplanar before sensor level stats. > - Does apply the same when doing source analysis with 'lcmv'? no, this is a different story. it is quite the opposite: the activity at a voxel (or grid point) is the linear combination (i.e. a weighed sum) of the activity at all the sensors. the weighing coefficients are what you calculate when you first do your forward and the then the inverse model (e.g., bem modelling as forward model, LCMV for the inverse solution). the forward modelling takes into account the orientation of the sensors and also knows, where the head is, i.e. how the brain is oriented with respect to the sensor. so, no need to do ft_combineplanar here. best, thomas > > Thanks a lot in advance, > All the best, > > Sara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email:thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From behzadiravani at gmail.com Thu Nov 5 19:18:07 2015 From: behzadiravani at gmail.com (Behzad Iravani) Date: Thu, 5 Nov 2015 19:18:07 +0100 Subject: [FieldTrip] statistical test Message-ID: Hi Fieldtrip users, I'm interested in doing statistical test on the source analysis output. I have used common filter beamforming and I ended up with source structure which doesn't contain avg field and instead has the the information for every trials. I could mange to do descriptive analysis and plot source. But I'm interested to do statistic on it and plot t-map of source. ft_sourcestatistics doesn't work properly. I would be grateful if anyone can help. Best Behzad -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Thu Nov 5 20:58:26 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Thu, 5 Nov 2015 14:58:26 -0500 Subject: [FieldTrip] disconnected cluster Message-ID: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible).[image: Inline image 3] I've inspected my channel layout and that looks good: [image: Inline image 4] I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): [image: Inline image 5] Looking into the disconnected channel F5, the neighborhood structure seems in order: *cfg.neighbours(15)* ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls *cfg.connectivity = channelconnectivity(cfg);* Stepping into this function, on line 20 it says: *chans=cfg.channel;* Checking what this variable contains, it has all my channels in *alphabetical order*, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighboorhood.jpg Type: image/jpeg Size: 26681 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2D_layout.jpg Type: image/jpeg Size: 37822 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cluster.jpg Type: image/jpeg Size: 53401 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Nov 6 07:34:32 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 6 Nov 2015 06:34:32 +0000 Subject: [FieldTrip] disconnected cluster In-Reply-To: References: Message-ID: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Hi Roy, The inadvertent alphabetization of channels should not occur. This issue has popped up in the past on several occasions (and on several locations in the code) and it has been a really tricky issue to deal with once and for all. Thanks for all the detective work so far. From what you write, it seems that the cfg.channel that goes into channelconnectivity is already in alphabetical order. Would it be possible to track down where this happens? Do you explicitly add the alphabetical list to cfg.channel in your call to ft_timelockanalysis? Does the problem persist if you define cfg.channel = data.label, i.e. the list in the order as it occurs in the data. (I would assume that the order of the channels is the same across all input data structures). Best, Jan-Mathijs On Nov 5, 2015, at 8:58 PM, Roy Cox > wrote: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible). I've inspected my channel layout and that looks good: <2D_layout.jpg> I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): Looking into the disconnected channel F5, the neighborhood structure seems in order: cfg.neighbours(15) ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls cfg.connectivity = channelconnectivity(cfg); Stepping into this function, on line 20 it says: chans=cfg.channel; Checking what this variable contains, it has all my channels in alphabetical order, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy _______________________________________________ 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 bmaniscalco at gmail.com Fri Nov 6 17:03:10 2015 From: bmaniscalco at gmail.com (Brian Maniscalco) Date: Fri, 6 Nov 2015 11:03:10 -0500 Subject: [FieldTrip] Smoothing results of ft_sourceanalysis for a cortical sheet Message-ID: Hi all, The minimum norm estimate tutorial http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate describes how to do minimum norm estimation where the source space is a cortical sheet and the activations on the sheet are produced by ft_sourceanalysis. Is there a way in Fieldtrip to conduct smoothing on the output of ft_sourceanalysis for the activations on the cortical sheet? thanks, Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Nov 8 05:21:49 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sat, 7 Nov 2015 20:21:49 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: Message-ID: Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables ? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : > Dear participants in the discussion on behavioural-power correlation, > > My name is Eric Maris and have contributed most of the older statfuns (but > not ft_statfun_correlationT). Together with Arjen, I will try to resolve > some of the issues that have been discussed. Give us some time, and we will > return to you via the Discussion List. > > best, > Eric > > > _______________________________________________ > 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 ls514 at cam.ac.uk Mon Nov 9 16:30:15 2015 From: ls514 at cam.ac.uk (Li Su) Date: Mon, 9 Nov 2015 15:30:15 +0000 Subject: [FieldTrip] Funded PhD Studentship in Cambridge Message-ID: <010C1775-9D09-4E04-B358-D7CF331DCC52@cam.ac.uk> PhD Studentship: Magnetoencephalography (MEG) Imaging in Dementia with Lewy Bodies Department of Psychiatry, University of Cambridge The Department of Psychiatry, University of Cambridge, is pleased to announce one PhD Studentship supported by The Lewy Body Society, to start in October 2016. Applications are welcome. The PhD project will focus on understanding the underlying neurobiological processes in Dementia with Lewy Bodies using Magnetetoencephalography (MEG) and MRI, and will be carried out under the supervision of Dr Li Su and Professor John O’Brien. The successful student will join our team at Department of Psychiatry, School of Clinical Medicine, located at the Cambridge Biomedical Campus on the Addenbrooke’s site. The Department has an outstanding international reputation and expertise in undertaking clinical and neuroimaging studies of neurological and psychiatric diseases, including dementia, and collaborates closely with the University departments of radiology, clinical neuroscience and Wolfson Brain Imaging Centre. The University of Cambridge is consistently ranked among the top universities in the world. The MEG scanner is hosted at the highly renowned MRC Cognition and Brain Sciences Unit (MRC CBSU), one of the only 9 MEG research facilities in the UK. The Department welcomes applications with a good degree in experimental psychology, medicine, neuroscience, statistics, physics, computer science or a related scientific discipline. The successful applicant will have some experience of, or good understanding of the issues involved in, conducting neuroimaging research on clinical populations. Excellent communication and organisational skills are essential. Due to the nature of the project, strong competence in quantitative methods and analytical skills is also essential. Programming skills in Matlab or similar languages would be desirable. Applicants for the Studentship should have, or expect to gain a 1st class or 2.1 class Honours degree in an appropriate subject, and may also have completed further research training or a Masters degree. The stipend will be paid at Research Councils UK rates for the 3 year duration of the award with no fourth year. Only the fees for home/EU students will be met in full. In addition, the Studentship includes funding for MEG scanning costs of the research, and costs for travel to scientific conferences. To apply, please email the following documents to the Education Administrator (Sarah Rowe) email: sr724 at medschl.cam.ac.uk: i) An academic CV (maximum 2 pages) ii) Two official academic references (please ask your referees to send these directly to the Education Administrator) iii) A research proposal within the remit of MEG imaging in DLB (maximum 1000 words, excluding bibliography or figures) iv) A cover letter indicating: o a brief summary of your research interests and any completed research conducted; o a clear summary of your analytical skills and levels; o a clear statement of your eligibility for this funding award (see below). Applications must be received by midnight on 6th Dec 2015. Interviews are likely to be held on 16th Dec 2015. Enquiries regarding the administration of the application process, or potential supervisors, should be directed via email to the Education Administrator, Sarah Rowe, email:sr724 at medschl.cam.ac.uk tel: + 44 (0) 1223 746 105. FURTHER INFORMATION Applicants should note the following before submitting their application: 1. Applicants should contact Dr Li Su (email ls514 at cam.ac.uk) for further information about the studies programme and supervisory possibilities. General information about these is available via the Department of Psychiatry’s website at www.psychiatry.cam.ac.uk/ or via the Cambridge Neuroscience website at www.neuroscience.cam.ac.uk/ or via the clinical school website at www.medschl.cam.ac.uk/research/Themes/neuro.html. 2. Full awards (fees plus maintenance stipend) are open to UK and EU nationals. 3. For full minimum entry requirements, including fluency in English language please refer to the Departmental website. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahjoory86 at gmail.com Mon Nov 9 16:46:24 2015 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Mon, 9 Nov 2015 16:46:24 +0100 Subject: [FieldTrip] Templates for Cortical mesh and Head model Message-ID: Dear Fieldtrip experts, I want to estimate sources restricted on cortex using a template head model and cortical mesh. the available options I could find in fieldtrip are: - template for headmodel: standard_bem - template for cortical mesh: http://www.fieldtriptoolbox.org/template/sourcemodel As far as I see (please correct me if I am wrong): - Both templates for volume conduction model and cortical mesh are based on Colin27. - cortical mesh looks like a White matter surface. I wonder whether: 1- Fieldtrip estimates sources on white matter surface? 2- Isn't there any ICBM based template for Fieldtrip? Many thanks in advance, Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Tue Nov 10 01:52:22 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Mon, 9 Nov 2015 19:52:22 -0500 Subject: [FieldTrip] disconnected cluster In-Reply-To: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> References: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Message-ID: Hi Jan-Matthijs, It was quite a quest, but I think/hope I've located the problem. I was typing this email as I was troubleshooting, so skip to *3)* to get to the point: I've tried setting both cfg.channel = 'all' and cfg.channel = cfg.label before calling ft_timelock_statistics. It makes no difference. *1) ft_timelock_statistics* I think the problem occurs at an earlier stage than what I thought at first, namely on line 105 of this function: *[varargin{:}] = ft_selectdata(tmpcfg, varargin{:});* After this, the varargin array of structures has the alphabetical channel order (while the input tmpcfg.channel was still good): *varargin{1}.cfg.channel* ans = 'Af3' 'Af4' 'Af7' etc Then after the next line *[cfg, varargin{:}] = rollback_provenance(cfg, varargin{:});* cfg now also contains these channel orders. *2) ft_selectdata* on line 264 the contents of cfg.channel is changed from whatever was put in there (either the cfg.label order or 'all') *if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end* this jumps to subfunction get_selection on line 619: *3) ft_get_selection* line 630 then correctly selects the requested channels from the label list in varargin{k}.labels *selchannel = ft_channelselection(cfg.channel, varargin{k}.label);* selchannel still has the correct order of channels, but then line 631 calls "union" which puts things in alphabetical order: *label = union(label, selchannel);* 637 finds the correspondences between the two lists: *[ix, iy] = match_str(label, varargin{k}.label);* then there is a loop from 653-660 that does some more reordering/matching that I don't follow, *but ultimately, on 677, the alphabetical list of channels is assigned to cfg.channel:* *cfg.channel = label;* I believe this is where the error stems from, because the variable "label" has not had its alphabetical order changed since calling "union" on 631. Hope this helps, Roy On Fri, Nov 6, 2015 at 1:34 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Roy, > > The inadvertent alphabetization of channels should not occur. This issue > has popped up in the past on several occasions (and on several locations in > the code) and it has been a really tricky issue to deal with once and for > all. Thanks for all the detective work so far. From what you write, it > seems that the cfg.channel that goes into channelconnectivity is already in > alphabetical order. Would it be possible to track down where this happens? > Do you explicitly add the alphabetical list to cfg.channel in your call to > ft_timelockanalysis? Does the problem persist if you define cfg.channel = > data.label, i.e. the list in the order as it occurs in the data. (I would > assume that the order of the channels is the same across all input data > structures). > > Best, > Jan-Mathijs > > On Nov 5, 2015, at 8:58 PM, Roy Cox wrote: > > hi all, > > I'm worried that something is not quite right with how the channel > neighborhood configuration is used in the formation of spatial clusters. > > I first noticed it when I got a significant cluster like below. Plotted > are t statistics for a between-group comparison, with the significant > "cluster" indicated with white electrodes. Notice F5 and P8 here which are > disconnected from the rest. I should also mention that I have only one > "time point" (and no frequencies), so it's not possible that these channels > are somehow connected via a "time bridge" (if that would even be possible). > > > I've inspected my channel layout and that looks good: > > <2D_layout.jpg> > I've looked at my neighborhood plot and that looks good too, although I > notice that frontal channels are plotted to the right here (not sure if > that's simply by default): > > > > Looking into the disconnected channel F5, the neighborhood structure seems > in order: > > *cfg.neighbours(15)* > > ans = > > label: 'F5' > neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} > > > I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, > which, on line 165 calls > > *cfg.connectivity = channelconnectivity(cfg);* > > Stepping into this function, on line 20 it says: > > *chans=cfg.channel;* > > Checking what this variable contains, it has all my channels in *alphabetical > order*, but my electrode location order is most definitely not. I've > tried to force the orders to be the same by setting cfg.channel = cfg.label > before calling ft_timelockstatistics, but somewhere down the line my > channel order is made alphabetical again. > > So I suspect that the neighborhood structure, reflecting my actual channel > order, is applied to the alphabetical channel order. That would explain why > a cluster could be scattered across the brain (and also why there's still > some spatial continuity given that alphabetically close channels are > usually close together in space). > > Has anyone ever seen this? Any suggestions how to solve this (other than > making my entire channel location file alphabetical)? I'm also posting this > because it may be of relevance to others. > > Roy > > > _______________________________________________ > 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 jan.schoffelen at donders.ru.nl Tue Nov 10 10:58:02 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Nov 2015 09:58:02 +0000 Subject: [FieldTrip] PhD-position available at the Donders Centre for Cognitive Neuroimaging References: Message-ID: Dear colleagues, I would like to announce an open PhD-position in my team at the Donders Centre for Cognitive Neuroimaging, Nijmegen, NL. Follow the link below for more information. Please feel free to spread the news among interested colleagues. http://www.ru.nl/overons/werken-radboud/details/details_vacature_0/?recid=564499 Thanks, and with best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.fieldtriptoolbox.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 10 11:12:26 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Nov 2015 10:12:26 +0000 Subject: [FieldTrip] disconnected cluster In-Reply-To: References: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Message-ID: <9BCE6FEF-A7D0-44F1-A000-02256D7E7681@fcdonders.ru.nl> Hi Roy, Thanks for looking into it in such detail. I can however not reproduce your problem. Can you update to a more recent version of FieldTrip and try whether it persists? Given the line numbers in ft_selectdata that you mention, it seems that you are using somewhat older code. Best, Jan-Mathijs On Nov 10, 2015, at 1:52 AM, Roy Cox > wrote: Hi Jan-Matthijs, It was quite a quest, but I think/hope I've located the problem. I was typing this email as I was troubleshooting, so skip to 3) to get to the point: I've tried setting both cfg.channel = 'all' and cfg.channel = cfg.label before calling ft_timelock_statistics. It makes no difference. 1) ft_timelock_statistics I think the problem occurs at an earlier stage than what I thought at first, namely on line 105 of this function: [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); After this, the varargin array of structures has the alphabetical channel order (while the input tmpcfg.channel was still good): varargin{1}.cfg.channel ans = 'Af3' 'Af4' 'Af7' etc Then after the next line [cfg, varargin{:}] = rollback_provenance(cfg, varargin{:}); cfg now also contains these channel orders. 2) ft_selectdata on line 264 the contents of cfg.channel is changed from whatever was put in there (either the cfg.label order or 'all') if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end this jumps to subfunction get_selection on line 619: 3) ft_get_selection line 630 then correctly selects the requested channels from the label list in varargin{k}.labels selchannel = ft_channelselection(cfg.channel, varargin{k}.label); selchannel still has the correct order of channels, but then line 631 calls "union" which puts things in alphabetical order: label = union(label, selchannel); 637 finds the correspondences between the two lists: [ix, iy] = match_str(label, varargin{k}.label); then there is a loop from 653-660 that does some more reordering/matching that I don't follow, but ultimately, on 677, the alphabetical list of channels is assigned to cfg.channel: cfg.channel = label; I believe this is where the error stems from, because the variable "label" has not had its alphabetical order changed since calling "union" on 631. Hope this helps, Roy On Fri, Nov 6, 2015 at 1:34 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Roy, The inadvertent alphabetization of channels should not occur. This issue has popped up in the past on several occasions (and on several locations in the code) and it has been a really tricky issue to deal with once and for all. Thanks for all the detective work so far. From what you write, it seems that the cfg.channel that goes into channelconnectivity is already in alphabetical order. Would it be possible to track down where this happens? Do you explicitly add the alphabetical list to cfg.channel in your call to ft_timelockanalysis? Does the problem persist if you define cfg.channel = data.label, i.e. the list in the order as it occurs in the data. (I would assume that the order of the channels is the same across all input data structures). Best, Jan-Mathijs On Nov 5, 2015, at 8:58 PM, Roy Cox > wrote: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible). I've inspected my channel layout and that looks good: <2D_layout.jpg> I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): Looking into the disconnected channel F5, the neighborhood structure seems in order: cfg.neighbours(15) ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls cfg.connectivity = channelconnectivity(cfg); Stepping into this function, on line 20 it says: chans=cfg.channel; Checking what this variable contains, it has all my channels in alphabetical order, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga.v.sysoeva at gmail.com Wed Nov 11 13:14:13 2015 From: olga.v.sysoeva at gmail.com (Olga Sysoeva) Date: Wed, 11 Nov 2015 15:14:13 +0300 Subject: [FieldTrip] Inter-trial coherence/PLF in source space Message-ID: Dear filedtripper, That was quite a while I follow your activity. But now I am back to active analysis and stucked... I'd like to calculate ITC/PLF in a source space similar to described - T. Bardouille , ,B. Ross, 2008 paper. I have 40Hz-auditory steady state response from 306 neuromag system. I figured out how to calculate ITC on sensor space from complex FFT coeficients obtained by ft_freqanalysis. As a next step I need to do this in source space. My vision that I can use complex FFT coeficients, obtained in sensor space but "project" them to source space by multiplying with weigted matrix. In the above mentioned paper they applied the LCMV beamformer to determine the weighting function, *w**jm*, that estimates the source activity across the steady-state time interval in the frequency band of interest. How can I do this? I tried to do it using ft_sourceanalysis but get lost. If I specified lcmv method and feed it with average timelocked data as in the example cfg = []; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = test_vol; cfg.lcmv.keepfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, test_data_LEar_avg); or for a frequency decomposed data using disc cfg = []; cfg.method = 'dics'; cfg.frequency = 40; cfg.grid = grid; cfg.vol = test_vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, test_freq_LEar); As output I get in the sourceAll.avg.filter some weigth matrix (although I am not fully sure if that is what I need). Unfortunately, I did not find the way (filtrip function) to apply this filter/weigths to itc or complex FFT coeficients. Should I write my our code for this? Which way is better: multiply it to itc or first to complex fft and than calculate itc? Which matrix to use (from disc or lcmv)? Is my way of thinking makes sense or am I completely lost? I would be really thankfull for any help. Best Regards, Olga Sysoeva, PhD, Senior Researcher, MEG-center, Moscow. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kkalimeri at gmail.com Wed Nov 11 19:37:17 2015 From: kkalimeri at gmail.com (Kyriaki Kalimeri) Date: Wed, 11 Nov 2015 18:37:17 +0000 Subject: [FieldTrip] New Postdoctoral Opportunity in Turin Message-ID: <5105449d6dff4b6896df6c5ef8fec28f@EXPRD01.hosting.ru.nl> [Apologies if you receive multiple copies of this message] Job Description Institute for Scientific Interchange(ISI) (http://www.isi.it) is seeking to appoint a highly motivated Postdoctoral Assistant to undertake research activities related to signal processing and machine learning for the understanding of human behavior through biosignals (EEG, EDA, etc.) within the scopes of the Horizon2020-funded project Sound Of Vision. Sound of Vision (Natural sense of vision through acoustics and haptics) (http://www.soundofvision.net) is a highly multidisciplinary project that designs, implements and validates an original non-invasive, wearable hardware and software system to assist visually impaired people by creating and conveying an auditory representation of the surrounding environment, helping them to both perceive and navigate in any kind of environment (indoor/outdoor). ISI is responsible for conducting usability studies to validate the functionalities of the prototype and access the users' experience. Specifically you will: * Design and conduct usability studies combining behavioural, neuroscientific and psychophysiological methods. * Assess the cognitive load and emotional states of the participants while using the system, employing multimodal data fusion and machine learning techniques; * Carry out innovative, impactful research in the areas of: Behavioral Understanding, Machine Learning and Human Computer Interaction; * Produce high quality scientific and technical outputs including journal articles, conference papers and presentations, patents and technical reports. Core skills you will need for this position: Ph.D in Computer Science, Computer Engineering, Machine Learning, Bioinformatics, Statistics or a related quantitative field. * Applicants should have an established publication record in the fields of signal processing and machine learning. * Have strong programming skills in at least one of the following languages Matlab, Python or Java. * Solid knowledge of statistics and hypothesis testing. * Experience with EEG and EDA signal processing as well as usability experimental design will be highly appreciated. * Experience with mobile application development is considered a plus. * Fluency in English both spoken and written. ISI offers: We provide an unusually rich opportunity for collegial interaction in a highly competitive environment. Mentoring will be provided by a multidisciplinary faculty team including co-investigators on the project and collaborators from neurology, engineering and psychology. We provide a competitive salary according to the qualifications and medical and pension benefits according to the Italian State. Applications received before the February 1st 2016 will be given priority, but the position will remain open until filled. The successful applicant is expected to start the appointment approximately on April 2016. The appointment is until January 2018. To apply, please send your cover letter, curriculum vitae and professional reference list to the PI of the project Dr. Kyriaki Kalimeri >. For any further information, please refer to Dr. Kyriaki Kalimeri or Dr. Charalampos Saitis >. ISI is an equal opportunity employer and does not discriminate on the basis of race, color, national origin, gender, sexual orientation, age, religion or disability. -- Kyriaki Kalimeri, Ph.D. Electronic & Computer Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From Farzaneh.Ahmadi at westernsydney.edu.au Wed Nov 11 21:24:26 2015 From: Farzaneh.Ahmadi at westernsydney.edu.au (Farzaneh Ahmadi) Date: Wed, 11 Nov 2015 20:24:26 +0000 Subject: [FieldTrip] Linking fieldtrip to simulink In-Reply-To: References: Message-ID: Dear Fieldtrippers Greetings from Sydney! I am new to field trip so please pardon my question if being basic. I have been trying to hook up field trip buffer directly to Simulink but so far I had no luck. So question 1. Has anyone successfully used the buffer with Simulink (TCP send/receive blocks)? I mean to run the buffer as a standalone executable and use Simulink TCP (Send/receive) blocks to directly connect to the buffer. If the answer to Q1 is no, then here is the details of the problem I have and wish to have your input. I have MATLAB 2014b and have Instrument control Toolbox-2 on Simulink (with the usual TCP/Send/Receive blocks). When the buffer is running as an standalone executable, Simulink can detect the connection but can not receive any streamed data. I suspect it is either a data format problem or a header problem. In my test bench I have used the standalone implementations of the buffer located here /fieldtrip-20151020/realtime/bin/ARCH (my ARCH is maci) Then I used a sine wave generator (sin2ft) from the same folder. I fed the sine wave from sin2ft to TCP port 1972 on the buffer. Then I use Simulink to read the data from the same port on the buffer. The output from the sin2ft is a float32 so I set the data type of my TCP receive block in simulink (The block is called Query instrument) to float32. The sample rate and block size match, but I get no data streams. I have worked around this by using the python implementations of fieldtrip. fieldtrip-20151020/realtime/src/buffer/python I use the field trip read python command to read the data from the buffer, discard the header and push the data myself as a float32 using sockets in python to a second TPC port. This way Simulink can receive the data I recive from the buffer and resend myslef in python to the second tcp port. I use the same block set above). Any ideas? Cheers Fary Ahmadi Researcher from MARCS institute Western Sydney uni > From joramvandriel at gmail.com Thu Nov 12 11:15:04 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Thu, 12 Nov 2015 11:15:04 +0100 Subject: [FieldTrip] source statistics on atlas-based ROIs Message-ID: Dear community, I am doing a source analysis on Neuromag data; I used the DICS beamformer to localize theta-band sources, and want to contrast two conditions of a Stroop task. I used subject-specific grids pre-warped to MNI space. Everything seems to work fine and I'm at the group level to do statistics. However, I have specific hypotheses about anatomical locations, so I'd like to do stats only within frontal cortex. I've searched around the tutorial web pages and the mailing list archive, and there should be an option for this in ft_sourcestatistics, via ft_read_atlas and ft_volumelookup. Currently, my code is: aal = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); % find frontal regions front_idx = strmatch('Front', aal.tissuelabel); cfg = []; cfg.inputcoord = 'mni'; cfg.atlas = aal; cfg.roi = aal.tissuelabel(front_idx); mask = ft_volumelookup(cfg, ICavg_int); ICavg_int.mask = mask; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'pow'; cfg.maskparameter = 'mask'; cfg.funcolormap = 'jet'; ft_sourceplot(cfg,ICavg_int); This gives me a source plot with only the frontal regions, the rest masked out; so the atlas lookup seems to work. Then for source stats, in addition to the design parameters (as in http://www.fieldtriptoolbox.org/example/source_statistics), I add: cfg.atlas = aal; cfg.roi = aal.tissuelabel(front_idx); cfg.inputcoord = 'mni'; Then I call: stat = ft_sourcestatistics(cfg, grandavgIC{:}, grandavgCG{:}); However, the results are exactly the same with or without the atlas info attached to the cfg; all voxels are analyzed, and the obtained cluster results are the same. So it looks like ft_sourcestatistics doesn't do anything with the atlas info. In the help of ft_sourcestatistics, it says: % FIXME the following needs to be reimplemented % % You can restrict the statistical analysis to regions of interest (ROIs) % or to the average value inside ROIs using the following options: % cfg.atlas = filename of the atlas % cfg.roi = string or cell of strings, region(s) of interest from anatomical atlas % cfg.avgoverroi = 'yes' or 'no' (default = 'no') % cfg.hemisphere = 'left', 'right', 'both', 'combined', specifying this is % required when averaging over regions % cfg.inputcoord = 'mni' or 'tal', the coordinate system in which your source % reconstruction is expressed Does this mean this functionality doesn't work (yet)? Will it in the (near) future, and is there a workaround? Of note, I just updated to the newest fieldtrip version. Thanks in advance for any thoughts or suggestions, - Joram -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Thu Nov 12 16:24:54 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 10:24:54 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: Message-ID: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ 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 stephen.whitmarsh at ki.se Thu Nov 12 16:42:59 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Thu, 12 Nov 2015 15:42:59 +0000 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else... Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk > 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) >: Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Nov 12 17:32:54 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 12 Nov 2015 08:32:54 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : > Dear Xiaoming, > > It is working for me, using it in sourcestatistics. Have you checked your > design is really only one row? I can’t think of anything else… > > Cheers, > > S > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Xiaoming Du > *Sent:* 12 November 2015 16:25 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation -- > follow-up questions > > > > Dear Arjen, > > > > Thanks for the updates. > > > > I was trying to run the following code on Fieldtrip website ( > http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables > ) > > > > % compute statistics with correlationT > cfg = []; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.method = 'montecarlo'; > cfg.numrandomization = 1000; > > n1 = 3; % n1 is the number of subjects > design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent > variable (behavioral data) in the cfg.design matrix, in this case reaction > times of 3 subjects. > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_freqstatistics(cfg, data_brain{:}); > > > > > > However, it gives me this error: > > Error using ft_statfun_correlationT (line 81) > uvar must be specified for dependent samples statistics > > > > Error in ft_statistics_montecarlo (line 276) > [statobs, cfg] = statfun(cfg, dat, design); > > > > Error in ft_freqstatistics (line 190) > [stat, cfg] = statmethod(cfg, dat, design); > > > > > > Could you provide a sample data_brain, so I can organize my data into same > format? Thanks! > > > > > > -Xiaoming > > > > > > > > >>> Arjen Stolk 11/7/2015 11:21 PM >>> > > Dear participants in the discussion on behavioural-power correlation, and > interested folks, > > > > Following recent discussion on this mailing list (thanks to Xiaoming Du > and Martin Krebber), we have updated ft_statfun_correlationT, a function > that can be used for correlating neural and behavioral variables. > > > > Following the update, the correlation values calculated on genuine data > have not changed. However, the permutation procedure for calculating the > randomization distribution has. Namely, prior to the update the permutation > procedure would randomly permute across both the independent (e.g., > behavior) and dependent variables (e.g., neural data). This procedure is > prone to systematic bias across the data belonging to these variables. And > conceptually, as outlined in a new wiki page (see below), the independent > and dependent variables should be statistically independent, meaning that > any association between these variables should be broken by randomly > permuting the values of the independent variable. > > > > > http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables > ? > > > > Those that have been using ft_statfun_correlationT for calculating a > randomization distribution using the permutation procedure are advised to > update to the latest fieldtrip version and re-calculate those > distributions. We are sorry for any inconvenience this may cause. > > > > On a related note, the functionality of ft_statfun_correlationT (under > Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make > the latter function, and others in the statfun suite, more accessible, we > would like to forward those interested to the above wiki page where an > overview is provided of the different approaches to correlating neural and > behavioral variables, with some example fieldtrip code. > > > > Yours, Arjen > > on behalf of Eric Maris and Egbert Hartstra > > > > 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : > > Dear participants in the discussion on behavioural-power correlation, > > My name is Eric Maris and have contributed most of the older statfuns (but > not ft_statfun_correlationT). Together with Arjen, I will try to resolve > some of the issues that have been discussed. Give us some time, and we will > return to you via the Discussion List. > > best, > Eric > > > > _______________________________________________ > 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 knorr at cbs.mpg.de Thu Nov 12 17:49:00 2015 From: knorr at cbs.mpg.de (Melanie Knorr) Date: Thu, 12 Nov 2015 17:49:00 +0100 Subject: [FieldTrip] help on ft_getopts mex file Message-ID: Dear all, unfortunately I can not use ft_getopts anymore. Matlab says: Invalid MEX-file '/home/raid2/knorr/Desktop/fieldtrip-20151111/fieldtrip-20151111/fileio/private/ft_getopt.mexa64': /home/raid2/knorr/Desktop/fieldtrip-20151111/fieldtrip-20151111/fileio/private/ft_getopt.mexa64: undefined symbol: mxErrMsgTxt I upgraded to the latest field trip version (20151111), however it still does not work. I work on matlab version 2015b on a linux machine. Can anyone help me? Thanks! Melanie -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Thu Nov 12 18:07:25 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 12:07:25 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: <564480FD020000DC00016A1A@MPRC.UMARYLAND.EDU> Thanks Stephen, Arjen. I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. Looking forward to your feedback! Best, Xiaoming >>> Arjen Stolk 11/12/2015 11:32 AM >>> Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can*t think of anything else* Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testdata.mat Type: application/octet-stream Size: 4117 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: errlog.txt URL: From a.stolk8 at gmail.com Thu Nov 12 18:14:59 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 12 Nov 2015 09:14:59 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Hey Xiaoming, Could you tell me which version of the function you're using? That info is specified at the bottom of the help. In my case it's % $Id: ft_statfun_correlationT.m 10837 2015-10-30 16:06:41Z arjsto $ Yours, Arjen 2015-11-12 9:07 GMT-08:00 Xiaoming Du : > Thanks Stephen, Arjen. > > I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. > > I attached the 'testdata.mat' which has cfg and data_brain. I also > attached the error message I got from Matlab command window. > > Looking forward to your feedback! > > Best, > Xiaoming > > >>> Arjen Stolk 11/12/2015 11:32 AM >>> > Hi Xiaoming, > > Sounds like you're using an older version of the function. Did you try > updating fieldtrip? > > Yours, > Arjen > > 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : > >> Dear Xiaoming, >> >> It is working for me, using it in sourcestatistics. Have you checked your >> design is really only one row? I can't think of anything else. >> >> Cheers, >> >> S >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Xiaoming Du >> *Sent:* 12 November 2015 16:25 >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation -- >> follow-up questions >> >> Dear Arjen, >> >> Thanks for the updates. >> >> I was trying to run the following code on Fieldtrip website ( >> http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables >> ) >> >> % compute statistics with correlationT >> cfg = []; >> cfg.statistic = 'ft_statfun_correlationT'; >> cfg.method = 'montecarlo'; >> cfg.numrandomization = 1000; >> >> n1 = 3; % n1 is the number of subjects >> design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable >> (behavioral data) in the cfg.design matrix, in this case reaction times of >> 3 subjects. >> >> cfg.design = design; >> cfg.ivar = 1; >> >> stat = ft_freqstatistics(cfg, data_brain{:}); >> >> However, it gives me this error: >> >> Error using ft_statfun_correlationT (line 81) >> uvar must be specified for dependent samples statistics >> >> Error in ft_statistics_montecarlo (line 276) >> [statobs, cfg] = statfun(cfg, dat, design); >> >> Error in ft_freqstatistics (line 190) >> [stat, cfg] = statmethod(cfg, dat, design); >> >> Could you provide a sample data_brain, so I can organize my data into >> same format? Thanks! >> >> -Xiaoming >> >> >> >> >>> Arjen Stolk 11/7/2015 11:21 PM >>> >> >> Dear participants in the discussion on behavioural-power correlation, and >> interested folks, >> >> Following recent discussion on this mailing list (thanks to Xiaoming Du >> and Martin Krebber), we have updated ft_statfun_correlationT, a function >> that can be used for correlating neural and behavioral variables. >> >> Following the update, the correlation values calculated on genuine data >> have not changed. However, the permutation procedure for calculating the >> randomization distribution has. Namely, prior to the update the permutation >> procedure would randomly permute across both the independent (e.g., >> behavior) and dependent variables (e.g., neural data). This procedure is >> prone to systematic bias across the data belonging to these variables. And >> conceptually, as outlined in a new wiki page (see below), the independent >> and dependent variables should be statistically independent, meaning that >> any association between these variables should be broken by randomly >> permuting the values of the independent variable. >> >> >> http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables >> ? >> >> Those that have been using ft_statfun_correlationT for calculating a >> randomization distribution using the permutation procedure are advised to >> update to the latest fieldtrip version and re-calculate those >> distributions. We are sorry for any inconvenience this may cause. >> >> On a related note, the functionality of ft_statfun_correlationT (under >> Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make >> the latter function, and others in the statfun suite, more accessible, we >> would like to forward those interested to the above wiki page where an >> overview is provided of the different approaches to correlating neural and >> behavioral variables, with some example fieldtrip code. >> >> Yours, Arjen >> >> on behalf of Eric Maris and Egbert Hartstra >> >> 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : >> >> Dear participants in the discussion on behavioural-power correlation, >> >> My name is Eric Maris and have contributed most of the older statfuns >> (but not ft_statfun_correlationT). Together with Arjen, I will try to >> resolve some of the issues that have been discussed. Give us some time, and >> we will return to you via the Discussion List. >> >> best, >> Eric >> >> >> >> _______________________________________________ >> 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 XDu at mprc.umaryland.edu Thu Nov 12 18:28:07 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 12:28:07 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: <564485D7020000DC00016A29@MPRC.UMARYLAND.EDU> I see. In my ft_statfun_correlationT.m file, It is % $Id: ft_statfun_correlationT.m 10042 2014-12-12 23:02:53Z arjsto $ . I installed fieldtrip using "fieldtrip-lite-20151111.zip". Are there newer version that we can download? Thanks. Xiaoming >>> Arjen Stolk 11/12/2015 12:14 PM >>> Hey Xiaoming, Could you tell me which version of the function you're using? That info is specified at the bottom of the help. In my case it's % $Id: ft_statfun_correlationT.m 10837 2015-10-30 16:06:41Z arjsto $ Yours, Arjen 2015-11-12 9:07 GMT-08:00 Xiaoming Du : Thanks Stephen, Arjen. I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. Looking forward to your feedback! Best, Xiaoming >>> Arjen Stolk 11/12/2015 11:32 AM >>> Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else. Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 09:41:46 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 08:41:46 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values Message-ID: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Nov 13 09:51:24 2015 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 13 Nov 2015 09:51:24 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: Message-ID: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From alexis.makin at liverpool.ac.uk Fri Nov 13 10:44:55 2015 From: alexis.makin at liverpool.ac.uk (alexis david james makin) Date: Fri, 13 Nov 2015 09:44:55 +0000 Subject: [FieldTrip] Matlab 2014b compatibility In-Reply-To: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: <587C548A-5DAA-45F6-ACDF-FFB0E332BB44@liverpool.ac.uk> Dear Field Trip Users, The Field Trip topoplot function ft_topoplotTFR(cfg, grandavg) used to work on Matlab 2011, but gives the following error message in Matlab 2014b: %%%%%%%%%% Error using sprintf Function is not defined for 'matlab.ui.Figure' inputs. Error in topoplot_common (line 862) set(gcf, 'Name', sprintf('%d: %s: %s', gcf, funcname, join_str(', ',dataname))); Error in ft_topoplotTFR (line 191) [cfg] = topoplot_common(cfg, varargin{:}); %%%%%%% This is arises change to the way Matlab does Figures I believe? Is the easiest thing to download the newer version of Fieldtrip? Thanks for any advice, Cheers Alexis Makin, University of Liverpool, Uk > On 13 Nov 2015, at 08:51, Julian Keil wrote: > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > >> Hi everybody, >> >> I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra >> (see the used options down below). >> While fieldtrip calculates the permutation test it throws the following information: >> >> "performing FDR correction for multiple comparisons >> the returned probabilities are uncorrected, the thresholded mask is corrected" >> >> Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I >> get my p-values corrected for multiple comparison? >> >> Does anyone has an idea? Thanks in advance! >> >> >> I used the following options: >> >> cfg = []; >> cfg.channel = 'all'; >> cfg.latency = [2.3 2.8]; >> cfg.avgoverchan = 'yes'; >> cfg.avgovertime = 'no'; >> cfg.frequency = [9 14]; >> cfg.parameter = 'powspctrm'; >> cfg.alpha = 0.05; >> cfg.tail = 0; >> cfg.correctm = 'fdr'; >> cfg.correcttail = 'prob'; >> cfg.ivar = 1; >> cfg.statistic = 'ft_statfun_indepsamplesT'; >> cfg.method = 'montecarlo'; >> cfg.design = design; % defined in at the beginning of the function >> cfg.numrandomization = 1000; >> >> stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) >> _______________________________________________ >> 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 16:41:47 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 15:41:47 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 julian.keil at gmail.com Fri Nov 13 16:59:50 2015 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 13 Nov 2015 16:59:50 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Iris, maybe I completely miss your point, could you describe what you want to do with your p-values? Please keep in mind, that a correction for multiple comparisons does not change your p-values, it changes the threshold after which a p-value is significant. Think about the very simple Bonferroni-correction: If you have 5 tests, you set your significance-level to 0.05/5 = 0.01, then compute your 5 t-tests and see which p-value is below 0.01 (instead of below 0.05). This does not affect the t-tests, or the p-value or t-value of the tests themselves, but only the level you consider significant. tl;dr: You don't correct your p-values, you correct the level after which you consider them significant. Hope this helps Julian Am 13.11.2015 um 16:41 schrieb Steinmann, Iris: > Hi Julian, > > Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? > > Best wishes! > Iris > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil > Sent: Freitag, 13. November 2015 09:51 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > > > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From mail at philipp-ruhnau.de Fri Nov 13 17:29:28 2015 From: mail at philipp-ruhnau.de (Philipp Ruhnau) Date: Fri, 13 Nov 2015 17:29:28 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hey Iris, you could use matlabs inbuilt function (mafdr) to produce corrected p-values, then again if you just want to check your outcome with a higher threshold you might as well feed that into the fieldtrip statistics function with cfg.alpha It is possible to estimate corrected p-values by hand, the logic being the following as in Julian’s example for 5 tests bonferroni adjustment is alpha_level/5. but you could also multiply your p-value with 5 and keep the original threshold. similarly for a simple Benjamini-Hochberg fdr if you have a vector with p-values (original_pvals) you do pvals = sort(original_pvals); % sort % correct p-vals by hand n = numel(pvals); cor_pvals = pvals .* (n./(1:n)); so following the fdr logic you correct each p-val by its own factor. but note that this is not the fdr correction that is implemented in fieldtrip (see fieldtrips fdr.m for the reference) and that some p-values now can exceed 1… Also I think Arnaud Delorme’s fdr function in eeglab had the option to estimate corrected p-values (but I haven’t checked for quite a while) but yeah, I’m with Julian on this one. as the t-value doesn’t change it certainly makes more sense to quote fdr-corrected p < 0.05 then an exact but corrected p-value hope this helps philipp > On 13 Nov 2015, at 16:41, Steinmann, Iris wrote: > > Hi Julian, > > Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? > > Best wishes! > Iris > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil > Sent: Freitag, 13. November 2015 09:51 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > > > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 17:34:50 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 16:34:50 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hey Julian, thanks, you are right! I thought instead of correcting the threshold on which I consider significance, it would be possible to fix the threshold at 0.05 and adapt the p-values. Maybe that's really not possible... so, thanks for your comprehensive explanation. I will go with your first advice and multiply the p-values with the mask. Thanks a lot and have a nice weekend! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 17:00 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, maybe I completely miss your point, could you describe what you want to do with your p-values? Please keep in mind, that a correction for multiple comparisons does not change your p-values, it changes the threshold after which a p-value is significant. Think about the very simple Bonferroni-correction: If you have 5 tests, you set your significance-level to 0.05/5 = 0.01, then compute your 5 t-tests and see which p-value is below 0.01 (instead of below 0.05). This does not affect the t-tests, or the p-value or t-value of the tests themselves, but only the level you consider significant. tl;dr: You don't correct your p-values, you correct the level after which you consider them significant. Hope this helps Julian Am 13.11.2015 um 16:41 schrieb Steinmann, Iris: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 helen.wieffering at gmail.com Fri Nov 13 22:56:33 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Fri, 13 Nov 2015 16:56:33 -0500 Subject: [FieldTrip] NaN Values in Granger Causality Message-ID: Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that our output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform wavelet analysiscfg = [];cfg.method = 'wavelet';cfg.channelcmb = {'all' 'all'};cfg.channel = {'source01' 'source01'};cfg.fsample = 250;cfg.output = 'powandcsd';cfg.tapsmofrq = 2;cfg.foi = 0:1:8; cfg.toi = -0.5:0.004:1.5; freq = ft_freqanalysis(cfg, data);* Note: I've checked the values in freq.powspctrm, and though there are NaNs there is real data, too. *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* However, this plot is a blank no matter which values I seem to choose as a zlim. Any insight is much appreciated - thanks! Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Sun Nov 15 02:07:30 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Sun, 15 Nov 2015 01:07:30 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation tests Message-ID: Hi all, I am writing up results for cluster based permutation tests that I ran on masked priming meg data. I have to admit I am not entirely sure the exact form for reporting the stats on these. For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: prob: 0.0420 clusterstat: 1.2443e+04 stddev: 0.0063 cirange: 0.0124 Has anyone else completed and rerooted on results, having used cluster based permutation tests? Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? Thanks, K PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Sun Nov 15 12:15:48 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Sun, 15 Nov 2015 11:15:48 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation Message-ID: Hello Kaelasha, There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper: https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study . I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper: http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ Message: 1 > Date: Sun, 15 Nov 2015 01:07:30 +0000 > From: Kaelasha Tyler > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] statistical reporting cluster based permutation > tests > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am writing up results for cluster based permutation tests that I ran on > masked priming meg data. > > I have to admit I am not entirely sure the exact form for reporting the > stats on these. > > For example, when comparing two conditions, with n=20, I have one > significant positive cluster over left frontal and parietal areas. The > stats for this cluster read: > > prob: 0.0420 > clusterstat: 1.2443e+04 > stddev: 0.0063 > cirange: 0.0124 > > Has anyone else completed and rerooted on results, having used cluster > based permutation tests? > Mean values don't seem to be appropriate here, so would it simply be the p > value and standard deviation for the significant clusters that would be > reported on? > > Thanks, > K > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Mon Nov 16 04:39:28 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 16 Nov 2015 03:39:28 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation In-Reply-To: References: Message-ID: Thanks Steve, Very clear. K. PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Stephen Politzer-Ahles [stephen.politzer-ahles at ling-phil.ox.ac.uk] Sent: Sunday, 15 November 2015 10:15 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] statistical reporting cluster based permutation Hello Kaelasha, There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper: https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study. I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper: http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ Message: 1 Date: Sun, 15 Nov 2015 01:07:30 +0000 From: Kaelasha Tyler > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] statistical reporting cluster based permutation tests Message-ID: > Content-Type: text/plain; charset="iso-8859-1" Hi all, I am writing up results for cluster based permutation tests that I ran on masked priming meg data. I have to admit I am not entirely sure the exact form for reporting the stats on these. For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: prob: 0.0420 clusterstat: 1.2443e+04 stddev: 0.0063 cirange: 0.0124 Has anyone else completed and rerooted on results, having used cluster based permutation tests? Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? Thanks, K PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Mon Nov 16 07:06:28 2015 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Sun, 15 Nov 2015 22:06:28 -0800 Subject: [FieldTrip] statistical reporting cluster based permutation In-Reply-To: References: Message-ID: <770EEBFF-7AF3-4F0C-A661-7228B527CC8A@cerco.ups-tlse.fr> Dear Katia, I would mention that the statistics were corrected for multiple comparisons using the cluster methods. You may report the p-value for stats and the actual difference in terms of values between the conditions for effect size. Best, Arno -- Arnaud Delorme, PhD Centre de Recherche Cerveau et Cognition - UMR 5549 Pavillon Baudot, Hopital Purpan, BP 25202 31052 Toulouse Cedex 3, France > On Nov 15, 2015, at 7:39 PM, Kaelasha Tyler wrote: > > Thanks Steve, > > Very clear. > K. > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl ] on behalf of Stephen Politzer-Ahles [stephen.politzer-ahles at ling-phil.ox.ac.uk ] > Sent: Sunday, 15 November 2015 10:15 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] statistical reporting cluster based permutation > > Hello Kaelasha, > > There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper:https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study . > I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper:http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf > > See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. > > Best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ Message: 1 > Date: Sun, 15 Nov 2015 01:07:30 +0000 > From: Kaelasha Tyler > > To: "fieldtrip at science.ru.nl " > > Subject: [FieldTrip] statistical reporting cluster based permutation > tests > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am writing up results for cluster based permutation tests that I ran on masked priming meg data. > > I have to admit I am not entirely sure the exact form for reporting the stats on these. > > For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: > > prob: 0.0420 > clusterstat: 1.2443e+04 > stddev: 0.0063 > cirange: 0.0124 > > Has anyone else completed and rerooted on results, having used cluster based permutation tests? > Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? > > Thanks, > K > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From iris.steinmann at med.uni-goettingen.de Mon Nov 16 09:35:38 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Mon, 16 Nov 2015 08:35:38 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Phillipp, The idea was, that I don’t have to recalculate my statistics if I just want to look at the results with a higher threshold. So, thanks a lot for your additional information, it helps me to think over my analysis in the first place … thanks, have a nice day! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Philipp Ruhnau Sent: Freitag, 13. November 2015 17:29 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hey Iris, you could use matlabs inbuilt function (mafdr) to produce corrected p-values, then again if you just want to check your outcome with a higher threshold you might as well feed that into the fieldtrip statistics function with cfg.alpha It is possible to estimate corrected p-values by hand, the logic being the following as in Julian’s example for 5 tests bonferroni adjustment is alpha_level/5. but you could also multiply your p-value with 5 and keep the original threshold. similarly for a simple Benjamini-Hochberg fdr if you have a vector with p-values (original_pvals) you do pvals = sort(original_pvals); % sort % correct p-vals by hand n = numel(pvals); cor_pvals = pvals .* (n./(1:n)); so following the fdr logic you correct each p-val by its own factor. but note that this is not the fdr correction that is implemented in fieldtrip (see fieldtrips fdr.m for the reference) and that some p-values now can exceed 1… Also I think Arnaud Delorme’s fdr function in eeglab had the option to estimate corrected p-values (but I haven’t checked for quite a while) but yeah, I’m with Julian on this one. as the t-value doesn’t change it certainly makes more sense to quote fdr-corrected p < 0.05 then an exact but corrected p-value hope this helps philipp On 13 Nov 2015, at 16:41, Steinmann, Iris > wrote: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 Mon Nov 16 10:42:01 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Mon, 16 Nov 2015 10:42:01 +0100 (CET) Subject: [FieldTrip] chan_time dimord missing in ft_statfun_actvsblT Message-ID: <434773634.1339738.1447666921760.JavaMail.zimbra@bcbl.eu> Dear all, in the function ft_statfun_actvsblT there seems to be a bug related to the dimord of the data. The code seems to work only for chan_freq_time data but not for chan_time data, although in the past this function used to work also for ERF data, or am I wrong? Could it be that some part of the code is missing? 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” From p.babaeeghazvini at vu.nl Mon Nov 16 14:29:40 2015 From: p.babaeeghazvini at vu.nl (Babaeeghazvini, P.) Date: Mon, 16 Nov 2015 13:29:40 +0000 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region Message-ID: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> Hello I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis. Regards, Parinaz. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Mon Nov 16 15:01:51 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Mon, 16 Nov 2015 15:01:51 +0100 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region In-Reply-To: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> References: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> Message-ID: Hi Parinaz, I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches: 1) You can already focus your source analyses on ROIs at the level of the lead field grid. 2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs. For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup. For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g. cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using. For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results: atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); atlas = ft_convert_units(atlas,'cm'); cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi = atlas.tissuelabel(43:54); occ_mask = ft_volumelookup(cfg,template_grid); grandavg_col_masked = grandavg_col; grandavg_grey_masked = grandavg_grey; for s=1:10 grandavg_col_masked{s}.inside=occ_mask(:); grandavg_grey_masked{s}.inside=occ_mask(:); grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0; grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0; end Hope this helps. - Joram On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. wrote: > Hello > > I am doing beamformer on EEG data to find the source position of bimanual > activity based on dics method. For that I want to see the activity only on > motor area and remove the activities of other regions based on HMAT atlas ( > http://lrnlab.org/) which provides a binary mask of motor cortex. I need > to do that because I want to calculate the position of maximum activity in > motor region and I dont want this maximum activity appear somewhere else > due to any possible artifact. please tell me how and where should I apply > HMAT binary mask on the output of source analysis. > > Regards, > Parinaz. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.babaeeghazvini at vu.nl Mon Nov 16 15:53:12 2015 From: p.babaeeghazvini at vu.nl (Babaeeghazvini, P.) Date: Mon, 16 Nov 2015 14:53:12 +0000 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region In-Reply-To: References: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local>, Message-ID: <561966C5AD6B9647B14A89A8189322E02E719CBC@PEXMB002B.vu.local> Hi Joram, Thank you very much for such a complete and helpful explanation. Best regards, Parinaz. ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Joram van Driel [joramvandriel at gmail.com] Sent: Monday, November 16, 2015 3:01 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region Hi Parinaz, I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches: 1) You can already focus your source analyses on ROIs at the level of the lead field grid. 2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs. For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup. For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g. cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using. For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results: atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); atlas = ft_convert_units(atlas,'cm'); cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi = atlas.tissuelabel(43:54); occ_mask = ft_volumelookup(cfg,template_grid); grandavg_col_masked = grandavg_col; grandavg_grey_masked = grandavg_grey; for s=1:10 grandavg_col_masked{s}.inside=occ_mask(:); grandavg_grey_masked{s}.inside=occ_mask(:); grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0; grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0; end Hope this helps. - Joram On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. > wrote: Hello I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis. Regards, Parinaz. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From vic.schroeder2 at gmail.com Mon Nov 16 17:16:46 2015 From: vic.schroeder2 at gmail.com (victoria schroeder) Date: Mon, 16 Nov 2015 16:16:46 +0000 Subject: [FieldTrip] converting magnetometers Message-ID: Hello, Is it possible to convert magnetometers to pseudo-gradiometers to create planar gradients? We are working with Neuromag data. The following code does not work, since i get the error message that ft_megplanar() does not function with neuromag data. cfg = []; cfg.feedback = 'no'; cfg.method = 'distance'; cfg.planarmethod = 'sincos'; cfg.channel = {'MEGMAG'}; cfg.trials = 'all'; cfg.neighbours = ft_prepare_neighbours(cfg, rspdata); data_mag = ft_megplanar(cfg,rspdata); Cheers Victoria -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.stdgl at gmail.com Tue Nov 17 16:12:49 2015 From: tobias.stdgl at gmail.com (Tobias Staudigl) Date: Tue, 17 Nov 2015 16:12:49 +0100 Subject: [FieldTrip] ft_volumerealign with headshape Message-ID: Dear all, I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue ( http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); works fine, then: cfg = []; cfg.method = 'headshape' cfg.coordsys = 'ctf'; cfg.headshape.headshape = hs; mri_realigned2 = ft_volumerealign(cfg,mri_realigned); after the message 'doing interactive realignment with headshape' I get the following error: ************** Reference to non-existent field 'label'. Error in ft_datatype_sens (line 136) nchan = length(sens.label); Error in ft_checkconfig (line 248) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 68) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 586) tmpcfg = ft_interactiverealign(tmpcfg); ************** Reading the polhemus headshape was done with: [hs]=ft_read_headshape('hs_S01.pos'); which looks fine when plotting it with ft_plot_headshape(hs); I am using the fieldtrip version at the Donders. When using an older version, fieldtrip-20131231, no error occurs. Any help very much appreciated! Best, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 17 16:26:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 17 Nov 2015 15:26:27 +0000 Subject: [FieldTrip] ft_volumerealign with headshape In-Reply-To: References: Message-ID: <07142596-034A-482A-83B9-FC8C6D7705B6@fcdonders.ru.nl> Hi Tobias, I came across the same thing, and fixed it locally with a dirty hack. Please do drop by so that we can make a clean fix. Best, JM On Nov 17, 2015, at 4:12 PM, Tobias Staudigl > wrote: Dear all, I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue (http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); works fine, then: cfg = []; cfg.method = 'headshape' cfg.coordsys = 'ctf'; cfg.headshape.headshape = hs; mri_realigned2 = ft_volumerealign(cfg,mri_realigned); after the message 'doing interactive realignment with headshape' I get the following error: ************** Reference to non-existent field 'label'. Error in ft_datatype_sens (line 136) nchan = length(sens.label); Error in ft_checkconfig (line 248) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 68) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 586) tmpcfg = ft_interactiverealign(tmpcfg); ************** Reading the polhemus headshape was done with: [hs]=ft_read_headshape('hs_S01.pos'); which looks fine when plotting it with ft_plot_headshape(hs); I am using the fieldtrip version at the Donders. When using an older version, fieldtrip-20131231, no error occurs. Any help very much appreciated! Best, Tobias _______________________________________________ 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 nathan.friedman2 at mail.mcgill.ca Tue Nov 17 18:21:37 2015 From: nathan.friedman2 at mail.mcgill.ca (Nathan Friedman) Date: Tue, 17 Nov 2015 12:21:37 -0500 Subject: [FieldTrip] Malware detected in gtsrefine.exe Message-ID: Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Nov 18 09:13:16 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 18 Nov 2015 09:13:16 +0100 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: References: Message-ID: <005401d121d8$fbf51310$f3df3930$@artinis.com> HI Nathan, The function belongs to an external toolbox, iso2mesh: http://iso2mesh.sourceforge.net/cgi-bin/index.cgi So, while the file is not necessary for most things in FieldTrip, I deem it highly unlikely that it actually is malware. So probably it’s a false alarm. But you can delete the file without having troubles with FieldTrip (only if you want to create meshes yourself using this function, and the function is also only then used in special circumstances). Best, Jörn -- Jörn M. Horschig, PhD, 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 Nathan Friedman Sent: Tuesday, November 17, 2015 18:22 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Malware detected in gtsrefine.exe Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 09:16:48 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 08:16:48 +0000 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> Seems like a false positive: Scanning Report 18 November 2015 09:14:21 - 09:14:21 Computer name: DCCN553 Scanning type: Scan target Target: M:\fieldtrip-dev\external\iso2mesh\bin\gtsrefine.exe ________________________________ Result No malware found ________________________________ Statistics Scanned: * Files: 1 * Not scanned: 0 Result: * Viruses: 0 * Spyware: 0 * Suspicious items: 0 * Riskware: 0 Actions: * Disinfected: 0 * Renamed: 0 * Deleted: 0 * Quarantined: 0 * Failed: 0 Boot Sectors: * Scanned: 0 * Infected: 0 * Suspicious items: 0 * Disinfected: 0 ________________________________ Options Definitions version: * Viruses: 2015-11-18_02 * Spyware: 2015-11-18_02 Scanning Engines: * F-Secure Aquarius: 11.00.01, 2015-11-18 * F-Secure Hydra: 5.15.21, 2015-11-17 * F-Secure Online: 13.40.159, 2014-04-28 * F-Secure Gemini: 3.02.384, 2015-11-12 Scanning options: * Scan defined files: ANI ASP AX BAT BIN BOO CHM CMD COM CPL DLL DOC DOT DRV EML EXE HLP HTA HTM HTML HTT INF INI JOB JS JSE LNK LSP MDB MHT MPP MPT MSG MSO OCX PDF PHP PIF POT PPT RTF SCR SHS SWF SYS TD0 TMP VBE VBS VXD WBK WMA WMV WMF WSC WSF WSH WRI XLS XLT XML CLASS ZIP JAR ARJ LZH TAR TGZ GZ CAB RAR BZ2 HQX * Scan inside archives Excluded: * Spyware: Application.BitCoinMiner.AY Application.BitCoinMiner.AX Actions: * Viruses: Ask after scan * Spyware: Ask after scan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Nathan Friedman Sent: dinsdag 17 november 2015 18:22 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Malware detected in gtsrefine.exe Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.braukmann at donders.ru.nl Wed Nov 18 12:58:20 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Wed, 18 Nov 2015 12:58:20 +0100 Subject: [FieldTrip] Automatized artifact rejection in FT Message-ID: Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 14:14:21 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 13:14:21 +0000 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B0836@exprd01.hosting.ru.nl> Hi Ricarda, All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point. Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work: cfg.artfctdef.threshold.channel = cell-array with channel labels cfg.artfctdef.threshold.bpfilter = 'no'; cfg.artfctdef.threshold.absdiff = ‘yes’; cfg.artfctdef.threshold.max = 50; Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 12:58 To: FieldTrip discussion list Subject: [FieldTrip] Automatized artifact rejection in FT Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.braukmann at donders.ru.nl Wed Nov 18 14:41:56 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Wed, 18 Nov 2015 14:41:56 +0100 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> References: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> Message-ID: Hi Jim, Thanks for the quick reply, this is really helpful. I will try your suggestion for number three. Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms. So if you have any suggestion of how we might be able to implement this as well, that would be great! Thanks! Ricarda On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Hi Ricarda, > > > > All three criteria have a certain threshold that has to be met in order > for a trial to be marked as containing artifacts so for all criteria you > could use ft_artifact_threshold (or ft_artifact_zvalue). The difference > will be how you preprocess the signal. You would need to transform the > signal so that for criteria nr. 2 the signal represents the potential > difference over a 200ms window?, and for nr. 3 the potential difference per > sampling point. > > > > Number 3 is relatively easy, you can calculate the first temporal > derivative (ie. the difference between two consecutive samples) with > cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, > if you want the absolute difference). So something like this should work: > > > > cfg.artfctdef.threshold.channel = cell-array with channel labels > > cfg.artfctdef.threshold.bpfilter = 'no'; > > cfg.artfctdef.threshold.absdiff = ‘yes’; > > cfg.artfctdef.threshold.max = 50; > > > > Number 2 is slightly more difficult because you want to integrate over a > larger window. I don’t fully understand what you want to avoid, should the > signal at time X stay within 3uV of the signal at time X + 200ms? > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Ricarda Braukmann > *Sent:* woensdag 18 november 2015 12:58 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Automatized artifact rejection in FT > > > > Hi everyone, > > I would like to implement an automatized artifact rejection procedure for > my EEG data and compare this to manual rejection. > > I would like to use the following criteria for rejection of a segment: > > 1. amplitudes below -150 or above 150 µV > 2. a difference of 3 µV per 200 ms, > 3. or a voltage change of 50 µV per sampling point > > Is there a function in fieldtrip that I can use for implementing these > different criteria? > > I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the > first criteria but I am unsure how to implement the second two. > > Any help would be highly appreciated. > > Thanks! > > Ricarda > > > > -- > > > Ricarda Braukmann, MSc > PhD student > > Radboud University Medical Centre & Baby Research Center > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Neuroscience & Centre for Cognition > > Room B.01.22 > Phone: +31 (0) 24 36 12652 > Email: r.braukmann at donders.ru.nl > > Website: http://www.zebra-project.nl/ > -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 15:42:23 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 14:42:23 +0000 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: References: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B19E9@exprd01.hosting.ru.nl> Hi Ricarda, I’m not sure if that is what you want but you could see whether a time-shifted version of your data (+200ms) differs more than 3uV from your original data. To shift your data you can use ft_redefinetrial with cfg.offset = -samples, where samples is the amount of samples from the original zero-point you wish to shift your time series by. Subtracting those time-series should give you the difference between t and t+200ms. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 14:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Automatized artifact rejection in FT Hi Jim, Thanks for the quick reply, this is really helpful. I will try your suggestion for number three. Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms. So if you have any suggestion of how we might be able to implement this as well, that would be great! Thanks! Ricarda On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) > wrote: Hi Ricarda, All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point. Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work: cfg.artfctdef.threshold.channel = cell-array with channel labels cfg.artfctdef.threshold.bpfilter = 'no'; cfg.artfctdef.threshold.absdiff = ‘yes’; cfg.artfctdef.threshold.max = 50; Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 12:58 To: FieldTrip discussion list Subject: [FieldTrip] Automatized artifact rejection in FT Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Wed Nov 18 15:46:48 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Wed, 18 Nov 2015 09:46:48 -0500 Subject: [FieldTrip] NaNs in Granger Spectrum Message-ID: Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that my output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all' 'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output = 'powandcsd';cfg.foi = 0:1:20; cfg.toi = -0.5:0.004:1.5; cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./ cfg.foi; freq = ft_freqanalysis(cfg, data_both);* Note: I've checked the values in freq.powspctrm, and though there are NaNs around the temporal edges, there is real data amid the time frame of interest. I've attached a sample TFR plot. *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* However, this plot is a blank no matter which values I seem to choose as a zlim. Any tips are much appreciated - thanks! (Please excuse my re-posting of a similar message twice - I'm simply hoping to catch a few more responses. As far as I can tell, this issue has not yet been addressed in the digest archives - though if I'm mistaken please feel free to point me to the appropriate thread!) Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source01TFR.jpg Type: image/jpeg Size: 49523 bytes Desc: not available URL: From friedman.nathan at gmail.com Wed Nov 18 17:14:20 2015 From: friedman.nathan at gmail.com (Nathan Friedman) Date: Wed, 18 Nov 2015 11:14:20 -0500 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> Message-ID: Thank you both very much! Nathan On Wed, Nov 18, 2015 at 3:16 AM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Seems like a false positive: > > > > *Scanning Report* > > *18 November 2015 09:14:21 - 09:14:21* > > Computer name: DCCN553 > Scanning type: Scan target > Target: M:\fieldtrip-dev\external\iso2mesh\bin\gtsrefine.exe > ------------------------------ > > *Result* > > No malware found > ------------------------------ > > *Statistics* > > Scanned: > > - Files: 1 > - Not scanned: 0 > > Result: > > - Viruses: 0 > - Spyware: 0 > - Suspicious items: 0 > - Riskware: 0 > > Actions: > > - Disinfected: 0 > - Renamed: 0 > - Deleted: 0 > - Quarantined: 0 > - Failed: 0 > > Boot Sectors: > > - Scanned: 0 > - Infected: 0 > - Suspicious items: 0 > - Disinfected: 0 > > ------------------------------ > > *Options* > > Definitions version: > > - Viruses: 2015-11-18_02 > - Spyware: 2015-11-18_02 > > Scanning Engines: > > - F-Secure Aquarius: 11.00.01, 2015-11-18 > - F-Secure Hydra: 5.15.21, 2015-11-17 > - F-Secure Online: 13.40.159, 2014-04-28 > - F-Secure Gemini: 3.02.384, 2015-11-12 > > Scanning options: > > - Scan defined files: ANI ASP AX BAT BIN BOO CHM CMD COM CPL DLL DOC > DOT DRV EML EXE HLP HTA HTM HTML HTT INF INI JOB JS JSE LNK LSP MDB MHT MPP > MPT MSG MSO OCX PDF PHP PIF POT PPT RTF SCR SHS SWF SYS TD0 TMP VBE VBS VXD > WBK WMA WMV WMF WSC WSF WSH WRI XLS XLT XML CLASS ZIP JAR ARJ LZH TAR TGZ > GZ CAB RAR BZ2 HQX > - Scan inside archives > > Excluded: > > - Spyware: Application.BitCoinMiner.AY Application.BitCoinMiner.AX > > Actions: > > - Viruses: Ask after scan > - Spyware: Ask after scan > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Nathan Friedman > *Sent:* dinsdag 17 november 2015 18:22 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Malware detected in gtsrefine.exe > > > > Hi, > > > > Sorry if this is a known issue but I'm new to FieldTrip. > > > > Windows Defender detected gtsrefine.exe as malware on my computer. Is this > file necessary for FieldTrip to function properly? > > > > Nathan Friedman, M.Eng > > _______________________________________________ > 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 jorn at artinis.com Thu Nov 19 09:30:55 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 19 Nov 2015 09:30:55 +0100 Subject: [FieldTrip] NaNs in Granger Spectrum In-Reply-To: References: Message-ID: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> Dear Helen, I am not quite sure why there are only nans or 0s in your granger spectrum. It could be because of the nans in your data. You could test that by just putting the time from e.g. 0.3s to 0.7s in. As a general tip, I would always segment trials into larger chunks that you want to do your final analysis on, otherwise edge artifacts (either from filtering or like here in the TFR) will show up. Also, I used constant 400ms time windows (link) , which apart from making the time-windows of the TFR look ‘nicer’, it also makes it easier to compare across frequencies. With the frequency-dependent time window, you could run into issues with SNR across frequencies, as the lower frequency content is estimated by a longer time windows, and averaging over more data should lead to a higher SNR. Thus, the lower frequency content should be more reliable when using frequency-dependent time windows. Two other general tips: 1) If I recall correctly, the Wilson factorization that is being used for estimating the transfer matrix assumes that your data contains all frequencies from DC to the Nyquist frequency. So better not restrict your analysis from 1 to 20Hz, but use 0 to fsample/2. 2) If you have strong noise components in your data, for example line noise, your power spectrum will sharply rise near the line noise frequency, and quickly fall off a few Hz after that. Such sharp changes will lead to strange effects in your Granger estimation, showing up as changes in estimated peak frequencies. Filtering such artifacts out though should be done with care though, see e.g. http://www.ncbi.nlm.nih.gov/pubmed/21864571 and http://www.ncbi.nlm.nih.gov/pubmed/20026279. I would advise against trying to filter out line noise based on experience with my own data. I found it more suitable to use zero padding, which “artificially” increases your frequency resolution, thereby smoothes the power spectrum and thus avoid prevents sharp changes in there. Btw, note that the two above papers are on parametric Granger, which might be differently affected by filtering than the nonparametric version (that’s at least what I found using simulated data – parametric Granger was more invariant to different preprocessing pipelines) Best of luck ;) Greetings, Jörn -- Jörn M. Horschig, PhD, 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 Helen Wieffering Sent: Wednesday, November 18, 2015 15:47 To: FieldTrip discussion list Subject: [FieldTrip] NaNs in Granger Spectrum Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that my output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. data = label: {2x1 cell} trial: {1x155 cell} time: {1x155 cell} fsample: 250 cfg: [1x1 struct] sampleinfo: [155x2 double] % perform multitaper analysis cfg = []; cfg.method = 'mtmconvol'; cfg.channelcmb = { 'all' 'all'}; cfg.fsample = 250; cfg.channel = data.label; cfg.output = 'powandcsd'; cfg.foi = 0:1:20; cfg.toi = -0.5:0.004:1.5; cfg.taper = 'hanning'; cfg.t_ftimwin = 4 ./ cfg.foi; freq = ft_freqanalysis(cfg, data_both); Note: I've checked the values in freq.powspctrm, and though there are NaNs around the temporal edges, there is real data amid the time frame of interest. I've attached a sample TFR plot. % compute granger causality cfg = []; cfg.method = 'granger'; cfg.channel = {'source01' 'source02'}; cfg.channelcmb = {'all' 'all'}; granger = ft_connectivityanalysis(cfg, freq); % plot cfg = []; cfg.parameter = 'grangerspctrm'; cfg.zlim = [0 .5]; cfg.refchannel = 'source02'; cfg.directionality = 'outflow'; ft_singleplotTFR(cfg, granger); However, this plot is a blank no matter which values I seem to choose as a zlim. Any tips are much appreciated - thanks! (Please excuse my re-posting of a similar message twice - I'm simply hoping to catch a few more responses. As far as I can tell, this issue has not yet been addressed in the digest archives - though if I'm mistaken please feel free to point me to the appropriate thread!) Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.P.Vlaar at tudelft.nl Thu Nov 19 09:58:52 2015 From: M.P.Vlaar at tudelft.nl (Martijn Vlaar - 3ME) Date: Thu, 19 Nov 2015 08:58:52 +0000 Subject: [FieldTrip] Number of shells in OpenMEEG Message-ID: Dear all, I am interested in including the CSF in the forward model. In ft_headmodel_openmeeg at line 75 there is an error message: "More than 3 shells not allowed". In the OpenMEEG documentation I do not find such a limitation. Could someone clarify why the OpenMEEG-related function in fieldtrip is restricted to 1, 2 or 3 shells? Thank you in advance! Martijn Vlaar ________________________________ Ir. Martijn Vlaar Delft University of Technology BioMechanical Engineering Mekelweg 2, 2628 CD Delft, The Netherlands tel: +31 (0)1527 85625 fax: +31 (0)1527 84717 mobile: +31 (0)618081635 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Thu Nov 19 10:53:55 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Thu, 19 Nov 2015 10:53:55 +0100 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: References: Message-ID: hi, I confirm that OpenMEEG can handle more than 3 layers. Best, Alex On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME wrote: > Dear all, > > > > I am interested in including the CSF in the forward model. > > > > In ft_headmodel_openmeeg at line 75 there is an error message: “More than 3 > shells not allowed”. In the OpenMEEG documentation I do not find such a > limitation. > > > > Could someone clarify why the OpenMEEG-related function in fieldtrip is > restricted to 1, 2 or 3 shells? > > > > Thank you in advance! > > > > Martijn Vlaar > > > > ________________________________ > > Ir. Martijn Vlaar > > Delft University of Technology > > BioMechanical Engineering > > Mekelweg 2, 2628 CD Delft, The Netherlands > > tel: +31 (0)1527 85625 > > fax: +31 (0)1527 84717 > > mobile: +31 (0)618081635 > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From craiggrichter at gmail.com Thu Nov 19 12:13:17 2015 From: craiggrichter at gmail.com (Craig Richter) Date: Thu, 19 Nov 2015 12:13:17 +0100 Subject: [FieldTrip] NaNs in Granger Spectrum Message-ID: Hi Helen, Try switching the output of ft_freqanalysis to cfg.output = 'fourier'. You also must you all the frequencies up to your Nyquist to get a reasonable result. Best, Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Thu Nov 19 13:47:43 2015 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Thu, 19 Nov 2015 13:47:43 +0100 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: References: Message-ID: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer case 4 vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain case 3 vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad = grad_mri; cfg.grid.warpmni = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; cfg.unit = 'mm', cfg.vol = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4904 bytes Desc: not available URL: From a.maye at uke.de Thu Nov 19 15:49:39 2015 From: a.maye at uke.de (Alexander Maye) Date: Thu, 19 Nov 2015 15:49:39 +0100 Subject: [FieldTrip] help on ft_getopts mex file In-Reply-To: References: Message-ID: <1551109.ONu50G9ISl@mars> Dear Melanie, I had the same problem in Matlab 2015b under Linux. Deleting all ft_getopt.mex64 files (there are several of them in different fieldtrip directories) solved the issue. Probably it's a library version issue; maybe the person that compiles the mex64 files may take a look? Best, ALEX. -------------- next part -------------- -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From maity_winky at yahoo.es Thu Nov 19 17:58:21 2015 From: maity_winky at yahoo.es (=?UTF-8?Q?Mait=C3=A9_Crespo_Garc=C3=ADa?=) Date: Thu, 19 Nov 2015 16:58:21 +0000 (UTC) Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> References: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> Message-ID: <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> Dear Martijn, the error happens when you don't specify the conductivity values. Best,Maite El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal escribió: Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer     case 4         vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain     case 3         vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad                  = grad_mri; cfg.grid.warpmni  = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel  = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri            = mri; cfg.unit = 'mm', cfg.vol                  = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid              = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: >     > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** _______________________________________________ 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 kathrin.muesch at gmail.com Thu Nov 19 18:46:45 2015 From: kathrin.muesch at gmail.com (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 19 Nov 2015 12:46:45 -0500 Subject: [FieldTrip] bug in FDR script Message-ID: Hi, I realized that the fdr.m file gives a wrong output for the case that the smallest p values are above the FDR threshold. This means that the smallest p-values might be rejected, whereas lower p-values could pass the test. I have filed it as a bug (#3008). The current script only declares the p-values below or equal to the threshold as significant, whereas in fact all p-values that are smaller or equal to the largest p-value below or equal to this threshold should be declared significant according to the original paper ("find the largest P value that is below the line [threshold]. All voxels with P values less than or equal to this are declared active.”). I assume that the following line is incorrect and should be replaced by the one below: Incorrect: h = (ps<=pi); Correct: h = ps<=(max(ps(ps<=pi))); Cheers, Kathrin -- Kathrin Müsch, Ph.D. Department of Psychology University of Toronto Toronto, Canada www.honeylab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From eriksenj at ohsu.edu Fri Nov 20 00:52:51 2015 From: eriksenj at ohsu.edu (K Jeffrey Eriksen) Date: Thu, 19 Nov 2015 23:52:51 +0000 Subject: [FieldTrip] FW: FEM head model and source model Message-ID: Hi again, I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. Thanks, -Jeff From: K Jeffrey Eriksen Sent: Wednesday, October 21, 2015 4:30 PM To: 'fieldtrip at science.ru.nl' Subject: FEM head model and source model I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. Thanks, -Jeff Eriksen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aishwaryaselvaraj1708 at gmail.com Fri Nov 20 06:43:43 2015 From: aishwaryaselvaraj1708 at gmail.com (aishwarya selvaraj) Date: Fri, 20 Nov 2015 11:13:43 +0530 Subject: [FieldTrip] filed trip Message-ID: Hi , I just started using filed trip for my project work. I have EEG data as a mat file . And im confused on how to even start using filedtrip commands on my dataset and proceed with the processing . Can anyone guide me on how to start?? I did read the manual ,but getting confused . It would be of great help if anyone could help me out . Thank you :) -- Regards, Aishwarya Selvaraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Nov 20 07:09:29 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 19 Nov 2015 22:09:29 -0800 Subject: [FieldTrip] filed trip In-Reply-To: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> References: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> Message-ID: Hi Aishwarya, If you only have a mat file, this wiki page might set you in the right direction: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Yours, Arjen 2015-11-19 21:43 GMT-08:00 aishwarya selvaraj < aishwaryaselvaraj1708 at gmail.com>: > Hi , > I just started using filed trip for my project work. > I have EEG data as a mat file . > And im confused on how to even start using filedtrip commands on my > dataset and proceed with the processing . > > > Can anyone guide me on how to start?? > I did read the manual ,but getting confused . > > It would be of great help if anyone could help me out . > > > Thank you :) > > -- > Regards, > Aishwarya Selvaraj > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mishra408 at gmail.com Fri Nov 20 07:48:07 2015 From: mishra408 at gmail.com (Ashutosh Mishra) Date: Fri, 20 Nov 2015 12:18:07 +0530 Subject: [FieldTrip] filed trip In-Reply-To: References: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> Message-ID: Hi Aishwarya, I faced the similar problem. You are supposed to change your data (.mat format) in a data structure that is read by fieldtrip. For that you need at least following information 1. Channel label and their location (If you don't have this file you can use standard file available in Fieldtrip and you can include only those electrode that you have been using in your experiment) 2. sampling rate of the data (that you would have done while recording the data) 3. time vector 4. no. of trials You can create them in MATLAB and put them together in a structure along with your recorded data. This worked for me. -- Ashutosh Mishra 5th year Integrated BS-MS student Department of Physical Sciences Indian Institute of Science Education and Research, Kolkata From jan.schoffelen at donders.ru.nl Fri Nov 20 08:02:15 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 20 Nov 2015 07:02:15 +0000 Subject: [FieldTrip] FEM head model and source model In-Reply-To: References: Message-ID: <95A72A87-CE48-4598-BF73-F58FCFBD7AE3@fcdonders.ru.nl> Jeff, You could start with checking the tutorial on minimum norm estimation. This contains a section on how you can create a cortically constrained source model using Freesurfer. Jan-Mathijs On Nov 20, 2015, at 12:52 AM, K Jeffrey Eriksen > wrote: Hi again, I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. Thanks, -Jeff From: K Jeffrey Eriksen Sent: Wednesday, October 21, 2015 4:30 PM To: 'fieldtrip at science.ru.nl' Subject: FEM head model and source model I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. Thanks, -Jeff Eriksen _______________________________________________ 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.P.Vlaar at tudelft.nl Fri Nov 20 10:45:42 2015 From: M.P.Vlaar at tudelft.nl (Martijn Vlaar - 3ME) Date: Fri, 20 Nov 2015 09:45:42 +0000 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> References: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> Message-ID: Dear all, Thanks for the helpful replies! I have just tried, and it indeed runs fine when you specify 4 conductivity. Guess I was confused by the specific error message: “More than 3 shells not allowed”. Perhaps this message can be made more accurate: “Conductivity values need to be explicitly specified when using 2 shells or more than 3 shells.”. Regards, Martijn From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Maité Crespo García Sent: donderdag 19 november 2015 17:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] Number of shells in OpenMEEG Dear Martijn, the error happens when you don't specify the conductivity values. Best, Maite El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal > escribió: Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer case 4 vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain case 3 vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad = grad_mri; cfg.grid.warpmni = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; cfg.unit = 'mm', cfg.vol = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: > > > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Fri Nov 20 15:01:48 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Fri, 20 Nov 2015 14:01:48 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. John http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >------------------------------ > >Message: 6 >Date: Thu, 19 Nov 2015 23:52:51 +0000 >From: K Jeffrey Eriksen >To: "fieldtrip at science.ru.nl" >Subject: [FieldTrip] FW: FEM head model and source model >Message-ID: >Content-Type: text/plain; charset="us-ascii" > >Hi again, > >I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. > >Thanks, >-Jeff > > >From: K Jeffrey Eriksen >Sent: Wednesday, October 21, 2015 4:30 PM >To: 'fieldtrip at science.ru.nl' >Subject: FEM head model and source model > >I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. > >Thanks, >-Jeff Eriksen > -------------- next part -------------- A non-text attachment was scrubbed... Name: default.vnd.ms-officetheme Type: application/octet-stream Size: 3131 bytes Desc: default.vnd.ms-officetheme URL: From icelandhouse at gmail.com Fri Nov 20 18:49:10 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Fri, 20 Nov 2015 18:49:10 +0100 Subject: [FieldTrip] Cortical surface VS brain volume source models Message-ID: Dear Fieldtrip users, I am currently working on source reconstruction (EEG) of both ERPs and of oscillatory activity. I have 3 short and related questions of clarification: (1) Why are MNE suite and Free Surfer used to construct the cortical-surface-based source model in the MNE tutorial ( http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate)? Is it simply because discretizing the source model into locations on the cortical surface (as opposed to a 3D volume of grid points) is a functionality not provided by Fieldtrip directly? (2) So, if I prefer to have a 3D grid as the source model for my MNE source reconstruction, can I simply make use of Fieldtrip's own function ft_prepare_sourcemodel and forget about MNE Suite & Free Surfer? (3) Does the choice between a cortical-surface-based an a brain-volume-based source model depend primarily on the expectation of where the sources would most likely be located? Or are there other reasons why the MNE source reconstruction approach would make use of a cortical-surface-based source space instead of a 3D volumetric grid (as found in all the beamformer tutorials)? Thanks! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From eriksenj at ohsu.edu Sat Nov 21 02:54:58 2015 From: eriksenj at ohsu.edu (K Jeffrey Eriksen) Date: Sat, 21 Nov 2015 01:54:58 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: Hi John, This was more than I expected, thanks for the detail. I will start with what you suggest. Thanks, -Jeff PS. Are you using FEM because you have EEG, as opposed to MEG data? I really need to model the whole head for 256-channel EGI EEG coverage. -----Original Message----- From: RICHARDS, JOHN [mailto:RICHARDS at mailbox.sc.edu] Sent: Friday, November 20, 2015 6:02 AM To: fieldtrip at science.ru.nl; K Jeffrey Eriksen Subject: Re: {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. John http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new From RICHARDS at mailbox.sc.edu Sat Nov 21 03:10:06 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 21 Nov 2015 02:10:06 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: I am doing this with EEG, EGI’s 128-channel system, with infants. There are large individual differences in head media (e.g., CSF, GM/WM/non-myelinated axons) and the models are significantly different with FEM and BEM. We are using individual head models from participants who are in the EEG experiments; so the FEM on individual head models is the best one can get with EEG source analysis. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** On 11/20/15, 8:54 PM, "K Jeffrey Eriksen" wrote: >Hi John, > >This was more than I expected, thanks for the detail. I will start with what you suggest. Thanks, >-Jeff > >PS. Are you using FEM because you have EEG, as opposed to MEG data? I really need to model the whole head for 256-channel EGI EEG coverage. > > >-----Original Message----- >From: RICHARDS, JOHN [mailto:RICHARDS at mailbox.sc.edu] >Sent: Friday, November 20, 2015 6:02 AM >To: fieldtrip at science.ru.nl; K Jeffrey Eriksen >Subject: Re: {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 > >I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. > >Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. > >The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. > >Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. > >John > >http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model >http://fieldtrip.fcdonders.nl/development/simbio >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh > >http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >http://fieldtrip.fcdonders.nl/development/simbio >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh >http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space >http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new > From RICHARDS at mailbox.sc.edu Sat Nov 21 14:32:43 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 21 Nov 2015 13:32:43 +0000 Subject: [FieldTrip] Cortical surface VS brain volume source models Message-ID: <390034A7-436E-4F1A-BA02-7EF1727A023B@mailbox.sc.edu> See part of my note below. I think the answer is: 1—the Freesurfer reference is to develop a surface model of the head, and results in a surface-based mesh (pos, tri). This mesh can be used in the ft_source_model. Free surfer also is used to extract the brain surface; which might be a better model for where the sources are. 2—FT does provide tools to create either a surface-based or volume-based source model. I use our segmented GM from other methods (FSL, SPM, …) and do a volume model of points only on the GM. FT can do surface source meshes without using Freesurfer; (e.g., surface of the GM; surface of the brain; surface of a realistic inner compartment). Part of this is because I use infant participants and have not been able to use the Freesurfer tool to identify GM surfaces. 3—There are some theoretical rationales for EEG to use surface models, with the dipoles pointed normal to the surface. Presumably this reflects the columnar arrangement of neurons that generate a current flow across the column and thus the estimated dipoles are normal to the surface. The three-direction moment dipole models used with volume models allow the direction of the dipole on each source dipole location to vary, and presumably capture more variance as the EEG source. I have found in some single-dipole-fitting models that the volume models provide a better fit, and I have assumed this is because they allow more flexibility in the estimation. The EEG source analysis and some of the methods have very large resolutions compared to the normal-surface model, so this is an artificial restriction because of the relatively poor resolution of the inverse techniques (in cm range rather than in mm range). 4—I have preferred volume models; there are some points in the GM that probably have active current dipoles that can be modeled as a volume; e.g., inside gyri, inside rather than on the surface, in convoluted structures, etc. I also have volumetric atlases that I can use more easily with volume models; I currently am using the volumes which correspond to fMRI clusters; and some other reasons. I use the GM as the volume, rather than the whole brain (which is theoretically questionable). 5—The “pos” matrix in surface models and volume models acts the same; the pos are only on the surface, or in the volume, but their structure is the same. The surface-normal models only need a “pow” matrix as output, since the direction of the moment vector is not estimated, whereas the non-normal models (usually volume) require the “pow" be calculated from the “mom" matrix. Some of this is “practical” rather the “theoretical” (e.g., pos pow mom matrices). Perhaps someone has a reference that is more theoretically descriptive? John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** > >The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. > >Date: Fri, 20 Nov 2015 18:49:10 +0100 >From: Maris Skujevskis >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] Cortical surface VS brain volume source models >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Dear Fieldtrip users, > >I am currently working on source reconstruction (EEG) of both ERPs and of >oscillatory activity. > >I have 3 short and related questions of clarification: >(1) >Why are MNE suite and Free Surfer used to construct the >cortical-surface-based source model in the MNE tutorial ( >http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate)? >Is it simply because discretizing the source model into locations on the >cortical surface (as opposed to a 3D volume of grid points) is a >functionality not provided by Fieldtrip directly? > >(2) >So, if I prefer to have a 3D grid as the source model for my MNE source >reconstruction, can I simply make use of Fieldtrip's own function >ft_prepare_sourcemodel and forget about MNE Suite & Free Surfer? > >(3) >Does the choice between a cortical-surface-based an a brain-volume-based >source model depend primarily on the expectation of where the sources would >most likely be located? >Or are there other reasons why the MNE source reconstruction approach would >make use of a cortical-surface-based source space instead of a 3D >volumetric grid (as found in all the beamformer tutorials)? > > > >Thanks! > >Maris >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: > >------------------------------ From david.m.groppe at gmail.com Mon Nov 23 04:24:31 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Sun, 22 Nov 2015 22:24:31 -0500 Subject: [FieldTrip] bug in FDR script In-Reply-To: References: Message-ID: Kathrin is correct about the bug in FieldTrip's FDR function. You can verify it yourself with Matlab's built in mafdr.m or this File Exchange Function https://www.mathworks.com/matlabcentral/fileexchange/27418-benjamini---hochberg-yekutieli-false-discovery-rate--fdr--control-procedure--fdr-bh-m- For example, if you run: raw_p=[.01 .01 .01 .6 .6 .6]; %uncorrected p-values % Matlab's built-in function sig_p=mafdr(p,'BHFDR',.05)<.05; % p-values signficant after Benjamini & Hochberg FDR adjustment fprintf('mafdr significant p-values:\n'); disp(sig_p) % FieldTrip's function sig_pFT=fdr(p,.05); fprintf('FieldTrip FDR significant p-values:\n'); disp(sig_pFT) The first three p-values should be significant but FieldTrip's function only declares the 3rd p-value significant. If you've used FieldTrip's FDR function you should fix the bug and re-run your analysis. You may have missed significant effects (though in practice missed p-values might actually be rare). -David On Thu, Nov 19, 2015 at 12:46 PM, Kathrin Müsch wrote: > Hi, > > I realized that the fdr.m file gives a wrong output for the case that the smallest p values are above the FDR threshold. This means that the smallest p-values might be rejected, whereas lower p-values could pass the test. I have filed it as a bug (#3008). > > The current script only declares the p-values below or equal to the threshold as significant, whereas in fact all p-values that are smaller or equal to the largest p-value below or equal to this threshold should be declared significant according to the original paper ("find the largest P value that is below the line [threshold]. All voxels with P values less than or equal to this are declared active.”). > > I assume that the following line is incorrect and should be replaced by the one below: > > Incorrect: h = (ps<=pi); > > Correct: h = ps<=(max(ps(ps<=pi))); > > Cheers, > Kathrin > > -- > > Kathrin Müsch, Ph.D. > > Department of Psychology > University of Toronto > Toronto, Canada > www.honeylab.org > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Nov 23 10:13:55 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 23 Nov 2015 10:13:55 +0100 Subject: [FieldTrip] Error message with latest fieldtrip version Message-ID: Dear all, I keep getting error message when using the newer version of fieldtrip (from 20151020 onwards) and Matlab 2014a. Here's the error message: Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 704) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 704) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback When I switched back to the older version (i.e. 20150420 version), I don't get such error messages. Could someone please tell me how to resolve this issue? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Mon Nov 23 21:33:52 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Mon, 23 Nov 2015 15:33:52 -0500 Subject: [FieldTrip] NaNs in Granger Spectrum In-Reply-To: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> References: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> Message-ID: Dear Jörn, Thank you very much for your detailed reply. I think my issue was definitely due to a poorly thought out time window and zero padding combination - but with a constant time window in ft_freqanalysis I'm now successfully getting Granger causality to calculate, and to produce a full spectrum of values rather than just the NaNs! It's especially helpful to have the attached papers and to get a sense of how others are approaching the procedure. Thank you, again! Best, Helen On Thu, Nov 19, 2015 at 3:30 AM, Jörn M. Horschig wrote: > Dear Helen, > > > > I am not quite sure why there are only nans or 0s in your granger > spectrum. It could be because of the nans in your data. You could test that > by just putting the time from e.g. 0.3s to 0.7s in. As a general tip, I > would always segment trials into larger chunks that you want to do your > final analysis on, otherwise edge artifacts (either from filtering or like > here in the TFR) will show up. Also, I used constant 400ms time windows > > (link) > , > which apart from making the time-windows of the TFR look ‘nicer’, it also > makes it easier to compare across frequencies. With the frequency-dependent > time window, you could run into issues with SNR across frequencies, as the > lower frequency content is estimated by a longer time windows, and > averaging over more data should lead to a higher SNR. Thus, the lower > frequency content should be more reliable when using frequency-dependent > time windows. > > > > Two other general tips: > > 1) If I recall correctly, the Wilson factorization that is being > used for estimating the transfer matrix assumes that your data contains all > frequencies from DC to the Nyquist frequency. So better not restrict your > analysis from 1 to 20Hz, but use 0 to fsample/2. > > 2) If you have strong noise components in your data, for example > line noise, your power spectrum will sharply rise near the line noise > frequency, and quickly fall off a few Hz after that. Such sharp changes > will lead to strange effects in your Granger estimation, showing up as > changes in estimated peak frequencies. Filtering such artifacts out though > should be done with care though, see e.g. > http://www.ncbi.nlm.nih.gov/pubmed/21864571 and > http://www.ncbi.nlm.nih.gov/pubmed/20026279. I would advise against > trying to filter out line noise based on experience with my own data. I > found it more suitable to use zero padding, which “artificially” increases > your frequency resolution, thereby smoothes the power spectrum and thus > avoid prevents sharp changes in there. Btw, note that the two above papers > are on parametric Granger, which might be differently affected by filtering > than the nonparametric version (that’s at least what I found using > simulated data – parametric Granger was more invariant to different > preprocessing pipelines) > > > > Best of luck ;) > > Greetings, > > Jörn > > > > *--* > *Jörn M. Horschig, PhD*, 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 *Helen Wieffering > *Sent:* Wednesday, November 18, 2015 15:47 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] NaNs in Granger Spectrum > > > > Dear Fieldtrip users, > > I am working with a 128 channel EEG data and am currently in the process > of calculating non-parametric Granger causality measures. I am following > the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. > > However, I'm facing the curious problem that my output data from calling > ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does > anyone have insight as to why that might be? I've tried playing around with > cfg.toi and the location of our virtual channels, but neither seems to > help. > > My code is below, where 'source01' and 'source02' refer to virtual > channels we created based off powspctrm data from beamformer source > localization on our own data, according to steps outlined in the FT > connectivity tutorial. > > > > > > > > > > > > > > > > > > > > > *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: > 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper > analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all' > 'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output = > 'powandcsd';cfg.foi = 0:1:20; cfg.toi = > -0.5:0.004:1.5; cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./ > cfg.foi; freq = ft_freqanalysis(cfg, data_both);* > > Note: I've checked the values in freq.powspctrm, and though there are NaNs > around the temporal edges, there is real data amid the time frame of > interest. I've attached a sample TFR plot. > > > > > > > > > > > > > > > > *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = > {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = > ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = > 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = > 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* > > However, this plot is a blank no matter which values I seem to choose as a > zlim. > > Any tips are much appreciated - thanks! > > (Please excuse my re-posting of a similar message twice - I'm simply > hoping to catch a few more responses. As far as I can tell, this issue has > not yet been addressed in the digest archives - though if I'm mistaken > please feel free to point me to the appropriate thread!) > > Best, > > Helen Wieffering > > _______________________________________________ > 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 xcz20 at outlook.com Tue Nov 24 07:44:39 2015 From: xcz20 at outlook.com (X Chen) Date: Tue, 24 Nov 2015 06:44:39 +0000 Subject: [FieldTrip] [Fieldtrip] frequency issue in beamfomer Message-ID: Dear Fieldtrip developers and users, Since a while I am struggling with a question regarding the frequency range used in beamfomer, The length of each data epoch is 1 second, resulting in ±1Hz frequency smoothing while performing ‘mtmfft’ method together with a hanning taper. Nevertheless, when the frequency band of interest is 4~7Hz at sensor-level, how to make the frequency range as the frequency of interest in source analysis? At sensor level, the permutation test offer a configuration setting for frequency average which resolves the issue. One possible solution, which I have tried consisting of using ‘dpss’ taper instead of ‘hanning’ taper, setting the frequency of interest to 5.5Hz, padding the epoch to 2s and setting the tapsmofrq = 1.5. The resulting 5.5 ±1.5Hz is just the range needed. Is it a feasible way? If it is, will the setting of padding influence the source analysis result to some degree? The other possible solution I have considered, is to average the output of frequency analysis, including ‘powspctrm’ and ‘crsspctrm’ across the selected range manually. Then the average result from the frequency range will output to source analysis? Is this correct? Thanks for your help, Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksoftkeyan at gmail.com Wed Nov 25 06:26:04 2015 From: ksoftkeyan at gmail.com (Karthikeyan) Date: Wed, 25 Nov 2015 10:56:04 +0530 Subject: [FieldTrip] Help on Connectivity Message-ID: Dear Community, I am working on estimating the PDC,DTF from EEG signals. Why is that we have to fit a AR model to data in order to compute the measures of connectivity. Regards S. Karthikeyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Nov 26 13:34:43 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 26 Nov 2015 13:34:43 +0100 (CET) Subject: [FieldTrip] power suppression during DICS beamforming ? Message-ID: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> Dear all, I am observing a counter-intuitive result after applying the spatial filters obtained from DICS beamforming to my MEG data. The plot in the attachment summarizes the issue: The raw data shows a clear peak of activity at 10 Hz, however, after applying the spatial filter to the MEG data the spectrum of the virtual channels shows that power in this frequency band is reduced. The same also happens when I apply a spatial filter in the gamma range for power at 70 Hz to the raw MEG signals. Is this something that falls out of the beamformer math due to the fact how the algorithm suppresses power at all locations by minimizing the noise level, or is there something wrong with my code? I (maybe naively) assumed that the results should come out the opposite. On the other hand, when plotting the noise normalized maps (NAI) of both the alpha and gamma beamformers the sources look quite accurate. Should I normalize with the level of noise first before plotting the spectrum to see the expected results (ie an upregulation of power instead of a downregulation of power)? The code that I use to generate the figures is: % 1) compute CSD matrix cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foilim = [10 10]; cfg.tapsmofrq = 2; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; [csd] = ft_freqanalysis(cfg,meg_data); % 2) compute DICS filter cfg = []; cfg.method = 'dics'; cfg.grad = meg_data.grad; cfg.headmodel = vol; cfg.frequency = csd.freq; cfg.dics.realfiter = 'yes'; cfg.dics.fixedori = 'yes'; [alpha_filter]= ft_sourceanalysis(cfg,csd); % 3) compute the virtual channel data VC = meg_data; VC.trial = cell(1,length(meg_data.trial)); VC.label = cell(1,length(alpha_filter.avg.pow)); for i = 1:length(VC.trial) for j = 1:length(VC.label) VC.trial{i}(j,:) = alpha_filter{j}*meg_data.trial{i}; VC.label(j) = {['virtual_channel',num2str(j)]}; end; end; % 4) compute the spectrum of the virtual channel data cfg = []; cfg.method = 'mtmfft'; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; cfg.tapsmofrq = 1; cfg.foi = 0.1:100; [pow] = ft_freqanalysis(cfg,VC); Any help or suggestions would be greatly appreciated. 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_channel_DICS_power_reduction.jpg Type: image/jpeg Size: 132452 bytes Desc: not available URL: From erin.white at sickkids.ca Thu Nov 26 13:48:25 2015 From: erin.white at sickkids.ca (Erin White) Date: Thu, 26 Nov 2015 12:48:25 +0000 Subject: [FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images Message-ID: <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D@SKMBXX03.sickkids.ca> Hi, I'm new at programming and was wondering if someone could help with something that I'm sure is simple. I'd like to add tick marks to my multiplotER and multiplotTFR figures so that the timing and amplitude (for multiplotER) and timing and frequency (for multiplotTFR) scales are presented clearly. For example, I'd like a tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER images and every 5 Hz for TFR images. Could anyone suggest what I should add to my code to show this? Thanks very much! Erin ---------------------------------------------------- Erin White, PhD Post-Doctoral Research Fellow Neurosciences and Mental Health The Hospital for Sick Children 555 University Avenue Toronto, Ontario Canada Telephone: (647)834-7813 ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Nov 27 13:28:58 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 27 Nov 2015 12:28:58 +0000 Subject: [FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images Message-ID: Hi Erin, I don't use the multiplot functions much, so my solution is clunky and there may be others on the list with a better way to do this. But just in case, here's how I do it: Rather than using multiplot, I make each plot individually, and use the subplot() command to arrange multiple plots into a figure. Within each subplot, I just use some custom code to draw the ticks. For example: tickspots = [-200:200:1000]; % one tick every 200 ms, from -200 to 1000 ms tickheight = [-.5 .5]; % how high and low the ticks will go for tickspots = tickspot % iterate through tick spots plot( [tickspot tickspot], tickheight, 'k' ); % plot each tick as a black line end; Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > ------------------------------ > > Message: 2 > Date: Thu, 26 Nov 2015 12:48:25 +0000 > From: Erin White > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Adding tick marks to the X and Y axes in > multiplotER and multiplotTFR images > Message-ID: > <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D at SKMBXX03.sickkids.ca> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I'm new at programming and was wondering if someone could help with > something that I'm sure is simple. > I'd like to add tick marks to my multiplotER and multiplotTFR figures so > that the timing and amplitude (for multiplotER) and timing and frequency > (for multiplotTFR) scales are presented clearly. For example, I'd like a > tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER > images and every 5 Hz for TFR images. > > Could anyone suggest what I should add to my code to show this? > > Thanks very much! > > Erin > > > > > > > > > > > > > ---------------------------------------------------- > Erin White, PhD > Post-Doctoral Research Fellow > Neurosciences and Mental Health > The Hospital for Sick Children > 555 University Avenue > Toronto, Ontario > Canada > Telephone: (647)834-7813 > > ________________________________ > > This e-mail may contain confidential, personal and/or health > information(information which may be subject to legal restrictions on use, > retention and/or disclosure) for the sole use of the intended recipient. > Any review or distribution by anyone other than the person for whom it was > originally intended is strictly prohibited. If you have received this > e-mail in error, please contact the sender and delete all copies. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151126/f0640a71/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 23 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Fri Nov 27 16:19:27 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Fri, 27 Nov 2015 16:19:27 +0100 Subject: [FieldTrip] why "fixedori"=yes? Message-ID: Dear Fieldtrip users, I am currently working on beamformer source estimation using EEG data. My question is about the meaning behind cfg.fixedori in ft_sourceanalysis. As one of the fieldtrip tutorials explains, cfg.fixedori = 'yes' leads to only the largest of the three dipole directions per spatial filter being kept, the other two get discarded. My specific questions are: (1) why should this be done? (2) is this an MEG-specific setting due to the fact that MEG is somewhat blind to particular dipole orientations? (in which case cfg.fixedori = 'no' for EEG data?) (3) does anyone have an article in mind where the need for this processing step is explained/illustrated? Best wishes, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From vpapenm at uni-koeln.de Sun Nov 29 19:43:02 2015 From: vpapenm at uni-koeln.de (vpapenm at uni-koeln.de) Date: Sun, 29 Nov 2015 19:43:02 +0100 Subject: [FieldTrip] Spectral factorization: Wilson-Burg algorithm does not converge Message-ID: <20151129194302.Horde.q4hgBAr5av_BdvL_7VvPuv8@webmail.uni-koeln.de> Dear all, I use sfactorization_wilson.m (in my own pipeline outside field trip actually) to estimate the spectral Granger causality of my time series (local field potentials from deep brain stimulation electrodes). As input I use a 3D spectral matrix S with dimensions 2x2x32 calculated from wavelet transformation at frequencies f=[0:1:31] Hz. It consists of time-averaged auto- (Sxx, Syy) and cross-spectral densities (Sxy, conj(Sxy)), obtained from smoothing the wavelet matrix. My problem is that the implemented Wilson-Burg algorithm quite often does not converge at all and I wonder if anybody else has that problem. The non-convergence leads to a new spectral matrix Snew=psi*psi', which has non-zero imaginary parts or which is simply too different from the original matrix S. I also wonder why the only criteria to stop the iteration is when the increment step psi_old-psi becomes small. Why is there no criterion to stop the iteration if the new spectral matrix is close enough to the original one (e.g. S-Snew References: <20151129194302.Horde.q4hgBAr5av_BdvL_7VvPuv8@webmail.uni-koeln.de> Message-ID: <427A0885-F577-4FE0-9583-B3BDCBBA3C08@fcdonders.ru.nl> Hi Mitch, It could be that your dysconvergence is due to 1) you using a wavelet transform, and 2) you using a very limited bandwidth. In my experience the algorithm performs best if you use a multitapered FFT approach, estimating frequencies from 0 up until the Nyquist frequency, and using a lot of zero-padding before the spectral estimation. Best, Jan-Mathijs On Nov 29, 2015, at 7:43 PM, vpapenm at uni-koeln.de wrote: > Dear all, > > I use sfactorization_wilson.m (in my own pipeline outside field trip actually) to estimate the spectral Granger causality of my time series (local field potentials from deep brain stimulation electrodes). As input I use a 3D spectral matrix S with dimensions 2x2x32 calculated from wavelet transformation at frequencies f=[0:1:31] Hz. It consists of time-averaged auto- (Sxx, Syy) and cross-spectral densities (Sxy, conj(Sxy)), obtained from smoothing the wavelet matrix. > > My problem is that the implemented Wilson-Burg algorithm quite often does not converge at all and I wonder if anybody else has that problem. The non-convergence leads to a new spectral matrix Snew=psi*psi', which has non-zero imaginary parts or which is simply too different from the original matrix S. > > I also wonder why the only criteria to stop the iteration is when the increment step psi_old-psi becomes small. Why is there no criterion to stop the iteration if the new spectral matrix is close enough to the original one (e.g. S-Snew > At the moment I have tried two different approaches to estimate the power at f=0 Hz: 1) I use the power at f=0Hz from FFT [which is mean( sum(x).^2/N*dt ); for the auto-spectra, e.g.] and 2) I use a linear extrapolation of the PSD to get P(f=0). However, both methods do not lead to sufficient convergence of the algorithm. > > I would be very grateful if someone found the time to answer. > > Best regards, > Mitch > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From barbara.schorr at uni-ulm.de Mon Nov 30 10:52:32 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Mon, 30 Nov 2015 10:52:32 +0100 Subject: [FieldTrip] SCD and coherence analysis Message-ID: <52d6-565c1c80-25-55c3b400@102538225> Dear Fieltripers, I would like to do coherence analysis. I did a SCD analysis on my data first ('finite' method), and want to run ft_mvaranalysis now. I get the error Error using ft_datatype_sens (line 186) inconsistent number of channels in sensor description As cfg.elec I use the GSN-HydroCel-257.sfp file which is included in fieldtrip (my raw data set has 257 channels), but there are only 256 channels left after the SCD analysis. Can this cause the problem? Has anyone had this problem before and can provide a solution? I only found one prior entry with this topic, but there was no final solution for it. Thanks and all the best, Barbara From maity_winky at yahoo.es Mon Nov 30 16:31:20 2015 From: maity_winky at yahoo.es (=?UTF-8?Q?Mait=C3=A9_Crespo_Garc=C3=ADa?=) Date: Mon, 30 Nov 2015 15:31:20 +0000 (UTC) Subject: [FieldTrip] power suppression during DICS beamforming ? In-Reply-To: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> References: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> Message-ID: <1881724873.21184223.1448897480847.JavaMail.yahoo@mail.yahoo.com> Dear Frédéri, maybe you have the solution already. In case not, could you explain how did you get the last two plots? Are spectra computed after averaging across all virtual channel spectra or you are representing the spectrum of the source with maximal power? Best,Maite El Jueves 26 de noviembre de 2015 13:55, Frédéric Roux escribió: Dear all, I am observing a counter-intuitive result after applying the spatial filters obtained from DICS beamforming to my MEG data. The plot in the attachment summarizes the issue: The raw data shows a clear peak of activity at 10 Hz, however, after applying the spatial filter to the MEG data the spectrum of the virtual channels shows that power in this frequency band is reduced. The same also happens when I apply a spatial filter in the gamma range for power at 70 Hz to the raw MEG signals. Is this something that falls out of the beamformer math due to the fact how the algorithm suppresses power at all locations by minimizing the noise level, or is there something wrong with my code? I (maybe naively) assumed that the results should come out the opposite. On the other hand, when plotting the noise normalized maps (NAI) of both the alpha and gamma beamformers the sources look quite accurate. Should I normalize with the level of noise first before plotting the spectrum to see the expected results (ie an upregulation of power instead of a downregulation of power)? The code that I use to generate the figures is: % 1) compute CSD matrix cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foilim = [10 10]; cfg.tapsmofrq = 2; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; [csd] = ft_freqanalysis(cfg,meg_data); % 2) compute DICS filter cfg = []; cfg.method = 'dics'; cfg.grad = meg_data.grad; cfg.headmodel = vol; cfg.frequency = csd.freq; cfg.dics.realfiter = 'yes'; cfg.dics.fixedori = 'yes'; [alpha_filter]= ft_sourceanalysis(cfg,csd); % 3) compute the virtual channel data VC = meg_data; VC.trial = cell(1,length(meg_data.trial)); VC.label = cell(1,length(alpha_filter.avg.pow)); for i = 1:length(VC.trial)   for j = 1:length(VC.label)       VC.trial{i}(j,:) = alpha_filter{j}*meg_data.trial{i};       VC.label(j) = {['virtual_channel',num2str(j)]};   end; end; % 4) compute the spectrum of the virtual channel data cfg = []; cfg.method = 'mtmfft'; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; cfg.tapsmofrq = 1; cfg.foi = 0.1:100; [pow] = ft_freqanalysis(cfg,VC); Any help or suggestions would be greatly appreciated. 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” _______________________________________________ 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 pmetzak at gmail.com Tue Nov 3 00:34:52 2015 From: pmetzak at gmail.com (Paul Metzak) Date: Mon, 2 Nov 2015 15:34:52 -0800 Subject: [FieldTrip] ft_sourcestatistics: cfg.design and memory issues Message-ID: Hello, I am new to FieldTrip (and MEG) and I have been working through the walkthroughs and tutorials in an attempt to use beamforming to source localize my MEG data. In this experiment, there are 3 conditions and 2 groups. I have been following the Example: Source Statistics ( http://www.fieldtriptoolbox.org/example/source_statistics) tutorial but I have encountered a couple of difficulties. 1) The first issue is in the choice of design matrix for the analyses I would like to run. The tutorial offers a very clear example of how to assess differences between conditions within a single group, but it is less straightforward (to me at least) how to run an analysis of the differences between two groups on a single condition. In my case, I have 17 participants from group 1 and 14 participants from group 2. I have created 17x1 and 14x1 cell array containing the output from each subject's beamform (at the individual subject level, I contrasted a period of interest from condition 1 with an equivalent length of time from the prestim baseline). My call to ft_sourcestatistics is below. Is this the proper way to set up the design matrix to run this analysis? I know that participants are not true 'independent variables' but it seems to me that treating them as such will randomise group assignment to produce the monte carlo distribution that I am looking for. cfg=[]; cfg.dim=cond1_h{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; % note that this only implies single-sided testing cfg.tail = 0; nsubj=17; cfg2.design(1,:) = [ones(1,nsubj) ones(1,nsubj)*2]; %create over-large desmtx cfg.design=cfg.design(:,1:31); %trim desmtx to correct specs cfg.ivar = 1; % row of design matrix that contains independent variable (the participants) stat = ft_sourcestatistics(cfg, cond1_h{:}, cond1_s{:}); 2) The second issue is that it appears I have been inefficient in my memory use as matlab crashes when I attempt to run this analysis ( FYI I have 16GB of RAM and 16GB of swap space). I have employed the -nojvm flag when starting matlab, and I have used struct2single to try and reduce the memory load but matlab still crashes out (without message) when I attempt to run this analysis. This code will run on my computer with a maximum of 4 subjects from each group and 50 randomizations, which is obviously not ideal for me. Please find the contents of a single cell from one of the groups below. Is there something that is obviously problematic in what I have so far? inside: [256x256x256 logical] pow: [256x256x256 single] dim: [256 256 256] transform: [4x4 single] anatomy: [256x256x256 single] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Thank you very much for any help you can offer me with this! If any further information or clarifications would be useful to help diagnose or overcome this issue, please let me know. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Tue Nov 3 10:06:25 2015 From: anne.urai at gmail.com (Anne Urai) Date: Tue, 3 Nov 2015 10:06:25 +0100 Subject: [FieldTrip] ft_sourcestatistics: cfg.design and memory issues In-Reply-To: References: Message-ID: Hi Paul, in my experience, the cfg field can get rather big as it accumulates information about previous steps in the pipeline. source = rmfield(source, 'cfg') might help a bit. Cheers, Anne On 3 November 2015 at 00:34, Paul Metzak wrote: > Hello, > > I am new to FieldTrip (and MEG) and I have been working through the > walkthroughs and tutorials in an attempt to use beamforming to source > localize my MEG data. In this experiment, there are 3 conditions and 2 > groups. I have been following the Example: Source Statistics ( > http://www.fieldtriptoolbox.org/example/source_statistics) tutorial but I > have encountered a couple of difficulties. > > 1) The first issue is in the choice of design matrix for the analyses I > would like to run. The tutorial offers a very clear example of how to > assess differences between conditions within a single group, but it is less > straightforward (to me at least) how to run an analysis of the differences > between two groups on a single condition. In my case, I have 17 > participants from group 1 and 14 participants from group 2. I have created > 17x1 and 14x1 cell array containing the output from each subject's beamform > (at the individual subject level, I contrasted a period of interest from > condition 1 with an equivalent length of time from the prestim baseline). > My call to ft_sourcestatistics is below. Is this the proper way to set up > the design matrix to run this analysis? I know that participants are not > true 'independent variables' but it seems to me that treating them as such > will randomise group assignment to produce the monte carlo distribution > that I am looking for. > > cfg=[]; > cfg.dim=cond1_h{1}.dim; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.parameter = 'pow'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; % note that this only implies single-sided testing > cfg.tail = 0; > > nsubj=17; > cfg2.design(1,:) = [ones(1,nsubj) ones(1,nsubj)*2]; %create over-large > desmtx > cfg.design=cfg.design(:,1:31); %trim desmtx to correct specs > cfg.ivar = 1; % row of design matrix that contains independent > variable (the participants) > > stat = ft_sourcestatistics(cfg, cond1_h{:}, cond1_s{:}); > > 2) The second issue is that it appears I have been inefficient in my > memory use as matlab crashes when I attempt to run this analysis ( FYI I > have 16GB of RAM and 16GB of swap space). I have employed the -nojvm flag > when starting matlab, and I have used struct2single to try and reduce the > memory load but matlab still crashes out (without message) when I attempt > to run this analysis. This code will run on my computer with a maximum of 4 > subjects from each group and 50 randomizations, which is obviously not > ideal for me. Please find the contents of a single cell from one of the > groups below. Is there something that is obviously problematic in what I > have so far? > > inside: [256x256x256 logical] > pow: [256x256x256 single] > dim: [256 256 256] > transform: [4x4 single] > anatomy: [256x256x256 single] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > Thank you very much for any help you can offer me with this! If any > further information or clarifications would be useful to help diagnose or > overcome this issue, please let me know. > > Paul > > > > > _______________________________________________ > 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 Holger.Krause at med.uni-duesseldorf.de Tue Nov 3 16:45:55 2015 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Tue, 3 Nov 2015 16:45:55 +0100 Subject: [FieldTrip] No daily releases on ftp-server since two weeks? Message-ID: <4718281.hncb08gLrJ@metta> Hi, the newest version I can find on ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/ dates from "Tue Oct 20 21:03:00 2015". Will newer versions still be made available here? Thanks in advance! Holger From mikexcohen at gmail.com Tue Nov 3 17:33:22 2015 From: mikexcohen at gmail.com (Mike X Cohen) Date: Tue, 3 Nov 2015 17:33:22 +0100 Subject: [FieldTrip] Conference announcement: ICON (August 2017, Amsterdam) Message-ID: We are happy to make the first announcement for the ICON XIII conference, which will take place on 5-9 August 2017 in Amsterdam (the Netherlands). Amsterdam is an easily-accessible and progressive city. ICON will take place at the Beurs van Berlage, located in downtown Amsterdam and one of the most beautiful conference venues in Europe! Visit the website: http://www.icon2017.org ICON stands for International Conference for Cognitive Neuroscience. ICON has taken place every 2-3 years since 1980. This conference brings together researchers from diverse backgrounds, joined by their interest in studying the relationships amongst brain, mind, and behavior. ICON conferences are always a big success, and 2017 in Amsterdam will follow this same tradition! Symposia and poster submissions will be open from early summer 2016, with deadlines in August/October (precise dates to be announced in the future). Plan your research accordingly! PRE-CONFERENCE WORKSHOPS/SATELLITES We welcome pre-conference satellites, and will be happy to advertise them on the ICON website. Note that satellites are independent from ICON in terms of organization, registration, and costs. If you have any questions or would like to discuss ideas for your satellite, please contact Mike Cohen (mikexcohen at gmail.com) and Birte Forstmann (buforstmann at gmail.com). FOLLOW US ON TWITTER For up-to-date announcements before and during the ICON meeting, follow @icon2017 (see also "Media" tab on the website). http://www.icon2017.org We look forward to seeing you in beautiful Amsterdam! Mike X Cohen and Birte Forstmann -- Mike X Cohen, PhD mikexcohen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Tue Nov 3 21:21:51 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Tue, 3 Nov 2015 15:21:51 -0500 Subject: [FieldTrip] one-dimensional cluster stats Message-ID: hi all, I'm trying to trick Fieldtrip into doing cluster stats on "one-dimensional" EEG data. What I mean by that is that for every subject, and every electrode, I have only one value (average density of sleep spindles). So no time dimension, just a spatial one. I assumed (but I'm not sure) that Fieldtrip always requires a time dimension, so I'm essentially copying the data over to a second sample, and set 'avgovertime' to yes. I have a simple between-subjects design (at least for a first pass) with 16 and 20 subjects respectively. my code: cfg=[]; *%I get my chanlocs from eeglab* cfg=eeglab2fieldtrip(myeeg,'chanloc'); cfg.rotate=90; %because eeglab and fieldtrip have different orientations cfg.layout=ft_prepare_layout(cfg); cfg.label=cfg.elec.label; cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,cfg.elec); cfg.channel = {'EEG'}; cfg.latency = 'all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.alpha = 0.05; cfg.tail = 2; cfg.numrandomization = 1000; cfg.avgovertime = 'yes'; cfg.design: [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] cfg.ivar: 1 *%data to compare* spindledata.dimord='subj_chan_time'; % spindledata.time=[0 1]; %pretend I have two timepoints spindledata.label=cfg.label; %*paste data (and use repmat to make a copy for the second timepoint)* spindledata1=spindledata; spindledata2=spindledata; spindledata1.avg=repmat(allData(allLabels==1,:),[1 1 2]); spindledata2.avg=repmat(allData(allLabels==2,:),[1 1 2]); [statT] = ft_timelockstatistics(cfg,spindledata1,spindledata2); Matlab's output: total number of measurements = 36 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parametric threshold for clustering Reference to non-existent field 'critval'. Error using ft_statistics_montecarlo (line 250) could not determine the parametric critical value for clustering Error in ft_timelockstatistics (line 181) [stat, cfg] = statmethod(cfg, dat, design); Error in spindlestats (line 149) [statT] = ft_timelockstatistics(cfg,spindledata1,spindledata2); When I step into the ft_timelockstatistics to figure out what's happening, I notice that the cfg.channel field holds only 32 channels (while I have 58). Similarly, right before it crashes the "dat" variable is also a 32x36 matrix while I'd expect a 58x36. All my data are free of Nans, so that's not it. It's a great mystery to me so any suggestions are welcome. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Nov 4 00:00:35 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 4 Nov 2015 00:00:35 +0100 Subject: [FieldTrip] bemcp vs dipoli Message-ID: Hi Fieldtrip users, When constructing a volume conduction model for EEG using the boundary element method (BEM), there are two methods available: 'dipoli' and 'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), are there any differences that you know of/have experienced that make one method better (more reliable, more accurate, or anything else that makes you prefer one rather) than the other? For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During processing with 'bemcp' there is a "warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the end result being that vol.mat contains NaNs. The input in both cases, besides the method chosen, is identical. Taking one step back in the processing pipeline, I am aware that a poor segmentation outcome might be a/the cause of the warnings and eventual errors when constructing a volume conduction model. But in general this should hold equally for both methods. What I am wondering about is why one method might deal more successfully than the other with the same input. Best, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailtome.2113 at gmail.com Wed Nov 4 00:49:36 2015 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Wed, 4 Nov 2015 10:49:36 +1100 Subject: [FieldTrip] Re referencing Message-ID: Dear fieldtrip community, I am working with 128 channel EEG data recorded with EGI system. The data was recorded with Cz reference. I want to re-reference to average reference and get the data from the original reference channel Cz. When I run the following code, I still can't get the data from Cz. Could you please suggest a fix? Thanks, Arti cfg = []; cfg.reref = 'yes'; cfg.implicitref = 'Cz'; cfg.refchannel = 'all'; data_reref= ft_preprocessing(cfg, data_clean); -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.aurtenetxe at bcbl.eu Wed Nov 4 09:51:00 2015 From: s.aurtenetxe at bcbl.eu (Sara Aurtenetxe) Date: Wed, 4 Nov 2015 09:51:00 +0100 (CET) Subject: [FieldTrip] Combineplanars and timelockstatistics Message-ID: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> Dear all, I would highly appreciate if an expert on the field could comment on the following questions, or highlight a reference, since as far as I am aware of, there are different opinions on it. When doing timelockstatistics (ERFs) at the gradiometers level: - Do the gradiometers need to be combined (ft_combineplanar) before the stats? And/or do they need to be combined for visualization of effects? - Which is the (mathematical) explanation for the answer/s? - Does apply the same when doing source analysis with 'lcmv'? Thanks a lot in advance, All the best, Sara From alexandre.gramfort at telecom-paristech.fr Wed Nov 4 10:05:53 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 4 Nov 2015 10:05:53 +0100 Subject: [FieldTrip] bemcp vs dipoli In-Reply-To: References: Message-ID: hi Maris, you can have a look at: http://www.hindawi.com/journals/cin/2011/923703/ especially: http://www.hindawi.com/journals/cin/2011/923703/fig12/ LC (linear collocation) is bemcp and LCISA is dipoli. When using ISA (isolated skull approach) accuracy is better. In summary use dipoli if you can. Hope this helps, Best, Alex On Wed, Nov 4, 2015 at 12:00 AM, Maris Skujevskis wrote: > Hi Fieldtrip users, > > When constructing a volume conduction model for EEG using the boundary > element method (BEM), there are two methods available: 'dipoli' and 'bemcp'. > Besides technicalities (i.e., 'dipoli' only available on Linux), are there > any differences that you know of/have experienced that make one method > better (more reliable, more accurate, or anything else that makes you prefer > one rather) than the other? > > For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During > processing with 'bemcp' there is a "warning: Matrix is singular, close to > singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the > end result being that vol.mat contains NaNs. > The input in both cases, besides the method chosen, is identical. > > Taking one step back in the processing pipeline, I am aware that a poor > segmentation outcome might be a/the cause of the warnings and eventual > errors when constructing a volume conduction model. But in general this > should hold equally for both methods. What I am wondering about is why one > method might deal more successfully than the other with the same input. > > Best, > Maris > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From thomas.hartmann at th-ht.de Wed Nov 4 11:19:45 2015 From: thomas.hartmann at th-ht.de (Thomas Hartmann) Date: Wed, 4 Nov 2015 11:19:45 +0100 Subject: [FieldTrip] Combineplanars and timelockstatistics In-Reply-To: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> References: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> Message-ID: <5639DBC1.5070502@th-ht.de> dear sara, Am 2015-11-04 um 09:51 schrieb Sara Aurtenetxe: > When doing timelockstatistics (ERFs) at the gradiometers level: > > - Do the gradiometers need to be combined (ft_combineplanar) before the stats? > And/or do they need to be combined for visualization of effects? > > - Which is the (mathematical) explanation for the answer/s? let me answer both questions at the same time: the two planar gradiometers that make up the set of two that you find at each sensor location point into orthogonal directions. you can imagine one pointing along the x-axis, the other pointing along the y-axis of a 2d coordinate system. so, the gradiometer pointing along the x-axis would pick up 100% percent of an activity that increases or decreases in that direction. if the activity increases or decreases along the y-axis, the x-axis gradiometer would not pick up anything. instead, the other gradiometer would pick up the whole energy. if there is activity that increases or decreases in an angle 45° to both gradiometers, both would pick up half the energy. this works accordingly for any orientation of the underlying source. i.e. the two gradiometers pick up the x and the y part of the signal. this means, that the activity at the x-gradiometer is meaningless without the activity at the y-gradiometer. and as the orientations of the respective gradiometers with respect to the head are arbitrary, it does not make sense to compare, let's say the x-gradiometer at one spot with the x-gradiometer at another one. mathematically speaking: instead of looking at the coordinates of your vector, you want the length of it. so, in order to get that, you need to do: sqrt(x^2 + y^2). so, long story short: yes, you need to to ft_combineplanar before sensor level stats. > - Does apply the same when doing source analysis with 'lcmv'? no, this is a different story. it is quite the opposite: the activity at a voxel (or grid point) is the linear combination (i.e. a weighed sum) of the activity at all the sensors. the weighing coefficients are what you calculate when you first do your forward and the then the inverse model (e.g., bem modelling as forward model, LCMV for the inverse solution). the forward modelling takes into account the orientation of the sensors and also knows, where the head is, i.e. how the brain is oriented with respect to the sensor. so, no need to do ft_combineplanar here. best, thomas > > Thanks a lot in advance, > All the best, > > Sara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email:thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From RICHARDS at mailbox.sc.edu Wed Nov 4 14:36:00 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 4 Nov 2015 13:36:00 +0000 Subject: [FieldTrip] bemcp vs dipoli Message-ID: In addition to the answer given by Alexandre Gramfort. I have compared BEMCP, Dipoli, Sim-bio FEM, and spherical models. My tests use an individual head model with that individuals data, and then head models based on other participants, age-appropriate MRI templates, and age-inappropriate MRI templates; with infants. The BEMCP is the three-compartment model, the Dipoli is a four-compartment model, the Simbio is a full segmented head model with 10 different materials, the spherical is four spheres. 1—I sometimes have issues getting the forward model / source analysis with BEMCP. It appears to have singularities on the borders of the compartments and gives the same answer as you report. Or does not even compute. Using the same (or similar) head model mesh with Dipole, it works. 2—I have been using the Dipoli with four compartments. I am comparing the four methods with a set of empirical data and simulated data. I have found that the dipole solutions on a single individual(s) for the BEMCP and the spherical models are closer in solution, and the Dipoli and the SimBio-FEM are closer in the solution. 3—I also have been using head models from different individuals to solve the forward model for the EEG from a single individual, comparing the solutions across head models. Both the SimBio-FEM and Dipoli show the greatest change in solution across individuals with different head sizes or ages (using age-appropriate and age-inappropriate heads), whereas the BEMCP and spherical model show the least change. Interesting, the larger change for the two models occurs because its theoretical fit when the head comes from the individual is better than the fit when the head comes from an inappropriate age, whereas the age-appropriate head model are not as important for BEMCP and spherical models because they fit poorer. The results from 2 and 3 are being analyzed now, eventually will reach publication. John >------------------------------ > >Message: 4 >Date: Wed, 4 Nov 2015 00:00:35 +0100 >From: Maris Skujevskis >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] bemcp vs dipoli >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Hi Fieldtrip users, > >When constructing a volume conduction model for EEG using the boundary >element method (BEM), there are two methods available: 'dipoli' and >'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), >are there any differences that you know of/have experienced that make one >method better (more reliable, more accurate, or anything else that makes >you prefer one rather) than the other? > >For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During >processing with 'bemcp' there is a "warning: Matrix is singular, close to >singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the >end result being that vol.mat contains NaNs. >The input in both cases, besides the method chosen, is identical. > >Taking one step back in the processing pipeline, I am aware that a poor >segmentation outcome might be a/the cause of the warnings and eventual >errors when constructing a volume conduction model. But in general this >should hold equally for both methods. What I am wondering about is why one >method might deal more successfully than the other with the same input. > >Best, >Maris >-------------- next part -------------- From litvak.vladimir at gmail.com Wed Nov 4 14:51:14 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Wed, 4 Nov 2015 13:51:14 +0000 Subject: [FieldTrip] bemcp vs dipoli In-Reply-To: References: Message-ID: Dear all, I have also looked at this in a different context and found that bemcp computation breaks down at distances smaller than mean triangle side length from the boundary (for meshes used in SPM that's about 6mm). So you can avoid numerical problems by making sure your sources are never closer than that to the inner skull boundary. This can be done with cfg.inwardshift (for grids) or cfg.moveinward (for meshes) arguments of ft_prepare_sourcemodel, In SPM12 this is done automatically for the forward models we generate. Best, Vladimir On Wed, Nov 4, 2015 at 1:36 PM, RICHARDS, JOHN wrote: > In addition to the answer given by Alexandre Gramfort. > > I have compared BEMCP, Dipoli, Sim-bio FEM, and spherical models. My > tests use an individual head model with that individuals data, and then > head models based on other participants, age-appropriate MRI templates, and > age-inappropriate MRI templates; with infants. The BEMCP is the > three-compartment model, the Dipoli is a four-compartment model, the Simbio > is a full segmented head model with 10 different materials, the spherical > is four spheres. > > 1—I sometimes have issues getting the forward model / source analysis with > BEMCP. It appears to have singularities on the borders of the compartments > and gives the same answer as you report. Or does not even compute. Using > the same (or similar) head model mesh with Dipole, it works. > > 2—I have been using the Dipoli with four compartments. I am comparing the > four methods with a set of empirical data and simulated data. I have found > that the dipole solutions on a single individual(s) for the BEMCP and the > spherical models are closer in solution, and the Dipoli and the SimBio-FEM > are closer in the solution. > > 3—I also have been using head models from different individuals to solve > the forward model for the EEG from a single individual, comparing the > solutions across head models. Both the SimBio-FEM and Dipoli show the > greatest change in solution across individuals with different head sizes or > ages (using age-appropriate and age-inappropriate heads), whereas the BEMCP > and spherical model show the least change. Interesting, the larger change > for the two models occurs because its theoretical fit when the head comes > from the individual is better than the fit when the head comes from an > inappropriate age, whereas the age-appropriate head model are not as > important for BEMCP and spherical models because they fit poorer. > > The results from 2 and 3 are being analyzed now, eventually will reach > publication. > > John > > > >------------------------------ > > > >Message: 4 > >Date: Wed, 4 Nov 2015 00:00:35 +0100 > >From: Maris Skujevskis > >To: fieldtrip at science.ru.nl > >Subject: [FieldTrip] bemcp vs dipoli > >Message-ID: > > dQimv7Q at mail.gmail.com> > >Content-Type: text/plain; charset="utf-8" > > > >Hi Fieldtrip users, > > > >When constructing a volume conduction model for EEG using the boundary > >element method (BEM), there are two methods available: 'dipoli' and > >'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), > >are there any differences that you know of/have experienced that make one > >method better (more reliable, more accurate, or anything else that makes > >you prefer one rather) than the other? > > > >For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During > >processing with 'bemcp' there is a "warning: Matrix is singular, close to > >singular or badly scaled. Results may be inaccurate. RCOND = NaN", with > the > >end result being that vol.mat contains NaNs. > >The input in both cases, besides the method chosen, is identical. > > > >Taking one step back in the processing pipeline, I am aware that a poor > >segmentation outcome might be a/the cause of the warnings and eventual > >errors when constructing a volume conduction model. But in general this > >should hold equally for both methods. What I am wondering about is why one > >method might deal more successfully than the other with the same input. > > > >Best, > >Maris > >-------------- next part -------------- > > _______________________________________________ > 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 inouereo0406 at gmail.com Thu Nov 5 00:15:50 2015 From: inouereo0406 at gmail.com (Reo Inoue) Date: Wed, 04 Nov 2015 23:15:50 +0000 Subject: [FieldTrip] How to obtain all trials data? Message-ID: <1446678950846-66347c9d-4c1fc339-4b7068ac@mixmax.com> Dear all, I use function; ft_sourceanalysis following. [source] = ft_sourceanalysis(cfg, timelock) And I want to obtain the all trials data, not average. But I could not understand why i obtain the average. My config is following. Are there any problems? cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' jackknife resampling of trials cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = ft_sourceanalysis(cfg,timelock); Thanks a lot in advance, All the best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Thu Nov 5 12:06:26 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Thu, 5 Nov 2015 11:06:26 +0000 Subject: [FieldTrip] How to obtain all trials data? Message-ID: Hello Reo, What was the format of the timelock data structure you supplied to ft_sourceanalysis()? i.e., when you called ft_timelockanalysis() to create the timelock structure earlier, did you also use cfg.keeptrials='yes' there? If not, then your timelock structure would be an average (rather than all trials), and thus the source data you get would also be averaged across trials. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 3 > Date: Wed, 04 Nov 2015 23:15:50 +0000 > From: Reo Inoue > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] How to obtain all trials data? > Message-ID: <1446678950846-66347c9d-4c1fc339-4b7068ac at mixmax.com> > Content-Type: text/plain; charset="us-ascii"; Format="flowed" > > Dear all, > > I use function; ft_sourceanalysis following. [source] = > ft_sourceanalysis(cfg, timelock) > And I want to obtain the all trials data, not average. But I could not > understand why i obtain the average. My config is following. Are there any > problems? > cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' > jackknife resampling of trials > cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials > cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials > cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of > original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with > volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure > with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = > ft_sourceanalysis(cfg,timelock); > > > Thanks a lot in advance, > All the best, > -------------- next part -------------- An HTML attachment was scrubbed... URL: From inouereo0406 at gmail.com Thu Nov 5 13:11:58 2015 From: inouereo0406 at gmail.com (Reo Inoue) Date: Thu, 05 Nov 2015 12:11:58 +0000 Subject: [FieldTrip] How to obtain all trials data? In-Reply-To: References: Message-ID: <1446725518503-9830d601-c4877279-85e07c59@mixmax.com> Dear all, Steve I use ft_timelockanalysis before ft_sourceanalysis. I also use cfg.keeptrials='yes' there. All the best 2015-11-05 20:06 GMT+09:00 Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk > : Hello Reo, What was the format of the timelock data structure you supplied to ft_sourceanalysis()? i.e., when you called ft_timelockanalysis() to create the timelock structure earlier, did you also use cfg.keeptrials='yes' there? If not, then your timelock structure would be an average (rather than all trials), and thus the source data you get would also be averaged across trials. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~ cpgl0080/ Message: 3 Date: Wed, 04 Nov 2015 23:15:50 +0000 From: Reo Inoue < inouereo0406 at gmail.com > To: fieldtrip at science.ru.nl Subject: [FieldTrip] How to obtain all trials data? Message-ID: < 1446678950846-66347c9d- 4c1fc339-4b7068ac at mixmax.com > Content-Type: text/plain; charset="us-ascii"; Format="flowed" Dear all, I use function; ft_sourceanalysis following. [source] = ft_sourceanalysis(cfg, timelock) And I want to obtain the all trials data, not average. But I could not understand why i obtain the average. My config is following. Are there any problems? cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' jackknife resampling of trials cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = ft_sourceanalysis(cfg, timelock); Thanks a lot in advance, All the best, ______________________________ _________________ 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 s.aurtenetxe at bcbl.eu Thu Nov 5 15:39:14 2015 From: s.aurtenetxe at bcbl.eu (Sara Aurtenetxe) Date: Thu, 5 Nov 2015 15:39:14 +0100 (CET) Subject: [FieldTrip] Combineplanars and timelockstatistics In-Reply-To: <5639DBC1.5070502@th-ht.de> References: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> <5639DBC1.5070502@th-ht.de> Message-ID: <1226445767.1122841.1446734354736.JavaMail.zimbra@bcbl.eu> Dear Thomas, Thanks a lot for your answer. It makes sense that the non-combined planars may not be ideally suited for sensor-level statistics if sources are not equally measured by the same planar gradiometers across participants. Similarly, I can see how dipoles with changing orientation could produce fields with opposite polarity, that is one with a negative peak and another one with a positive peak. In the non-combined case, these would cancel out to zero in the average, whereas in the combined case both components would sum up to a non-zero average. In fact, by doing some further research I found a relevant post by Eric Marris and Michael Wibral on this topic: http://mailman.science.ru.nl/pipermail/fieldtrip/2010-March/002668.html I now clearly see your point about the combined planar gradients providing a better basis for comparisons across participants, especially for the scenario where the dipole would be shifting its orientation or position relative to the helmet across participants. I also imagine that source analysis would provide important additional information here, as it would allow to test the hypothesis that the fields have similar sources across participants. The question that remains to me, however, is whether it is acceptable to ignore the shifts in the dipole orientation from a neurophysiological perspective. Is it legitimate to assume that although the dipoles presumably have the same source but different orientations, they reflect the same process if their orientations differ? Some biophysical insights on this would be very helpful I guess. Looking forward to receive further advice on this. Thanks! Sara Sara Aurtenetxe ----- Original Message ----- From: "Thomas Hartmann" To: fieldtrip at science.ru.nl Sent: Wednesday, November 4, 2015 11:19:45 AM Subject: Re: [FieldTrip] Combineplanars and timelockstatistics dear sara, Am 2015-11-04 um 09:51 schrieb Sara Aurtenetxe: > When doing timelockstatistics (ERFs) at the gradiometers level: > > - Do the gradiometers need to be combined (ft_combineplanar) before the stats? > And/or do they need to be combined for visualization of effects? > > - Which is the (mathematical) explanation for the answer/s? let me answer both questions at the same time: the two planar gradiometers that make up the set of two that you find at each sensor location point into orthogonal directions. you can imagine one pointing along the x-axis, the other pointing along the y-axis of a 2d coordinate system. so, the gradiometer pointing along the x-axis would pick up 100% percent of an activity that increases or decreases in that direction. if the activity increases or decreases along the y-axis, the x-axis gradiometer would not pick up anything. instead, the other gradiometer would pick up the whole energy. if there is activity that increases or decreases in an angle 45° to both gradiometers, both would pick up half the energy. this works accordingly for any orientation of the underlying source. i.e. the two gradiometers pick up the x and the y part of the signal. this means, that the activity at the x-gradiometer is meaningless without the activity at the y-gradiometer. and as the orientations of the respective gradiometers with respect to the head are arbitrary, it does not make sense to compare, let's say the x-gradiometer at one spot with the x-gradiometer at another one. mathematically speaking: instead of looking at the coordinates of your vector, you want the length of it. so, in order to get that, you need to do: sqrt(x^2 + y^2). so, long story short: yes, you need to to ft_combineplanar before sensor level stats. > - Does apply the same when doing source analysis with 'lcmv'? no, this is a different story. it is quite the opposite: the activity at a voxel (or grid point) is the linear combination (i.e. a weighed sum) of the activity at all the sensors. the weighing coefficients are what you calculate when you first do your forward and the then the inverse model (e.g., bem modelling as forward model, LCMV for the inverse solution). the forward modelling takes into account the orientation of the sensors and also knows, where the head is, i.e. how the brain is oriented with respect to the sensor. so, no need to do ft_combineplanar here. best, thomas > > Thanks a lot in advance, > All the best, > > Sara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email:thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From behzadiravani at gmail.com Thu Nov 5 19:18:07 2015 From: behzadiravani at gmail.com (Behzad Iravani) Date: Thu, 5 Nov 2015 19:18:07 +0100 Subject: [FieldTrip] statistical test Message-ID: Hi Fieldtrip users, I'm interested in doing statistical test on the source analysis output. I have used common filter beamforming and I ended up with source structure which doesn't contain avg field and instead has the the information for every trials. I could mange to do descriptive analysis and plot source. But I'm interested to do statistic on it and plot t-map of source. ft_sourcestatistics doesn't work properly. I would be grateful if anyone can help. Best Behzad -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Thu Nov 5 20:58:26 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Thu, 5 Nov 2015 14:58:26 -0500 Subject: [FieldTrip] disconnected cluster Message-ID: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible).[image: Inline image 3] I've inspected my channel layout and that looks good: [image: Inline image 4] I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): [image: Inline image 5] Looking into the disconnected channel F5, the neighborhood structure seems in order: *cfg.neighbours(15)* ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls *cfg.connectivity = channelconnectivity(cfg);* Stepping into this function, on line 20 it says: *chans=cfg.channel;* Checking what this variable contains, it has all my channels in *alphabetical order*, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighboorhood.jpg Type: image/jpeg Size: 26681 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2D_layout.jpg Type: image/jpeg Size: 37822 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cluster.jpg Type: image/jpeg Size: 53401 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Nov 6 07:34:32 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 6 Nov 2015 06:34:32 +0000 Subject: [FieldTrip] disconnected cluster In-Reply-To: References: Message-ID: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Hi Roy, The inadvertent alphabetization of channels should not occur. This issue has popped up in the past on several occasions (and on several locations in the code) and it has been a really tricky issue to deal with once and for all. Thanks for all the detective work so far. From what you write, it seems that the cfg.channel that goes into channelconnectivity is already in alphabetical order. Would it be possible to track down where this happens? Do you explicitly add the alphabetical list to cfg.channel in your call to ft_timelockanalysis? Does the problem persist if you define cfg.channel = data.label, i.e. the list in the order as it occurs in the data. (I would assume that the order of the channels is the same across all input data structures). Best, Jan-Mathijs On Nov 5, 2015, at 8:58 PM, Roy Cox > wrote: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible). I've inspected my channel layout and that looks good: <2D_layout.jpg> I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): Looking into the disconnected channel F5, the neighborhood structure seems in order: cfg.neighbours(15) ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls cfg.connectivity = channelconnectivity(cfg); Stepping into this function, on line 20 it says: chans=cfg.channel; Checking what this variable contains, it has all my channels in alphabetical order, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy _______________________________________________ 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 bmaniscalco at gmail.com Fri Nov 6 17:03:10 2015 From: bmaniscalco at gmail.com (Brian Maniscalco) Date: Fri, 6 Nov 2015 11:03:10 -0500 Subject: [FieldTrip] Smoothing results of ft_sourceanalysis for a cortical sheet Message-ID: Hi all, The minimum norm estimate tutorial http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate describes how to do minimum norm estimation where the source space is a cortical sheet and the activations on the sheet are produced by ft_sourceanalysis. Is there a way in Fieldtrip to conduct smoothing on the output of ft_sourceanalysis for the activations on the cortical sheet? thanks, Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Nov 8 05:21:49 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sat, 7 Nov 2015 20:21:49 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: Message-ID: Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables ? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : > Dear participants in the discussion on behavioural-power correlation, > > My name is Eric Maris and have contributed most of the older statfuns (but > not ft_statfun_correlationT). Together with Arjen, I will try to resolve > some of the issues that have been discussed. Give us some time, and we will > return to you via the Discussion List. > > best, > Eric > > > _______________________________________________ > 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 ls514 at cam.ac.uk Mon Nov 9 16:30:15 2015 From: ls514 at cam.ac.uk (Li Su) Date: Mon, 9 Nov 2015 15:30:15 +0000 Subject: [FieldTrip] Funded PhD Studentship in Cambridge Message-ID: <010C1775-9D09-4E04-B358-D7CF331DCC52@cam.ac.uk> PhD Studentship: Magnetoencephalography (MEG) Imaging in Dementia with Lewy Bodies Department of Psychiatry, University of Cambridge The Department of Psychiatry, University of Cambridge, is pleased to announce one PhD Studentship supported by The Lewy Body Society, to start in October 2016. Applications are welcome. The PhD project will focus on understanding the underlying neurobiological processes in Dementia with Lewy Bodies using Magnetetoencephalography (MEG) and MRI, and will be carried out under the supervision of Dr Li Su and Professor John O’Brien. The successful student will join our team at Department of Psychiatry, School of Clinical Medicine, located at the Cambridge Biomedical Campus on the Addenbrooke’s site. The Department has an outstanding international reputation and expertise in undertaking clinical and neuroimaging studies of neurological and psychiatric diseases, including dementia, and collaborates closely with the University departments of radiology, clinical neuroscience and Wolfson Brain Imaging Centre. The University of Cambridge is consistently ranked among the top universities in the world. The MEG scanner is hosted at the highly renowned MRC Cognition and Brain Sciences Unit (MRC CBSU), one of the only 9 MEG research facilities in the UK. The Department welcomes applications with a good degree in experimental psychology, medicine, neuroscience, statistics, physics, computer science or a related scientific discipline. The successful applicant will have some experience of, or good understanding of the issues involved in, conducting neuroimaging research on clinical populations. Excellent communication and organisational skills are essential. Due to the nature of the project, strong competence in quantitative methods and analytical skills is also essential. Programming skills in Matlab or similar languages would be desirable. Applicants for the Studentship should have, or expect to gain a 1st class or 2.1 class Honours degree in an appropriate subject, and may also have completed further research training or a Masters degree. The stipend will be paid at Research Councils UK rates for the 3 year duration of the award with no fourth year. Only the fees for home/EU students will be met in full. In addition, the Studentship includes funding for MEG scanning costs of the research, and costs for travel to scientific conferences. To apply, please email the following documents to the Education Administrator (Sarah Rowe) email: sr724 at medschl.cam.ac.uk: i) An academic CV (maximum 2 pages) ii) Two official academic references (please ask your referees to send these directly to the Education Administrator) iii) A research proposal within the remit of MEG imaging in DLB (maximum 1000 words, excluding bibliography or figures) iv) A cover letter indicating: o a brief summary of your research interests and any completed research conducted; o a clear summary of your analytical skills and levels; o a clear statement of your eligibility for this funding award (see below). Applications must be received by midnight on 6th Dec 2015. Interviews are likely to be held on 16th Dec 2015. Enquiries regarding the administration of the application process, or potential supervisors, should be directed via email to the Education Administrator, Sarah Rowe, email:sr724 at medschl.cam.ac.uk tel: + 44 (0) 1223 746 105. FURTHER INFORMATION Applicants should note the following before submitting their application: 1. Applicants should contact Dr Li Su (email ls514 at cam.ac.uk) for further information about the studies programme and supervisory possibilities. General information about these is available via the Department of Psychiatry’s website at www.psychiatry.cam.ac.uk/ or via the Cambridge Neuroscience website at www.neuroscience.cam.ac.uk/ or via the clinical school website at www.medschl.cam.ac.uk/research/Themes/neuro.html. 2. Full awards (fees plus maintenance stipend) are open to UK and EU nationals. 3. For full minimum entry requirements, including fluency in English language please refer to the Departmental website. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahjoory86 at gmail.com Mon Nov 9 16:46:24 2015 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Mon, 9 Nov 2015 16:46:24 +0100 Subject: [FieldTrip] Templates for Cortical mesh and Head model Message-ID: Dear Fieldtrip experts, I want to estimate sources restricted on cortex using a template head model and cortical mesh. the available options I could find in fieldtrip are: - template for headmodel: standard_bem - template for cortical mesh: http://www.fieldtriptoolbox.org/template/sourcemodel As far as I see (please correct me if I am wrong): - Both templates for volume conduction model and cortical mesh are based on Colin27. - cortical mesh looks like a White matter surface. I wonder whether: 1- Fieldtrip estimates sources on white matter surface? 2- Isn't there any ICBM based template for Fieldtrip? Many thanks in advance, Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Tue Nov 10 01:52:22 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Mon, 9 Nov 2015 19:52:22 -0500 Subject: [FieldTrip] disconnected cluster In-Reply-To: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> References: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Message-ID: Hi Jan-Matthijs, It was quite a quest, but I think/hope I've located the problem. I was typing this email as I was troubleshooting, so skip to *3)* to get to the point: I've tried setting both cfg.channel = 'all' and cfg.channel = cfg.label before calling ft_timelock_statistics. It makes no difference. *1) ft_timelock_statistics* I think the problem occurs at an earlier stage than what I thought at first, namely on line 105 of this function: *[varargin{:}] = ft_selectdata(tmpcfg, varargin{:});* After this, the varargin array of structures has the alphabetical channel order (while the input tmpcfg.channel was still good): *varargin{1}.cfg.channel* ans = 'Af3' 'Af4' 'Af7' etc Then after the next line *[cfg, varargin{:}] = rollback_provenance(cfg, varargin{:});* cfg now also contains these channel orders. *2) ft_selectdata* on line 264 the contents of cfg.channel is changed from whatever was put in there (either the cfg.label order or 'all') *if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end* this jumps to subfunction get_selection on line 619: *3) ft_get_selection* line 630 then correctly selects the requested channels from the label list in varargin{k}.labels *selchannel = ft_channelselection(cfg.channel, varargin{k}.label);* selchannel still has the correct order of channels, but then line 631 calls "union" which puts things in alphabetical order: *label = union(label, selchannel);* 637 finds the correspondences between the two lists: *[ix, iy] = match_str(label, varargin{k}.label);* then there is a loop from 653-660 that does some more reordering/matching that I don't follow, *but ultimately, on 677, the alphabetical list of channels is assigned to cfg.channel:* *cfg.channel = label;* I believe this is where the error stems from, because the variable "label" has not had its alphabetical order changed since calling "union" on 631. Hope this helps, Roy On Fri, Nov 6, 2015 at 1:34 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Roy, > > The inadvertent alphabetization of channels should not occur. This issue > has popped up in the past on several occasions (and on several locations in > the code) and it has been a really tricky issue to deal with once and for > all. Thanks for all the detective work so far. From what you write, it > seems that the cfg.channel that goes into channelconnectivity is already in > alphabetical order. Would it be possible to track down where this happens? > Do you explicitly add the alphabetical list to cfg.channel in your call to > ft_timelockanalysis? Does the problem persist if you define cfg.channel = > data.label, i.e. the list in the order as it occurs in the data. (I would > assume that the order of the channels is the same across all input data > structures). > > Best, > Jan-Mathijs > > On Nov 5, 2015, at 8:58 PM, Roy Cox wrote: > > hi all, > > I'm worried that something is not quite right with how the channel > neighborhood configuration is used in the formation of spatial clusters. > > I first noticed it when I got a significant cluster like below. Plotted > are t statistics for a between-group comparison, with the significant > "cluster" indicated with white electrodes. Notice F5 and P8 here which are > disconnected from the rest. I should also mention that I have only one > "time point" (and no frequencies), so it's not possible that these channels > are somehow connected via a "time bridge" (if that would even be possible). > > > I've inspected my channel layout and that looks good: > > <2D_layout.jpg> > I've looked at my neighborhood plot and that looks good too, although I > notice that frontal channels are plotted to the right here (not sure if > that's simply by default): > > > > Looking into the disconnected channel F5, the neighborhood structure seems > in order: > > *cfg.neighbours(15)* > > ans = > > label: 'F5' > neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} > > > I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, > which, on line 165 calls > > *cfg.connectivity = channelconnectivity(cfg);* > > Stepping into this function, on line 20 it says: > > *chans=cfg.channel;* > > Checking what this variable contains, it has all my channels in *alphabetical > order*, but my electrode location order is most definitely not. I've > tried to force the orders to be the same by setting cfg.channel = cfg.label > before calling ft_timelockstatistics, but somewhere down the line my > channel order is made alphabetical again. > > So I suspect that the neighborhood structure, reflecting my actual channel > order, is applied to the alphabetical channel order. That would explain why > a cluster could be scattered across the brain (and also why there's still > some spatial continuity given that alphabetically close channels are > usually close together in space). > > Has anyone ever seen this? Any suggestions how to solve this (other than > making my entire channel location file alphabetical)? I'm also posting this > because it may be of relevance to others. > > Roy > > > _______________________________________________ > 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 jan.schoffelen at donders.ru.nl Tue Nov 10 10:58:02 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Nov 2015 09:58:02 +0000 Subject: [FieldTrip] PhD-position available at the Donders Centre for Cognitive Neuroimaging References: Message-ID: Dear colleagues, I would like to announce an open PhD-position in my team at the Donders Centre for Cognitive Neuroimaging, Nijmegen, NL. Follow the link below for more information. Please feel free to spread the news among interested colleagues. http://www.ru.nl/overons/werken-radboud/details/details_vacature_0/?recid=564499 Thanks, and with best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.fieldtriptoolbox.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 10 11:12:26 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Nov 2015 10:12:26 +0000 Subject: [FieldTrip] disconnected cluster In-Reply-To: References: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Message-ID: <9BCE6FEF-A7D0-44F1-A000-02256D7E7681@fcdonders.ru.nl> Hi Roy, Thanks for looking into it in such detail. I can however not reproduce your problem. Can you update to a more recent version of FieldTrip and try whether it persists? Given the line numbers in ft_selectdata that you mention, it seems that you are using somewhat older code. Best, Jan-Mathijs On Nov 10, 2015, at 1:52 AM, Roy Cox > wrote: Hi Jan-Matthijs, It was quite a quest, but I think/hope I've located the problem. I was typing this email as I was troubleshooting, so skip to 3) to get to the point: I've tried setting both cfg.channel = 'all' and cfg.channel = cfg.label before calling ft_timelock_statistics. It makes no difference. 1) ft_timelock_statistics I think the problem occurs at an earlier stage than what I thought at first, namely on line 105 of this function: [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); After this, the varargin array of structures has the alphabetical channel order (while the input tmpcfg.channel was still good): varargin{1}.cfg.channel ans = 'Af3' 'Af4' 'Af7' etc Then after the next line [cfg, varargin{:}] = rollback_provenance(cfg, varargin{:}); cfg now also contains these channel orders. 2) ft_selectdata on line 264 the contents of cfg.channel is changed from whatever was put in there (either the cfg.label order or 'all') if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end this jumps to subfunction get_selection on line 619: 3) ft_get_selection line 630 then correctly selects the requested channels from the label list in varargin{k}.labels selchannel = ft_channelselection(cfg.channel, varargin{k}.label); selchannel still has the correct order of channels, but then line 631 calls "union" which puts things in alphabetical order: label = union(label, selchannel); 637 finds the correspondences between the two lists: [ix, iy] = match_str(label, varargin{k}.label); then there is a loop from 653-660 that does some more reordering/matching that I don't follow, but ultimately, on 677, the alphabetical list of channels is assigned to cfg.channel: cfg.channel = label; I believe this is where the error stems from, because the variable "label" has not had its alphabetical order changed since calling "union" on 631. Hope this helps, Roy On Fri, Nov 6, 2015 at 1:34 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Roy, The inadvertent alphabetization of channels should not occur. This issue has popped up in the past on several occasions (and on several locations in the code) and it has been a really tricky issue to deal with once and for all. Thanks for all the detective work so far. From what you write, it seems that the cfg.channel that goes into channelconnectivity is already in alphabetical order. Would it be possible to track down where this happens? Do you explicitly add the alphabetical list to cfg.channel in your call to ft_timelockanalysis? Does the problem persist if you define cfg.channel = data.label, i.e. the list in the order as it occurs in the data. (I would assume that the order of the channels is the same across all input data structures). Best, Jan-Mathijs On Nov 5, 2015, at 8:58 PM, Roy Cox > wrote: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible). I've inspected my channel layout and that looks good: <2D_layout.jpg> I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): Looking into the disconnected channel F5, the neighborhood structure seems in order: cfg.neighbours(15) ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls cfg.connectivity = channelconnectivity(cfg); Stepping into this function, on line 20 it says: chans=cfg.channel; Checking what this variable contains, it has all my channels in alphabetical order, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga.v.sysoeva at gmail.com Wed Nov 11 13:14:13 2015 From: olga.v.sysoeva at gmail.com (Olga Sysoeva) Date: Wed, 11 Nov 2015 15:14:13 +0300 Subject: [FieldTrip] Inter-trial coherence/PLF in source space Message-ID: Dear filedtripper, That was quite a while I follow your activity. But now I am back to active analysis and stucked... I'd like to calculate ITC/PLF in a source space similar to described - T. Bardouille , ,B. Ross, 2008 paper. I have 40Hz-auditory steady state response from 306 neuromag system. I figured out how to calculate ITC on sensor space from complex FFT coeficients obtained by ft_freqanalysis. As a next step I need to do this in source space. My vision that I can use complex FFT coeficients, obtained in sensor space but "project" them to source space by multiplying with weigted matrix. In the above mentioned paper they applied the LCMV beamformer to determine the weighting function, *w**jm*, that estimates the source activity across the steady-state time interval in the frequency band of interest. How can I do this? I tried to do it using ft_sourceanalysis but get lost. If I specified lcmv method and feed it with average timelocked data as in the example cfg = []; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = test_vol; cfg.lcmv.keepfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, test_data_LEar_avg); or for a frequency decomposed data using disc cfg = []; cfg.method = 'dics'; cfg.frequency = 40; cfg.grid = grid; cfg.vol = test_vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, test_freq_LEar); As output I get in the sourceAll.avg.filter some weigth matrix (although I am not fully sure if that is what I need). Unfortunately, I did not find the way (filtrip function) to apply this filter/weigths to itc or complex FFT coeficients. Should I write my our code for this? Which way is better: multiply it to itc or first to complex fft and than calculate itc? Which matrix to use (from disc or lcmv)? Is my way of thinking makes sense or am I completely lost? I would be really thankfull for any help. Best Regards, Olga Sysoeva, PhD, Senior Researcher, MEG-center, Moscow. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kkalimeri at gmail.com Wed Nov 11 19:37:17 2015 From: kkalimeri at gmail.com (Kyriaki Kalimeri) Date: Wed, 11 Nov 2015 18:37:17 +0000 Subject: [FieldTrip] New Postdoctoral Opportunity in Turin Message-ID: <5105449d6dff4b6896df6c5ef8fec28f@EXPRD01.hosting.ru.nl> [Apologies if you receive multiple copies of this message] Job Description Institute for Scientific Interchange(ISI) (http://www.isi.it) is seeking to appoint a highly motivated Postdoctoral Assistant to undertake research activities related to signal processing and machine learning for the understanding of human behavior through biosignals (EEG, EDA, etc.) within the scopes of the Horizon2020-funded project Sound Of Vision. Sound of Vision (Natural sense of vision through acoustics and haptics) (http://www.soundofvision.net) is a highly multidisciplinary project that designs, implements and validates an original non-invasive, wearable hardware and software system to assist visually impaired people by creating and conveying an auditory representation of the surrounding environment, helping them to both perceive and navigate in any kind of environment (indoor/outdoor). ISI is responsible for conducting usability studies to validate the functionalities of the prototype and access the users' experience. Specifically you will: * Design and conduct usability studies combining behavioural, neuroscientific and psychophysiological methods. * Assess the cognitive load and emotional states of the participants while using the system, employing multimodal data fusion and machine learning techniques; * Carry out innovative, impactful research in the areas of: Behavioral Understanding, Machine Learning and Human Computer Interaction; * Produce high quality scientific and technical outputs including journal articles, conference papers and presentations, patents and technical reports. Core skills you will need for this position: Ph.D in Computer Science, Computer Engineering, Machine Learning, Bioinformatics, Statistics or a related quantitative field. * Applicants should have an established publication record in the fields of signal processing and machine learning. * Have strong programming skills in at least one of the following languages Matlab, Python or Java. * Solid knowledge of statistics and hypothesis testing. * Experience with EEG and EDA signal processing as well as usability experimental design will be highly appreciated. * Experience with mobile application development is considered a plus. * Fluency in English both spoken and written. ISI offers: We provide an unusually rich opportunity for collegial interaction in a highly competitive environment. Mentoring will be provided by a multidisciplinary faculty team including co-investigators on the project and collaborators from neurology, engineering and psychology. We provide a competitive salary according to the qualifications and medical and pension benefits according to the Italian State. Applications received before the February 1st 2016 will be given priority, but the position will remain open until filled. The successful applicant is expected to start the appointment approximately on April 2016. The appointment is until January 2018. To apply, please send your cover letter, curriculum vitae and professional reference list to the PI of the project Dr. Kyriaki Kalimeri >. For any further information, please refer to Dr. Kyriaki Kalimeri or Dr. Charalampos Saitis >. ISI is an equal opportunity employer and does not discriminate on the basis of race, color, national origin, gender, sexual orientation, age, religion or disability. -- Kyriaki Kalimeri, Ph.D. Electronic & Computer Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From Farzaneh.Ahmadi at westernsydney.edu.au Wed Nov 11 21:24:26 2015 From: Farzaneh.Ahmadi at westernsydney.edu.au (Farzaneh Ahmadi) Date: Wed, 11 Nov 2015 20:24:26 +0000 Subject: [FieldTrip] Linking fieldtrip to simulink In-Reply-To: References: Message-ID: Dear Fieldtrippers Greetings from Sydney! I am new to field trip so please pardon my question if being basic. I have been trying to hook up field trip buffer directly to Simulink but so far I had no luck. So question 1. Has anyone successfully used the buffer with Simulink (TCP send/receive blocks)? I mean to run the buffer as a standalone executable and use Simulink TCP (Send/receive) blocks to directly connect to the buffer. If the answer to Q1 is no, then here is the details of the problem I have and wish to have your input. I have MATLAB 2014b and have Instrument control Toolbox-2 on Simulink (with the usual TCP/Send/Receive blocks). When the buffer is running as an standalone executable, Simulink can detect the connection but can not receive any streamed data. I suspect it is either a data format problem or a header problem. In my test bench I have used the standalone implementations of the buffer located here /fieldtrip-20151020/realtime/bin/ARCH (my ARCH is maci) Then I used a sine wave generator (sin2ft) from the same folder. I fed the sine wave from sin2ft to TCP port 1972 on the buffer. Then I use Simulink to read the data from the same port on the buffer. The output from the sin2ft is a float32 so I set the data type of my TCP receive block in simulink (The block is called Query instrument) to float32. The sample rate and block size match, but I get no data streams. I have worked around this by using the python implementations of fieldtrip. fieldtrip-20151020/realtime/src/buffer/python I use the field trip read python command to read the data from the buffer, discard the header and push the data myself as a float32 using sockets in python to a second TPC port. This way Simulink can receive the data I recive from the buffer and resend myslef in python to the second tcp port. I use the same block set above). Any ideas? Cheers Fary Ahmadi Researcher from MARCS institute Western Sydney uni > From joramvandriel at gmail.com Thu Nov 12 11:15:04 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Thu, 12 Nov 2015 11:15:04 +0100 Subject: [FieldTrip] source statistics on atlas-based ROIs Message-ID: Dear community, I am doing a source analysis on Neuromag data; I used the DICS beamformer to localize theta-band sources, and want to contrast two conditions of a Stroop task. I used subject-specific grids pre-warped to MNI space. Everything seems to work fine and I'm at the group level to do statistics. However, I have specific hypotheses about anatomical locations, so I'd like to do stats only within frontal cortex. I've searched around the tutorial web pages and the mailing list archive, and there should be an option for this in ft_sourcestatistics, via ft_read_atlas and ft_volumelookup. Currently, my code is: aal = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); % find frontal regions front_idx = strmatch('Front', aal.tissuelabel); cfg = []; cfg.inputcoord = 'mni'; cfg.atlas = aal; cfg.roi = aal.tissuelabel(front_idx); mask = ft_volumelookup(cfg, ICavg_int); ICavg_int.mask = mask; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'pow'; cfg.maskparameter = 'mask'; cfg.funcolormap = 'jet'; ft_sourceplot(cfg,ICavg_int); This gives me a source plot with only the frontal regions, the rest masked out; so the atlas lookup seems to work. Then for source stats, in addition to the design parameters (as in http://www.fieldtriptoolbox.org/example/source_statistics), I add: cfg.atlas = aal; cfg.roi = aal.tissuelabel(front_idx); cfg.inputcoord = 'mni'; Then I call: stat = ft_sourcestatistics(cfg, grandavgIC{:}, grandavgCG{:}); However, the results are exactly the same with or without the atlas info attached to the cfg; all voxels are analyzed, and the obtained cluster results are the same. So it looks like ft_sourcestatistics doesn't do anything with the atlas info. In the help of ft_sourcestatistics, it says: % FIXME the following needs to be reimplemented % % You can restrict the statistical analysis to regions of interest (ROIs) % or to the average value inside ROIs using the following options: % cfg.atlas = filename of the atlas % cfg.roi = string or cell of strings, region(s) of interest from anatomical atlas % cfg.avgoverroi = 'yes' or 'no' (default = 'no') % cfg.hemisphere = 'left', 'right', 'both', 'combined', specifying this is % required when averaging over regions % cfg.inputcoord = 'mni' or 'tal', the coordinate system in which your source % reconstruction is expressed Does this mean this functionality doesn't work (yet)? Will it in the (near) future, and is there a workaround? Of note, I just updated to the newest fieldtrip version. Thanks in advance for any thoughts or suggestions, - Joram -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Thu Nov 12 16:24:54 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 10:24:54 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: Message-ID: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ 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 stephen.whitmarsh at ki.se Thu Nov 12 16:42:59 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Thu, 12 Nov 2015 15:42:59 +0000 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else... Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk > 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) >: Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Nov 12 17:32:54 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 12 Nov 2015 08:32:54 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : > Dear Xiaoming, > > It is working for me, using it in sourcestatistics. Have you checked your > design is really only one row? I can’t think of anything else… > > Cheers, > > S > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Xiaoming Du > *Sent:* 12 November 2015 16:25 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation -- > follow-up questions > > > > Dear Arjen, > > > > Thanks for the updates. > > > > I was trying to run the following code on Fieldtrip website ( > http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables > ) > > > > % compute statistics with correlationT > cfg = []; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.method = 'montecarlo'; > cfg.numrandomization = 1000; > > n1 = 3; % n1 is the number of subjects > design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent > variable (behavioral data) in the cfg.design matrix, in this case reaction > times of 3 subjects. > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_freqstatistics(cfg, data_brain{:}); > > > > > > However, it gives me this error: > > Error using ft_statfun_correlationT (line 81) > uvar must be specified for dependent samples statistics > > > > Error in ft_statistics_montecarlo (line 276) > [statobs, cfg] = statfun(cfg, dat, design); > > > > Error in ft_freqstatistics (line 190) > [stat, cfg] = statmethod(cfg, dat, design); > > > > > > Could you provide a sample data_brain, so I can organize my data into same > format? Thanks! > > > > > > -Xiaoming > > > > > > > > >>> Arjen Stolk 11/7/2015 11:21 PM >>> > > Dear participants in the discussion on behavioural-power correlation, and > interested folks, > > > > Following recent discussion on this mailing list (thanks to Xiaoming Du > and Martin Krebber), we have updated ft_statfun_correlationT, a function > that can be used for correlating neural and behavioral variables. > > > > Following the update, the correlation values calculated on genuine data > have not changed. However, the permutation procedure for calculating the > randomization distribution has. Namely, prior to the update the permutation > procedure would randomly permute across both the independent (e.g., > behavior) and dependent variables (e.g., neural data). This procedure is > prone to systematic bias across the data belonging to these variables. And > conceptually, as outlined in a new wiki page (see below), the independent > and dependent variables should be statistically independent, meaning that > any association between these variables should be broken by randomly > permuting the values of the independent variable. > > > > > http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables > ? > > > > Those that have been using ft_statfun_correlationT for calculating a > randomization distribution using the permutation procedure are advised to > update to the latest fieldtrip version and re-calculate those > distributions. We are sorry for any inconvenience this may cause. > > > > On a related note, the functionality of ft_statfun_correlationT (under > Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make > the latter function, and others in the statfun suite, more accessible, we > would like to forward those interested to the above wiki page where an > overview is provided of the different approaches to correlating neural and > behavioral variables, with some example fieldtrip code. > > > > Yours, Arjen > > on behalf of Eric Maris and Egbert Hartstra > > > > 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : > > Dear participants in the discussion on behavioural-power correlation, > > My name is Eric Maris and have contributed most of the older statfuns (but > not ft_statfun_correlationT). Together with Arjen, I will try to resolve > some of the issues that have been discussed. Give us some time, and we will > return to you via the Discussion List. > > best, > Eric > > > > _______________________________________________ > 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 knorr at cbs.mpg.de Thu Nov 12 17:49:00 2015 From: knorr at cbs.mpg.de (Melanie Knorr) Date: Thu, 12 Nov 2015 17:49:00 +0100 Subject: [FieldTrip] help on ft_getopts mex file Message-ID: Dear all, unfortunately I can not use ft_getopts anymore. Matlab says: Invalid MEX-file '/home/raid2/knorr/Desktop/fieldtrip-20151111/fieldtrip-20151111/fileio/private/ft_getopt.mexa64': /home/raid2/knorr/Desktop/fieldtrip-20151111/fieldtrip-20151111/fileio/private/ft_getopt.mexa64: undefined symbol: mxErrMsgTxt I upgraded to the latest field trip version (20151111), however it still does not work. I work on matlab version 2015b on a linux machine. Can anyone help me? Thanks! Melanie -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Thu Nov 12 18:07:25 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 12:07:25 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: <564480FD020000DC00016A1A@MPRC.UMARYLAND.EDU> Thanks Stephen, Arjen. I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. Looking forward to your feedback! Best, Xiaoming >>> Arjen Stolk 11/12/2015 11:32 AM >>> Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can*t think of anything else* Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testdata.mat Type: application/octet-stream Size: 4117 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: errlog.txt URL: From a.stolk8 at gmail.com Thu Nov 12 18:14:59 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 12 Nov 2015 09:14:59 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Hey Xiaoming, Could you tell me which version of the function you're using? That info is specified at the bottom of the help. In my case it's % $Id: ft_statfun_correlationT.m 10837 2015-10-30 16:06:41Z arjsto $ Yours, Arjen 2015-11-12 9:07 GMT-08:00 Xiaoming Du : > Thanks Stephen, Arjen. > > I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. > > I attached the 'testdata.mat' which has cfg and data_brain. I also > attached the error message I got from Matlab command window. > > Looking forward to your feedback! > > Best, > Xiaoming > > >>> Arjen Stolk 11/12/2015 11:32 AM >>> > Hi Xiaoming, > > Sounds like you're using an older version of the function. Did you try > updating fieldtrip? > > Yours, > Arjen > > 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : > >> Dear Xiaoming, >> >> It is working for me, using it in sourcestatistics. Have you checked your >> design is really only one row? I can't think of anything else. >> >> Cheers, >> >> S >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Xiaoming Du >> *Sent:* 12 November 2015 16:25 >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation -- >> follow-up questions >> >> Dear Arjen, >> >> Thanks for the updates. >> >> I was trying to run the following code on Fieldtrip website ( >> http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables >> ) >> >> % compute statistics with correlationT >> cfg = []; >> cfg.statistic = 'ft_statfun_correlationT'; >> cfg.method = 'montecarlo'; >> cfg.numrandomization = 1000; >> >> n1 = 3; % n1 is the number of subjects >> design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable >> (behavioral data) in the cfg.design matrix, in this case reaction times of >> 3 subjects. >> >> cfg.design = design; >> cfg.ivar = 1; >> >> stat = ft_freqstatistics(cfg, data_brain{:}); >> >> However, it gives me this error: >> >> Error using ft_statfun_correlationT (line 81) >> uvar must be specified for dependent samples statistics >> >> Error in ft_statistics_montecarlo (line 276) >> [statobs, cfg] = statfun(cfg, dat, design); >> >> Error in ft_freqstatistics (line 190) >> [stat, cfg] = statmethod(cfg, dat, design); >> >> Could you provide a sample data_brain, so I can organize my data into >> same format? Thanks! >> >> -Xiaoming >> >> >> >> >>> Arjen Stolk 11/7/2015 11:21 PM >>> >> >> Dear participants in the discussion on behavioural-power correlation, and >> interested folks, >> >> Following recent discussion on this mailing list (thanks to Xiaoming Du >> and Martin Krebber), we have updated ft_statfun_correlationT, a function >> that can be used for correlating neural and behavioral variables. >> >> Following the update, the correlation values calculated on genuine data >> have not changed. However, the permutation procedure for calculating the >> randomization distribution has. Namely, prior to the update the permutation >> procedure would randomly permute across both the independent (e.g., >> behavior) and dependent variables (e.g., neural data). This procedure is >> prone to systematic bias across the data belonging to these variables. And >> conceptually, as outlined in a new wiki page (see below), the independent >> and dependent variables should be statistically independent, meaning that >> any association between these variables should be broken by randomly >> permuting the values of the independent variable. >> >> >> http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables >> ? >> >> Those that have been using ft_statfun_correlationT for calculating a >> randomization distribution using the permutation procedure are advised to >> update to the latest fieldtrip version and re-calculate those >> distributions. We are sorry for any inconvenience this may cause. >> >> On a related note, the functionality of ft_statfun_correlationT (under >> Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make >> the latter function, and others in the statfun suite, more accessible, we >> would like to forward those interested to the above wiki page where an >> overview is provided of the different approaches to correlating neural and >> behavioral variables, with some example fieldtrip code. >> >> Yours, Arjen >> >> on behalf of Eric Maris and Egbert Hartstra >> >> 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : >> >> Dear participants in the discussion on behavioural-power correlation, >> >> My name is Eric Maris and have contributed most of the older statfuns >> (but not ft_statfun_correlationT). Together with Arjen, I will try to >> resolve some of the issues that have been discussed. Give us some time, and >> we will return to you via the Discussion List. >> >> best, >> Eric >> >> >> >> _______________________________________________ >> 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 XDu at mprc.umaryland.edu Thu Nov 12 18:28:07 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 12:28:07 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: <564485D7020000DC00016A29@MPRC.UMARYLAND.EDU> I see. In my ft_statfun_correlationT.m file, It is % $Id: ft_statfun_correlationT.m 10042 2014-12-12 23:02:53Z arjsto $ . I installed fieldtrip using "fieldtrip-lite-20151111.zip". Are there newer version that we can download? Thanks. Xiaoming >>> Arjen Stolk 11/12/2015 12:14 PM >>> Hey Xiaoming, Could you tell me which version of the function you're using? That info is specified at the bottom of the help. In my case it's % $Id: ft_statfun_correlationT.m 10837 2015-10-30 16:06:41Z arjsto $ Yours, Arjen 2015-11-12 9:07 GMT-08:00 Xiaoming Du : Thanks Stephen, Arjen. I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. Looking forward to your feedback! Best, Xiaoming >>> Arjen Stolk 11/12/2015 11:32 AM >>> Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else. Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 09:41:46 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 08:41:46 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values Message-ID: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Nov 13 09:51:24 2015 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 13 Nov 2015 09:51:24 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: Message-ID: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From alexis.makin at liverpool.ac.uk Fri Nov 13 10:44:55 2015 From: alexis.makin at liverpool.ac.uk (alexis david james makin) Date: Fri, 13 Nov 2015 09:44:55 +0000 Subject: [FieldTrip] Matlab 2014b compatibility In-Reply-To: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: <587C548A-5DAA-45F6-ACDF-FFB0E332BB44@liverpool.ac.uk> Dear Field Trip Users, The Field Trip topoplot function ft_topoplotTFR(cfg, grandavg) used to work on Matlab 2011, but gives the following error message in Matlab 2014b: %%%%%%%%%% Error using sprintf Function is not defined for 'matlab.ui.Figure' inputs. Error in topoplot_common (line 862) set(gcf, 'Name', sprintf('%d: %s: %s', gcf, funcname, join_str(', ',dataname))); Error in ft_topoplotTFR (line 191) [cfg] = topoplot_common(cfg, varargin{:}); %%%%%%% This is arises change to the way Matlab does Figures I believe? Is the easiest thing to download the newer version of Fieldtrip? Thanks for any advice, Cheers Alexis Makin, University of Liverpool, Uk > On 13 Nov 2015, at 08:51, Julian Keil wrote: > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > >> Hi everybody, >> >> I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra >> (see the used options down below). >> While fieldtrip calculates the permutation test it throws the following information: >> >> "performing FDR correction for multiple comparisons >> the returned probabilities are uncorrected, the thresholded mask is corrected" >> >> Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I >> get my p-values corrected for multiple comparison? >> >> Does anyone has an idea? Thanks in advance! >> >> >> I used the following options: >> >> cfg = []; >> cfg.channel = 'all'; >> cfg.latency = [2.3 2.8]; >> cfg.avgoverchan = 'yes'; >> cfg.avgovertime = 'no'; >> cfg.frequency = [9 14]; >> cfg.parameter = 'powspctrm'; >> cfg.alpha = 0.05; >> cfg.tail = 0; >> cfg.correctm = 'fdr'; >> cfg.correcttail = 'prob'; >> cfg.ivar = 1; >> cfg.statistic = 'ft_statfun_indepsamplesT'; >> cfg.method = 'montecarlo'; >> cfg.design = design; % defined in at the beginning of the function >> cfg.numrandomization = 1000; >> >> stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) >> _______________________________________________ >> 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 16:41:47 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 15:41:47 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 julian.keil at gmail.com Fri Nov 13 16:59:50 2015 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 13 Nov 2015 16:59:50 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Iris, maybe I completely miss your point, could you describe what you want to do with your p-values? Please keep in mind, that a correction for multiple comparisons does not change your p-values, it changes the threshold after which a p-value is significant. Think about the very simple Bonferroni-correction: If you have 5 tests, you set your significance-level to 0.05/5 = 0.01, then compute your 5 t-tests and see which p-value is below 0.01 (instead of below 0.05). This does not affect the t-tests, or the p-value or t-value of the tests themselves, but only the level you consider significant. tl;dr: You don't correct your p-values, you correct the level after which you consider them significant. Hope this helps Julian Am 13.11.2015 um 16:41 schrieb Steinmann, Iris: > Hi Julian, > > Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? > > Best wishes! > Iris > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil > Sent: Freitag, 13. November 2015 09:51 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > > > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From mail at philipp-ruhnau.de Fri Nov 13 17:29:28 2015 From: mail at philipp-ruhnau.de (Philipp Ruhnau) Date: Fri, 13 Nov 2015 17:29:28 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hey Iris, you could use matlabs inbuilt function (mafdr) to produce corrected p-values, then again if you just want to check your outcome with a higher threshold you might as well feed that into the fieldtrip statistics function with cfg.alpha It is possible to estimate corrected p-values by hand, the logic being the following as in Julian’s example for 5 tests bonferroni adjustment is alpha_level/5. but you could also multiply your p-value with 5 and keep the original threshold. similarly for a simple Benjamini-Hochberg fdr if you have a vector with p-values (original_pvals) you do pvals = sort(original_pvals); % sort % correct p-vals by hand n = numel(pvals); cor_pvals = pvals .* (n./(1:n)); so following the fdr logic you correct each p-val by its own factor. but note that this is not the fdr correction that is implemented in fieldtrip (see fieldtrips fdr.m for the reference) and that some p-values now can exceed 1… Also I think Arnaud Delorme’s fdr function in eeglab had the option to estimate corrected p-values (but I haven’t checked for quite a while) but yeah, I’m with Julian on this one. as the t-value doesn’t change it certainly makes more sense to quote fdr-corrected p < 0.05 then an exact but corrected p-value hope this helps philipp > On 13 Nov 2015, at 16:41, Steinmann, Iris wrote: > > Hi Julian, > > Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? > > Best wishes! > Iris > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil > Sent: Freitag, 13. November 2015 09:51 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > > > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 17:34:50 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 16:34:50 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hey Julian, thanks, you are right! I thought instead of correcting the threshold on which I consider significance, it would be possible to fix the threshold at 0.05 and adapt the p-values. Maybe that's really not possible... so, thanks for your comprehensive explanation. I will go with your first advice and multiply the p-values with the mask. Thanks a lot and have a nice weekend! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 17:00 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, maybe I completely miss your point, could you describe what you want to do with your p-values? Please keep in mind, that a correction for multiple comparisons does not change your p-values, it changes the threshold after which a p-value is significant. Think about the very simple Bonferroni-correction: If you have 5 tests, you set your significance-level to 0.05/5 = 0.01, then compute your 5 t-tests and see which p-value is below 0.01 (instead of below 0.05). This does not affect the t-tests, or the p-value or t-value of the tests themselves, but only the level you consider significant. tl;dr: You don't correct your p-values, you correct the level after which you consider them significant. Hope this helps Julian Am 13.11.2015 um 16:41 schrieb Steinmann, Iris: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 helen.wieffering at gmail.com Fri Nov 13 22:56:33 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Fri, 13 Nov 2015 16:56:33 -0500 Subject: [FieldTrip] NaN Values in Granger Causality Message-ID: Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that our output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform wavelet analysiscfg = [];cfg.method = 'wavelet';cfg.channelcmb = {'all' 'all'};cfg.channel = {'source01' 'source01'};cfg.fsample = 250;cfg.output = 'powandcsd';cfg.tapsmofrq = 2;cfg.foi = 0:1:8; cfg.toi = -0.5:0.004:1.5; freq = ft_freqanalysis(cfg, data);* Note: I've checked the values in freq.powspctrm, and though there are NaNs there is real data, too. *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* However, this plot is a blank no matter which values I seem to choose as a zlim. Any insight is much appreciated - thanks! Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Sun Nov 15 02:07:30 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Sun, 15 Nov 2015 01:07:30 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation tests Message-ID: Hi all, I am writing up results for cluster based permutation tests that I ran on masked priming meg data. I have to admit I am not entirely sure the exact form for reporting the stats on these. For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: prob: 0.0420 clusterstat: 1.2443e+04 stddev: 0.0063 cirange: 0.0124 Has anyone else completed and rerooted on results, having used cluster based permutation tests? Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? Thanks, K PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Sun Nov 15 12:15:48 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Sun, 15 Nov 2015 11:15:48 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation Message-ID: Hello Kaelasha, There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper: https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study . I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper: http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ Message: 1 > Date: Sun, 15 Nov 2015 01:07:30 +0000 > From: Kaelasha Tyler > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] statistical reporting cluster based permutation > tests > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am writing up results for cluster based permutation tests that I ran on > masked priming meg data. > > I have to admit I am not entirely sure the exact form for reporting the > stats on these. > > For example, when comparing two conditions, with n=20, I have one > significant positive cluster over left frontal and parietal areas. The > stats for this cluster read: > > prob: 0.0420 > clusterstat: 1.2443e+04 > stddev: 0.0063 > cirange: 0.0124 > > Has anyone else completed and rerooted on results, having used cluster > based permutation tests? > Mean values don't seem to be appropriate here, so would it simply be the p > value and standard deviation for the significant clusters that would be > reported on? > > Thanks, > K > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Mon Nov 16 04:39:28 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 16 Nov 2015 03:39:28 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation In-Reply-To: References: Message-ID: Thanks Steve, Very clear. K. PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Stephen Politzer-Ahles [stephen.politzer-ahles at ling-phil.ox.ac.uk] Sent: Sunday, 15 November 2015 10:15 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] statistical reporting cluster based permutation Hello Kaelasha, There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper: https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study. I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper: http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ Message: 1 Date: Sun, 15 Nov 2015 01:07:30 +0000 From: Kaelasha Tyler > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] statistical reporting cluster based permutation tests Message-ID: > Content-Type: text/plain; charset="iso-8859-1" Hi all, I am writing up results for cluster based permutation tests that I ran on masked priming meg data. I have to admit I am not entirely sure the exact form for reporting the stats on these. For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: prob: 0.0420 clusterstat: 1.2443e+04 stddev: 0.0063 cirange: 0.0124 Has anyone else completed and rerooted on results, having used cluster based permutation tests? Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? Thanks, K PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Mon Nov 16 07:06:28 2015 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Sun, 15 Nov 2015 22:06:28 -0800 Subject: [FieldTrip] statistical reporting cluster based permutation In-Reply-To: References: Message-ID: <770EEBFF-7AF3-4F0C-A661-7228B527CC8A@cerco.ups-tlse.fr> Dear Katia, I would mention that the statistics were corrected for multiple comparisons using the cluster methods. You may report the p-value for stats and the actual difference in terms of values between the conditions for effect size. Best, Arno -- Arnaud Delorme, PhD Centre de Recherche Cerveau et Cognition - UMR 5549 Pavillon Baudot, Hopital Purpan, BP 25202 31052 Toulouse Cedex 3, France > On Nov 15, 2015, at 7:39 PM, Kaelasha Tyler wrote: > > Thanks Steve, > > Very clear. > K. > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl ] on behalf of Stephen Politzer-Ahles [stephen.politzer-ahles at ling-phil.ox.ac.uk ] > Sent: Sunday, 15 November 2015 10:15 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] statistical reporting cluster based permutation > > Hello Kaelasha, > > There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper:https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study . > I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper:http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf > > See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. > > Best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ Message: 1 > Date: Sun, 15 Nov 2015 01:07:30 +0000 > From: Kaelasha Tyler > > To: "fieldtrip at science.ru.nl " > > Subject: [FieldTrip] statistical reporting cluster based permutation > tests > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am writing up results for cluster based permutation tests that I ran on masked priming meg data. > > I have to admit I am not entirely sure the exact form for reporting the stats on these. > > For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: > > prob: 0.0420 > clusterstat: 1.2443e+04 > stddev: 0.0063 > cirange: 0.0124 > > Has anyone else completed and rerooted on results, having used cluster based permutation tests? > Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? > > Thanks, > K > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From iris.steinmann at med.uni-goettingen.de Mon Nov 16 09:35:38 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Mon, 16 Nov 2015 08:35:38 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Phillipp, The idea was, that I don’t have to recalculate my statistics if I just want to look at the results with a higher threshold. So, thanks a lot for your additional information, it helps me to think over my analysis in the first place … thanks, have a nice day! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Philipp Ruhnau Sent: Freitag, 13. November 2015 17:29 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hey Iris, you could use matlabs inbuilt function (mafdr) to produce corrected p-values, then again if you just want to check your outcome with a higher threshold you might as well feed that into the fieldtrip statistics function with cfg.alpha It is possible to estimate corrected p-values by hand, the logic being the following as in Julian’s example for 5 tests bonferroni adjustment is alpha_level/5. but you could also multiply your p-value with 5 and keep the original threshold. similarly for a simple Benjamini-Hochberg fdr if you have a vector with p-values (original_pvals) you do pvals = sort(original_pvals); % sort % correct p-vals by hand n = numel(pvals); cor_pvals = pvals .* (n./(1:n)); so following the fdr logic you correct each p-val by its own factor. but note that this is not the fdr correction that is implemented in fieldtrip (see fieldtrips fdr.m for the reference) and that some p-values now can exceed 1… Also I think Arnaud Delorme’s fdr function in eeglab had the option to estimate corrected p-values (but I haven’t checked for quite a while) but yeah, I’m with Julian on this one. as the t-value doesn’t change it certainly makes more sense to quote fdr-corrected p < 0.05 then an exact but corrected p-value hope this helps philipp On 13 Nov 2015, at 16:41, Steinmann, Iris > wrote: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 Mon Nov 16 10:42:01 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Mon, 16 Nov 2015 10:42:01 +0100 (CET) Subject: [FieldTrip] chan_time dimord missing in ft_statfun_actvsblT Message-ID: <434773634.1339738.1447666921760.JavaMail.zimbra@bcbl.eu> Dear all, in the function ft_statfun_actvsblT there seems to be a bug related to the dimord of the data. The code seems to work only for chan_freq_time data but not for chan_time data, although in the past this function used to work also for ERF data, or am I wrong? Could it be that some part of the code is missing? 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” From p.babaeeghazvini at vu.nl Mon Nov 16 14:29:40 2015 From: p.babaeeghazvini at vu.nl (Babaeeghazvini, P.) Date: Mon, 16 Nov 2015 13:29:40 +0000 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region Message-ID: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> Hello I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis. Regards, Parinaz. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Mon Nov 16 15:01:51 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Mon, 16 Nov 2015 15:01:51 +0100 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region In-Reply-To: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> References: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> Message-ID: Hi Parinaz, I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches: 1) You can already focus your source analyses on ROIs at the level of the lead field grid. 2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs. For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup. For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g. cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using. For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results: atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); atlas = ft_convert_units(atlas,'cm'); cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi = atlas.tissuelabel(43:54); occ_mask = ft_volumelookup(cfg,template_grid); grandavg_col_masked = grandavg_col; grandavg_grey_masked = grandavg_grey; for s=1:10 grandavg_col_masked{s}.inside=occ_mask(:); grandavg_grey_masked{s}.inside=occ_mask(:); grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0; grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0; end Hope this helps. - Joram On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. wrote: > Hello > > I am doing beamformer on EEG data to find the source position of bimanual > activity based on dics method. For that I want to see the activity only on > motor area and remove the activities of other regions based on HMAT atlas ( > http://lrnlab.org/) which provides a binary mask of motor cortex. I need > to do that because I want to calculate the position of maximum activity in > motor region and I dont want this maximum activity appear somewhere else > due to any possible artifact. please tell me how and where should I apply > HMAT binary mask on the output of source analysis. > > Regards, > Parinaz. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.babaeeghazvini at vu.nl Mon Nov 16 15:53:12 2015 From: p.babaeeghazvini at vu.nl (Babaeeghazvini, P.) Date: Mon, 16 Nov 2015 14:53:12 +0000 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region In-Reply-To: References: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local>, Message-ID: <561966C5AD6B9647B14A89A8189322E02E719CBC@PEXMB002B.vu.local> Hi Joram, Thank you very much for such a complete and helpful explanation. Best regards, Parinaz. ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Joram van Driel [joramvandriel at gmail.com] Sent: Monday, November 16, 2015 3:01 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region Hi Parinaz, I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches: 1) You can already focus your source analyses on ROIs at the level of the lead field grid. 2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs. For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup. For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g. cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using. For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results: atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); atlas = ft_convert_units(atlas,'cm'); cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi = atlas.tissuelabel(43:54); occ_mask = ft_volumelookup(cfg,template_grid); grandavg_col_masked = grandavg_col; grandavg_grey_masked = grandavg_grey; for s=1:10 grandavg_col_masked{s}.inside=occ_mask(:); grandavg_grey_masked{s}.inside=occ_mask(:); grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0; grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0; end Hope this helps. - Joram On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. > wrote: Hello I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis. Regards, Parinaz. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From vic.schroeder2 at gmail.com Mon Nov 16 17:16:46 2015 From: vic.schroeder2 at gmail.com (victoria schroeder) Date: Mon, 16 Nov 2015 16:16:46 +0000 Subject: [FieldTrip] converting magnetometers Message-ID: Hello, Is it possible to convert magnetometers to pseudo-gradiometers to create planar gradients? We are working with Neuromag data. The following code does not work, since i get the error message that ft_megplanar() does not function with neuromag data. cfg = []; cfg.feedback = 'no'; cfg.method = 'distance'; cfg.planarmethod = 'sincos'; cfg.channel = {'MEGMAG'}; cfg.trials = 'all'; cfg.neighbours = ft_prepare_neighbours(cfg, rspdata); data_mag = ft_megplanar(cfg,rspdata); Cheers Victoria -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.stdgl at gmail.com Tue Nov 17 16:12:49 2015 From: tobias.stdgl at gmail.com (Tobias Staudigl) Date: Tue, 17 Nov 2015 16:12:49 +0100 Subject: [FieldTrip] ft_volumerealign with headshape Message-ID: Dear all, I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue ( http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); works fine, then: cfg = []; cfg.method = 'headshape' cfg.coordsys = 'ctf'; cfg.headshape.headshape = hs; mri_realigned2 = ft_volumerealign(cfg,mri_realigned); after the message 'doing interactive realignment with headshape' I get the following error: ************** Reference to non-existent field 'label'. Error in ft_datatype_sens (line 136) nchan = length(sens.label); Error in ft_checkconfig (line 248) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 68) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 586) tmpcfg = ft_interactiverealign(tmpcfg); ************** Reading the polhemus headshape was done with: [hs]=ft_read_headshape('hs_S01.pos'); which looks fine when plotting it with ft_plot_headshape(hs); I am using the fieldtrip version at the Donders. When using an older version, fieldtrip-20131231, no error occurs. Any help very much appreciated! Best, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 17 16:26:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 17 Nov 2015 15:26:27 +0000 Subject: [FieldTrip] ft_volumerealign with headshape In-Reply-To: References: Message-ID: <07142596-034A-482A-83B9-FC8C6D7705B6@fcdonders.ru.nl> Hi Tobias, I came across the same thing, and fixed it locally with a dirty hack. Please do drop by so that we can make a clean fix. Best, JM On Nov 17, 2015, at 4:12 PM, Tobias Staudigl > wrote: Dear all, I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue (http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); works fine, then: cfg = []; cfg.method = 'headshape' cfg.coordsys = 'ctf'; cfg.headshape.headshape = hs; mri_realigned2 = ft_volumerealign(cfg,mri_realigned); after the message 'doing interactive realignment with headshape' I get the following error: ************** Reference to non-existent field 'label'. Error in ft_datatype_sens (line 136) nchan = length(sens.label); Error in ft_checkconfig (line 248) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 68) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 586) tmpcfg = ft_interactiverealign(tmpcfg); ************** Reading the polhemus headshape was done with: [hs]=ft_read_headshape('hs_S01.pos'); which looks fine when plotting it with ft_plot_headshape(hs); I am using the fieldtrip version at the Donders. When using an older version, fieldtrip-20131231, no error occurs. Any help very much appreciated! Best, Tobias _______________________________________________ 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 nathan.friedman2 at mail.mcgill.ca Tue Nov 17 18:21:37 2015 From: nathan.friedman2 at mail.mcgill.ca (Nathan Friedman) Date: Tue, 17 Nov 2015 12:21:37 -0500 Subject: [FieldTrip] Malware detected in gtsrefine.exe Message-ID: Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Nov 18 09:13:16 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 18 Nov 2015 09:13:16 +0100 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: References: Message-ID: <005401d121d8$fbf51310$f3df3930$@artinis.com> HI Nathan, The function belongs to an external toolbox, iso2mesh: http://iso2mesh.sourceforge.net/cgi-bin/index.cgi So, while the file is not necessary for most things in FieldTrip, I deem it highly unlikely that it actually is malware. So probably it’s a false alarm. But you can delete the file without having troubles with FieldTrip (only if you want to create meshes yourself using this function, and the function is also only then used in special circumstances). Best, Jörn -- Jörn M. Horschig, PhD, 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 Nathan Friedman Sent: Tuesday, November 17, 2015 18:22 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Malware detected in gtsrefine.exe Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 09:16:48 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 08:16:48 +0000 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> Seems like a false positive: Scanning Report 18 November 2015 09:14:21 - 09:14:21 Computer name: DCCN553 Scanning type: Scan target Target: M:\fieldtrip-dev\external\iso2mesh\bin\gtsrefine.exe ________________________________ Result No malware found ________________________________ Statistics Scanned: * Files: 1 * Not scanned: 0 Result: * Viruses: 0 * Spyware: 0 * Suspicious items: 0 * Riskware: 0 Actions: * Disinfected: 0 * Renamed: 0 * Deleted: 0 * Quarantined: 0 * Failed: 0 Boot Sectors: * Scanned: 0 * Infected: 0 * Suspicious items: 0 * Disinfected: 0 ________________________________ Options Definitions version: * Viruses: 2015-11-18_02 * Spyware: 2015-11-18_02 Scanning Engines: * F-Secure Aquarius: 11.00.01, 2015-11-18 * F-Secure Hydra: 5.15.21, 2015-11-17 * F-Secure Online: 13.40.159, 2014-04-28 * F-Secure Gemini: 3.02.384, 2015-11-12 Scanning options: * Scan defined files: ANI ASP AX BAT BIN BOO CHM CMD COM CPL DLL DOC DOT DRV EML EXE HLP HTA HTM HTML HTT INF INI JOB JS JSE LNK LSP MDB MHT MPP MPT MSG MSO OCX PDF PHP PIF POT PPT RTF SCR SHS SWF SYS TD0 TMP VBE VBS VXD WBK WMA WMV WMF WSC WSF WSH WRI XLS XLT XML CLASS ZIP JAR ARJ LZH TAR TGZ GZ CAB RAR BZ2 HQX * Scan inside archives Excluded: * Spyware: Application.BitCoinMiner.AY Application.BitCoinMiner.AX Actions: * Viruses: Ask after scan * Spyware: Ask after scan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Nathan Friedman Sent: dinsdag 17 november 2015 18:22 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Malware detected in gtsrefine.exe Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.braukmann at donders.ru.nl Wed Nov 18 12:58:20 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Wed, 18 Nov 2015 12:58:20 +0100 Subject: [FieldTrip] Automatized artifact rejection in FT Message-ID: Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 14:14:21 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 13:14:21 +0000 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B0836@exprd01.hosting.ru.nl> Hi Ricarda, All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point. Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work: cfg.artfctdef.threshold.channel = cell-array with channel labels cfg.artfctdef.threshold.bpfilter = 'no'; cfg.artfctdef.threshold.absdiff = ‘yes’; cfg.artfctdef.threshold.max = 50; Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 12:58 To: FieldTrip discussion list Subject: [FieldTrip] Automatized artifact rejection in FT Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.braukmann at donders.ru.nl Wed Nov 18 14:41:56 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Wed, 18 Nov 2015 14:41:56 +0100 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> References: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> Message-ID: Hi Jim, Thanks for the quick reply, this is really helpful. I will try your suggestion for number three. Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms. So if you have any suggestion of how we might be able to implement this as well, that would be great! Thanks! Ricarda On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Hi Ricarda, > > > > All three criteria have a certain threshold that has to be met in order > for a trial to be marked as containing artifacts so for all criteria you > could use ft_artifact_threshold (or ft_artifact_zvalue). The difference > will be how you preprocess the signal. You would need to transform the > signal so that for criteria nr. 2 the signal represents the potential > difference over a 200ms window?, and for nr. 3 the potential difference per > sampling point. > > > > Number 3 is relatively easy, you can calculate the first temporal > derivative (ie. the difference between two consecutive samples) with > cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, > if you want the absolute difference). So something like this should work: > > > > cfg.artfctdef.threshold.channel = cell-array with channel labels > > cfg.artfctdef.threshold.bpfilter = 'no'; > > cfg.artfctdef.threshold.absdiff = ‘yes’; > > cfg.artfctdef.threshold.max = 50; > > > > Number 2 is slightly more difficult because you want to integrate over a > larger window. I don’t fully understand what you want to avoid, should the > signal at time X stay within 3uV of the signal at time X + 200ms? > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Ricarda Braukmann > *Sent:* woensdag 18 november 2015 12:58 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Automatized artifact rejection in FT > > > > Hi everyone, > > I would like to implement an automatized artifact rejection procedure for > my EEG data and compare this to manual rejection. > > I would like to use the following criteria for rejection of a segment: > > 1. amplitudes below -150 or above 150 µV > 2. a difference of 3 µV per 200 ms, > 3. or a voltage change of 50 µV per sampling point > > Is there a function in fieldtrip that I can use for implementing these > different criteria? > > I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the > first criteria but I am unsure how to implement the second two. > > Any help would be highly appreciated. > > Thanks! > > Ricarda > > > > -- > > > Ricarda Braukmann, MSc > PhD student > > Radboud University Medical Centre & Baby Research Center > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Neuroscience & Centre for Cognition > > Room B.01.22 > Phone: +31 (0) 24 36 12652 > Email: r.braukmann at donders.ru.nl > > Website: http://www.zebra-project.nl/ > -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 15:42:23 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 14:42:23 +0000 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: References: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B19E9@exprd01.hosting.ru.nl> Hi Ricarda, I’m not sure if that is what you want but you could see whether a time-shifted version of your data (+200ms) differs more than 3uV from your original data. To shift your data you can use ft_redefinetrial with cfg.offset = -samples, where samples is the amount of samples from the original zero-point you wish to shift your time series by. Subtracting those time-series should give you the difference between t and t+200ms. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 14:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Automatized artifact rejection in FT Hi Jim, Thanks for the quick reply, this is really helpful. I will try your suggestion for number three. Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms. So if you have any suggestion of how we might be able to implement this as well, that would be great! Thanks! Ricarda On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) > wrote: Hi Ricarda, All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point. Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work: cfg.artfctdef.threshold.channel = cell-array with channel labels cfg.artfctdef.threshold.bpfilter = 'no'; cfg.artfctdef.threshold.absdiff = ‘yes’; cfg.artfctdef.threshold.max = 50; Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 12:58 To: FieldTrip discussion list Subject: [FieldTrip] Automatized artifact rejection in FT Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Wed Nov 18 15:46:48 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Wed, 18 Nov 2015 09:46:48 -0500 Subject: [FieldTrip] NaNs in Granger Spectrum Message-ID: Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that my output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all' 'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output = 'powandcsd';cfg.foi = 0:1:20; cfg.toi = -0.5:0.004:1.5; cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./ cfg.foi; freq = ft_freqanalysis(cfg, data_both);* Note: I've checked the values in freq.powspctrm, and though there are NaNs around the temporal edges, there is real data amid the time frame of interest. I've attached a sample TFR plot. *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* However, this plot is a blank no matter which values I seem to choose as a zlim. Any tips are much appreciated - thanks! (Please excuse my re-posting of a similar message twice - I'm simply hoping to catch a few more responses. As far as I can tell, this issue has not yet been addressed in the digest archives - though if I'm mistaken please feel free to point me to the appropriate thread!) Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source01TFR.jpg Type: image/jpeg Size: 49523 bytes Desc: not available URL: From friedman.nathan at gmail.com Wed Nov 18 17:14:20 2015 From: friedman.nathan at gmail.com (Nathan Friedman) Date: Wed, 18 Nov 2015 11:14:20 -0500 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> Message-ID: Thank you both very much! Nathan On Wed, Nov 18, 2015 at 3:16 AM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Seems like a false positive: > > > > *Scanning Report* > > *18 November 2015 09:14:21 - 09:14:21* > > Computer name: DCCN553 > Scanning type: Scan target > Target: M:\fieldtrip-dev\external\iso2mesh\bin\gtsrefine.exe > ------------------------------ > > *Result* > > No malware found > ------------------------------ > > *Statistics* > > Scanned: > > - Files: 1 > - Not scanned: 0 > > Result: > > - Viruses: 0 > - Spyware: 0 > - Suspicious items: 0 > - Riskware: 0 > > Actions: > > - Disinfected: 0 > - Renamed: 0 > - Deleted: 0 > - Quarantined: 0 > - Failed: 0 > > Boot Sectors: > > - Scanned: 0 > - Infected: 0 > - Suspicious items: 0 > - Disinfected: 0 > > ------------------------------ > > *Options* > > Definitions version: > > - Viruses: 2015-11-18_02 > - Spyware: 2015-11-18_02 > > Scanning Engines: > > - F-Secure Aquarius: 11.00.01, 2015-11-18 > - F-Secure Hydra: 5.15.21, 2015-11-17 > - F-Secure Online: 13.40.159, 2014-04-28 > - F-Secure Gemini: 3.02.384, 2015-11-12 > > Scanning options: > > - Scan defined files: ANI ASP AX BAT BIN BOO CHM CMD COM CPL DLL DOC > DOT DRV EML EXE HLP HTA HTM HTML HTT INF INI JOB JS JSE LNK LSP MDB MHT MPP > MPT MSG MSO OCX PDF PHP PIF POT PPT RTF SCR SHS SWF SYS TD0 TMP VBE VBS VXD > WBK WMA WMV WMF WSC WSF WSH WRI XLS XLT XML CLASS ZIP JAR ARJ LZH TAR TGZ > GZ CAB RAR BZ2 HQX > - Scan inside archives > > Excluded: > > - Spyware: Application.BitCoinMiner.AY Application.BitCoinMiner.AX > > Actions: > > - Viruses: Ask after scan > - Spyware: Ask after scan > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Nathan Friedman > *Sent:* dinsdag 17 november 2015 18:22 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Malware detected in gtsrefine.exe > > > > Hi, > > > > Sorry if this is a known issue but I'm new to FieldTrip. > > > > Windows Defender detected gtsrefine.exe as malware on my computer. Is this > file necessary for FieldTrip to function properly? > > > > Nathan Friedman, M.Eng > > _______________________________________________ > 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 jorn at artinis.com Thu Nov 19 09:30:55 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 19 Nov 2015 09:30:55 +0100 Subject: [FieldTrip] NaNs in Granger Spectrum In-Reply-To: References: Message-ID: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> Dear Helen, I am not quite sure why there are only nans or 0s in your granger spectrum. It could be because of the nans in your data. You could test that by just putting the time from e.g. 0.3s to 0.7s in. As a general tip, I would always segment trials into larger chunks that you want to do your final analysis on, otherwise edge artifacts (either from filtering or like here in the TFR) will show up. Also, I used constant 400ms time windows (link) , which apart from making the time-windows of the TFR look ‘nicer’, it also makes it easier to compare across frequencies. With the frequency-dependent time window, you could run into issues with SNR across frequencies, as the lower frequency content is estimated by a longer time windows, and averaging over more data should lead to a higher SNR. Thus, the lower frequency content should be more reliable when using frequency-dependent time windows. Two other general tips: 1) If I recall correctly, the Wilson factorization that is being used for estimating the transfer matrix assumes that your data contains all frequencies from DC to the Nyquist frequency. So better not restrict your analysis from 1 to 20Hz, but use 0 to fsample/2. 2) If you have strong noise components in your data, for example line noise, your power spectrum will sharply rise near the line noise frequency, and quickly fall off a few Hz after that. Such sharp changes will lead to strange effects in your Granger estimation, showing up as changes in estimated peak frequencies. Filtering such artifacts out though should be done with care though, see e.g. http://www.ncbi.nlm.nih.gov/pubmed/21864571 and http://www.ncbi.nlm.nih.gov/pubmed/20026279. I would advise against trying to filter out line noise based on experience with my own data. I found it more suitable to use zero padding, which “artificially” increases your frequency resolution, thereby smoothes the power spectrum and thus avoid prevents sharp changes in there. Btw, note that the two above papers are on parametric Granger, which might be differently affected by filtering than the nonparametric version (that’s at least what I found using simulated data – parametric Granger was more invariant to different preprocessing pipelines) Best of luck ;) Greetings, Jörn -- Jörn M. Horschig, PhD, 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 Helen Wieffering Sent: Wednesday, November 18, 2015 15:47 To: FieldTrip discussion list Subject: [FieldTrip] NaNs in Granger Spectrum Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that my output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. data = label: {2x1 cell} trial: {1x155 cell} time: {1x155 cell} fsample: 250 cfg: [1x1 struct] sampleinfo: [155x2 double] % perform multitaper analysis cfg = []; cfg.method = 'mtmconvol'; cfg.channelcmb = { 'all' 'all'}; cfg.fsample = 250; cfg.channel = data.label; cfg.output = 'powandcsd'; cfg.foi = 0:1:20; cfg.toi = -0.5:0.004:1.5; cfg.taper = 'hanning'; cfg.t_ftimwin = 4 ./ cfg.foi; freq = ft_freqanalysis(cfg, data_both); Note: I've checked the values in freq.powspctrm, and though there are NaNs around the temporal edges, there is real data amid the time frame of interest. I've attached a sample TFR plot. % compute granger causality cfg = []; cfg.method = 'granger'; cfg.channel = {'source01' 'source02'}; cfg.channelcmb = {'all' 'all'}; granger = ft_connectivityanalysis(cfg, freq); % plot cfg = []; cfg.parameter = 'grangerspctrm'; cfg.zlim = [0 .5]; cfg.refchannel = 'source02'; cfg.directionality = 'outflow'; ft_singleplotTFR(cfg, granger); However, this plot is a blank no matter which values I seem to choose as a zlim. Any tips are much appreciated - thanks! (Please excuse my re-posting of a similar message twice - I'm simply hoping to catch a few more responses. As far as I can tell, this issue has not yet been addressed in the digest archives - though if I'm mistaken please feel free to point me to the appropriate thread!) Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.P.Vlaar at tudelft.nl Thu Nov 19 09:58:52 2015 From: M.P.Vlaar at tudelft.nl (Martijn Vlaar - 3ME) Date: Thu, 19 Nov 2015 08:58:52 +0000 Subject: [FieldTrip] Number of shells in OpenMEEG Message-ID: Dear all, I am interested in including the CSF in the forward model. In ft_headmodel_openmeeg at line 75 there is an error message: "More than 3 shells not allowed". In the OpenMEEG documentation I do not find such a limitation. Could someone clarify why the OpenMEEG-related function in fieldtrip is restricted to 1, 2 or 3 shells? Thank you in advance! Martijn Vlaar ________________________________ Ir. Martijn Vlaar Delft University of Technology BioMechanical Engineering Mekelweg 2, 2628 CD Delft, The Netherlands tel: +31 (0)1527 85625 fax: +31 (0)1527 84717 mobile: +31 (0)618081635 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Thu Nov 19 10:53:55 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Thu, 19 Nov 2015 10:53:55 +0100 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: References: Message-ID: hi, I confirm that OpenMEEG can handle more than 3 layers. Best, Alex On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME wrote: > Dear all, > > > > I am interested in including the CSF in the forward model. > > > > In ft_headmodel_openmeeg at line 75 there is an error message: “More than 3 > shells not allowed”. In the OpenMEEG documentation I do not find such a > limitation. > > > > Could someone clarify why the OpenMEEG-related function in fieldtrip is > restricted to 1, 2 or 3 shells? > > > > Thank you in advance! > > > > Martijn Vlaar > > > > ________________________________ > > Ir. Martijn Vlaar > > Delft University of Technology > > BioMechanical Engineering > > Mekelweg 2, 2628 CD Delft, The Netherlands > > tel: +31 (0)1527 85625 > > fax: +31 (0)1527 84717 > > mobile: +31 (0)618081635 > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From craiggrichter at gmail.com Thu Nov 19 12:13:17 2015 From: craiggrichter at gmail.com (Craig Richter) Date: Thu, 19 Nov 2015 12:13:17 +0100 Subject: [FieldTrip] NaNs in Granger Spectrum Message-ID: Hi Helen, Try switching the output of ft_freqanalysis to cfg.output = 'fourier'. You also must you all the frequencies up to your Nyquist to get a reasonable result. Best, Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Thu Nov 19 13:47:43 2015 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Thu, 19 Nov 2015 13:47:43 +0100 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: References: Message-ID: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer case 4 vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain case 3 vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad = grad_mri; cfg.grid.warpmni = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; cfg.unit = 'mm', cfg.vol = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4904 bytes Desc: not available URL: From a.maye at uke.de Thu Nov 19 15:49:39 2015 From: a.maye at uke.de (Alexander Maye) Date: Thu, 19 Nov 2015 15:49:39 +0100 Subject: [FieldTrip] help on ft_getopts mex file In-Reply-To: References: Message-ID: <1551109.ONu50G9ISl@mars> Dear Melanie, I had the same problem in Matlab 2015b under Linux. Deleting all ft_getopt.mex64 files (there are several of them in different fieldtrip directories) solved the issue. Probably it's a library version issue; maybe the person that compiles the mex64 files may take a look? Best, ALEX. -------------- next part -------------- -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From maity_winky at yahoo.es Thu Nov 19 17:58:21 2015 From: maity_winky at yahoo.es (=?UTF-8?Q?Mait=C3=A9_Crespo_Garc=C3=ADa?=) Date: Thu, 19 Nov 2015 16:58:21 +0000 (UTC) Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> References: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> Message-ID: <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> Dear Martijn, the error happens when you don't specify the conductivity values. Best,Maite El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal escribió: Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer     case 4         vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain     case 3         vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad                  = grad_mri; cfg.grid.warpmni  = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel  = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri            = mri; cfg.unit = 'mm', cfg.vol                  = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid              = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: >     > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** _______________________________________________ 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 kathrin.muesch at gmail.com Thu Nov 19 18:46:45 2015 From: kathrin.muesch at gmail.com (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 19 Nov 2015 12:46:45 -0500 Subject: [FieldTrip] bug in FDR script Message-ID: Hi, I realized that the fdr.m file gives a wrong output for the case that the smallest p values are above the FDR threshold. This means that the smallest p-values might be rejected, whereas lower p-values could pass the test. I have filed it as a bug (#3008). The current script only declares the p-values below or equal to the threshold as significant, whereas in fact all p-values that are smaller or equal to the largest p-value below or equal to this threshold should be declared significant according to the original paper ("find the largest P value that is below the line [threshold]. All voxels with P values less than or equal to this are declared active.”). I assume that the following line is incorrect and should be replaced by the one below: Incorrect: h = (ps<=pi); Correct: h = ps<=(max(ps(ps<=pi))); Cheers, Kathrin -- Kathrin Müsch, Ph.D. Department of Psychology University of Toronto Toronto, Canada www.honeylab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From eriksenj at ohsu.edu Fri Nov 20 00:52:51 2015 From: eriksenj at ohsu.edu (K Jeffrey Eriksen) Date: Thu, 19 Nov 2015 23:52:51 +0000 Subject: [FieldTrip] FW: FEM head model and source model Message-ID: Hi again, I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. Thanks, -Jeff From: K Jeffrey Eriksen Sent: Wednesday, October 21, 2015 4:30 PM To: 'fieldtrip at science.ru.nl' Subject: FEM head model and source model I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. Thanks, -Jeff Eriksen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aishwaryaselvaraj1708 at gmail.com Fri Nov 20 06:43:43 2015 From: aishwaryaselvaraj1708 at gmail.com (aishwarya selvaraj) Date: Fri, 20 Nov 2015 11:13:43 +0530 Subject: [FieldTrip] filed trip Message-ID: Hi , I just started using filed trip for my project work. I have EEG data as a mat file . And im confused on how to even start using filedtrip commands on my dataset and proceed with the processing . Can anyone guide me on how to start?? I did read the manual ,but getting confused . It would be of great help if anyone could help me out . Thank you :) -- Regards, Aishwarya Selvaraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Nov 20 07:09:29 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 19 Nov 2015 22:09:29 -0800 Subject: [FieldTrip] filed trip In-Reply-To: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> References: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> Message-ID: Hi Aishwarya, If you only have a mat file, this wiki page might set you in the right direction: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Yours, Arjen 2015-11-19 21:43 GMT-08:00 aishwarya selvaraj < aishwaryaselvaraj1708 at gmail.com>: > Hi , > I just started using filed trip for my project work. > I have EEG data as a mat file . > And im confused on how to even start using filedtrip commands on my > dataset and proceed with the processing . > > > Can anyone guide me on how to start?? > I did read the manual ,but getting confused . > > It would be of great help if anyone could help me out . > > > Thank you :) > > -- > Regards, > Aishwarya Selvaraj > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mishra408 at gmail.com Fri Nov 20 07:48:07 2015 From: mishra408 at gmail.com (Ashutosh Mishra) Date: Fri, 20 Nov 2015 12:18:07 +0530 Subject: [FieldTrip] filed trip In-Reply-To: References: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> Message-ID: Hi Aishwarya, I faced the similar problem. You are supposed to change your data (.mat format) in a data structure that is read by fieldtrip. For that you need at least following information 1. Channel label and their location (If you don't have this file you can use standard file available in Fieldtrip and you can include only those electrode that you have been using in your experiment) 2. sampling rate of the data (that you would have done while recording the data) 3. time vector 4. no. of trials You can create them in MATLAB and put them together in a structure along with your recorded data. This worked for me. -- Ashutosh Mishra 5th year Integrated BS-MS student Department of Physical Sciences Indian Institute of Science Education and Research, Kolkata From jan.schoffelen at donders.ru.nl Fri Nov 20 08:02:15 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 20 Nov 2015 07:02:15 +0000 Subject: [FieldTrip] FEM head model and source model In-Reply-To: References: Message-ID: <95A72A87-CE48-4598-BF73-F58FCFBD7AE3@fcdonders.ru.nl> Jeff, You could start with checking the tutorial on minimum norm estimation. This contains a section on how you can create a cortically constrained source model using Freesurfer. Jan-Mathijs On Nov 20, 2015, at 12:52 AM, K Jeffrey Eriksen > wrote: Hi again, I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. Thanks, -Jeff From: K Jeffrey Eriksen Sent: Wednesday, October 21, 2015 4:30 PM To: 'fieldtrip at science.ru.nl' Subject: FEM head model and source model I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. Thanks, -Jeff Eriksen _______________________________________________ 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.P.Vlaar at tudelft.nl Fri Nov 20 10:45:42 2015 From: M.P.Vlaar at tudelft.nl (Martijn Vlaar - 3ME) Date: Fri, 20 Nov 2015 09:45:42 +0000 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> References: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> Message-ID: Dear all, Thanks for the helpful replies! I have just tried, and it indeed runs fine when you specify 4 conductivity. Guess I was confused by the specific error message: “More than 3 shells not allowed”. Perhaps this message can be made more accurate: “Conductivity values need to be explicitly specified when using 2 shells or more than 3 shells.”. Regards, Martijn From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Maité Crespo García Sent: donderdag 19 november 2015 17:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] Number of shells in OpenMEEG Dear Martijn, the error happens when you don't specify the conductivity values. Best, Maite El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal > escribió: Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer case 4 vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain case 3 vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad = grad_mri; cfg.grid.warpmni = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; cfg.unit = 'mm', cfg.vol = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: > > > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Fri Nov 20 15:01:48 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Fri, 20 Nov 2015 14:01:48 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. John http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >------------------------------ > >Message: 6 >Date: Thu, 19 Nov 2015 23:52:51 +0000 >From: K Jeffrey Eriksen >To: "fieldtrip at science.ru.nl" >Subject: [FieldTrip] FW: FEM head model and source model >Message-ID: >Content-Type: text/plain; charset="us-ascii" > >Hi again, > >I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. > >Thanks, >-Jeff > > >From: K Jeffrey Eriksen >Sent: Wednesday, October 21, 2015 4:30 PM >To: 'fieldtrip at science.ru.nl' >Subject: FEM head model and source model > >I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. > >Thanks, >-Jeff Eriksen > -------------- next part -------------- A non-text attachment was scrubbed... Name: default.vnd.ms-officetheme Type: application/octet-stream Size: 3131 bytes Desc: default.vnd.ms-officetheme URL: From icelandhouse at gmail.com Fri Nov 20 18:49:10 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Fri, 20 Nov 2015 18:49:10 +0100 Subject: [FieldTrip] Cortical surface VS brain volume source models Message-ID: Dear Fieldtrip users, I am currently working on source reconstruction (EEG) of both ERPs and of oscillatory activity. I have 3 short and related questions of clarification: (1) Why are MNE suite and Free Surfer used to construct the cortical-surface-based source model in the MNE tutorial ( http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate)? Is it simply because discretizing the source model into locations on the cortical surface (as opposed to a 3D volume of grid points) is a functionality not provided by Fieldtrip directly? (2) So, if I prefer to have a 3D grid as the source model for my MNE source reconstruction, can I simply make use of Fieldtrip's own function ft_prepare_sourcemodel and forget about MNE Suite & Free Surfer? (3) Does the choice between a cortical-surface-based an a brain-volume-based source model depend primarily on the expectation of where the sources would most likely be located? Or are there other reasons why the MNE source reconstruction approach would make use of a cortical-surface-based source space instead of a 3D volumetric grid (as found in all the beamformer tutorials)? Thanks! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From eriksenj at ohsu.edu Sat Nov 21 02:54:58 2015 From: eriksenj at ohsu.edu (K Jeffrey Eriksen) Date: Sat, 21 Nov 2015 01:54:58 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: Hi John, This was more than I expected, thanks for the detail. I will start with what you suggest. Thanks, -Jeff PS. Are you using FEM because you have EEG, as opposed to MEG data? I really need to model the whole head for 256-channel EGI EEG coverage. -----Original Message----- From: RICHARDS, JOHN [mailto:RICHARDS at mailbox.sc.edu] Sent: Friday, November 20, 2015 6:02 AM To: fieldtrip at science.ru.nl; K Jeffrey Eriksen Subject: Re: {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. John http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new From RICHARDS at mailbox.sc.edu Sat Nov 21 03:10:06 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 21 Nov 2015 02:10:06 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: I am doing this with EEG, EGI’s 128-channel system, with infants. There are large individual differences in head media (e.g., CSF, GM/WM/non-myelinated axons) and the models are significantly different with FEM and BEM. We are using individual head models from participants who are in the EEG experiments; so the FEM on individual head models is the best one can get with EEG source analysis. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** On 11/20/15, 8:54 PM, "K Jeffrey Eriksen" wrote: >Hi John, > >This was more than I expected, thanks for the detail. I will start with what you suggest. Thanks, >-Jeff > >PS. Are you using FEM because you have EEG, as opposed to MEG data? I really need to model the whole head for 256-channel EGI EEG coverage. > > >-----Original Message----- >From: RICHARDS, JOHN [mailto:RICHARDS at mailbox.sc.edu] >Sent: Friday, November 20, 2015 6:02 AM >To: fieldtrip at science.ru.nl; K Jeffrey Eriksen >Subject: Re: {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 > >I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. > >Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. > >The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. > >Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. > >John > >http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model >http://fieldtrip.fcdonders.nl/development/simbio >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh > >http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >http://fieldtrip.fcdonders.nl/development/simbio >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh >http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space >http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new > From RICHARDS at mailbox.sc.edu Sat Nov 21 14:32:43 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 21 Nov 2015 13:32:43 +0000 Subject: [FieldTrip] Cortical surface VS brain volume source models Message-ID: <390034A7-436E-4F1A-BA02-7EF1727A023B@mailbox.sc.edu> See part of my note below. I think the answer is: 1—the Freesurfer reference is to develop a surface model of the head, and results in a surface-based mesh (pos, tri). This mesh can be used in the ft_source_model. Free surfer also is used to extract the brain surface; which might be a better model for where the sources are. 2—FT does provide tools to create either a surface-based or volume-based source model. I use our segmented GM from other methods (FSL, SPM, …) and do a volume model of points only on the GM. FT can do surface source meshes without using Freesurfer; (e.g., surface of the GM; surface of the brain; surface of a realistic inner compartment). Part of this is because I use infant participants and have not been able to use the Freesurfer tool to identify GM surfaces. 3—There are some theoretical rationales for EEG to use surface models, with the dipoles pointed normal to the surface. Presumably this reflects the columnar arrangement of neurons that generate a current flow across the column and thus the estimated dipoles are normal to the surface. The three-direction moment dipole models used with volume models allow the direction of the dipole on each source dipole location to vary, and presumably capture more variance as the EEG source. I have found in some single-dipole-fitting models that the volume models provide a better fit, and I have assumed this is because they allow more flexibility in the estimation. The EEG source analysis and some of the methods have very large resolutions compared to the normal-surface model, so this is an artificial restriction because of the relatively poor resolution of the inverse techniques (in cm range rather than in mm range). 4—I have preferred volume models; there are some points in the GM that probably have active current dipoles that can be modeled as a volume; e.g., inside gyri, inside rather than on the surface, in convoluted structures, etc. I also have volumetric atlases that I can use more easily with volume models; I currently am using the volumes which correspond to fMRI clusters; and some other reasons. I use the GM as the volume, rather than the whole brain (which is theoretically questionable). 5—The “pos” matrix in surface models and volume models acts the same; the pos are only on the surface, or in the volume, but their structure is the same. The surface-normal models only need a “pow” matrix as output, since the direction of the moment vector is not estimated, whereas the non-normal models (usually volume) require the “pow" be calculated from the “mom" matrix. Some of this is “practical” rather the “theoretical” (e.g., pos pow mom matrices). Perhaps someone has a reference that is more theoretically descriptive? John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** > >The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. > >Date: Fri, 20 Nov 2015 18:49:10 +0100 >From: Maris Skujevskis >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] Cortical surface VS brain volume source models >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Dear Fieldtrip users, > >I am currently working on source reconstruction (EEG) of both ERPs and of >oscillatory activity. > >I have 3 short and related questions of clarification: >(1) >Why are MNE suite and Free Surfer used to construct the >cortical-surface-based source model in the MNE tutorial ( >http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate)? >Is it simply because discretizing the source model into locations on the >cortical surface (as opposed to a 3D volume of grid points) is a >functionality not provided by Fieldtrip directly? > >(2) >So, if I prefer to have a 3D grid as the source model for my MNE source >reconstruction, can I simply make use of Fieldtrip's own function >ft_prepare_sourcemodel and forget about MNE Suite & Free Surfer? > >(3) >Does the choice between a cortical-surface-based an a brain-volume-based >source model depend primarily on the expectation of where the sources would >most likely be located? >Or are there other reasons why the MNE source reconstruction approach would >make use of a cortical-surface-based source space instead of a 3D >volumetric grid (as found in all the beamformer tutorials)? > > > >Thanks! > >Maris >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: > >------------------------------ From david.m.groppe at gmail.com Mon Nov 23 04:24:31 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Sun, 22 Nov 2015 22:24:31 -0500 Subject: [FieldTrip] bug in FDR script In-Reply-To: References: Message-ID: Kathrin is correct about the bug in FieldTrip's FDR function. You can verify it yourself with Matlab's built in mafdr.m or this File Exchange Function https://www.mathworks.com/matlabcentral/fileexchange/27418-benjamini---hochberg-yekutieli-false-discovery-rate--fdr--control-procedure--fdr-bh-m- For example, if you run: raw_p=[.01 .01 .01 .6 .6 .6]; %uncorrected p-values % Matlab's built-in function sig_p=mafdr(p,'BHFDR',.05)<.05; % p-values signficant after Benjamini & Hochberg FDR adjustment fprintf('mafdr significant p-values:\n'); disp(sig_p) % FieldTrip's function sig_pFT=fdr(p,.05); fprintf('FieldTrip FDR significant p-values:\n'); disp(sig_pFT) The first three p-values should be significant but FieldTrip's function only declares the 3rd p-value significant. If you've used FieldTrip's FDR function you should fix the bug and re-run your analysis. You may have missed significant effects (though in practice missed p-values might actually be rare). -David On Thu, Nov 19, 2015 at 12:46 PM, Kathrin Müsch wrote: > Hi, > > I realized that the fdr.m file gives a wrong output for the case that the smallest p values are above the FDR threshold. This means that the smallest p-values might be rejected, whereas lower p-values could pass the test. I have filed it as a bug (#3008). > > The current script only declares the p-values below or equal to the threshold as significant, whereas in fact all p-values that are smaller or equal to the largest p-value below or equal to this threshold should be declared significant according to the original paper ("find the largest P value that is below the line [threshold]. All voxels with P values less than or equal to this are declared active.”). > > I assume that the following line is incorrect and should be replaced by the one below: > > Incorrect: h = (ps<=pi); > > Correct: h = ps<=(max(ps(ps<=pi))); > > Cheers, > Kathrin > > -- > > Kathrin Müsch, Ph.D. > > Department of Psychology > University of Toronto > Toronto, Canada > www.honeylab.org > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Nov 23 10:13:55 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 23 Nov 2015 10:13:55 +0100 Subject: [FieldTrip] Error message with latest fieldtrip version Message-ID: Dear all, I keep getting error message when using the newer version of fieldtrip (from 20151020 onwards) and Matlab 2014a. Here's the error message: Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 704) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 704) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback When I switched back to the older version (i.e. 20150420 version), I don't get such error messages. Could someone please tell me how to resolve this issue? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Mon Nov 23 21:33:52 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Mon, 23 Nov 2015 15:33:52 -0500 Subject: [FieldTrip] NaNs in Granger Spectrum In-Reply-To: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> References: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> Message-ID: Dear Jörn, Thank you very much for your detailed reply. I think my issue was definitely due to a poorly thought out time window and zero padding combination - but with a constant time window in ft_freqanalysis I'm now successfully getting Granger causality to calculate, and to produce a full spectrum of values rather than just the NaNs! It's especially helpful to have the attached papers and to get a sense of how others are approaching the procedure. Thank you, again! Best, Helen On Thu, Nov 19, 2015 at 3:30 AM, Jörn M. Horschig wrote: > Dear Helen, > > > > I am not quite sure why there are only nans or 0s in your granger > spectrum. It could be because of the nans in your data. You could test that > by just putting the time from e.g. 0.3s to 0.7s in. As a general tip, I > would always segment trials into larger chunks that you want to do your > final analysis on, otherwise edge artifacts (either from filtering or like > here in the TFR) will show up. Also, I used constant 400ms time windows > > (link) > , > which apart from making the time-windows of the TFR look ‘nicer’, it also > makes it easier to compare across frequencies. With the frequency-dependent > time window, you could run into issues with SNR across frequencies, as the > lower frequency content is estimated by a longer time windows, and > averaging over more data should lead to a higher SNR. Thus, the lower > frequency content should be more reliable when using frequency-dependent > time windows. > > > > Two other general tips: > > 1) If I recall correctly, the Wilson factorization that is being > used for estimating the transfer matrix assumes that your data contains all > frequencies from DC to the Nyquist frequency. So better not restrict your > analysis from 1 to 20Hz, but use 0 to fsample/2. > > 2) If you have strong noise components in your data, for example > line noise, your power spectrum will sharply rise near the line noise > frequency, and quickly fall off a few Hz after that. Such sharp changes > will lead to strange effects in your Granger estimation, showing up as > changes in estimated peak frequencies. Filtering such artifacts out though > should be done with care though, see e.g. > http://www.ncbi.nlm.nih.gov/pubmed/21864571 and > http://www.ncbi.nlm.nih.gov/pubmed/20026279. I would advise against > trying to filter out line noise based on experience with my own data. I > found it more suitable to use zero padding, which “artificially” increases > your frequency resolution, thereby smoothes the power spectrum and thus > avoid prevents sharp changes in there. Btw, note that the two above papers > are on parametric Granger, which might be differently affected by filtering > than the nonparametric version (that’s at least what I found using > simulated data – parametric Granger was more invariant to different > preprocessing pipelines) > > > > Best of luck ;) > > Greetings, > > Jörn > > > > *--* > *Jörn M. Horschig, PhD*, 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 *Helen Wieffering > *Sent:* Wednesday, November 18, 2015 15:47 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] NaNs in Granger Spectrum > > > > Dear Fieldtrip users, > > I am working with a 128 channel EEG data and am currently in the process > of calculating non-parametric Granger causality measures. I am following > the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. > > However, I'm facing the curious problem that my output data from calling > ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does > anyone have insight as to why that might be? I've tried playing around with > cfg.toi and the location of our virtual channels, but neither seems to > help. > > My code is below, where 'source01' and 'source02' refer to virtual > channels we created based off powspctrm data from beamformer source > localization on our own data, according to steps outlined in the FT > connectivity tutorial. > > > > > > > > > > > > > > > > > > > > > *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: > 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper > analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all' > 'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output = > 'powandcsd';cfg.foi = 0:1:20; cfg.toi = > -0.5:0.004:1.5; cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./ > cfg.foi; freq = ft_freqanalysis(cfg, data_both);* > > Note: I've checked the values in freq.powspctrm, and though there are NaNs > around the temporal edges, there is real data amid the time frame of > interest. I've attached a sample TFR plot. > > > > > > > > > > > > > > > > *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = > {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = > ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = > 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = > 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* > > However, this plot is a blank no matter which values I seem to choose as a > zlim. > > Any tips are much appreciated - thanks! > > (Please excuse my re-posting of a similar message twice - I'm simply > hoping to catch a few more responses. As far as I can tell, this issue has > not yet been addressed in the digest archives - though if I'm mistaken > please feel free to point me to the appropriate thread!) > > Best, > > Helen Wieffering > > _______________________________________________ > 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 xcz20 at outlook.com Tue Nov 24 07:44:39 2015 From: xcz20 at outlook.com (X Chen) Date: Tue, 24 Nov 2015 06:44:39 +0000 Subject: [FieldTrip] [Fieldtrip] frequency issue in beamfomer Message-ID: Dear Fieldtrip developers and users, Since a while I am struggling with a question regarding the frequency range used in beamfomer, The length of each data epoch is 1 second, resulting in ±1Hz frequency smoothing while performing ‘mtmfft’ method together with a hanning taper. Nevertheless, when the frequency band of interest is 4~7Hz at sensor-level, how to make the frequency range as the frequency of interest in source analysis? At sensor level, the permutation test offer a configuration setting for frequency average which resolves the issue. One possible solution, which I have tried consisting of using ‘dpss’ taper instead of ‘hanning’ taper, setting the frequency of interest to 5.5Hz, padding the epoch to 2s and setting the tapsmofrq = 1.5. The resulting 5.5 ±1.5Hz is just the range needed. Is it a feasible way? If it is, will the setting of padding influence the source analysis result to some degree? The other possible solution I have considered, is to average the output of frequency analysis, including ‘powspctrm’ and ‘crsspctrm’ across the selected range manually. Then the average result from the frequency range will output to source analysis? Is this correct? Thanks for your help, Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksoftkeyan at gmail.com Wed Nov 25 06:26:04 2015 From: ksoftkeyan at gmail.com (Karthikeyan) Date: Wed, 25 Nov 2015 10:56:04 +0530 Subject: [FieldTrip] Help on Connectivity Message-ID: Dear Community, I am working on estimating the PDC,DTF from EEG signals. Why is that we have to fit a AR model to data in order to compute the measures of connectivity. Regards S. Karthikeyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Nov 26 13:34:43 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 26 Nov 2015 13:34:43 +0100 (CET) Subject: [FieldTrip] power suppression during DICS beamforming ? Message-ID: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> Dear all, I am observing a counter-intuitive result after applying the spatial filters obtained from DICS beamforming to my MEG data. The plot in the attachment summarizes the issue: The raw data shows a clear peak of activity at 10 Hz, however, after applying the spatial filter to the MEG data the spectrum of the virtual channels shows that power in this frequency band is reduced. The same also happens when I apply a spatial filter in the gamma range for power at 70 Hz to the raw MEG signals. Is this something that falls out of the beamformer math due to the fact how the algorithm suppresses power at all locations by minimizing the noise level, or is there something wrong with my code? I (maybe naively) assumed that the results should come out the opposite. On the other hand, when plotting the noise normalized maps (NAI) of both the alpha and gamma beamformers the sources look quite accurate. Should I normalize with the level of noise first before plotting the spectrum to see the expected results (ie an upregulation of power instead of a downregulation of power)? The code that I use to generate the figures is: % 1) compute CSD matrix cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foilim = [10 10]; cfg.tapsmofrq = 2; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; [csd] = ft_freqanalysis(cfg,meg_data); % 2) compute DICS filter cfg = []; cfg.method = 'dics'; cfg.grad = meg_data.grad; cfg.headmodel = vol; cfg.frequency = csd.freq; cfg.dics.realfiter = 'yes'; cfg.dics.fixedori = 'yes'; [alpha_filter]= ft_sourceanalysis(cfg,csd); % 3) compute the virtual channel data VC = meg_data; VC.trial = cell(1,length(meg_data.trial)); VC.label = cell(1,length(alpha_filter.avg.pow)); for i = 1:length(VC.trial) for j = 1:length(VC.label) VC.trial{i}(j,:) = alpha_filter{j}*meg_data.trial{i}; VC.label(j) = {['virtual_channel',num2str(j)]}; end; end; % 4) compute the spectrum of the virtual channel data cfg = []; cfg.method = 'mtmfft'; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; cfg.tapsmofrq = 1; cfg.foi = 0.1:100; [pow] = ft_freqanalysis(cfg,VC); Any help or suggestions would be greatly appreciated. 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_channel_DICS_power_reduction.jpg Type: image/jpeg Size: 132452 bytes Desc: not available URL: From erin.white at sickkids.ca Thu Nov 26 13:48:25 2015 From: erin.white at sickkids.ca (Erin White) Date: Thu, 26 Nov 2015 12:48:25 +0000 Subject: [FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images Message-ID: <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D@SKMBXX03.sickkids.ca> Hi, I'm new at programming and was wondering if someone could help with something that I'm sure is simple. I'd like to add tick marks to my multiplotER and multiplotTFR figures so that the timing and amplitude (for multiplotER) and timing and frequency (for multiplotTFR) scales are presented clearly. For example, I'd like a tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER images and every 5 Hz for TFR images. Could anyone suggest what I should add to my code to show this? Thanks very much! Erin ---------------------------------------------------- Erin White, PhD Post-Doctoral Research Fellow Neurosciences and Mental Health The Hospital for Sick Children 555 University Avenue Toronto, Ontario Canada Telephone: (647)834-7813 ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Nov 27 13:28:58 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 27 Nov 2015 12:28:58 +0000 Subject: [FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images Message-ID: Hi Erin, I don't use the multiplot functions much, so my solution is clunky and there may be others on the list with a better way to do this. But just in case, here's how I do it: Rather than using multiplot, I make each plot individually, and use the subplot() command to arrange multiple plots into a figure. Within each subplot, I just use some custom code to draw the ticks. For example: tickspots = [-200:200:1000]; % one tick every 200 ms, from -200 to 1000 ms tickheight = [-.5 .5]; % how high and low the ticks will go for tickspots = tickspot % iterate through tick spots plot( [tickspot tickspot], tickheight, 'k' ); % plot each tick as a black line end; Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > ------------------------------ > > Message: 2 > Date: Thu, 26 Nov 2015 12:48:25 +0000 > From: Erin White > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Adding tick marks to the X and Y axes in > multiplotER and multiplotTFR images > Message-ID: > <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D at SKMBXX03.sickkids.ca> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I'm new at programming and was wondering if someone could help with > something that I'm sure is simple. > I'd like to add tick marks to my multiplotER and multiplotTFR figures so > that the timing and amplitude (for multiplotER) and timing and frequency > (for multiplotTFR) scales are presented clearly. For example, I'd like a > tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER > images and every 5 Hz for TFR images. > > Could anyone suggest what I should add to my code to show this? > > Thanks very much! > > Erin > > > > > > > > > > > > > ---------------------------------------------------- > Erin White, PhD > Post-Doctoral Research Fellow > Neurosciences and Mental Health > The Hospital for Sick Children > 555 University Avenue > Toronto, Ontario > Canada > Telephone: (647)834-7813 > > ________________________________ > > This e-mail may contain confidential, personal and/or health > information(information which may be subject to legal restrictions on use, > retention and/or disclosure) for the sole use of the intended recipient. > Any review or distribution by anyone other than the person for whom it was > originally intended is strictly prohibited. If you have received this > e-mail in error, please contact the sender and delete all copies. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151126/f0640a71/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 23 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Fri Nov 27 16:19:27 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Fri, 27 Nov 2015 16:19:27 +0100 Subject: [FieldTrip] why "fixedori"=yes? Message-ID: Dear Fieldtrip users, I am currently working on beamformer source estimation using EEG data. My question is about the meaning behind cfg.fixedori in ft_sourceanalysis. As one of the fieldtrip tutorials explains, cfg.fixedori = 'yes' leads to only the largest of the three dipole directions per spatial filter being kept, the other two get discarded. My specific questions are: (1) why should this be done? (2) is this an MEG-specific setting due to the fact that MEG is somewhat blind to particular dipole orientations? (in which case cfg.fixedori = 'no' for EEG data?) (3) does anyone have an article in mind where the need for this processing step is explained/illustrated? Best wishes, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From vpapenm at uni-koeln.de Sun Nov 29 19:43:02 2015 From: vpapenm at uni-koeln.de (vpapenm at uni-koeln.de) Date: Sun, 29 Nov 2015 19:43:02 +0100 Subject: [FieldTrip] Spectral factorization: Wilson-Burg algorithm does not converge Message-ID: <20151129194302.Horde.q4hgBAr5av_BdvL_7VvPuv8@webmail.uni-koeln.de> Dear all, I use sfactorization_wilson.m (in my own pipeline outside field trip actually) to estimate the spectral Granger causality of my time series (local field potentials from deep brain stimulation electrodes). As input I use a 3D spectral matrix S with dimensions 2x2x32 calculated from wavelet transformation at frequencies f=[0:1:31] Hz. It consists of time-averaged auto- (Sxx, Syy) and cross-spectral densities (Sxy, conj(Sxy)), obtained from smoothing the wavelet matrix. My problem is that the implemented Wilson-Burg algorithm quite often does not converge at all and I wonder if anybody else has that problem. The non-convergence leads to a new spectral matrix Snew=psi*psi', which has non-zero imaginary parts or which is simply too different from the original matrix S. I also wonder why the only criteria to stop the iteration is when the increment step psi_old-psi becomes small. Why is there no criterion to stop the iteration if the new spectral matrix is close enough to the original one (e.g. S-Snew References: <20151129194302.Horde.q4hgBAr5av_BdvL_7VvPuv8@webmail.uni-koeln.de> Message-ID: <427A0885-F577-4FE0-9583-B3BDCBBA3C08@fcdonders.ru.nl> Hi Mitch, It could be that your dysconvergence is due to 1) you using a wavelet transform, and 2) you using a very limited bandwidth. In my experience the algorithm performs best if you use a multitapered FFT approach, estimating frequencies from 0 up until the Nyquist frequency, and using a lot of zero-padding before the spectral estimation. Best, Jan-Mathijs On Nov 29, 2015, at 7:43 PM, vpapenm at uni-koeln.de wrote: > Dear all, > > I use sfactorization_wilson.m (in my own pipeline outside field trip actually) to estimate the spectral Granger causality of my time series (local field potentials from deep brain stimulation electrodes). As input I use a 3D spectral matrix S with dimensions 2x2x32 calculated from wavelet transformation at frequencies f=[0:1:31] Hz. It consists of time-averaged auto- (Sxx, Syy) and cross-spectral densities (Sxy, conj(Sxy)), obtained from smoothing the wavelet matrix. > > My problem is that the implemented Wilson-Burg algorithm quite often does not converge at all and I wonder if anybody else has that problem. The non-convergence leads to a new spectral matrix Snew=psi*psi', which has non-zero imaginary parts or which is simply too different from the original matrix S. > > I also wonder why the only criteria to stop the iteration is when the increment step psi_old-psi becomes small. Why is there no criterion to stop the iteration if the new spectral matrix is close enough to the original one (e.g. S-Snew > At the moment I have tried two different approaches to estimate the power at f=0 Hz: 1) I use the power at f=0Hz from FFT [which is mean( sum(x).^2/N*dt ); for the auto-spectra, e.g.] and 2) I use a linear extrapolation of the PSD to get P(f=0). However, both methods do not lead to sufficient convergence of the algorithm. > > I would be very grateful if someone found the time to answer. > > Best regards, > Mitch > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From barbara.schorr at uni-ulm.de Mon Nov 30 10:52:32 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Mon, 30 Nov 2015 10:52:32 +0100 Subject: [FieldTrip] SCD and coherence analysis Message-ID: <52d6-565c1c80-25-55c3b400@102538225> Dear Fieltripers, I would like to do coherence analysis. I did a SCD analysis on my data first ('finite' method), and want to run ft_mvaranalysis now. I get the error Error using ft_datatype_sens (line 186) inconsistent number of channels in sensor description As cfg.elec I use the GSN-HydroCel-257.sfp file which is included in fieldtrip (my raw data set has 257 channels), but there are only 256 channels left after the SCD analysis. Can this cause the problem? Has anyone had this problem before and can provide a solution? I only found one prior entry with this topic, but there was no final solution for it. Thanks and all the best, Barbara From maity_winky at yahoo.es Mon Nov 30 16:31:20 2015 From: maity_winky at yahoo.es (=?UTF-8?Q?Mait=C3=A9_Crespo_Garc=C3=ADa?=) Date: Mon, 30 Nov 2015 15:31:20 +0000 (UTC) Subject: [FieldTrip] power suppression during DICS beamforming ? In-Reply-To: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> References: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> Message-ID: <1881724873.21184223.1448897480847.JavaMail.yahoo@mail.yahoo.com> Dear Frédéri, maybe you have the solution already. In case not, could you explain how did you get the last two plots? Are spectra computed after averaging across all virtual channel spectra or you are representing the spectrum of the source with maximal power? Best,Maite El Jueves 26 de noviembre de 2015 13:55, Frédéric Roux escribió: Dear all, I am observing a counter-intuitive result after applying the spatial filters obtained from DICS beamforming to my MEG data. The plot in the attachment summarizes the issue: The raw data shows a clear peak of activity at 10 Hz, however, after applying the spatial filter to the MEG data the spectrum of the virtual channels shows that power in this frequency band is reduced. The same also happens when I apply a spatial filter in the gamma range for power at 70 Hz to the raw MEG signals. Is this something that falls out of the beamformer math due to the fact how the algorithm suppresses power at all locations by minimizing the noise level, or is there something wrong with my code? I (maybe naively) assumed that the results should come out the opposite. On the other hand, when plotting the noise normalized maps (NAI) of both the alpha and gamma beamformers the sources look quite accurate. Should I normalize with the level of noise first before plotting the spectrum to see the expected results (ie an upregulation of power instead of a downregulation of power)? The code that I use to generate the figures is: % 1) compute CSD matrix cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foilim = [10 10]; cfg.tapsmofrq = 2; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; [csd] = ft_freqanalysis(cfg,meg_data); % 2) compute DICS filter cfg = []; cfg.method = 'dics'; cfg.grad = meg_data.grad; cfg.headmodel = vol; cfg.frequency = csd.freq; cfg.dics.realfiter = 'yes'; cfg.dics.fixedori = 'yes'; [alpha_filter]= ft_sourceanalysis(cfg,csd); % 3) compute the virtual channel data VC = meg_data; VC.trial = cell(1,length(meg_data.trial)); VC.label = cell(1,length(alpha_filter.avg.pow)); for i = 1:length(VC.trial)   for j = 1:length(VC.label)       VC.trial{i}(j,:) = alpha_filter{j}*meg_data.trial{i};       VC.label(j) = {['virtual_channel',num2str(j)]};   end; end; % 4) compute the spectrum of the virtual channel data cfg = []; cfg.method = 'mtmfft'; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; cfg.tapsmofrq = 1; cfg.foi = 0.1:100; [pow] = ft_freqanalysis(cfg,VC); Any help or suggestions would be greatly appreciated. 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” _______________________________________________ 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 pmetzak at gmail.com Tue Nov 3 00:34:52 2015 From: pmetzak at gmail.com (Paul Metzak) Date: Mon, 2 Nov 2015 15:34:52 -0800 Subject: [FieldTrip] ft_sourcestatistics: cfg.design and memory issues Message-ID: Hello, I am new to FieldTrip (and MEG) and I have been working through the walkthroughs and tutorials in an attempt to use beamforming to source localize my MEG data. In this experiment, there are 3 conditions and 2 groups. I have been following the Example: Source Statistics ( http://www.fieldtriptoolbox.org/example/source_statistics) tutorial but I have encountered a couple of difficulties. 1) The first issue is in the choice of design matrix for the analyses I would like to run. The tutorial offers a very clear example of how to assess differences between conditions within a single group, but it is less straightforward (to me at least) how to run an analysis of the differences between two groups on a single condition. In my case, I have 17 participants from group 1 and 14 participants from group 2. I have created 17x1 and 14x1 cell array containing the output from each subject's beamform (at the individual subject level, I contrasted a period of interest from condition 1 with an equivalent length of time from the prestim baseline). My call to ft_sourcestatistics is below. Is this the proper way to set up the design matrix to run this analysis? I know that participants are not true 'independent variables' but it seems to me that treating them as such will randomise group assignment to produce the monte carlo distribution that I am looking for. cfg=[]; cfg.dim=cond1_h{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; % note that this only implies single-sided testing cfg.tail = 0; nsubj=17; cfg2.design(1,:) = [ones(1,nsubj) ones(1,nsubj)*2]; %create over-large desmtx cfg.design=cfg.design(:,1:31); %trim desmtx to correct specs cfg.ivar = 1; % row of design matrix that contains independent variable (the participants) stat = ft_sourcestatistics(cfg, cond1_h{:}, cond1_s{:}); 2) The second issue is that it appears I have been inefficient in my memory use as matlab crashes when I attempt to run this analysis ( FYI I have 16GB of RAM and 16GB of swap space). I have employed the -nojvm flag when starting matlab, and I have used struct2single to try and reduce the memory load but matlab still crashes out (without message) when I attempt to run this analysis. This code will run on my computer with a maximum of 4 subjects from each group and 50 randomizations, which is obviously not ideal for me. Please find the contents of a single cell from one of the groups below. Is there something that is obviously problematic in what I have so far? inside: [256x256x256 logical] pow: [256x256x256 single] dim: [256 256 256] transform: [4x4 single] anatomy: [256x256x256 single] coordsys: 'ctf' unit: 'mm' cfg: [1x1 struct] Thank you very much for any help you can offer me with this! If any further information or clarifications would be useful to help diagnose or overcome this issue, please let me know. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Tue Nov 3 10:06:25 2015 From: anne.urai at gmail.com (Anne Urai) Date: Tue, 3 Nov 2015 10:06:25 +0100 Subject: [FieldTrip] ft_sourcestatistics: cfg.design and memory issues In-Reply-To: References: Message-ID: Hi Paul, in my experience, the cfg field can get rather big as it accumulates information about previous steps in the pipeline. source = rmfield(source, 'cfg') might help a bit. Cheers, Anne On 3 November 2015 at 00:34, Paul Metzak wrote: > Hello, > > I am new to FieldTrip (and MEG) and I have been working through the > walkthroughs and tutorials in an attempt to use beamforming to source > localize my MEG data. In this experiment, there are 3 conditions and 2 > groups. I have been following the Example: Source Statistics ( > http://www.fieldtriptoolbox.org/example/source_statistics) tutorial but I > have encountered a couple of difficulties. > > 1) The first issue is in the choice of design matrix for the analyses I > would like to run. The tutorial offers a very clear example of how to > assess differences between conditions within a single group, but it is less > straightforward (to me at least) how to run an analysis of the differences > between two groups on a single condition. In my case, I have 17 > participants from group 1 and 14 participants from group 2. I have created > 17x1 and 14x1 cell array containing the output from each subject's beamform > (at the individual subject level, I contrasted a period of interest from > condition 1 with an equivalent length of time from the prestim baseline). > My call to ft_sourcestatistics is below. Is this the proper way to set up > the design matrix to run this analysis? I know that participants are not > true 'independent variables' but it seems to me that treating them as such > will randomise group assignment to produce the monte carlo distribution > that I am looking for. > > cfg=[]; > cfg.dim=cond1_h{1}.dim; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.parameter = 'pow'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; % note that this only implies single-sided testing > cfg.tail = 0; > > nsubj=17; > cfg2.design(1,:) = [ones(1,nsubj) ones(1,nsubj)*2]; %create over-large > desmtx > cfg.design=cfg.design(:,1:31); %trim desmtx to correct specs > cfg.ivar = 1; % row of design matrix that contains independent > variable (the participants) > > stat = ft_sourcestatistics(cfg, cond1_h{:}, cond1_s{:}); > > 2) The second issue is that it appears I have been inefficient in my > memory use as matlab crashes when I attempt to run this analysis ( FYI I > have 16GB of RAM and 16GB of swap space). I have employed the -nojvm flag > when starting matlab, and I have used struct2single to try and reduce the > memory load but matlab still crashes out (without message) when I attempt > to run this analysis. This code will run on my computer with a maximum of 4 > subjects from each group and 50 randomizations, which is obviously not > ideal for me. Please find the contents of a single cell from one of the > groups below. Is there something that is obviously problematic in what I > have so far? > > inside: [256x256x256 logical] > pow: [256x256x256 single] > dim: [256 256 256] > transform: [4x4 single] > anatomy: [256x256x256 single] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] > > > Thank you very much for any help you can offer me with this! If any > further information or clarifications would be useful to help diagnose or > overcome this issue, please let me know. > > Paul > > > > > _______________________________________________ > 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 Holger.Krause at med.uni-duesseldorf.de Tue Nov 3 16:45:55 2015 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Tue, 3 Nov 2015 16:45:55 +0100 Subject: [FieldTrip] No daily releases on ftp-server since two weeks? Message-ID: <4718281.hncb08gLrJ@metta> Hi, the newest version I can find on ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/ dates from "Tue Oct 20 21:03:00 2015". Will newer versions still be made available here? Thanks in advance! Holger From mikexcohen at gmail.com Tue Nov 3 17:33:22 2015 From: mikexcohen at gmail.com (Mike X Cohen) Date: Tue, 3 Nov 2015 17:33:22 +0100 Subject: [FieldTrip] Conference announcement: ICON (August 2017, Amsterdam) Message-ID: We are happy to make the first announcement for the ICON XIII conference, which will take place on 5-9 August 2017 in Amsterdam (the Netherlands). Amsterdam is an easily-accessible and progressive city. ICON will take place at the Beurs van Berlage, located in downtown Amsterdam and one of the most beautiful conference venues in Europe! Visit the website: http://www.icon2017.org ICON stands for International Conference for Cognitive Neuroscience. ICON has taken place every 2-3 years since 1980. This conference brings together researchers from diverse backgrounds, joined by their interest in studying the relationships amongst brain, mind, and behavior. ICON conferences are always a big success, and 2017 in Amsterdam will follow this same tradition! Symposia and poster submissions will be open from early summer 2016, with deadlines in August/October (precise dates to be announced in the future). Plan your research accordingly! PRE-CONFERENCE WORKSHOPS/SATELLITES We welcome pre-conference satellites, and will be happy to advertise them on the ICON website. Note that satellites are independent from ICON in terms of organization, registration, and costs. If you have any questions or would like to discuss ideas for your satellite, please contact Mike Cohen (mikexcohen at gmail.com) and Birte Forstmann (buforstmann at gmail.com). FOLLOW US ON TWITTER For up-to-date announcements before and during the ICON meeting, follow @icon2017 (see also "Media" tab on the website). http://www.icon2017.org We look forward to seeing you in beautiful Amsterdam! Mike X Cohen and Birte Forstmann -- Mike X Cohen, PhD mikexcohen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Tue Nov 3 21:21:51 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Tue, 3 Nov 2015 15:21:51 -0500 Subject: [FieldTrip] one-dimensional cluster stats Message-ID: hi all, I'm trying to trick Fieldtrip into doing cluster stats on "one-dimensional" EEG data. What I mean by that is that for every subject, and every electrode, I have only one value (average density of sleep spindles). So no time dimension, just a spatial one. I assumed (but I'm not sure) that Fieldtrip always requires a time dimension, so I'm essentially copying the data over to a second sample, and set 'avgovertime' to yes. I have a simple between-subjects design (at least for a first pass) with 16 and 20 subjects respectively. my code: cfg=[]; *%I get my chanlocs from eeglab* cfg=eeglab2fieldtrip(myeeg,'chanloc'); cfg.rotate=90; %because eeglab and fieldtrip have different orientations cfg.layout=ft_prepare_layout(cfg); cfg.label=cfg.elec.label; cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,cfg.elec); cfg.channel = {'EEG'}; cfg.latency = 'all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.alpha = 0.05; cfg.tail = 2; cfg.numrandomization = 1000; cfg.avgovertime = 'yes'; cfg.design: [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] cfg.ivar: 1 *%data to compare* spindledata.dimord='subj_chan_time'; % spindledata.time=[0 1]; %pretend I have two timepoints spindledata.label=cfg.label; %*paste data (and use repmat to make a copy for the second timepoint)* spindledata1=spindledata; spindledata2=spindledata; spindledata1.avg=repmat(allData(allLabels==1,:),[1 1 2]); spindledata2.avg=repmat(allData(allLabels==2,:),[1 1 2]); [statT] = ft_timelockstatistics(cfg,spindledata1,spindledata2); Matlab's output: total number of measurements = 36 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parametric threshold for clustering Reference to non-existent field 'critval'. Error using ft_statistics_montecarlo (line 250) could not determine the parametric critical value for clustering Error in ft_timelockstatistics (line 181) [stat, cfg] = statmethod(cfg, dat, design); Error in spindlestats (line 149) [statT] = ft_timelockstatistics(cfg,spindledata1,spindledata2); When I step into the ft_timelockstatistics to figure out what's happening, I notice that the cfg.channel field holds only 32 channels (while I have 58). Similarly, right before it crashes the "dat" variable is also a 32x36 matrix while I'd expect a 58x36. All my data are free of Nans, so that's not it. It's a great mystery to me so any suggestions are welcome. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Nov 4 00:00:35 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 4 Nov 2015 00:00:35 +0100 Subject: [FieldTrip] bemcp vs dipoli Message-ID: Hi Fieldtrip users, When constructing a volume conduction model for EEG using the boundary element method (BEM), there are two methods available: 'dipoli' and 'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), are there any differences that you know of/have experienced that make one method better (more reliable, more accurate, or anything else that makes you prefer one rather) than the other? For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During processing with 'bemcp' there is a "warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the end result being that vol.mat contains NaNs. The input in both cases, besides the method chosen, is identical. Taking one step back in the processing pipeline, I am aware that a poor segmentation outcome might be a/the cause of the warnings and eventual errors when constructing a volume conduction model. But in general this should hold equally for both methods. What I am wondering about is why one method might deal more successfully than the other with the same input. Best, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailtome.2113 at gmail.com Wed Nov 4 00:49:36 2015 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Wed, 4 Nov 2015 10:49:36 +1100 Subject: [FieldTrip] Re referencing Message-ID: Dear fieldtrip community, I am working with 128 channel EEG data recorded with EGI system. The data was recorded with Cz reference. I want to re-reference to average reference and get the data from the original reference channel Cz. When I run the following code, I still can't get the data from Cz. Could you please suggest a fix? Thanks, Arti cfg = []; cfg.reref = 'yes'; cfg.implicitref = 'Cz'; cfg.refchannel = 'all'; data_reref= ft_preprocessing(cfg, data_clean); -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.aurtenetxe at bcbl.eu Wed Nov 4 09:51:00 2015 From: s.aurtenetxe at bcbl.eu (Sara Aurtenetxe) Date: Wed, 4 Nov 2015 09:51:00 +0100 (CET) Subject: [FieldTrip] Combineplanars and timelockstatistics Message-ID: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> Dear all, I would highly appreciate if an expert on the field could comment on the following questions, or highlight a reference, since as far as I am aware of, there are different opinions on it. When doing timelockstatistics (ERFs) at the gradiometers level: - Do the gradiometers need to be combined (ft_combineplanar) before the stats? And/or do they need to be combined for visualization of effects? - Which is the (mathematical) explanation for the answer/s? - Does apply the same when doing source analysis with 'lcmv'? Thanks a lot in advance, All the best, Sara From alexandre.gramfort at telecom-paristech.fr Wed Nov 4 10:05:53 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 4 Nov 2015 10:05:53 +0100 Subject: [FieldTrip] bemcp vs dipoli In-Reply-To: References: Message-ID: hi Maris, you can have a look at: http://www.hindawi.com/journals/cin/2011/923703/ especially: http://www.hindawi.com/journals/cin/2011/923703/fig12/ LC (linear collocation) is bemcp and LCISA is dipoli. When using ISA (isolated skull approach) accuracy is better. In summary use dipoli if you can. Hope this helps, Best, Alex On Wed, Nov 4, 2015 at 12:00 AM, Maris Skujevskis wrote: > Hi Fieldtrip users, > > When constructing a volume conduction model for EEG using the boundary > element method (BEM), there are two methods available: 'dipoli' and 'bemcp'. > Besides technicalities (i.e., 'dipoli' only available on Linux), are there > any differences that you know of/have experienced that make one method > better (more reliable, more accurate, or anything else that makes you prefer > one rather) than the other? > > For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During > processing with 'bemcp' there is a "warning: Matrix is singular, close to > singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the > end result being that vol.mat contains NaNs. > The input in both cases, besides the method chosen, is identical. > > Taking one step back in the processing pipeline, I am aware that a poor > segmentation outcome might be a/the cause of the warnings and eventual > errors when constructing a volume conduction model. But in general this > should hold equally for both methods. What I am wondering about is why one > method might deal more successfully than the other with the same input. > > Best, > Maris > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From thomas.hartmann at th-ht.de Wed Nov 4 11:19:45 2015 From: thomas.hartmann at th-ht.de (Thomas Hartmann) Date: Wed, 4 Nov 2015 11:19:45 +0100 Subject: [FieldTrip] Combineplanars and timelockstatistics In-Reply-To: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> References: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> Message-ID: <5639DBC1.5070502@th-ht.de> dear sara, Am 2015-11-04 um 09:51 schrieb Sara Aurtenetxe: > When doing timelockstatistics (ERFs) at the gradiometers level: > > - Do the gradiometers need to be combined (ft_combineplanar) before the stats? > And/or do they need to be combined for visualization of effects? > > - Which is the (mathematical) explanation for the answer/s? let me answer both questions at the same time: the two planar gradiometers that make up the set of two that you find at each sensor location point into orthogonal directions. you can imagine one pointing along the x-axis, the other pointing along the y-axis of a 2d coordinate system. so, the gradiometer pointing along the x-axis would pick up 100% percent of an activity that increases or decreases in that direction. if the activity increases or decreases along the y-axis, the x-axis gradiometer would not pick up anything. instead, the other gradiometer would pick up the whole energy. if there is activity that increases or decreases in an angle 45° to both gradiometers, both would pick up half the energy. this works accordingly for any orientation of the underlying source. i.e. the two gradiometers pick up the x and the y part of the signal. this means, that the activity at the x-gradiometer is meaningless without the activity at the y-gradiometer. and as the orientations of the respective gradiometers with respect to the head are arbitrary, it does not make sense to compare, let's say the x-gradiometer at one spot with the x-gradiometer at another one. mathematically speaking: instead of looking at the coordinates of your vector, you want the length of it. so, in order to get that, you need to do: sqrt(x^2 + y^2). so, long story short: yes, you need to to ft_combineplanar before sensor level stats. > - Does apply the same when doing source analysis with 'lcmv'? no, this is a different story. it is quite the opposite: the activity at a voxel (or grid point) is the linear combination (i.e. a weighed sum) of the activity at all the sensors. the weighing coefficients are what you calculate when you first do your forward and the then the inverse model (e.g., bem modelling as forward model, LCMV for the inverse solution). the forward modelling takes into account the orientation of the sensors and also knows, where the head is, i.e. how the brain is oriented with respect to the sensor. so, no need to do ft_combineplanar here. best, thomas > > Thanks a lot in advance, > All the best, > > Sara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email:thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) From RICHARDS at mailbox.sc.edu Wed Nov 4 14:36:00 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 4 Nov 2015 13:36:00 +0000 Subject: [FieldTrip] bemcp vs dipoli Message-ID: In addition to the answer given by Alexandre Gramfort. I have compared BEMCP, Dipoli, Sim-bio FEM, and spherical models. My tests use an individual head model with that individuals data, and then head models based on other participants, age-appropriate MRI templates, and age-inappropriate MRI templates; with infants. The BEMCP is the three-compartment model, the Dipoli is a four-compartment model, the Simbio is a full segmented head model with 10 different materials, the spherical is four spheres. 1—I sometimes have issues getting the forward model / source analysis with BEMCP. It appears to have singularities on the borders of the compartments and gives the same answer as you report. Or does not even compute. Using the same (or similar) head model mesh with Dipole, it works. 2—I have been using the Dipoli with four compartments. I am comparing the four methods with a set of empirical data and simulated data. I have found that the dipole solutions on a single individual(s) for the BEMCP and the spherical models are closer in solution, and the Dipoli and the SimBio-FEM are closer in the solution. 3—I also have been using head models from different individuals to solve the forward model for the EEG from a single individual, comparing the solutions across head models. Both the SimBio-FEM and Dipoli show the greatest change in solution across individuals with different head sizes or ages (using age-appropriate and age-inappropriate heads), whereas the BEMCP and spherical model show the least change. Interesting, the larger change for the two models occurs because its theoretical fit when the head comes from the individual is better than the fit when the head comes from an inappropriate age, whereas the age-appropriate head model are not as important for BEMCP and spherical models because they fit poorer. The results from 2 and 3 are being analyzed now, eventually will reach publication. John >------------------------------ > >Message: 4 >Date: Wed, 4 Nov 2015 00:00:35 +0100 >From: Maris Skujevskis >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] bemcp vs dipoli >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Hi Fieldtrip users, > >When constructing a volume conduction model for EEG using the boundary >element method (BEM), there are two methods available: 'dipoli' and >'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), >are there any differences that you know of/have experienced that make one >method better (more reliable, more accurate, or anything else that makes >you prefer one rather) than the other? > >For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During >processing with 'bemcp' there is a "warning: Matrix is singular, close to >singular or badly scaled. Results may be inaccurate. RCOND = NaN", with the >end result being that vol.mat contains NaNs. >The input in both cases, besides the method chosen, is identical. > >Taking one step back in the processing pipeline, I am aware that a poor >segmentation outcome might be a/the cause of the warnings and eventual >errors when constructing a volume conduction model. But in general this >should hold equally for both methods. What I am wondering about is why one >method might deal more successfully than the other with the same input. > >Best, >Maris >-------------- next part -------------- From litvak.vladimir at gmail.com Wed Nov 4 14:51:14 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Wed, 4 Nov 2015 13:51:14 +0000 Subject: [FieldTrip] bemcp vs dipoli In-Reply-To: References: Message-ID: Dear all, I have also looked at this in a different context and found that bemcp computation breaks down at distances smaller than mean triangle side length from the boundary (for meshes used in SPM that's about 6mm). So you can avoid numerical problems by making sure your sources are never closer than that to the inner skull boundary. This can be done with cfg.inwardshift (for grids) or cfg.moveinward (for meshes) arguments of ft_prepare_sourcemodel, In SPM12 this is done automatically for the forward models we generate. Best, Vladimir On Wed, Nov 4, 2015 at 1:36 PM, RICHARDS, JOHN wrote: > In addition to the answer given by Alexandre Gramfort. > > I have compared BEMCP, Dipoli, Sim-bio FEM, and spherical models. My > tests use an individual head model with that individuals data, and then > head models based on other participants, age-appropriate MRI templates, and > age-inappropriate MRI templates; with infants. The BEMCP is the > three-compartment model, the Dipoli is a four-compartment model, the Simbio > is a full segmented head model with 10 different materials, the spherical > is four spheres. > > 1—I sometimes have issues getting the forward model / source analysis with > BEMCP. It appears to have singularities on the borders of the compartments > and gives the same answer as you report. Or does not even compute. Using > the same (or similar) head model mesh with Dipole, it works. > > 2—I have been using the Dipoli with four compartments. I am comparing the > four methods with a set of empirical data and simulated data. I have found > that the dipole solutions on a single individual(s) for the BEMCP and the > spherical models are closer in solution, and the Dipoli and the SimBio-FEM > are closer in the solution. > > 3—I also have been using head models from different individuals to solve > the forward model for the EEG from a single individual, comparing the > solutions across head models. Both the SimBio-FEM and Dipoli show the > greatest change in solution across individuals with different head sizes or > ages (using age-appropriate and age-inappropriate heads), whereas the BEMCP > and spherical model show the least change. Interesting, the larger change > for the two models occurs because its theoretical fit when the head comes > from the individual is better than the fit when the head comes from an > inappropriate age, whereas the age-appropriate head model are not as > important for BEMCP and spherical models because they fit poorer. > > The results from 2 and 3 are being analyzed now, eventually will reach > publication. > > John > > > >------------------------------ > > > >Message: 4 > >Date: Wed, 4 Nov 2015 00:00:35 +0100 > >From: Maris Skujevskis > >To: fieldtrip at science.ru.nl > >Subject: [FieldTrip] bemcp vs dipoli > >Message-ID: > > dQimv7Q at mail.gmail.com> > >Content-Type: text/plain; charset="utf-8" > > > >Hi Fieldtrip users, > > > >When constructing a volume conduction model for EEG using the boundary > >element method (BEM), there are two methods available: 'dipoli' and > >'bemcp'. Besides technicalities (i.e., 'dipoli' only available on Linux), > >are there any differences that you know of/have experienced that make one > >method better (more reliable, more accurate, or anything else that makes > >you prefer one rather) than the other? > > > >For some of my EEG subjects, 'dipoli' succeeds where 'bemcp' fails. During > >processing with 'bemcp' there is a "warning: Matrix is singular, close to > >singular or badly scaled. Results may be inaccurate. RCOND = NaN", with > the > >end result being that vol.mat contains NaNs. > >The input in both cases, besides the method chosen, is identical. > > > >Taking one step back in the processing pipeline, I am aware that a poor > >segmentation outcome might be a/the cause of the warnings and eventual > >errors when constructing a volume conduction model. But in general this > >should hold equally for both methods. What I am wondering about is why one > >method might deal more successfully than the other with the same input. > > > >Best, > >Maris > >-------------- next part -------------- > > _______________________________________________ > 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 inouereo0406 at gmail.com Thu Nov 5 00:15:50 2015 From: inouereo0406 at gmail.com (Reo Inoue) Date: Wed, 04 Nov 2015 23:15:50 +0000 Subject: [FieldTrip] How to obtain all trials data? Message-ID: <1446678950846-66347c9d-4c1fc339-4b7068ac@mixmax.com> Dear all, I use function; ft_sourceanalysis following. [source] = ft_sourceanalysis(cfg, timelock) And I want to obtain the all trials data, not average. But I could not understand why i obtain the average. My config is following. Are there any problems? cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' jackknife resampling of trials cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = ft_sourceanalysis(cfg,timelock); Thanks a lot in advance, All the best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Thu Nov 5 12:06:26 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Thu, 5 Nov 2015 11:06:26 +0000 Subject: [FieldTrip] How to obtain all trials data? Message-ID: Hello Reo, What was the format of the timelock data structure you supplied to ft_sourceanalysis()? i.e., when you called ft_timelockanalysis() to create the timelock structure earlier, did you also use cfg.keeptrials='yes' there? If not, then your timelock structure would be an average (rather than all trials), and thus the source data you get would also be averaged across trials. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 3 > Date: Wed, 04 Nov 2015 23:15:50 +0000 > From: Reo Inoue > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] How to obtain all trials data? > Message-ID: <1446678950846-66347c9d-4c1fc339-4b7068ac at mixmax.com> > Content-Type: text/plain; charset="us-ascii"; Format="flowed" > > Dear all, > > I use function; ft_sourceanalysis following. [source] = > ft_sourceanalysis(cfg, timelock) > And I want to obtain the all trials data, not average. But I could not > understand why i obtain the average. My config is following. Are there any > problems? > cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' > jackknife resampling of trials > cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials > cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials > cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of > original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with > volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure > with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = > ft_sourceanalysis(cfg,timelock); > > > Thanks a lot in advance, > All the best, > -------------- next part -------------- An HTML attachment was scrubbed... URL: From inouereo0406 at gmail.com Thu Nov 5 13:11:58 2015 From: inouereo0406 at gmail.com (Reo Inoue) Date: Thu, 05 Nov 2015 12:11:58 +0000 Subject: [FieldTrip] How to obtain all trials data? In-Reply-To: References: Message-ID: <1446725518503-9830d601-c4877279-85e07c59@mixmax.com> Dear all, Steve I use ft_timelockanalysis before ft_sourceanalysis. I also use cfg.keeptrials='yes' there. All the best 2015-11-05 20:06 GMT+09:00 Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk > : Hello Reo, What was the format of the timelock data structure you supplied to ft_sourceanalysis()? i.e., when you called ft_timelockanalysis() to create the timelock structure earlier, did you also use cfg.keeptrials='yes' there? If not, then your timelock structure would be an average (rather than all trials), and thus the source data you get would also be averaged across trials. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~ cpgl0080/ Message: 3 Date: Wed, 04 Nov 2015 23:15:50 +0000 From: Reo Inoue < inouereo0406 at gmail.com > To: fieldtrip at science.ru.nl Subject: [FieldTrip] How to obtain all trials data? Message-ID: < 1446678950846-66347c9d- 4c1fc339-4b7068ac at mixmax.com > Content-Type: text/plain; charset="us-ascii"; Format="flowed" Dear all, I use function; ft_sourceanalysis following. [source] = ft_sourceanalysis(cfg, timelock) And I want to obtain the all trials data, not average. But I could not understand why i obtain the average. My config is following. Are there any problems? cfg=[]; cfg.method = 'eloreta'; cfg.jackknife = 'no';%'no' or 'yes' jackknife resampling of trials cfg.pseudovalue = 'no';%'no' or 'yes' pseudovalue resampling of trials cfg.bootstrap = 'no';%'no' or 'yes' bootstrap resampling of trials cfg.numbootstrap = 1;%%number of bootstrap replications (e.g. number of original trials) cfg.keeptrials='yes'; cfg.vol =vol; %structure with volume conduction model, see FT_PREPARE_HEADMODEL cfg.elec =elec;%structure with electrode positions, see FT_DATATYPE_SENS [source{SouInd,1}] = ft_sourceanalysis(cfg, timelock); Thanks a lot in advance, All the best, ______________________________ _________________ 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 s.aurtenetxe at bcbl.eu Thu Nov 5 15:39:14 2015 From: s.aurtenetxe at bcbl.eu (Sara Aurtenetxe) Date: Thu, 5 Nov 2015 15:39:14 +0100 (CET) Subject: [FieldTrip] Combineplanars and timelockstatistics In-Reply-To: <5639DBC1.5070502@th-ht.de> References: <835194692.1073438.1446627060229.JavaMail.zimbra@bcbl.eu> <5639DBC1.5070502@th-ht.de> Message-ID: <1226445767.1122841.1446734354736.JavaMail.zimbra@bcbl.eu> Dear Thomas, Thanks a lot for your answer. It makes sense that the non-combined planars may not be ideally suited for sensor-level statistics if sources are not equally measured by the same planar gradiometers across participants. Similarly, I can see how dipoles with changing orientation could produce fields with opposite polarity, that is one with a negative peak and another one with a positive peak. In the non-combined case, these would cancel out to zero in the average, whereas in the combined case both components would sum up to a non-zero average. In fact, by doing some further research I found a relevant post by Eric Marris and Michael Wibral on this topic: http://mailman.science.ru.nl/pipermail/fieldtrip/2010-March/002668.html I now clearly see your point about the combined planar gradients providing a better basis for comparisons across participants, especially for the scenario where the dipole would be shifting its orientation or position relative to the helmet across participants. I also imagine that source analysis would provide important additional information here, as it would allow to test the hypothesis that the fields have similar sources across participants. The question that remains to me, however, is whether it is acceptable to ignore the shifts in the dipole orientation from a neurophysiological perspective. Is it legitimate to assume that although the dipoles presumably have the same source but different orientations, they reflect the same process if their orientations differ? Some biophysical insights on this would be very helpful I guess. Looking forward to receive further advice on this. Thanks! Sara Sara Aurtenetxe ----- Original Message ----- From: "Thomas Hartmann" To: fieldtrip at science.ru.nl Sent: Wednesday, November 4, 2015 11:19:45 AM Subject: Re: [FieldTrip] Combineplanars and timelockstatistics dear sara, Am 2015-11-04 um 09:51 schrieb Sara Aurtenetxe: > When doing timelockstatistics (ERFs) at the gradiometers level: > > - Do the gradiometers need to be combined (ft_combineplanar) before the stats? > And/or do they need to be combined for visualization of effects? > > - Which is the (mathematical) explanation for the answer/s? let me answer both questions at the same time: the two planar gradiometers that make up the set of two that you find at each sensor location point into orthogonal directions. you can imagine one pointing along the x-axis, the other pointing along the y-axis of a 2d coordinate system. so, the gradiometer pointing along the x-axis would pick up 100% percent of an activity that increases or decreases in that direction. if the activity increases or decreases along the y-axis, the x-axis gradiometer would not pick up anything. instead, the other gradiometer would pick up the whole energy. if there is activity that increases or decreases in an angle 45° to both gradiometers, both would pick up half the energy. this works accordingly for any orientation of the underlying source. i.e. the two gradiometers pick up the x and the y part of the signal. this means, that the activity at the x-gradiometer is meaningless without the activity at the y-gradiometer. and as the orientations of the respective gradiometers with respect to the head are arbitrary, it does not make sense to compare, let's say the x-gradiometer at one spot with the x-gradiometer at another one. mathematically speaking: instead of looking at the coordinates of your vector, you want the length of it. so, in order to get that, you need to do: sqrt(x^2 + y^2). so, long story short: yes, you need to to ft_combineplanar before sensor level stats. > - Does apply the same when doing source analysis with 'lcmv'? no, this is a different story. it is quite the opposite: the activity at a voxel (or grid point) is the linear combination (i.e. a weighed sum) of the activity at all the sensors. the weighing coefficients are what you calculate when you first do your forward and the then the inverse model (e.g., bem modelling as forward model, LCMV for the inverse solution). the forward modelling takes into account the orientation of the sensors and also knows, where the head is, i.e. how the brain is oriented with respect to the sensor. so, no need to do ft_combineplanar here. best, thomas > > Thanks a lot in advance, > All the best, > > Sara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email:thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From behzadiravani at gmail.com Thu Nov 5 19:18:07 2015 From: behzadiravani at gmail.com (Behzad Iravani) Date: Thu, 5 Nov 2015 19:18:07 +0100 Subject: [FieldTrip] statistical test Message-ID: Hi Fieldtrip users, I'm interested in doing statistical test on the source analysis output. I have used common filter beamforming and I ended up with source structure which doesn't contain avg field and instead has the the information for every trials. I could mange to do descriptive analysis and plot source. But I'm interested to do statistic on it and plot t-map of source. ft_sourcestatistics doesn't work properly. I would be grateful if anyone can help. Best Behzad -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Thu Nov 5 20:58:26 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Thu, 5 Nov 2015 14:58:26 -0500 Subject: [FieldTrip] disconnected cluster Message-ID: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible).[image: Inline image 3] I've inspected my channel layout and that looks good: [image: Inline image 4] I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): [image: Inline image 5] Looking into the disconnected channel F5, the neighborhood structure seems in order: *cfg.neighbours(15)* ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls *cfg.connectivity = channelconnectivity(cfg);* Stepping into this function, on line 20 it says: *chans=cfg.channel;* Checking what this variable contains, it has all my channels in *alphabetical order*, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neighboorhood.jpg Type: image/jpeg Size: 26681 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2D_layout.jpg Type: image/jpeg Size: 37822 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cluster.jpg Type: image/jpeg Size: 53401 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Nov 6 07:34:32 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 6 Nov 2015 06:34:32 +0000 Subject: [FieldTrip] disconnected cluster In-Reply-To: References: Message-ID: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Hi Roy, The inadvertent alphabetization of channels should not occur. This issue has popped up in the past on several occasions (and on several locations in the code) and it has been a really tricky issue to deal with once and for all. Thanks for all the detective work so far. From what you write, it seems that the cfg.channel that goes into channelconnectivity is already in alphabetical order. Would it be possible to track down where this happens? Do you explicitly add the alphabetical list to cfg.channel in your call to ft_timelockanalysis? Does the problem persist if you define cfg.channel = data.label, i.e. the list in the order as it occurs in the data. (I would assume that the order of the channels is the same across all input data structures). Best, Jan-Mathijs On Nov 5, 2015, at 8:58 PM, Roy Cox > wrote: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible). I've inspected my channel layout and that looks good: <2D_layout.jpg> I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): Looking into the disconnected channel F5, the neighborhood structure seems in order: cfg.neighbours(15) ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls cfg.connectivity = channelconnectivity(cfg); Stepping into this function, on line 20 it says: chans=cfg.channel; Checking what this variable contains, it has all my channels in alphabetical order, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy _______________________________________________ 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 bmaniscalco at gmail.com Fri Nov 6 17:03:10 2015 From: bmaniscalco at gmail.com (Brian Maniscalco) Date: Fri, 6 Nov 2015 11:03:10 -0500 Subject: [FieldTrip] Smoothing results of ft_sourceanalysis for a cortical sheet Message-ID: Hi all, The minimum norm estimate tutorial http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate describes how to do minimum norm estimation where the source space is a cortical sheet and the activations on the sheet are produced by ft_sourceanalysis. Is there a way in Fieldtrip to conduct smoothing on the output of ft_sourceanalysis for the activations on the cortical sheet? thanks, Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Nov 8 05:21:49 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sat, 7 Nov 2015 20:21:49 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: Message-ID: Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables ? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : > Dear participants in the discussion on behavioural-power correlation, > > My name is Eric Maris and have contributed most of the older statfuns (but > not ft_statfun_correlationT). Together with Arjen, I will try to resolve > some of the issues that have been discussed. Give us some time, and we will > return to you via the Discussion List. > > best, > Eric > > > _______________________________________________ > 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 ls514 at cam.ac.uk Mon Nov 9 16:30:15 2015 From: ls514 at cam.ac.uk (Li Su) Date: Mon, 9 Nov 2015 15:30:15 +0000 Subject: [FieldTrip] Funded PhD Studentship in Cambridge Message-ID: <010C1775-9D09-4E04-B358-D7CF331DCC52@cam.ac.uk> PhD Studentship: Magnetoencephalography (MEG) Imaging in Dementia with Lewy Bodies Department of Psychiatry, University of Cambridge The Department of Psychiatry, University of Cambridge, is pleased to announce one PhD Studentship supported by The Lewy Body Society, to start in October 2016. Applications are welcome. The PhD project will focus on understanding the underlying neurobiological processes in Dementia with Lewy Bodies using Magnetetoencephalography (MEG) and MRI, and will be carried out under the supervision of Dr Li Su and Professor John O’Brien. The successful student will join our team at Department of Psychiatry, School of Clinical Medicine, located at the Cambridge Biomedical Campus on the Addenbrooke’s site. The Department has an outstanding international reputation and expertise in undertaking clinical and neuroimaging studies of neurological and psychiatric diseases, including dementia, and collaborates closely with the University departments of radiology, clinical neuroscience and Wolfson Brain Imaging Centre. The University of Cambridge is consistently ranked among the top universities in the world. The MEG scanner is hosted at the highly renowned MRC Cognition and Brain Sciences Unit (MRC CBSU), one of the only 9 MEG research facilities in the UK. The Department welcomes applications with a good degree in experimental psychology, medicine, neuroscience, statistics, physics, computer science or a related scientific discipline. The successful applicant will have some experience of, or good understanding of the issues involved in, conducting neuroimaging research on clinical populations. Excellent communication and organisational skills are essential. Due to the nature of the project, strong competence in quantitative methods and analytical skills is also essential. Programming skills in Matlab or similar languages would be desirable. Applicants for the Studentship should have, or expect to gain a 1st class or 2.1 class Honours degree in an appropriate subject, and may also have completed further research training or a Masters degree. The stipend will be paid at Research Councils UK rates for the 3 year duration of the award with no fourth year. Only the fees for home/EU students will be met in full. In addition, the Studentship includes funding for MEG scanning costs of the research, and costs for travel to scientific conferences. To apply, please email the following documents to the Education Administrator (Sarah Rowe) email: sr724 at medschl.cam.ac.uk: i) An academic CV (maximum 2 pages) ii) Two official academic references (please ask your referees to send these directly to the Education Administrator) iii) A research proposal within the remit of MEG imaging in DLB (maximum 1000 words, excluding bibliography or figures) iv) A cover letter indicating: o a brief summary of your research interests and any completed research conducted; o a clear summary of your analytical skills and levels; o a clear statement of your eligibility for this funding award (see below). Applications must be received by midnight on 6th Dec 2015. Interviews are likely to be held on 16th Dec 2015. Enquiries regarding the administration of the application process, or potential supervisors, should be directed via email to the Education Administrator, Sarah Rowe, email:sr724 at medschl.cam.ac.uk tel: + 44 (0) 1223 746 105. FURTHER INFORMATION Applicants should note the following before submitting their application: 1. Applicants should contact Dr Li Su (email ls514 at cam.ac.uk) for further information about the studies programme and supervisory possibilities. General information about these is available via the Department of Psychiatry’s website at www.psychiatry.cam.ac.uk/ or via the Cambridge Neuroscience website at www.neuroscience.cam.ac.uk/ or via the clinical school website at www.medschl.cam.ac.uk/research/Themes/neuro.html. 2. Full awards (fees plus maintenance stipend) are open to UK and EU nationals. 3. For full minimum entry requirements, including fluency in English language please refer to the Departmental website. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahjoory86 at gmail.com Mon Nov 9 16:46:24 2015 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Mon, 9 Nov 2015 16:46:24 +0100 Subject: [FieldTrip] Templates for Cortical mesh and Head model Message-ID: Dear Fieldtrip experts, I want to estimate sources restricted on cortex using a template head model and cortical mesh. the available options I could find in fieldtrip are: - template for headmodel: standard_bem - template for cortical mesh: http://www.fieldtriptoolbox.org/template/sourcemodel As far as I see (please correct me if I am wrong): - Both templates for volume conduction model and cortical mesh are based on Colin27. - cortical mesh looks like a White matter surface. I wonder whether: 1- Fieldtrip estimates sources on white matter surface? 2- Isn't there any ICBM based template for Fieldtrip? Many thanks in advance, Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From roycox.roycox at gmail.com Tue Nov 10 01:52:22 2015 From: roycox.roycox at gmail.com (Roy Cox) Date: Mon, 9 Nov 2015 19:52:22 -0500 Subject: [FieldTrip] disconnected cluster In-Reply-To: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> References: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Message-ID: Hi Jan-Matthijs, It was quite a quest, but I think/hope I've located the problem. I was typing this email as I was troubleshooting, so skip to *3)* to get to the point: I've tried setting both cfg.channel = 'all' and cfg.channel = cfg.label before calling ft_timelock_statistics. It makes no difference. *1) ft_timelock_statistics* I think the problem occurs at an earlier stage than what I thought at first, namely on line 105 of this function: *[varargin{:}] = ft_selectdata(tmpcfg, varargin{:});* After this, the varargin array of structures has the alphabetical channel order (while the input tmpcfg.channel was still good): *varargin{1}.cfg.channel* ans = 'Af3' 'Af4' 'Af7' etc Then after the next line *[cfg, varargin{:}] = rollback_provenance(cfg, varargin{:});* cfg now also contains these channel orders. *2) ft_selectdata* on line 264 the contents of cfg.channel is changed from whatever was put in there (either the cfg.label order or 'all') *if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end* this jumps to subfunction get_selection on line 619: *3) ft_get_selection* line 630 then correctly selects the requested channels from the label list in varargin{k}.labels *selchannel = ft_channelselection(cfg.channel, varargin{k}.label);* selchannel still has the correct order of channels, but then line 631 calls "union" which puts things in alphabetical order: *label = union(label, selchannel);* 637 finds the correspondences between the two lists: *[ix, iy] = match_str(label, varargin{k}.label);* then there is a loop from 653-660 that does some more reordering/matching that I don't follow, *but ultimately, on 677, the alphabetical list of channels is assigned to cfg.channel:* *cfg.channel = label;* I believe this is where the error stems from, because the variable "label" has not had its alphabetical order changed since calling "union" on 631. Hope this helps, Roy On Fri, Nov 6, 2015 at 1:34 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Roy, > > The inadvertent alphabetization of channels should not occur. This issue > has popped up in the past on several occasions (and on several locations in > the code) and it has been a really tricky issue to deal with once and for > all. Thanks for all the detective work so far. From what you write, it > seems that the cfg.channel that goes into channelconnectivity is already in > alphabetical order. Would it be possible to track down where this happens? > Do you explicitly add the alphabetical list to cfg.channel in your call to > ft_timelockanalysis? Does the problem persist if you define cfg.channel = > data.label, i.e. the list in the order as it occurs in the data. (I would > assume that the order of the channels is the same across all input data > structures). > > Best, > Jan-Mathijs > > On Nov 5, 2015, at 8:58 PM, Roy Cox wrote: > > hi all, > > I'm worried that something is not quite right with how the channel > neighborhood configuration is used in the formation of spatial clusters. > > I first noticed it when I got a significant cluster like below. Plotted > are t statistics for a between-group comparison, with the significant > "cluster" indicated with white electrodes. Notice F5 and P8 here which are > disconnected from the rest. I should also mention that I have only one > "time point" (and no frequencies), so it's not possible that these channels > are somehow connected via a "time bridge" (if that would even be possible). > > > I've inspected my channel layout and that looks good: > > <2D_layout.jpg> > I've looked at my neighborhood plot and that looks good too, although I > notice that frontal channels are plotted to the right here (not sure if > that's simply by default): > > > > Looking into the disconnected channel F5, the neighborhood structure seems > in order: > > *cfg.neighbours(15)* > > ans = > > label: 'F5' > neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} > > > I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, > which, on line 165 calls > > *cfg.connectivity = channelconnectivity(cfg);* > > Stepping into this function, on line 20 it says: > > *chans=cfg.channel;* > > Checking what this variable contains, it has all my channels in *alphabetical > order*, but my electrode location order is most definitely not. I've > tried to force the orders to be the same by setting cfg.channel = cfg.label > before calling ft_timelockstatistics, but somewhere down the line my > channel order is made alphabetical again. > > So I suspect that the neighborhood structure, reflecting my actual channel > order, is applied to the alphabetical channel order. That would explain why > a cluster could be scattered across the brain (and also why there's still > some spatial continuity given that alphabetically close channels are > usually close together in space). > > Has anyone ever seen this? Any suggestions how to solve this (other than > making my entire channel location file alphabetical)? I'm also posting this > because it may be of relevance to others. > > Roy > > > _______________________________________________ > 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 jan.schoffelen at donders.ru.nl Tue Nov 10 10:58:02 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Nov 2015 09:58:02 +0000 Subject: [FieldTrip] PhD-position available at the Donders Centre for Cognitive Neuroimaging References: Message-ID: Dear colleagues, I would like to announce an open PhD-position in my team at the Donders Centre for Cognitive Neuroimaging, Nijmegen, NL. Follow the link below for more information. Please feel free to spread the news among interested colleagues. http://www.ru.nl/overons/werken-radboud/details/details_vacature_0/?recid=564499 Thanks, and with best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.fieldtriptoolbox.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 10 11:12:26 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Nov 2015 10:12:26 +0000 Subject: [FieldTrip] disconnected cluster In-Reply-To: References: <27479C39-DFD6-451A-85EA-CA49286FD0A8@fcdonders.ru.nl> Message-ID: <9BCE6FEF-A7D0-44F1-A000-02256D7E7681@fcdonders.ru.nl> Hi Roy, Thanks for looking into it in such detail. I can however not reproduce your problem. Can you update to a more recent version of FieldTrip and try whether it persists? Given the line numbers in ft_selectdata that you mention, it seems that you are using somewhat older code. Best, Jan-Mathijs On Nov 10, 2015, at 1:52 AM, Roy Cox > wrote: Hi Jan-Matthijs, It was quite a quest, but I think/hope I've located the problem. I was typing this email as I was troubleshooting, so skip to 3) to get to the point: I've tried setting both cfg.channel = 'all' and cfg.channel = cfg.label before calling ft_timelock_statistics. It makes no difference. 1) ft_timelock_statistics I think the problem occurs at an earlier stage than what I thought at first, namely on line 105 of this function: [varargin{:}] = ft_selectdata(tmpcfg, varargin{:}); After this, the varargin array of structures has the alphabetical channel order (while the input tmpcfg.channel was still good): varargin{1}.cfg.channel ans = 'Af3' 'Af4' 'Af7' etc Then after the next line [cfg, varargin{:}] = rollback_provenance(cfg, varargin{:}); cfg now also contains these channel orders. 2) ft_selectdata on line 264 the contents of cfg.channel is changed from whatever was put in there (either the cfg.label order or 'all') if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end this jumps to subfunction get_selection on line 619: 3) ft_get_selection line 630 then correctly selects the requested channels from the label list in varargin{k}.labels selchannel = ft_channelselection(cfg.channel, varargin{k}.label); selchannel still has the correct order of channels, but then line 631 calls "union" which puts things in alphabetical order: label = union(label, selchannel); 637 finds the correspondences between the two lists: [ix, iy] = match_str(label, varargin{k}.label); then there is a loop from 653-660 that does some more reordering/matching that I don't follow, but ultimately, on 677, the alphabetical list of channels is assigned to cfg.channel: cfg.channel = label; I believe this is where the error stems from, because the variable "label" has not had its alphabetical order changed since calling "union" on 631. Hope this helps, Roy On Fri, Nov 6, 2015 at 1:34 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Roy, The inadvertent alphabetization of channels should not occur. This issue has popped up in the past on several occasions (and on several locations in the code) and it has been a really tricky issue to deal with once and for all. Thanks for all the detective work so far. From what you write, it seems that the cfg.channel that goes into channelconnectivity is already in alphabetical order. Would it be possible to track down where this happens? Do you explicitly add the alphabetical list to cfg.channel in your call to ft_timelockanalysis? Does the problem persist if you define cfg.channel = data.label, i.e. the list in the order as it occurs in the data. (I would assume that the order of the channels is the same across all input data structures). Best, Jan-Mathijs On Nov 5, 2015, at 8:58 PM, Roy Cox > wrote: hi all, I'm worried that something is not quite right with how the channel neighborhood configuration is used in the formation of spatial clusters. I first noticed it when I got a significant cluster like below. Plotted are t statistics for a between-group comparison, with the significant "cluster" indicated with white electrodes. Notice F5 and P8 here which are disconnected from the rest. I should also mention that I have only one "time point" (and no frequencies), so it's not possible that these channels are somehow connected via a "time bridge" (if that would even be possible). I've inspected my channel layout and that looks good: <2D_layout.jpg> I've looked at my neighborhood plot and that looks good too, although I notice that frontal channels are plotted to the right here (not sure if that's simply by default): Looking into the disconnected channel F5, the neighborhood structure seems in order: cfg.neighbours(15) ans = label: 'F5' neighblabel: {'Af7' 'F3' 'F7' 'Fc5'} I call ft_timelockstatistics, which then calls ft_statistics_montecarlo, which, on line 165 calls cfg.connectivity = channelconnectivity(cfg); Stepping into this function, on line 20 it says: chans=cfg.channel; Checking what this variable contains, it has all my channels in alphabetical order, but my electrode location order is most definitely not. I've tried to force the orders to be the same by setting cfg.channel = cfg.label before calling ft_timelockstatistics, but somewhere down the line my channel order is made alphabetical again. So I suspect that the neighborhood structure, reflecting my actual channel order, is applied to the alphabetical channel order. That would explain why a cluster could be scattered across the brain (and also why there's still some spatial continuity given that alphabetically close channels are usually close together in space). Has anyone ever seen this? Any suggestions how to solve this (other than making my entire channel location file alphabetical)? I'm also posting this because it may be of relevance to others. Roy _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga.v.sysoeva at gmail.com Wed Nov 11 13:14:13 2015 From: olga.v.sysoeva at gmail.com (Olga Sysoeva) Date: Wed, 11 Nov 2015 15:14:13 +0300 Subject: [FieldTrip] Inter-trial coherence/PLF in source space Message-ID: Dear filedtripper, That was quite a while I follow your activity. But now I am back to active analysis and stucked... I'd like to calculate ITC/PLF in a source space similar to described - T. Bardouille , ,B. Ross, 2008 paper. I have 40Hz-auditory steady state response from 306 neuromag system. I figured out how to calculate ITC on sensor space from complex FFT coeficients obtained by ft_freqanalysis. As a next step I need to do this in source space. My vision that I can use complex FFT coeficients, obtained in sensor space but "project" them to source space by multiplying with weigted matrix. In the above mentioned paper they applied the LCMV beamformer to determine the weighting function, *w**jm*, that estimates the source activity across the steady-state time interval in the frequency band of interest. How can I do this? I tried to do it using ft_sourceanalysis but get lost. If I specified lcmv method and feed it with average timelocked data as in the example cfg = []; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = test_vol; cfg.lcmv.keepfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, test_data_LEar_avg); or for a frequency decomposed data using disc cfg = []; cfg.method = 'dics'; cfg.frequency = 40; cfg.grid = grid; cfg.vol = test_vol; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, test_freq_LEar); As output I get in the sourceAll.avg.filter some weigth matrix (although I am not fully sure if that is what I need). Unfortunately, I did not find the way (filtrip function) to apply this filter/weigths to itc or complex FFT coeficients. Should I write my our code for this? Which way is better: multiply it to itc or first to complex fft and than calculate itc? Which matrix to use (from disc or lcmv)? Is my way of thinking makes sense or am I completely lost? I would be really thankfull for any help. Best Regards, Olga Sysoeva, PhD, Senior Researcher, MEG-center, Moscow. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kkalimeri at gmail.com Wed Nov 11 19:37:17 2015 From: kkalimeri at gmail.com (Kyriaki Kalimeri) Date: Wed, 11 Nov 2015 18:37:17 +0000 Subject: [FieldTrip] New Postdoctoral Opportunity in Turin Message-ID: <5105449d6dff4b6896df6c5ef8fec28f@EXPRD01.hosting.ru.nl> [Apologies if you receive multiple copies of this message] Job Description Institute for Scientific Interchange(ISI) (http://www.isi.it) is seeking to appoint a highly motivated Postdoctoral Assistant to undertake research activities related to signal processing and machine learning for the understanding of human behavior through biosignals (EEG, EDA, etc.) within the scopes of the Horizon2020-funded project Sound Of Vision. Sound of Vision (Natural sense of vision through acoustics and haptics) (http://www.soundofvision.net) is a highly multidisciplinary project that designs, implements and validates an original non-invasive, wearable hardware and software system to assist visually impaired people by creating and conveying an auditory representation of the surrounding environment, helping them to both perceive and navigate in any kind of environment (indoor/outdoor). ISI is responsible for conducting usability studies to validate the functionalities of the prototype and access the users' experience. Specifically you will: * Design and conduct usability studies combining behavioural, neuroscientific and psychophysiological methods. * Assess the cognitive load and emotional states of the participants while using the system, employing multimodal data fusion and machine learning techniques; * Carry out innovative, impactful research in the areas of: Behavioral Understanding, Machine Learning and Human Computer Interaction; * Produce high quality scientific and technical outputs including journal articles, conference papers and presentations, patents and technical reports. Core skills you will need for this position: Ph.D in Computer Science, Computer Engineering, Machine Learning, Bioinformatics, Statistics or a related quantitative field. * Applicants should have an established publication record in the fields of signal processing and machine learning. * Have strong programming skills in at least one of the following languages Matlab, Python or Java. * Solid knowledge of statistics and hypothesis testing. * Experience with EEG and EDA signal processing as well as usability experimental design will be highly appreciated. * Experience with mobile application development is considered a plus. * Fluency in English both spoken and written. ISI offers: We provide an unusually rich opportunity for collegial interaction in a highly competitive environment. Mentoring will be provided by a multidisciplinary faculty team including co-investigators on the project and collaborators from neurology, engineering and psychology. We provide a competitive salary according to the qualifications and medical and pension benefits according to the Italian State. Applications received before the February 1st 2016 will be given priority, but the position will remain open until filled. The successful applicant is expected to start the appointment approximately on April 2016. The appointment is until January 2018. To apply, please send your cover letter, curriculum vitae and professional reference list to the PI of the project Dr. Kyriaki Kalimeri >. For any further information, please refer to Dr. Kyriaki Kalimeri or Dr. Charalampos Saitis >. ISI is an equal opportunity employer and does not discriminate on the basis of race, color, national origin, gender, sexual orientation, age, religion or disability. -- Kyriaki Kalimeri, Ph.D. Electronic & Computer Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From Farzaneh.Ahmadi at westernsydney.edu.au Wed Nov 11 21:24:26 2015 From: Farzaneh.Ahmadi at westernsydney.edu.au (Farzaneh Ahmadi) Date: Wed, 11 Nov 2015 20:24:26 +0000 Subject: [FieldTrip] Linking fieldtrip to simulink In-Reply-To: References: Message-ID: Dear Fieldtrippers Greetings from Sydney! I am new to field trip so please pardon my question if being basic. I have been trying to hook up field trip buffer directly to Simulink but so far I had no luck. So question 1. Has anyone successfully used the buffer with Simulink (TCP send/receive blocks)? I mean to run the buffer as a standalone executable and use Simulink TCP (Send/receive) blocks to directly connect to the buffer. If the answer to Q1 is no, then here is the details of the problem I have and wish to have your input. I have MATLAB 2014b and have Instrument control Toolbox-2 on Simulink (with the usual TCP/Send/Receive blocks). When the buffer is running as an standalone executable, Simulink can detect the connection but can not receive any streamed data. I suspect it is either a data format problem or a header problem. In my test bench I have used the standalone implementations of the buffer located here /fieldtrip-20151020/realtime/bin/ARCH (my ARCH is maci) Then I used a sine wave generator (sin2ft) from the same folder. I fed the sine wave from sin2ft to TCP port 1972 on the buffer. Then I use Simulink to read the data from the same port on the buffer. The output from the sin2ft is a float32 so I set the data type of my TCP receive block in simulink (The block is called Query instrument) to float32. The sample rate and block size match, but I get no data streams. I have worked around this by using the python implementations of fieldtrip. fieldtrip-20151020/realtime/src/buffer/python I use the field trip read python command to read the data from the buffer, discard the header and push the data myself as a float32 using sockets in python to a second TPC port. This way Simulink can receive the data I recive from the buffer and resend myslef in python to the second tcp port. I use the same block set above). Any ideas? Cheers Fary Ahmadi Researcher from MARCS institute Western Sydney uni > From joramvandriel at gmail.com Thu Nov 12 11:15:04 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Thu, 12 Nov 2015 11:15:04 +0100 Subject: [FieldTrip] source statistics on atlas-based ROIs Message-ID: Dear community, I am doing a source analysis on Neuromag data; I used the DICS beamformer to localize theta-band sources, and want to contrast two conditions of a Stroop task. I used subject-specific grids pre-warped to MNI space. Everything seems to work fine and I'm at the group level to do statistics. However, I have specific hypotheses about anatomical locations, so I'd like to do stats only within frontal cortex. I've searched around the tutorial web pages and the mailing list archive, and there should be an option for this in ft_sourcestatistics, via ft_read_atlas and ft_volumelookup. Currently, my code is: aal = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); % find frontal regions front_idx = strmatch('Front', aal.tissuelabel); cfg = []; cfg.inputcoord = 'mni'; cfg.atlas = aal; cfg.roi = aal.tissuelabel(front_idx); mask = ft_volumelookup(cfg, ICavg_int); ICavg_int.mask = mask; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'pow'; cfg.maskparameter = 'mask'; cfg.funcolormap = 'jet'; ft_sourceplot(cfg,ICavg_int); This gives me a source plot with only the frontal regions, the rest masked out; so the atlas lookup seems to work. Then for source stats, in addition to the design parameters (as in http://www.fieldtriptoolbox.org/example/source_statistics), I add: cfg.atlas = aal; cfg.roi = aal.tissuelabel(front_idx); cfg.inputcoord = 'mni'; Then I call: stat = ft_sourcestatistics(cfg, grandavgIC{:}, grandavgCG{:}); However, the results are exactly the same with or without the atlas info attached to the cfg; all voxels are analyzed, and the obtained cluster results are the same. So it looks like ft_sourcestatistics doesn't do anything with the atlas info. In the help of ft_sourcestatistics, it says: % FIXME the following needs to be reimplemented % % You can restrict the statistical analysis to regions of interest (ROIs) % or to the average value inside ROIs using the following options: % cfg.atlas = filename of the atlas % cfg.roi = string or cell of strings, region(s) of interest from anatomical atlas % cfg.avgoverroi = 'yes' or 'no' (default = 'no') % cfg.hemisphere = 'left', 'right', 'both', 'combined', specifying this is % required when averaging over regions % cfg.inputcoord = 'mni' or 'tal', the coordinate system in which your source % reconstruction is expressed Does this mean this functionality doesn't work (yet)? Will it in the (near) future, and is there a workaround? Of note, I just updated to the newest fieldtrip version. Thanks in advance for any thoughts or suggestions, - Joram -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Thu Nov 12 16:24:54 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 10:24:54 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: Message-ID: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ 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 stephen.whitmarsh at ki.se Thu Nov 12 16:42:59 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Thu, 12 Nov 2015 15:42:59 +0000 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else... Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk > 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) >: Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Nov 12 17:32:54 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 12 Nov 2015 08:32:54 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : > Dear Xiaoming, > > It is working for me, using it in sourcestatistics. Have you checked your > design is really only one row? I can’t think of anything else… > > Cheers, > > S > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Xiaoming Du > *Sent:* 12 November 2015 16:25 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] calculating behavioural-power correlation -- > follow-up questions > > > > Dear Arjen, > > > > Thanks for the updates. > > > > I was trying to run the following code on Fieldtrip website ( > http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables > ) > > > > % compute statistics with correlationT > cfg = []; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.method = 'montecarlo'; > cfg.numrandomization = 1000; > > n1 = 3; % n1 is the number of subjects > design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent > variable (behavioral data) in the cfg.design matrix, in this case reaction > times of 3 subjects. > > cfg.design = design; > cfg.ivar = 1; > > stat = ft_freqstatistics(cfg, data_brain{:}); > > > > > > However, it gives me this error: > > Error using ft_statfun_correlationT (line 81) > uvar must be specified for dependent samples statistics > > > > Error in ft_statistics_montecarlo (line 276) > [statobs, cfg] = statfun(cfg, dat, design); > > > > Error in ft_freqstatistics (line 190) > [stat, cfg] = statmethod(cfg, dat, design); > > > > > > Could you provide a sample data_brain, so I can organize my data into same > format? Thanks! > > > > > > -Xiaoming > > > > > > > > >>> Arjen Stolk 11/7/2015 11:21 PM >>> > > Dear participants in the discussion on behavioural-power correlation, and > interested folks, > > > > Following recent discussion on this mailing list (thanks to Xiaoming Du > and Martin Krebber), we have updated ft_statfun_correlationT, a function > that can be used for correlating neural and behavioral variables. > > > > Following the update, the correlation values calculated on genuine data > have not changed. However, the permutation procedure for calculating the > randomization distribution has. Namely, prior to the update the permutation > procedure would randomly permute across both the independent (e.g., > behavior) and dependent variables (e.g., neural data). This procedure is > prone to systematic bias across the data belonging to these variables. And > conceptually, as outlined in a new wiki page (see below), the independent > and dependent variables should be statistically independent, meaning that > any association between these variables should be broken by randomly > permuting the values of the independent variable. > > > > > http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables > ? > > > > Those that have been using ft_statfun_correlationT for calculating a > randomization distribution using the permutation procedure are advised to > update to the latest fieldtrip version and re-calculate those > distributions. We are sorry for any inconvenience this may cause. > > > > On a related note, the functionality of ft_statfun_correlationT (under > Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make > the latter function, and others in the statfun suite, more accessible, we > would like to forward those interested to the above wiki page where an > overview is provided of the different approaches to correlating neural and > behavioral variables, with some example fieldtrip code. > > > > Yours, Arjen > > on behalf of Eric Maris and Egbert Hartstra > > > > 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : > > Dear participants in the discussion on behavioural-power correlation, > > My name is Eric Maris and have contributed most of the older statfuns (but > not ft_statfun_correlationT). Together with Arjen, I will try to resolve > some of the issues that have been discussed. Give us some time, and we will > return to you via the Discussion List. > > best, > Eric > > > > _______________________________________________ > 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 knorr at cbs.mpg.de Thu Nov 12 17:49:00 2015 From: knorr at cbs.mpg.de (Melanie Knorr) Date: Thu, 12 Nov 2015 17:49:00 +0100 Subject: [FieldTrip] help on ft_getopts mex file Message-ID: Dear all, unfortunately I can not use ft_getopts anymore. Matlab says: Invalid MEX-file '/home/raid2/knorr/Desktop/fieldtrip-20151111/fieldtrip-20151111/fileio/private/ft_getopt.mexa64': /home/raid2/knorr/Desktop/fieldtrip-20151111/fieldtrip-20151111/fileio/private/ft_getopt.mexa64: undefined symbol: mxErrMsgTxt I upgraded to the latest field trip version (20151111), however it still does not work. I work on matlab version 2015b on a linux machine. Can anyone help me? Thanks! Melanie -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Thu Nov 12 18:07:25 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 12:07:25 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: <564480FD020000DC00016A1A@MPRC.UMARYLAND.EDU> Thanks Stephen, Arjen. I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. Looking forward to your feedback! Best, Xiaoming >>> Arjen Stolk 11/12/2015 11:32 AM >>> Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can*t think of anything else* Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testdata.mat Type: application/octet-stream Size: 4117 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: errlog.txt URL: From a.stolk8 at gmail.com Thu Nov 12 18:14:59 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 12 Nov 2015 09:14:59 -0800 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: Hey Xiaoming, Could you tell me which version of the function you're using? That info is specified at the bottom of the help. In my case it's % $Id: ft_statfun_correlationT.m 10837 2015-10-30 16:06:41Z arjsto $ Yours, Arjen 2015-11-12 9:07 GMT-08:00 Xiaoming Du : > Thanks Stephen, Arjen. > > I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. > > I attached the 'testdata.mat' which has cfg and data_brain. I also > attached the error message I got from Matlab command window. > > Looking forward to your feedback! > > Best, > Xiaoming > > >>> Arjen Stolk 11/12/2015 11:32 AM >>> > Hi Xiaoming, > > Sounds like you're using an older version of the function. Did you try > updating fieldtrip? > > Yours, > Arjen > > 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : > >> Dear Xiaoming, >> >> It is working for me, using it in sourcestatistics. Have you checked your >> design is really only one row? I can't think of anything else. >> >> Cheers, >> >> S >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Xiaoming Du >> *Sent:* 12 November 2015 16:25 >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] calculating behavioural-power correlation -- >> follow-up questions >> >> Dear Arjen, >> >> Thanks for the updates. >> >> I was trying to run the following code on Fieldtrip website ( >> http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables >> ) >> >> % compute statistics with correlationT >> cfg = []; >> cfg.statistic = 'ft_statfun_correlationT'; >> cfg.method = 'montecarlo'; >> cfg.numrandomization = 1000; >> >> n1 = 3; % n1 is the number of subjects >> design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable >> (behavioral data) in the cfg.design matrix, in this case reaction times of >> 3 subjects. >> >> cfg.design = design; >> cfg.ivar = 1; >> >> stat = ft_freqstatistics(cfg, data_brain{:}); >> >> However, it gives me this error: >> >> Error using ft_statfun_correlationT (line 81) >> uvar must be specified for dependent samples statistics >> >> Error in ft_statistics_montecarlo (line 276) >> [statobs, cfg] = statfun(cfg, dat, design); >> >> Error in ft_freqstatistics (line 190) >> [stat, cfg] = statmethod(cfg, dat, design); >> >> Could you provide a sample data_brain, so I can organize my data into >> same format? Thanks! >> >> -Xiaoming >> >> >> >> >>> Arjen Stolk 11/7/2015 11:21 PM >>> >> >> Dear participants in the discussion on behavioural-power correlation, and >> interested folks, >> >> Following recent discussion on this mailing list (thanks to Xiaoming Du >> and Martin Krebber), we have updated ft_statfun_correlationT, a function >> that can be used for correlating neural and behavioral variables. >> >> Following the update, the correlation values calculated on genuine data >> have not changed. However, the permutation procedure for calculating the >> randomization distribution has. Namely, prior to the update the permutation >> procedure would randomly permute across both the independent (e.g., >> behavior) and dependent variables (e.g., neural data). This procedure is >> prone to systematic bias across the data belonging to these variables. And >> conceptually, as outlined in a new wiki page (see below), the independent >> and dependent variables should be statistically independent, meaning that >> any association between these variables should be broken by randomly >> permuting the values of the independent variable. >> >> >> http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables >> ? >> >> Those that have been using ft_statfun_correlationT for calculating a >> randomization distribution using the permutation procedure are advised to >> update to the latest fieldtrip version and re-calculate those >> distributions. We are sorry for any inconvenience this may cause. >> >> On a related note, the functionality of ft_statfun_correlationT (under >> Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make >> the latter function, and others in the statfun suite, more accessible, we >> would like to forward those interested to the above wiki page where an >> overview is provided of the different approaches to correlating neural and >> behavioral variables, with some example fieldtrip code. >> >> Yours, Arjen >> >> on behalf of Eric Maris and Egbert Hartstra >> >> 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : >> >> Dear participants in the discussion on behavioural-power correlation, >> >> My name is Eric Maris and have contributed most of the older statfuns >> (but not ft_statfun_correlationT). Together with Arjen, I will try to >> resolve some of the issues that have been discussed. Give us some time, and >> we will return to you via the Discussion List. >> >> best, >> Eric >> >> >> >> _______________________________________________ >> 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 XDu at mprc.umaryland.edu Thu Nov 12 18:28:07 2015 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Thu, 12 Nov 2015 12:28:07 -0500 Subject: [FieldTrip] calculating behavioural-power correlation -- follow-up questions In-Reply-To: References: <564468F6020000DC00016A0C@MPRC.UMARYLAND.EDU> Message-ID: <564485D7020000DC00016A29@MPRC.UMARYLAND.EDU> I see. In my ft_statfun_correlationT.m file, It is % $Id: ft_statfun_correlationT.m 10042 2014-12-12 23:02:53Z arjsto $ . I installed fieldtrip using "fieldtrip-lite-20151111.zip". Are there newer version that we can download? Thanks. Xiaoming >>> Arjen Stolk 11/12/2015 12:14 PM >>> Hey Xiaoming, Could you tell me which version of the function you're using? That info is specified at the bottom of the help. In my case it's % $Id: ft_statfun_correlationT.m 10837 2015-10-30 16:06:41Z arjsto $ Yours, Arjen 2015-11-12 9:07 GMT-08:00 Xiaoming Du : Thanks Stephen, Arjen. I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. Looking forward to your feedback! Best, Xiaoming >>> Arjen Stolk 11/12/2015 11:32 AM >>> Hi Xiaoming, Sounds like you're using an older version of the function. Did you try updating fieldtrip? Yours, Arjen 2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh : Dear Xiaoming, It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else. Cheers, S From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Xiaoming Du Sent: 12 November 2015 16:25 To: FieldTrip discussion list Subject: Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions Dear Arjen, Thanks for the updates. I was trying to run the following code on Fieldtrip website (http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables) % compute statistics with correlationT cfg = []; cfg.statistic = 'ft_statfun_correlationT'; cfg.method = 'montecarlo'; cfg.numrandomization = 1000; n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, it gives me this error: Error using ft_statfun_correlationT (line 81) uvar must be specified for dependent samples statistics Error in ft_statistics_montecarlo (line 276) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Could you provide a sample data_brain, so I can organize my data into same format? Thanks! -Xiaoming >>> Arjen Stolk 11/7/2015 11:21 PM >>> Dear participants in the discussion on behavioural-power correlation, and interested folks, Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables? Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code. Yours, Arjen on behalf of Eric Maris and Egbert Hartstra 2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) : Dear participants in the discussion on behavioural-power correlation, My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List. best, Eric _______________________________________________ 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 09:41:46 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 08:41:46 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values Message-ID: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Nov 13 09:51:24 2015 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 13 Nov 2015 09:51:24 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: Message-ID: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From alexis.makin at liverpool.ac.uk Fri Nov 13 10:44:55 2015 From: alexis.makin at liverpool.ac.uk (alexis david james makin) Date: Fri, 13 Nov 2015 09:44:55 +0000 Subject: [FieldTrip] Matlab 2014b compatibility In-Reply-To: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: <587C548A-5DAA-45F6-ACDF-FFB0E332BB44@liverpool.ac.uk> Dear Field Trip Users, The Field Trip topoplot function ft_topoplotTFR(cfg, grandavg) used to work on Matlab 2011, but gives the following error message in Matlab 2014b: %%%%%%%%%% Error using sprintf Function is not defined for 'matlab.ui.Figure' inputs. Error in topoplot_common (line 862) set(gcf, 'Name', sprintf('%d: %s: %s', gcf, funcname, join_str(', ',dataname))); Error in ft_topoplotTFR (line 191) [cfg] = topoplot_common(cfg, varargin{:}); %%%%%%% This is arises change to the way Matlab does Figures I believe? Is the easiest thing to download the newer version of Fieldtrip? Thanks for any advice, Cheers Alexis Makin, University of Liverpool, Uk > On 13 Nov 2015, at 08:51, Julian Keil wrote: > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > >> Hi everybody, >> >> I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra >> (see the used options down below). >> While fieldtrip calculates the permutation test it throws the following information: >> >> "performing FDR correction for multiple comparisons >> the returned probabilities are uncorrected, the thresholded mask is corrected" >> >> Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I >> get my p-values corrected for multiple comparison? >> >> Does anyone has an idea? Thanks in advance! >> >> >> I used the following options: >> >> cfg = []; >> cfg.channel = 'all'; >> cfg.latency = [2.3 2.8]; >> cfg.avgoverchan = 'yes'; >> cfg.avgovertime = 'no'; >> cfg.frequency = [9 14]; >> cfg.parameter = 'powspctrm'; >> cfg.alpha = 0.05; >> cfg.tail = 0; >> cfg.correctm = 'fdr'; >> cfg.correcttail = 'prob'; >> cfg.ivar = 1; >> cfg.statistic = 'ft_statfun_indepsamplesT'; >> cfg.method = 'montecarlo'; >> cfg.design = design; % defined in at the beginning of the function >> cfg.numrandomization = 1000; >> >> stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) >> _______________________________________________ >> 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 16:41:47 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 15:41:47 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 julian.keil at gmail.com Fri Nov 13 16:59:50 2015 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 13 Nov 2015 16:59:50 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Iris, maybe I completely miss your point, could you describe what you want to do with your p-values? Please keep in mind, that a correction for multiple comparisons does not change your p-values, it changes the threshold after which a p-value is significant. Think about the very simple Bonferroni-correction: If you have 5 tests, you set your significance-level to 0.05/5 = 0.01, then compute your 5 t-tests and see which p-value is below 0.01 (instead of below 0.05). This does not affect the t-tests, or the p-value or t-value of the tests themselves, but only the level you consider significant. tl;dr: You don't correct your p-values, you correct the level after which you consider them significant. Hope this helps Julian Am 13.11.2015 um 16:41 schrieb Steinmann, Iris: > Hi Julian, > > Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? > > Best wishes! > Iris > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil > Sent: Freitag, 13. November 2015 09:51 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > > > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From mail at philipp-ruhnau.de Fri Nov 13 17:29:28 2015 From: mail at philipp-ruhnau.de (Philipp Ruhnau) Date: Fri, 13 Nov 2015 17:29:28 +0100 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hey Iris, you could use matlabs inbuilt function (mafdr) to produce corrected p-values, then again if you just want to check your outcome with a higher threshold you might as well feed that into the fieldtrip statistics function with cfg.alpha It is possible to estimate corrected p-values by hand, the logic being the following as in Julian’s example for 5 tests bonferroni adjustment is alpha_level/5. but you could also multiply your p-value with 5 and keep the original threshold. similarly for a simple Benjamini-Hochberg fdr if you have a vector with p-values (original_pvals) you do pvals = sort(original_pvals); % sort % correct p-vals by hand n = numel(pvals); cor_pvals = pvals .* (n./(1:n)); so following the fdr logic you correct each p-val by its own factor. but note that this is not the fdr correction that is implemented in fieldtrip (see fieldtrips fdr.m for the reference) and that some p-values now can exceed 1… Also I think Arnaud Delorme’s fdr function in eeglab had the option to estimate corrected p-values (but I haven’t checked for quite a while) but yeah, I’m with Julian on this one. as the t-value doesn’t change it certainly makes more sense to quote fdr-corrected p < 0.05 then an exact but corrected p-value hope this helps philipp > On 13 Nov 2015, at 16:41, Steinmann, Iris wrote: > > Hi Julian, > > Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? > > Best wishes! > Iris > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil > Sent: Freitag, 13. November 2015 09:51 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values > > Hi Iris, > > I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. > This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; > > Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. > > Hope this helps > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: > > > Hi everybody, > > I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra > (see the used options down below). > While fieldtrip calculates the permutation test it throws the following information: > > "performing FDR correction for multiple comparisons > the returned probabilities are uncorrected, the thresholded mask is corrected" > > Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I > get my p-values corrected for multiple comparison? > > Does anyone has an idea? Thanks in advance! > > > I used the following options: > > cfg = []; > cfg.channel = 'all'; > cfg.latency = [2.3 2.8]; > cfg.avgoverchan = 'yes'; > cfg.avgovertime = 'no'; > cfg.frequency = [9 14]; > cfg.parameter = 'powspctrm'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.correctm = 'fdr'; > cfg.correcttail = 'prob'; > cfg.ivar = 1; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.method = 'montecarlo'; > cfg.design = design; % defined in at the beginning of the function > cfg.numrandomization = 1000; > > stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) > _______________________________________________ > 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 iris.steinmann at med.uni-goettingen.de Fri Nov 13 17:34:50 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Fri, 13 Nov 2015 16:34:50 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hey Julian, thanks, you are right! I thought instead of correcting the threshold on which I consider significance, it would be possible to fix the threshold at 0.05 and adapt the p-values. Maybe that's really not possible... so, thanks for your comprehensive explanation. I will go with your first advice and multiply the p-values with the mask. Thanks a lot and have a nice weekend! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 17:00 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, maybe I completely miss your point, could you describe what you want to do with your p-values? Please keep in mind, that a correction for multiple comparisons does not change your p-values, it changes the threshold after which a p-value is significant. Think about the very simple Bonferroni-correction: If you have 5 tests, you set your significance-level to 0.05/5 = 0.01, then compute your 5 t-tests and see which p-value is below 0.01 (instead of below 0.05). This does not affect the t-tests, or the p-value or t-value of the tests themselves, but only the level you consider significant. tl;dr: You don't correct your p-values, you correct the level after which you consider them significant. Hope this helps Julian Am 13.11.2015 um 16:41 schrieb Steinmann, Iris: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 helen.wieffering at gmail.com Fri Nov 13 22:56:33 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Fri, 13 Nov 2015 16:56:33 -0500 Subject: [FieldTrip] NaN Values in Granger Causality Message-ID: Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that our output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform wavelet analysiscfg = [];cfg.method = 'wavelet';cfg.channelcmb = {'all' 'all'};cfg.channel = {'source01' 'source01'};cfg.fsample = 250;cfg.output = 'powandcsd';cfg.tapsmofrq = 2;cfg.foi = 0:1:8; cfg.toi = -0.5:0.004:1.5; freq = ft_freqanalysis(cfg, data);* Note: I've checked the values in freq.powspctrm, and though there are NaNs there is real data, too. *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* However, this plot is a blank no matter which values I seem to choose as a zlim. Any insight is much appreciated - thanks! Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Sun Nov 15 02:07:30 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Sun, 15 Nov 2015 01:07:30 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation tests Message-ID: Hi all, I am writing up results for cluster based permutation tests that I ran on masked priming meg data. I have to admit I am not entirely sure the exact form for reporting the stats on these. For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: prob: 0.0420 clusterstat: 1.2443e+04 stddev: 0.0063 cirange: 0.0124 Has anyone else completed and rerooted on results, having used cluster based permutation tests? Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? Thanks, K PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Sun Nov 15 12:15:48 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Sun, 15 Nov 2015 11:15:48 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation Message-ID: Hello Kaelasha, There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper: https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study . I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper: http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ Message: 1 > Date: Sun, 15 Nov 2015 01:07:30 +0000 > From: Kaelasha Tyler > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] statistical reporting cluster based permutation > tests > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am writing up results for cluster based permutation tests that I ran on > masked priming meg data. > > I have to admit I am not entirely sure the exact form for reporting the > stats on these. > > For example, when comparing two conditions, with n=20, I have one > significant positive cluster over left frontal and parietal areas. The > stats for this cluster read: > > prob: 0.0420 > clusterstat: 1.2443e+04 > stddev: 0.0063 > cirange: 0.0124 > > Has anyone else completed and rerooted on results, having used cluster > based permutation tests? > Mean values don't seem to be appropriate here, so would it simply be the p > value and standard deviation for the significant clusters that would be > reported on? > > Thanks, > K > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Mon Nov 16 04:39:28 2015 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Mon, 16 Nov 2015 03:39:28 +0000 Subject: [FieldTrip] statistical reporting cluster based permutation In-Reply-To: References: Message-ID: Thanks Steve, Very clear. K. PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Stephen Politzer-Ahles [stephen.politzer-ahles at ling-phil.ox.ac.uk] Sent: Sunday, 15 November 2015 10:15 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] statistical reporting cluster based permutation Hello Kaelasha, There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper: https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study. I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper: http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ Message: 1 Date: Sun, 15 Nov 2015 01:07:30 +0000 From: Kaelasha Tyler > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] statistical reporting cluster based permutation tests Message-ID: > Content-Type: text/plain; charset="iso-8859-1" Hi all, I am writing up results for cluster based permutation tests that I ran on masked priming meg data. I have to admit I am not entirely sure the exact form for reporting the stats on these. For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: prob: 0.0420 clusterstat: 1.2443e+04 stddev: 0.0063 cirange: 0.0124 Has anyone else completed and rerooted on results, having used cluster based permutation tests? Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? Thanks, K PhD Candidate Brain and Psychological Sciences Research Centre Swinburne University of Technology Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Mon Nov 16 07:06:28 2015 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Sun, 15 Nov 2015 22:06:28 -0800 Subject: [FieldTrip] statistical reporting cluster based permutation In-Reply-To: References: Message-ID: <770EEBFF-7AF3-4F0C-A661-7228B527CC8A@cerco.ups-tlse.fr> Dear Katia, I would mention that the statistics were corrected for multiple comparisons using the cluster methods. You may report the p-value for stats and the actual difference in terms of values between the conditions for effect size. Best, Arno -- Arnaud Delorme, PhD Centre de Recherche Cerveau et Cognition - UMR 5549 Pavillon Baudot, Hopital Purpan, BP 25202 31052 Toulouse Cedex 3, France > On Nov 15, 2015, at 7:39 PM, Kaelasha Tyler wrote: > > Thanks Steve, > > Very clear. > K. > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl ] on behalf of Stephen Politzer-Ahles [stephen.politzer-ahles at ling-phil.ox.ac.uk ] > Sent: Sunday, 15 November 2015 10:15 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] statistical reporting cluster based permutation > > Hello Kaelasha, > > There isn't really any one absolute right way to report these; my best suggestion is to look in the literature for other papers in your area that have reported cluster based stats, and see how they do it. In my experience it's usually sufficient to report the p-value, polarity, and approximate spatiotemporal distribution of an effect (e.g., "there was a significant positive effect (p=.042) based on a cluster of fronto-central electrodes lasting from x ms to y ms..."), as is done in this paper:https://www.researchgate.net/publication/38112722_Reasoning_with_Exceptions_An_Event-related_Brain_Potentials_Study . > I also find raster plots to be a nice way to visualize the spatiotemporal extent of a cluster; see, e.g., this paper:http://joshuakhartshorne.org/papers/HartshorneSnedekerLiemAzarKim.pdf > > See also http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for some suggestions about wording and interpretation of the effects. > > Best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ Message: 1 > Date: Sun, 15 Nov 2015 01:07:30 +0000 > From: Kaelasha Tyler > > To: "fieldtrip at science.ru.nl " > > Subject: [FieldTrip] statistical reporting cluster based permutation > tests > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am writing up results for cluster based permutation tests that I ran on masked priming meg data. > > I have to admit I am not entirely sure the exact form for reporting the stats on these. > > For example, when comparing two conditions, with n=20, I have one significant positive cluster over left frontal and parietal areas. The stats for this cluster read: > > prob: 0.0420 > clusterstat: 1.2443e+04 > stddev: 0.0063 > cirange: 0.0124 > > Has anyone else completed and rerooted on results, having used cluster based permutation tests? > Mean values don't seem to be appropriate here, so would it simply be the p value and standard deviation for the significant clusters that would be reported on? > > Thanks, > K > > PhD Candidate > Brain and Psychological Sciences Research Centre > Swinburne University of Technology > Melbourne > Australia > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From iris.steinmann at med.uni-goettingen.de Mon Nov 16 09:35:38 2015 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Mon, 16 Nov 2015 08:35:38 +0000 Subject: [FieldTrip] permutation test: multiple comparison correction for the p-values In-Reply-To: References: <6DDD80C5-EECF-467C-BABF-385AE1B6CB78@gmail.com> Message-ID: Hi Phillipp, The idea was, that I don’t have to recalculate my statistics if I just want to look at the results with a higher threshold. So, thanks a lot for your additional information, it helps me to think over my analysis in the first place … thanks, have a nice day! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Philipp Ruhnau Sent: Freitag, 13. November 2015 17:29 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hey Iris, you could use matlabs inbuilt function (mafdr) to produce corrected p-values, then again if you just want to check your outcome with a higher threshold you might as well feed that into the fieldtrip statistics function with cfg.alpha It is possible to estimate corrected p-values by hand, the logic being the following as in Julian’s example for 5 tests bonferroni adjustment is alpha_level/5. but you could also multiply your p-value with 5 and keep the original threshold. similarly for a simple Benjamini-Hochberg fdr if you have a vector with p-values (original_pvals) you do pvals = sort(original_pvals); % sort % correct p-vals by hand n = numel(pvals); cor_pvals = pvals .* (n./(1:n)); so following the fdr logic you correct each p-val by its own factor. but note that this is not the fdr correction that is implemented in fieldtrip (see fieldtrips fdr.m for the reference) and that some p-values now can exceed 1… Also I think Arnaud Delorme’s fdr function in eeglab had the option to estimate corrected p-values (but I haven’t checked for quite a while) but yeah, I’m with Julian on this one. as the t-value doesn’t change it certainly makes more sense to quote fdr-corrected p < 0.05 then an exact but corrected p-value hope this helps philipp On 13 Nov 2015, at 16:41, Steinmann, Iris > wrote: Hi Julian, Thanks a lot for your advice! But I wane keep all the p-values. Maybe to check what will happen when I would go with a more liberal threshold (maybe p = 0.06 instead of p = 0.05). So, is there any possibility to correct my p-values directly instead of only the mask? Best wishes! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Julian Keil Sent: Freitag, 13. November 2015 09:51 To: FieldTrip discussion list Subject: Re: [FieldTrip] permutation test: multiple comparison correction for the p-values Hi Iris, I'm not sure what you want to do with the p-values in the following, but you can multiply your (FDR-corrected) mask with the prob. This would look like this: stat_TF.prob_new = stat_TF.prob .* stat_TF.mask; Now you only have the significant p-values left in your prob_new-field, everything else is set to 0. Hope this helps Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 13.11.2015 um 09:41 schrieb Steinmann, Iris: Hi everybody, I' m using the 'ft_freqstatistics' function to find significant differences between two time-frequency spectra (see the used options down below). While fieldtrip calculates the permutation test it throws the following information: "performing FDR correction for multiple comparisons the returned probabilities are uncorrected, the thresholded mask is corrected" Since I'm using the p-values for the following analysis and not the thresholded mask, I was wondering how I get my p-values corrected for multiple comparison? Does anyone has an idea? Thanks in advance! I used the following options: cfg = []; cfg.channel = 'all'; cfg.latency = [2.3 2.8]; cfg.avgoverchan = 'yes'; cfg.avgovertime = 'no'; cfg.frequency = [9 14]; cfg.parameter = 'powspctrm'; cfg.alpha = 0.05; cfg.tail = 0; cfg.correctm = 'fdr'; cfg.correcttail = 'prob'; cfg.ivar = 1; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.method = 'montecarlo'; cfg.design = design; % defined in at the beginning of the function cfg.numrandomization = 1000; stat_TF = ft_freqstatistics(cfg, TF_remove, TF_noremove) _______________________________________________ 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 Mon Nov 16 10:42:01 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Mon, 16 Nov 2015 10:42:01 +0100 (CET) Subject: [FieldTrip] chan_time dimord missing in ft_statfun_actvsblT Message-ID: <434773634.1339738.1447666921760.JavaMail.zimbra@bcbl.eu> Dear all, in the function ft_statfun_actvsblT there seems to be a bug related to the dimord of the data. The code seems to work only for chan_freq_time data but not for chan_time data, although in the past this function used to work also for ERF data, or am I wrong? Could it be that some part of the code is missing? 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” From p.babaeeghazvini at vu.nl Mon Nov 16 14:29:40 2015 From: p.babaeeghazvini at vu.nl (Babaeeghazvini, P.) Date: Mon, 16 Nov 2015 13:29:40 +0000 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region Message-ID: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> Hello I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis. Regards, Parinaz. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Mon Nov 16 15:01:51 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Mon, 16 Nov 2015 15:01:51 +0100 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region In-Reply-To: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> References: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local> Message-ID: Hi Parinaz, I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches: 1) You can already focus your source analyses on ROIs at the level of the lead field grid. 2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs. For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup. For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g. cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using. For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results: atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); atlas = ft_convert_units(atlas,'cm'); cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi = atlas.tissuelabel(43:54); occ_mask = ft_volumelookup(cfg,template_grid); grandavg_col_masked = grandavg_col; grandavg_grey_masked = grandavg_grey; for s=1:10 grandavg_col_masked{s}.inside=occ_mask(:); grandavg_grey_masked{s}.inside=occ_mask(:); grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0; grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0; end Hope this helps. - Joram On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. wrote: > Hello > > I am doing beamformer on EEG data to find the source position of bimanual > activity based on dics method. For that I want to see the activity only on > motor area and remove the activities of other regions based on HMAT atlas ( > http://lrnlab.org/) which provides a binary mask of motor cortex. I need > to do that because I want to calculate the position of maximum activity in > motor region and I dont want this maximum activity appear somewhere else > due to any possible artifact. please tell me how and where should I apply > HMAT binary mask on the output of source analysis. > > Regards, > Parinaz. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.babaeeghazvini at vu.nl Mon Nov 16 15:53:12 2015 From: p.babaeeghazvini at vu.nl (Babaeeghazvini, P.) Date: Mon, 16 Nov 2015 14:53:12 +0000 Subject: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region In-Reply-To: References: <561966C5AD6B9647B14A89A8189322E02E719C8C@PEXMB002B.vu.local>, Message-ID: <561966C5AD6B9647B14A89A8189322E02E719CBC@PEXMB002B.vu.local> Hi Joram, Thank you very much for such a complete and helpful explanation. Best regards, Parinaz. ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Joram van Driel [joramvandriel at gmail.com] Sent: Monday, November 16, 2015 3:01 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region Hi Parinaz, I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches: 1) You can already focus your source analyses on ROIs at the level of the lead field grid. 2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs. For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup. For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g. cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using. For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results: atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii'); atlas = ft_convert_units(atlas,'cm'); cfg = []; cfg.atlas = atlas; cfg.inputcoord = 'mni'; cfg.roi = atlas.tissuelabel(43:54); occ_mask = ft_volumelookup(cfg,template_grid); grandavg_col_masked = grandavg_col; grandavg_grey_masked = grandavg_grey; for s=1:10 grandavg_col_masked{s}.inside=occ_mask(:); grandavg_grey_masked{s}.inside=occ_mask(:); grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0; grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0; end Hope this helps. - Joram On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. > wrote: Hello I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis. Regards, Parinaz. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van Driel, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From vic.schroeder2 at gmail.com Mon Nov 16 17:16:46 2015 From: vic.schroeder2 at gmail.com (victoria schroeder) Date: Mon, 16 Nov 2015 16:16:46 +0000 Subject: [FieldTrip] converting magnetometers Message-ID: Hello, Is it possible to convert magnetometers to pseudo-gradiometers to create planar gradients? We are working with Neuromag data. The following code does not work, since i get the error message that ft_megplanar() does not function with neuromag data. cfg = []; cfg.feedback = 'no'; cfg.method = 'distance'; cfg.planarmethod = 'sincos'; cfg.channel = {'MEGMAG'}; cfg.trials = 'all'; cfg.neighbours = ft_prepare_neighbours(cfg, rspdata); data_mag = ft_megplanar(cfg,rspdata); Cheers Victoria -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.stdgl at gmail.com Tue Nov 17 16:12:49 2015 From: tobias.stdgl at gmail.com (Tobias Staudigl) Date: Tue, 17 Nov 2015 16:12:49 +0100 Subject: [FieldTrip] ft_volumerealign with headshape Message-ID: Dear all, I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue ( http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); works fine, then: cfg = []; cfg.method = 'headshape' cfg.coordsys = 'ctf'; cfg.headshape.headshape = hs; mri_realigned2 = ft_volumerealign(cfg,mri_realigned); after the message 'doing interactive realignment with headshape' I get the following error: ************** Reference to non-existent field 'label'. Error in ft_datatype_sens (line 136) nchan = length(sens.label); Error in ft_checkconfig (line 248) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 68) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 586) tmpcfg = ft_interactiverealign(tmpcfg); ************** Reading the polhemus headshape was done with: [hs]=ft_read_headshape('hs_S01.pos'); which looks fine when plotting it with ft_plot_headshape(hs); I am using the fieldtrip version at the Donders. When using an older version, fieldtrip-20131231, no error occurs. Any help very much appreciated! Best, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 17 16:26:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 17 Nov 2015 15:26:27 +0000 Subject: [FieldTrip] ft_volumerealign with headshape In-Reply-To: References: Message-ID: <07142596-034A-482A-83B9-FC8C6D7705B6@fcdonders.ru.nl> Hi Tobias, I came across the same thing, and fixed it locally with a dirty hack. Please do drop by so that we can make a clean fix. Best, JM On Nov 17, 2015, at 4:12 PM, Tobias Staudigl > wrote: Dear all, I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue (http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); works fine, then: cfg = []; cfg.method = 'headshape' cfg.coordsys = 'ctf'; cfg.headshape.headshape = hs; mri_realigned2 = ft_volumerealign(cfg,mri_realigned); after the message 'doing interactive realignment with headshape' I get the following error: ************** Reference to non-existent field 'label'. Error in ft_datatype_sens (line 136) nchan = length(sens.label); Error in ft_checkconfig (line 248) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 68) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 586) tmpcfg = ft_interactiverealign(tmpcfg); ************** Reading the polhemus headshape was done with: [hs]=ft_read_headshape('hs_S01.pos'); which looks fine when plotting it with ft_plot_headshape(hs); I am using the fieldtrip version at the Donders. When using an older version, fieldtrip-20131231, no error occurs. Any help very much appreciated! Best, Tobias _______________________________________________ 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 nathan.friedman2 at mail.mcgill.ca Tue Nov 17 18:21:37 2015 From: nathan.friedman2 at mail.mcgill.ca (Nathan Friedman) Date: Tue, 17 Nov 2015 12:21:37 -0500 Subject: [FieldTrip] Malware detected in gtsrefine.exe Message-ID: Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Nov 18 09:13:16 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 18 Nov 2015 09:13:16 +0100 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: References: Message-ID: <005401d121d8$fbf51310$f3df3930$@artinis.com> HI Nathan, The function belongs to an external toolbox, iso2mesh: http://iso2mesh.sourceforge.net/cgi-bin/index.cgi So, while the file is not necessary for most things in FieldTrip, I deem it highly unlikely that it actually is malware. So probably it’s a false alarm. But you can delete the file without having troubles with FieldTrip (only if you want to create meshes yourself using this function, and the function is also only then used in special circumstances). Best, Jörn -- Jörn M. Horschig, PhD, 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 Nathan Friedman Sent: Tuesday, November 17, 2015 18:22 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Malware detected in gtsrefine.exe Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 09:16:48 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 08:16:48 +0000 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> Seems like a false positive: Scanning Report 18 November 2015 09:14:21 - 09:14:21 Computer name: DCCN553 Scanning type: Scan target Target: M:\fieldtrip-dev\external\iso2mesh\bin\gtsrefine.exe ________________________________ Result No malware found ________________________________ Statistics Scanned: * Files: 1 * Not scanned: 0 Result: * Viruses: 0 * Spyware: 0 * Suspicious items: 0 * Riskware: 0 Actions: * Disinfected: 0 * Renamed: 0 * Deleted: 0 * Quarantined: 0 * Failed: 0 Boot Sectors: * Scanned: 0 * Infected: 0 * Suspicious items: 0 * Disinfected: 0 ________________________________ Options Definitions version: * Viruses: 2015-11-18_02 * Spyware: 2015-11-18_02 Scanning Engines: * F-Secure Aquarius: 11.00.01, 2015-11-18 * F-Secure Hydra: 5.15.21, 2015-11-17 * F-Secure Online: 13.40.159, 2014-04-28 * F-Secure Gemini: 3.02.384, 2015-11-12 Scanning options: * Scan defined files: ANI ASP AX BAT BIN BOO CHM CMD COM CPL DLL DOC DOT DRV EML EXE HLP HTA HTM HTML HTT INF INI JOB JS JSE LNK LSP MDB MHT MPP MPT MSG MSO OCX PDF PHP PIF POT PPT RTF SCR SHS SWF SYS TD0 TMP VBE VBS VXD WBK WMA WMV WMF WSC WSF WSH WRI XLS XLT XML CLASS ZIP JAR ARJ LZH TAR TGZ GZ CAB RAR BZ2 HQX * Scan inside archives Excluded: * Spyware: Application.BitCoinMiner.AY Application.BitCoinMiner.AX Actions: * Viruses: Ask after scan * Spyware: Ask after scan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Nathan Friedman Sent: dinsdag 17 november 2015 18:22 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Malware detected in gtsrefine.exe Hi, Sorry if this is a known issue but I'm new to FieldTrip. Windows Defender detected gtsrefine.exe as malware on my computer. Is this file necessary for FieldTrip to function properly? Nathan Friedman, M.Eng -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.braukmann at donders.ru.nl Wed Nov 18 12:58:20 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Wed, 18 Nov 2015 12:58:20 +0100 Subject: [FieldTrip] Automatized artifact rejection in FT Message-ID: Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 14:14:21 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 13:14:21 +0000 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B0836@exprd01.hosting.ru.nl> Hi Ricarda, All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point. Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work: cfg.artfctdef.threshold.channel = cell-array with channel labels cfg.artfctdef.threshold.bpfilter = 'no'; cfg.artfctdef.threshold.absdiff = ‘yes’; cfg.artfctdef.threshold.max = 50; Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 12:58 To: FieldTrip discussion list Subject: [FieldTrip] Automatized artifact rejection in FT Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.braukmann at donders.ru.nl Wed Nov 18 14:41:56 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Wed, 18 Nov 2015 14:41:56 +0100 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> References: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> Message-ID: Hi Jim, Thanks for the quick reply, this is really helpful. I will try your suggestion for number three. Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms. So if you have any suggestion of how we might be able to implement this as well, that would be great! Thanks! Ricarda On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Hi Ricarda, > > > > All three criteria have a certain threshold that has to be met in order > for a trial to be marked as containing artifacts so for all criteria you > could use ft_artifact_threshold (or ft_artifact_zvalue). The difference > will be how you preprocess the signal. You would need to transform the > signal so that for criteria nr. 2 the signal represents the potential > difference over a 200ms window?, and for nr. 3 the potential difference per > sampling point. > > > > Number 3 is relatively easy, you can calculate the first temporal > derivative (ie. the difference between two consecutive samples) with > cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, > if you want the absolute difference). So something like this should work: > > > > cfg.artfctdef.threshold.channel = cell-array with channel labels > > cfg.artfctdef.threshold.bpfilter = 'no'; > > cfg.artfctdef.threshold.absdiff = ‘yes’; > > cfg.artfctdef.threshold.max = 50; > > > > Number 2 is slightly more difficult because you want to integrate over a > larger window. I don’t fully understand what you want to avoid, should the > signal at time X stay within 3uV of the signal at time X + 200ms? > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Ricarda Braukmann > *Sent:* woensdag 18 november 2015 12:58 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Automatized artifact rejection in FT > > > > Hi everyone, > > I would like to implement an automatized artifact rejection procedure for > my EEG data and compare this to manual rejection. > > I would like to use the following criteria for rejection of a segment: > > 1. amplitudes below -150 or above 150 µV > 2. a difference of 3 µV per 200 ms, > 3. or a voltage change of 50 µV per sampling point > > Is there a function in fieldtrip that I can use for implementing these > different criteria? > > I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the > first criteria but I am unsure how to implement the second two. > > Any help would be highly appreciated. > > Thanks! > > Ricarda > > > > -- > > > Ricarda Braukmann, MSc > PhD student > > Radboud University Medical Centre & Baby Research Center > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Neuroscience & Centre for Cognition > > Room B.01.22 > Phone: +31 (0) 24 36 12652 > Email: r.braukmann at donders.ru.nl > > Website: http://www.zebra-project.nl/ > -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Nov 18 15:42:23 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 18 Nov 2015 14:42:23 +0000 Subject: [FieldTrip] Automatized artifact rejection in FT In-Reply-To: References: <0bd3e2d1d8594386bf5a58a1e0e88973@EXPRD02.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB279B19E9@exprd01.hosting.ru.nl> Hi Ricarda, I’m not sure if that is what you want but you could see whether a time-shifted version of your data (+200ms) differs more than 3uV from your original data. To shift your data you can use ft_redefinetrial with cfg.offset = -samples, where samples is the amount of samples from the original zero-point you wish to shift your time series by. Subtracting those time-series should give you the difference between t and t+200ms. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 14:42 To: FieldTrip discussion list Subject: Re: [FieldTrip] Automatized artifact rejection in FT Hi Jim, Thanks for the quick reply, this is really helpful. I will try your suggestion for number three. Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms. So if you have any suggestion of how we might be able to implement this as well, that would be great! Thanks! Ricarda On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) > wrote: Hi Ricarda, All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point. Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work: cfg.artfctdef.threshold.channel = cell-array with channel labels cfg.artfctdef.threshold.bpfilter = 'no'; cfg.artfctdef.threshold.absdiff = ‘yes’; cfg.artfctdef.threshold.max = 50; Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann Sent: woensdag 18 november 2015 12:58 To: FieldTrip discussion list Subject: [FieldTrip] Automatized artifact rejection in FT Hi everyone, I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection. I would like to use the following criteria for rejection of a segment: 1. amplitudes below -150 or above 150 µV 2. a difference of 3 µV per 200 ms, 3. or a voltage change of 50 µV per sampling point Is there a function in fieldtrip that I can use for implementing these different criteria? I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two. Any help would be highly appreciated. Thanks! Ricarda -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Wed Nov 18 15:46:48 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Wed, 18 Nov 2015 09:46:48 -0500 Subject: [FieldTrip] NaNs in Granger Spectrum Message-ID: Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that my output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all' 'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output = 'powandcsd';cfg.foi = 0:1:20; cfg.toi = -0.5:0.004:1.5; cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./ cfg.foi; freq = ft_freqanalysis(cfg, data_both);* Note: I've checked the values in freq.powspctrm, and though there are NaNs around the temporal edges, there is real data amid the time frame of interest. I've attached a sample TFR plot. *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* However, this plot is a blank no matter which values I seem to choose as a zlim. Any tips are much appreciated - thanks! (Please excuse my re-posting of a similar message twice - I'm simply hoping to catch a few more responses. As far as I can tell, this issue has not yet been addressed in the digest archives - though if I'm mistaken please feel free to point me to the appropriate thread!) Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source01TFR.jpg Type: image/jpeg Size: 49523 bytes Desc: not available URL: From friedman.nathan at gmail.com Wed Nov 18 17:14:20 2015 From: friedman.nathan at gmail.com (Nathan Friedman) Date: Wed, 18 Nov 2015 11:14:20 -0500 Subject: [FieldTrip] Malware detected in gtsrefine.exe In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB279B0284@exprd01.hosting.ru.nl> Message-ID: Thank you both very much! Nathan On Wed, Nov 18, 2015 at 3:16 AM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Seems like a false positive: > > > > *Scanning Report* > > *18 November 2015 09:14:21 - 09:14:21* > > Computer name: DCCN553 > Scanning type: Scan target > Target: M:\fieldtrip-dev\external\iso2mesh\bin\gtsrefine.exe > ------------------------------ > > *Result* > > No malware found > ------------------------------ > > *Statistics* > > Scanned: > > - Files: 1 > - Not scanned: 0 > > Result: > > - Viruses: 0 > - Spyware: 0 > - Suspicious items: 0 > - Riskware: 0 > > Actions: > > - Disinfected: 0 > - Renamed: 0 > - Deleted: 0 > - Quarantined: 0 > - Failed: 0 > > Boot Sectors: > > - Scanned: 0 > - Infected: 0 > - Suspicious items: 0 > - Disinfected: 0 > > ------------------------------ > > *Options* > > Definitions version: > > - Viruses: 2015-11-18_02 > - Spyware: 2015-11-18_02 > > Scanning Engines: > > - F-Secure Aquarius: 11.00.01, 2015-11-18 > - F-Secure Hydra: 5.15.21, 2015-11-17 > - F-Secure Online: 13.40.159, 2014-04-28 > - F-Secure Gemini: 3.02.384, 2015-11-12 > > Scanning options: > > - Scan defined files: ANI ASP AX BAT BIN BOO CHM CMD COM CPL DLL DOC > DOT DRV EML EXE HLP HTA HTM HTML HTT INF INI JOB JS JSE LNK LSP MDB MHT MPP > MPT MSG MSO OCX PDF PHP PIF POT PPT RTF SCR SHS SWF SYS TD0 TMP VBE VBS VXD > WBK WMA WMV WMF WSC WSF WSH WRI XLS XLT XML CLASS ZIP JAR ARJ LZH TAR TGZ > GZ CAB RAR BZ2 HQX > - Scan inside archives > > Excluded: > > - Spyware: Application.BitCoinMiner.AY Application.BitCoinMiner.AX > > Actions: > > - Viruses: Ask after scan > - Spyware: Ask after scan > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Nathan Friedman > *Sent:* dinsdag 17 november 2015 18:22 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Malware detected in gtsrefine.exe > > > > Hi, > > > > Sorry if this is a known issue but I'm new to FieldTrip. > > > > Windows Defender detected gtsrefine.exe as malware on my computer. Is this > file necessary for FieldTrip to function properly? > > > > Nathan Friedman, M.Eng > > _______________________________________________ > 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 jorn at artinis.com Thu Nov 19 09:30:55 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 19 Nov 2015 09:30:55 +0100 Subject: [FieldTrip] NaNs in Granger Spectrum In-Reply-To: References: Message-ID: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> Dear Helen, I am not quite sure why there are only nans or 0s in your granger spectrum. It could be because of the nans in your data. You could test that by just putting the time from e.g. 0.3s to 0.7s in. As a general tip, I would always segment trials into larger chunks that you want to do your final analysis on, otherwise edge artifacts (either from filtering or like here in the TFR) will show up. Also, I used constant 400ms time windows (link) , which apart from making the time-windows of the TFR look ‘nicer’, it also makes it easier to compare across frequencies. With the frequency-dependent time window, you could run into issues with SNR across frequencies, as the lower frequency content is estimated by a longer time windows, and averaging over more data should lead to a higher SNR. Thus, the lower frequency content should be more reliable when using frequency-dependent time windows. Two other general tips: 1) If I recall correctly, the Wilson factorization that is being used for estimating the transfer matrix assumes that your data contains all frequencies from DC to the Nyquist frequency. So better not restrict your analysis from 1 to 20Hz, but use 0 to fsample/2. 2) If you have strong noise components in your data, for example line noise, your power spectrum will sharply rise near the line noise frequency, and quickly fall off a few Hz after that. Such sharp changes will lead to strange effects in your Granger estimation, showing up as changes in estimated peak frequencies. Filtering such artifacts out though should be done with care though, see e.g. http://www.ncbi.nlm.nih.gov/pubmed/21864571 and http://www.ncbi.nlm.nih.gov/pubmed/20026279. I would advise against trying to filter out line noise based on experience with my own data. I found it more suitable to use zero padding, which “artificially” increases your frequency resolution, thereby smoothes the power spectrum and thus avoid prevents sharp changes in there. Btw, note that the two above papers are on parametric Granger, which might be differently affected by filtering than the nonparametric version (that’s at least what I found using simulated data – parametric Granger was more invariant to different preprocessing pipelines) Best of luck ;) Greetings, Jörn -- Jörn M. Horschig, PhD, 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 Helen Wieffering Sent: Wednesday, November 18, 2015 15:47 To: FieldTrip discussion list Subject: [FieldTrip] NaNs in Granger Spectrum Dear Fieldtrip users, I am working with a 128 channel EEG data and am currently in the process of calculating non-parametric Granger causality measures. I am following the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. However, I'm facing the curious problem that my output data from calling ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does anyone have insight as to why that might be? I've tried playing around with cfg.toi and the location of our virtual channels, but neither seems to help. My code is below, where 'source01' and 'source02' refer to virtual channels we created based off powspctrm data from beamformer source localization on our own data, according to steps outlined in the FT connectivity tutorial. data = label: {2x1 cell} trial: {1x155 cell} time: {1x155 cell} fsample: 250 cfg: [1x1 struct] sampleinfo: [155x2 double] % perform multitaper analysis cfg = []; cfg.method = 'mtmconvol'; cfg.channelcmb = { 'all' 'all'}; cfg.fsample = 250; cfg.channel = data.label; cfg.output = 'powandcsd'; cfg.foi = 0:1:20; cfg.toi = -0.5:0.004:1.5; cfg.taper = 'hanning'; cfg.t_ftimwin = 4 ./ cfg.foi; freq = ft_freqanalysis(cfg, data_both); Note: I've checked the values in freq.powspctrm, and though there are NaNs around the temporal edges, there is real data amid the time frame of interest. I've attached a sample TFR plot. % compute granger causality cfg = []; cfg.method = 'granger'; cfg.channel = {'source01' 'source02'}; cfg.channelcmb = {'all' 'all'}; granger = ft_connectivityanalysis(cfg, freq); % plot cfg = []; cfg.parameter = 'grangerspctrm'; cfg.zlim = [0 .5]; cfg.refchannel = 'source02'; cfg.directionality = 'outflow'; ft_singleplotTFR(cfg, granger); However, this plot is a blank no matter which values I seem to choose as a zlim. Any tips are much appreciated - thanks! (Please excuse my re-posting of a similar message twice - I'm simply hoping to catch a few more responses. As far as I can tell, this issue has not yet been addressed in the digest archives - though if I'm mistaken please feel free to point me to the appropriate thread!) Best, Helen Wieffering -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.P.Vlaar at tudelft.nl Thu Nov 19 09:58:52 2015 From: M.P.Vlaar at tudelft.nl (Martijn Vlaar - 3ME) Date: Thu, 19 Nov 2015 08:58:52 +0000 Subject: [FieldTrip] Number of shells in OpenMEEG Message-ID: Dear all, I am interested in including the CSF in the forward model. In ft_headmodel_openmeeg at line 75 there is an error message: "More than 3 shells not allowed". In the OpenMEEG documentation I do not find such a limitation. Could someone clarify why the OpenMEEG-related function in fieldtrip is restricted to 1, 2 or 3 shells? Thank you in advance! Martijn Vlaar ________________________________ Ir. Martijn Vlaar Delft University of Technology BioMechanical Engineering Mekelweg 2, 2628 CD Delft, The Netherlands tel: +31 (0)1527 85625 fax: +31 (0)1527 84717 mobile: +31 (0)618081635 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Thu Nov 19 10:53:55 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Thu, 19 Nov 2015 10:53:55 +0100 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: References: Message-ID: hi, I confirm that OpenMEEG can handle more than 3 layers. Best, Alex On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME wrote: > Dear all, > > > > I am interested in including the CSF in the forward model. > > > > In ft_headmodel_openmeeg at line 75 there is an error message: “More than 3 > shells not allowed”. In the OpenMEEG documentation I do not find such a > limitation. > > > > Could someone clarify why the OpenMEEG-related function in fieldtrip is > restricted to 1, 2 or 3 shells? > > > > Thank you in advance! > > > > Martijn Vlaar > > > > ________________________________ > > Ir. Martijn Vlaar > > Delft University of Technology > > BioMechanical Engineering > > Mekelweg 2, 2628 CD Delft, The Netherlands > > tel: +31 (0)1527 85625 > > fax: +31 (0)1527 84717 > > mobile: +31 (0)618081635 > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From craiggrichter at gmail.com Thu Nov 19 12:13:17 2015 From: craiggrichter at gmail.com (Craig Richter) Date: Thu, 19 Nov 2015 12:13:17 +0100 Subject: [FieldTrip] NaNs in Granger Spectrum Message-ID: Hi Helen, Try switching the output of ft_freqanalysis to cfg.output = 'fourier'. You also must you all the frequencies up to your Nyquist to get a reasonable result. Best, Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Thu Nov 19 13:47:43 2015 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Thu, 19 Nov 2015 13:47:43 +0100 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: References: Message-ID: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer case 4 vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain case 3 vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad = grad_mri; cfg.grid.warpmni = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; cfg.unit = 'mm', cfg.vol = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4904 bytes Desc: not available URL: From a.maye at uke.de Thu Nov 19 15:49:39 2015 From: a.maye at uke.de (Alexander Maye) Date: Thu, 19 Nov 2015 15:49:39 +0100 Subject: [FieldTrip] help on ft_getopts mex file In-Reply-To: References: Message-ID: <1551109.ONu50G9ISl@mars> Dear Melanie, I had the same problem in Matlab 2015b under Linux. Deleting all ft_getopt.mex64 files (there are several of them in different fieldtrip directories) solved the issue. Probably it's a library version issue; maybe the person that compiles the mex64 files may take a look? Best, ALEX. -------------- next part -------------- -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From maity_winky at yahoo.es Thu Nov 19 17:58:21 2015 From: maity_winky at yahoo.es (=?UTF-8?Q?Mait=C3=A9_Crespo_Garc=C3=ADa?=) Date: Thu, 19 Nov 2015 16:58:21 +0000 (UTC) Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> References: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> Message-ID: <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> Dear Martijn, the error happens when you don't specify the conductivity values. Best,Maite El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal escribió: Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer     case 4         vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain     case 3         vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad                  = grad_mri; cfg.grid.warpmni  = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel  = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri            = mri; cfg.unit = 'mm', cfg.vol                  = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid              = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: >     > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** _______________________________________________ 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 kathrin.muesch at gmail.com Thu Nov 19 18:46:45 2015 From: kathrin.muesch at gmail.com (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 19 Nov 2015 12:46:45 -0500 Subject: [FieldTrip] bug in FDR script Message-ID: Hi, I realized that the fdr.m file gives a wrong output for the case that the smallest p values are above the FDR threshold. This means that the smallest p-values might be rejected, whereas lower p-values could pass the test. I have filed it as a bug (#3008). The current script only declares the p-values below or equal to the threshold as significant, whereas in fact all p-values that are smaller or equal to the largest p-value below or equal to this threshold should be declared significant according to the original paper ("find the largest P value that is below the line [threshold]. All voxels with P values less than or equal to this are declared active.”). I assume that the following line is incorrect and should be replaced by the one below: Incorrect: h = (ps<=pi); Correct: h = ps<=(max(ps(ps<=pi))); Cheers, Kathrin -- Kathrin Müsch, Ph.D. Department of Psychology University of Toronto Toronto, Canada www.honeylab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From eriksenj at ohsu.edu Fri Nov 20 00:52:51 2015 From: eriksenj at ohsu.edu (K Jeffrey Eriksen) Date: Thu, 19 Nov 2015 23:52:51 +0000 Subject: [FieldTrip] FW: FEM head model and source model Message-ID: Hi again, I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. Thanks, -Jeff From: K Jeffrey Eriksen Sent: Wednesday, October 21, 2015 4:30 PM To: 'fieldtrip at science.ru.nl' Subject: FEM head model and source model I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. Thanks, -Jeff Eriksen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aishwaryaselvaraj1708 at gmail.com Fri Nov 20 06:43:43 2015 From: aishwaryaselvaraj1708 at gmail.com (aishwarya selvaraj) Date: Fri, 20 Nov 2015 11:13:43 +0530 Subject: [FieldTrip] filed trip Message-ID: Hi , I just started using filed trip for my project work. I have EEG data as a mat file . And im confused on how to even start using filedtrip commands on my dataset and proceed with the processing . Can anyone guide me on how to start?? I did read the manual ,but getting confused . It would be of great help if anyone could help me out . Thank you :) -- Regards, Aishwarya Selvaraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Nov 20 07:09:29 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 19 Nov 2015 22:09:29 -0800 Subject: [FieldTrip] filed trip In-Reply-To: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> References: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> Message-ID: Hi Aishwarya, If you only have a mat file, this wiki page might set you in the right direction: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Yours, Arjen 2015-11-19 21:43 GMT-08:00 aishwarya selvaraj < aishwaryaselvaraj1708 at gmail.com>: > Hi , > I just started using filed trip for my project work. > I have EEG data as a mat file . > And im confused on how to even start using filedtrip commands on my > dataset and proceed with the processing . > > > Can anyone guide me on how to start?? > I did read the manual ,but getting confused . > > It would be of great help if anyone could help me out . > > > Thank you :) > > -- > Regards, > Aishwarya Selvaraj > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mishra408 at gmail.com Fri Nov 20 07:48:07 2015 From: mishra408 at gmail.com (Ashutosh Mishra) Date: Fri, 20 Nov 2015 12:18:07 +0530 Subject: [FieldTrip] filed trip In-Reply-To: References: <5bd6dabc93ec431694d6c282894f6b62@EXPRD02.hosting.ru.nl> Message-ID: Hi Aishwarya, I faced the similar problem. You are supposed to change your data (.mat format) in a data structure that is read by fieldtrip. For that you need at least following information 1. Channel label and their location (If you don't have this file you can use standard file available in Fieldtrip and you can include only those electrode that you have been using in your experiment) 2. sampling rate of the data (that you would have done while recording the data) 3. time vector 4. no. of trials You can create them in MATLAB and put them together in a structure along with your recorded data. This worked for me. -- Ashutosh Mishra 5th year Integrated BS-MS student Department of Physical Sciences Indian Institute of Science Education and Research, Kolkata From jan.schoffelen at donders.ru.nl Fri Nov 20 08:02:15 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 20 Nov 2015 07:02:15 +0000 Subject: [FieldTrip] FEM head model and source model In-Reply-To: References: Message-ID: <95A72A87-CE48-4598-BF73-F58FCFBD7AE3@fcdonders.ru.nl> Jeff, You could start with checking the tutorial on minimum norm estimation. This contains a section on how you can create a cortically constrained source model using Freesurfer. Jan-Mathijs On Nov 20, 2015, at 12:52 AM, K Jeffrey Eriksen > wrote: Hi again, I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. Thanks, -Jeff From: K Jeffrey Eriksen Sent: Wednesday, October 21, 2015 4:30 PM To: 'fieldtrip at science.ru.nl' Subject: FEM head model and source model I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. Thanks, -Jeff Eriksen _______________________________________________ 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.P.Vlaar at tudelft.nl Fri Nov 20 10:45:42 2015 From: M.P.Vlaar at tudelft.nl (Martijn Vlaar - 3ME) Date: Fri, 20 Nov 2015 09:45:42 +0000 Subject: [FieldTrip] Number of shells in OpenMEEG In-Reply-To: <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> References: <56FFAA7F-0BB9-4542-8784-A5261993253D@uni-konstanz.de> <63520225.11972894.1447952301187.JavaMail.yahoo@mail.yahoo.com> Message-ID: Dear all, Thanks for the helpful replies! I have just tried, and it indeed runs fine when you specify 4 conductivity. Guess I was confused by the specific error message: “More than 3 shells not allowed”. Perhaps this message can be made more accurate: “Conductivity values need to be explicitly specified when using 2 shells or more than 3 shells.”. Regards, Martijn From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Maité Crespo García Sent: donderdag 19 november 2015 17:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] Number of shells in OpenMEEG Dear Martijn, the error happens when you don't specify the conductivity values. Best, Maite El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal > escribió: Dear Martijn, Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it. BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces. I hope this helps, Sarang subjId = 'test'; vol.type = 'openmeeg'; vol.basefile = subjId; vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin vol.bnd = bnd; switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer case 4 vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain case 3 vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF) end vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space % we prefer to do all computations in MRI mm space, so sensor positions need to be transformed grad = data.grad; grad_mm = ft_convert_units(grad,'mm'); grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way cfg = []; cfg.grad = grad_mri; cfg.grid.warpmni = 'yes'; load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid) sourcemodel = ft_convert_units(sourcemodel,'mm'); cfg.grid.template = sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; cfg.unit = 'mm', cfg.vol = vol; cfg.channel = channel; cfg.reducerank = 'no'; cfg.grid.resolution = 5; % in mm grid = ft_prepare_leadfield(cfg); > Message: 9 > Date: Thu, 19 Nov 2015 10:53:55 +0100 > From: Alexandre Gramfort > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Number of shells in OpenMEEG > Message-ID: > > > Content-Type: text/plain; charset=UTF-8 > > hi, > > I confirm that OpenMEEG can handle more than 3 layers. > > Best, > Alex > > > On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME > > wrote: >> Dear all, >> >> >> >> I am interested in including the CSF in the forward model. >> >> >> >> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3 >> shells not allowed?. In the OpenMEEG documentation I do not find such a >> limitation. >> >> >> >> Could someone clarify why the OpenMEEG-related function in fieldtrip is >> restricted to 1, 2 or 3 shells? >> >> >> >> Thank you in advance! >> >> >> >> Martijn Vlaar >> >> >> >> ________________________________ >> >> Ir. Martijn Vlaar >> >> Delft University of Technology >> >> BioMechanical Engineering >> >> Mekelweg 2, 2628 CD Delft, The Netherlands >> >> tel: +31 (0)1527 85625 >> >> fax: +31 (0)1527 84717 >> >> mobile: +31 (0)618081635 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 16 > ***************************************** _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Fri Nov 20 15:01:48 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Fri, 20 Nov 2015 14:01:48 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. John http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >------------------------------ > >Message: 6 >Date: Thu, 19 Nov 2015 23:52:51 +0000 >From: K Jeffrey Eriksen >To: "fieldtrip at science.ru.nl" >Subject: [FieldTrip] FW: FEM head model and source model >Message-ID: >Content-Type: text/plain; charset="us-ascii" > >Hi again, > >I posted this a month ago and got no response. Is there anyone who could orient me some more to the FEM capabilities of FieldTrip please? I am a newbie, and the immensity of what is available is a bit overwhelming. > >Thanks, >-Jeff > > >From: K Jeffrey Eriksen >Sent: Wednesday, October 21, 2015 4:30 PM >To: 'fieldtrip at science.ru.nl' >Subject: FEM head model and source model > >I am thinking of using FieldTrip for EEG source modeling, and wish to use an FEM formulation. I have found documentation on creating an FEM head model, but am unsure how to create a matching source model. Can someone please point me to documentation for this? Ideally I would want to place sources perpendicular to the local cortical surface. Also I would want to be able to create distributed sources combining several adjacent cortical elements. > >Thanks, >-Jeff Eriksen > -------------- next part -------------- A non-text attachment was scrubbed... Name: default.vnd.ms-officetheme Type: application/octet-stream Size: 3131 bytes Desc: default.vnd.ms-officetheme URL: From icelandhouse at gmail.com Fri Nov 20 18:49:10 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Fri, 20 Nov 2015 18:49:10 +0100 Subject: [FieldTrip] Cortical surface VS brain volume source models Message-ID: Dear Fieldtrip users, I am currently working on source reconstruction (EEG) of both ERPs and of oscillatory activity. I have 3 short and related questions of clarification: (1) Why are MNE suite and Free Surfer used to construct the cortical-surface-based source model in the MNE tutorial ( http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate)? Is it simply because discretizing the source model into locations on the cortical surface (as opposed to a 3D volume of grid points) is a functionality not provided by Fieldtrip directly? (2) So, if I prefer to have a 3D grid as the source model for my MNE source reconstruction, can I simply make use of Fieldtrip's own function ft_prepare_sourcemodel and forget about MNE Suite & Free Surfer? (3) Does the choice between a cortical-surface-based an a brain-volume-based source model depend primarily on the expectation of where the sources would most likely be located? Or are there other reasons why the MNE source reconstruction approach would make use of a cortical-surface-based source space instead of a 3D volumetric grid (as found in all the beamformer tutorials)? Thanks! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From eriksenj at ohsu.edu Sat Nov 21 02:54:58 2015 From: eriksenj at ohsu.edu (K Jeffrey Eriksen) Date: Sat, 21 Nov 2015 01:54:58 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: Hi John, This was more than I expected, thanks for the detail. I will start with what you suggest. Thanks, -Jeff PS. Are you using FEM because you have EEG, as opposed to MEG data? I really need to model the whole head for 256-channel EGI EEG coverage. -----Original Message----- From: RICHARDS, JOHN [mailto:RICHARDS at mailbox.sc.edu] Sent: Friday, November 20, 2015 6:02 AM To: fieldtrip at science.ru.nl; K Jeffrey Eriksen Subject: Re: {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. John http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/development/simbio http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new From RICHARDS at mailbox.sc.edu Sat Nov 21 03:10:06 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 21 Nov 2015 02:10:06 +0000 Subject: [FieldTrip] {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 In-Reply-To: References: Message-ID: I am doing this with EEG, EGI’s 128-channel system, with infants. There are large individual differences in head media (e.g., CSF, GM/WM/non-myelinated axons) and the models are significantly different with FEM and BEM. We are using individual head models from participants who are in the EEG experiments; so the FEM on individual head models is the best one can get with EEG source analysis. John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** On 11/20/15, 8:54 PM, "K Jeffrey Eriksen" wrote: >Hi John, > >This was more than I expected, thanks for the detail. I will start with what you suggest. Thanks, >-Jeff > >PS. Are you using FEM because you have EEG, as opposed to MEG data? I really need to model the whole head for 256-channel EGI EEG coverage. > > >-----Original Message----- >From: RICHARDS, JOHN [mailto:RICHARDS at mailbox.sc.edu] >Sent: Friday, November 20, 2015 6:02 AM >To: fieldtrip at science.ru.nl; K Jeffrey Eriksen >Subject: Re: {SpamScore: ssss} fieldtrip Digest, Vol 60, Issue 17 > >I have learned FT recently. The “SimBio” external tool is used for a full segmented head FEM model. It works well, though needs some tweaking if you use grid (source dipole points) that are too dense. > >Re the “source model”. I presume you mean the source dipoles. The FT procedure is ft_prepare_sourcemodel, which has documentation on the www. > >The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. > >Here are a list of tutorials I have used. The SimBio one is mostly complete, but overall there is less help in the FT materials for the FEM models than for the BEM models. If I were doing BEM models, the tutorials are pretty self-sufficient; for the FEM model I have had to put a couple of incomplete code snippets together from different locations. > >John > >http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model >http://fieldtrip.fcdonders.nl/development/simbio >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh > >http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >http://fieldtrip.fcdonders.nl/development/simbio >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s[]=ft&s[]=prepare&s[]=mesh >http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg?s%5B%5D=ft&s%5B%5D=prepare&s%5B%5D=mesh >http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space >http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new >http://fieldtrip.fcdonders.nl/tutorial/natmeg/dipolefitting#construct_the_eeg_volume_conduction_model >http://fieldtrip.fcdonders.nl/development/minimum_norm_estimate_new > From RICHARDS at mailbox.sc.edu Sat Nov 21 14:32:43 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 21 Nov 2015 13:32:43 +0000 Subject: [FieldTrip] Cortical surface VS brain volume source models Message-ID: <390034A7-436E-4F1A-BA02-7EF1727A023B@mailbox.sc.edu> See part of my note below. I think the answer is: 1—the Freesurfer reference is to develop a surface model of the head, and results in a surface-based mesh (pos, tri). This mesh can be used in the ft_source_model. Free surfer also is used to extract the brain surface; which might be a better model for where the sources are. 2—FT does provide tools to create either a surface-based or volume-based source model. I use our segmented GM from other methods (FSL, SPM, …) and do a volume model of points only on the GM. FT can do surface source meshes without using Freesurfer; (e.g., surface of the GM; surface of the brain; surface of a realistic inner compartment). Part of this is because I use infant participants and have not been able to use the Freesurfer tool to identify GM surfaces. 3—There are some theoretical rationales for EEG to use surface models, with the dipoles pointed normal to the surface. Presumably this reflects the columnar arrangement of neurons that generate a current flow across the column and thus the estimated dipoles are normal to the surface. The three-direction moment dipole models used with volume models allow the direction of the dipole on each source dipole location to vary, and presumably capture more variance as the EEG source. I have found in some single-dipole-fitting models that the volume models provide a better fit, and I have assumed this is because they allow more flexibility in the estimation. The EEG source analysis and some of the methods have very large resolutions compared to the normal-surface model, so this is an artificial restriction because of the relatively poor resolution of the inverse techniques (in cm range rather than in mm range). 4—I have preferred volume models; there are some points in the GM that probably have active current dipoles that can be modeled as a volume; e.g., inside gyri, inside rather than on the surface, in convoluted structures, etc. I also have volumetric atlases that I can use more easily with volume models; I currently am using the volumes which correspond to fMRI clusters; and some other reasons. I use the GM as the volume, rather than the whole brain (which is theoretically questionable). 5—The “pos” matrix in surface models and volume models acts the same; the pos are only on the surface, or in the volume, but their structure is the same. The surface-normal models only need a “pow” matrix as output, since the direction of the moment vector is not estimated, whereas the non-normal models (usually volume) require the “pow" be calculated from the “mom" matrix. Some of this is “practical” rather the “theoretical” (e.g., pos pow mom matrices). Perhaps someone has a reference that is more theoretically descriptive? John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** > >The tutorial for the MNE estimation tells how to get this from free surfer; but there are a number of other tutorials on the FT site that show how to get this by other means. I have been using the segmented GM (or brain) and getting a volume grid that includes only the GM points; or points on the surface from my own grids or with the FT procedures. You can use normal dipoles or the 3-moment direction dipoles. I do this with a segmented GM done outside of FT, and use the GM MRI volume to get the grid positions for the volumetric dipoles; also have used the surface (on the GM, or on the brain-inner-compartment). I think the FT procedures to get the segmented MRI call SPM calls to get the GM/WM. > >Date: Fri, 20 Nov 2015 18:49:10 +0100 >From: Maris Skujevskis >To: fieldtrip at science.ru.nl >Subject: [FieldTrip] Cortical surface VS brain volume source models >Message-ID: > >Content-Type: text/plain; charset="utf-8" > >Dear Fieldtrip users, > >I am currently working on source reconstruction (EEG) of both ERPs and of >oscillatory activity. > >I have 3 short and related questions of clarification: >(1) >Why are MNE suite and Free Surfer used to construct the >cortical-surface-based source model in the MNE tutorial ( >http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate)? >Is it simply because discretizing the source model into locations on the >cortical surface (as opposed to a 3D volume of grid points) is a >functionality not provided by Fieldtrip directly? > >(2) >So, if I prefer to have a 3D grid as the source model for my MNE source >reconstruction, can I simply make use of Fieldtrip's own function >ft_prepare_sourcemodel and forget about MNE Suite & Free Surfer? > >(3) >Does the choice between a cortical-surface-based an a brain-volume-based >source model depend primarily on the expectation of where the sources would >most likely be located? >Or are there other reasons why the MNE source reconstruction approach would >make use of a cortical-surface-based source space instead of a 3D >volumetric grid (as found in all the beamformer tutorials)? > > > >Thanks! > >Maris >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: > >------------------------------ From david.m.groppe at gmail.com Mon Nov 23 04:24:31 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Sun, 22 Nov 2015 22:24:31 -0500 Subject: [FieldTrip] bug in FDR script In-Reply-To: References: Message-ID: Kathrin is correct about the bug in FieldTrip's FDR function. You can verify it yourself with Matlab's built in mafdr.m or this File Exchange Function https://www.mathworks.com/matlabcentral/fileexchange/27418-benjamini---hochberg-yekutieli-false-discovery-rate--fdr--control-procedure--fdr-bh-m- For example, if you run: raw_p=[.01 .01 .01 .6 .6 .6]; %uncorrected p-values % Matlab's built-in function sig_p=mafdr(p,'BHFDR',.05)<.05; % p-values signficant after Benjamini & Hochberg FDR adjustment fprintf('mafdr significant p-values:\n'); disp(sig_p) % FieldTrip's function sig_pFT=fdr(p,.05); fprintf('FieldTrip FDR significant p-values:\n'); disp(sig_pFT) The first three p-values should be significant but FieldTrip's function only declares the 3rd p-value significant. If you've used FieldTrip's FDR function you should fix the bug and re-run your analysis. You may have missed significant effects (though in practice missed p-values might actually be rare). -David On Thu, Nov 19, 2015 at 12:46 PM, Kathrin Müsch wrote: > Hi, > > I realized that the fdr.m file gives a wrong output for the case that the smallest p values are above the FDR threshold. This means that the smallest p-values might be rejected, whereas lower p-values could pass the test. I have filed it as a bug (#3008). > > The current script only declares the p-values below or equal to the threshold as significant, whereas in fact all p-values that are smaller or equal to the largest p-value below or equal to this threshold should be declared significant according to the original paper ("find the largest P value that is below the line [threshold]. All voxels with P values less than or equal to this are declared active.”). > > I assume that the following line is incorrect and should be replaced by the one below: > > Incorrect: h = (ps<=pi); > > Correct: h = ps<=(max(ps(ps<=pi))); > > Cheers, > Kathrin > > -- > > Kathrin Müsch, Ph.D. > > Department of Psychology > University of Toronto > Toronto, Canada > www.honeylab.org > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Nov 23 10:13:55 2015 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 23 Nov 2015 10:13:55 +0100 Subject: [FieldTrip] Error message with latest fieldtrip version Message-ID: Dear all, I keep getting error message when using the newer version of fieldtrip (from 20151020 onwards) and Matlab 2014a. Here's the error message: Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 704) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback Attempt to reference field of non-structure array. Error in ft_artifact_zvalue>keyboard_cb (line 704) curKey=eventdata.Key; Error using waitfor Error while evaluating uicontrol Callback When I switched back to the older version (i.e. 20150420 version), I don't get such error messages. Could someone please tell me how to resolve this issue? Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Mon Nov 23 21:33:52 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Mon, 23 Nov 2015 15:33:52 -0500 Subject: [FieldTrip] NaNs in Granger Spectrum In-Reply-To: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> References: <004c01d122a4$9c826ff0$d5874fd0$@artinis.com> Message-ID: Dear Jörn, Thank you very much for your detailed reply. I think my issue was definitely due to a poorly thought out time window and zero padding combination - but with a constant time window in ft_freqanalysis I'm now successfully getting Granger causality to calculate, and to produce a full spectrum of values rather than just the NaNs! It's especially helpful to have the attached papers and to get a sense of how others are approaching the procedure. Thank you, again! Best, Helen On Thu, Nov 19, 2015 at 3:30 AM, Jörn M. Horschig wrote: > Dear Helen, > > > > I am not quite sure why there are only nans or 0s in your granger > spectrum. It could be because of the nans in your data. You could test that > by just putting the time from e.g. 0.3s to 0.7s in. As a general tip, I > would always segment trials into larger chunks that you want to do your > final analysis on, otherwise edge artifacts (either from filtering or like > here in the TFR) will show up. Also, I used constant 400ms time windows > > (link) > , > which apart from making the time-windows of the TFR look ‘nicer’, it also > makes it easier to compare across frequencies. With the frequency-dependent > time window, you could run into issues with SNR across frequencies, as the > lower frequency content is estimated by a longer time windows, and > averaging over more data should lead to a higher SNR. Thus, the lower > frequency content should be more reliable when using frequency-dependent > time windows. > > > > Two other general tips: > > 1) If I recall correctly, the Wilson factorization that is being > used for estimating the transfer matrix assumes that your data contains all > frequencies from DC to the Nyquist frequency. So better not restrict your > analysis from 1 to 20Hz, but use 0 to fsample/2. > > 2) If you have strong noise components in your data, for example > line noise, your power spectrum will sharply rise near the line noise > frequency, and quickly fall off a few Hz after that. Such sharp changes > will lead to strange effects in your Granger estimation, showing up as > changes in estimated peak frequencies. Filtering such artifacts out though > should be done with care though, see e.g. > http://www.ncbi.nlm.nih.gov/pubmed/21864571 and > http://www.ncbi.nlm.nih.gov/pubmed/20026279. I would advise against > trying to filter out line noise based on experience with my own data. I > found it more suitable to use zero padding, which “artificially” increases > your frequency resolution, thereby smoothes the power spectrum and thus > avoid prevents sharp changes in there. Btw, note that the two above papers > are on parametric Granger, which might be differently affected by filtering > than the nonparametric version (that’s at least what I found using > simulated data – parametric Granger was more invariant to different > preprocessing pipelines) > > > > Best of luck ;) > > Greetings, > > Jörn > > > > *--* > *Jörn M. Horschig, PhD*, 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 *Helen Wieffering > *Sent:* Wednesday, November 18, 2015 15:47 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] NaNs in Granger Spectrum > > > > Dear Fieldtrip users, > > I am working with a 128 channel EEG data and am currently in the process > of calculating non-parametric Granger causality measures. I am following > the steps outlined in Dhamala, Rangarajan, and Ding (2008) from NeuroImage. > > However, I'm facing the curious problem that my output data from calling > ft_connectivity has a grangerspctrm made up only of NaN and 0 values. Does > anyone have insight as to why that might be? I've tried playing around with > cfg.toi and the location of our virtual channels, but neither seems to > help. > > My code is below, where 'source01' and 'source02' refer to virtual > channels we created based off powspctrm data from beamformer source > localization on our own data, according to steps outlined in the FT > connectivity tutorial. > > > > > > > > > > > > > > > > > > > > > *data = label: {2x1 cell}trial: {1x155 cell}time: {1x155 cell}fsample: > 250cfg: [1x1 struct]sampleinfo: [155x2 double]% perform multitaper > analysiscfg = [];cfg.method = 'mtmconvol';cfg.channelcmb = { 'all' > 'all'};cfg.fsample = 250;cfg.channel = data.label;cfg.output = > 'powandcsd';cfg.foi = 0:1:20; cfg.toi = > -0.5:0.004:1.5; cfg.taper = 'hanning';cfg.t_ftimwin = 4 ./ > cfg.foi; freq = ft_freqanalysis(cfg, data_both);* > > Note: I've checked the values in freq.powspctrm, and though there are NaNs > around the temporal edges, there is real data amid the time frame of > interest. I've attached a sample TFR plot. > > > > > > > > > > > > > > > > *% compute granger causalitycfg = [];cfg.method = 'granger';cfg.channel = > {'source01' 'source02'};cfg.channelcmb = {'all' 'all'};granger = > ft_connectivityanalysis(cfg, freq);% plotcfg = [];cfg.parameter = > 'grangerspctrm';cfg.zlim = [0 .5];cfg.refchannel = > 'source02';cfg.directionality = 'outflow';ft_singleplotTFR(cfg, granger);* > > However, this plot is a blank no matter which values I seem to choose as a > zlim. > > Any tips are much appreciated - thanks! > > (Please excuse my re-posting of a similar message twice - I'm simply > hoping to catch a few more responses. As far as I can tell, this issue has > not yet been addressed in the digest archives - though if I'm mistaken > please feel free to point me to the appropriate thread!) > > Best, > > Helen Wieffering > > _______________________________________________ > 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 xcz20 at outlook.com Tue Nov 24 07:44:39 2015 From: xcz20 at outlook.com (X Chen) Date: Tue, 24 Nov 2015 06:44:39 +0000 Subject: [FieldTrip] [Fieldtrip] frequency issue in beamfomer Message-ID: Dear Fieldtrip developers and users, Since a while I am struggling with a question regarding the frequency range used in beamfomer, The length of each data epoch is 1 second, resulting in ±1Hz frequency smoothing while performing ‘mtmfft’ method together with a hanning taper. Nevertheless, when the frequency band of interest is 4~7Hz at sensor-level, how to make the frequency range as the frequency of interest in source analysis? At sensor level, the permutation test offer a configuration setting for frequency average which resolves the issue. One possible solution, which I have tried consisting of using ‘dpss’ taper instead of ‘hanning’ taper, setting the frequency of interest to 5.5Hz, padding the epoch to 2s and setting the tapsmofrq = 1.5. The resulting 5.5 ±1.5Hz is just the range needed. Is it a feasible way? If it is, will the setting of padding influence the source analysis result to some degree? The other possible solution I have considered, is to average the output of frequency analysis, including ‘powspctrm’ and ‘crsspctrm’ across the selected range manually. Then the average result from the frequency range will output to source analysis? Is this correct? Thanks for your help, Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksoftkeyan at gmail.com Wed Nov 25 06:26:04 2015 From: ksoftkeyan at gmail.com (Karthikeyan) Date: Wed, 25 Nov 2015 10:56:04 +0530 Subject: [FieldTrip] Help on Connectivity Message-ID: Dear Community, I am working on estimating the PDC,DTF from EEG signals. Why is that we have to fit a AR model to data in order to compute the measures of connectivity. Regards S. Karthikeyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Nov 26 13:34:43 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 26 Nov 2015 13:34:43 +0100 (CET) Subject: [FieldTrip] power suppression during DICS beamforming ? Message-ID: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> Dear all, I am observing a counter-intuitive result after applying the spatial filters obtained from DICS beamforming to my MEG data. The plot in the attachment summarizes the issue: The raw data shows a clear peak of activity at 10 Hz, however, after applying the spatial filter to the MEG data the spectrum of the virtual channels shows that power in this frequency band is reduced. The same also happens when I apply a spatial filter in the gamma range for power at 70 Hz to the raw MEG signals. Is this something that falls out of the beamformer math due to the fact how the algorithm suppresses power at all locations by minimizing the noise level, or is there something wrong with my code? I (maybe naively) assumed that the results should come out the opposite. On the other hand, when plotting the noise normalized maps (NAI) of both the alpha and gamma beamformers the sources look quite accurate. Should I normalize with the level of noise first before plotting the spectrum to see the expected results (ie an upregulation of power instead of a downregulation of power)? The code that I use to generate the figures is: % 1) compute CSD matrix cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foilim = [10 10]; cfg.tapsmofrq = 2; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; [csd] = ft_freqanalysis(cfg,meg_data); % 2) compute DICS filter cfg = []; cfg.method = 'dics'; cfg.grad = meg_data.grad; cfg.headmodel = vol; cfg.frequency = csd.freq; cfg.dics.realfiter = 'yes'; cfg.dics.fixedori = 'yes'; [alpha_filter]= ft_sourceanalysis(cfg,csd); % 3) compute the virtual channel data VC = meg_data; VC.trial = cell(1,length(meg_data.trial)); VC.label = cell(1,length(alpha_filter.avg.pow)); for i = 1:length(VC.trial) for j = 1:length(VC.label) VC.trial{i}(j,:) = alpha_filter{j}*meg_data.trial{i}; VC.label(j) = {['virtual_channel',num2str(j)]}; end; end; % 4) compute the spectrum of the virtual channel data cfg = []; cfg.method = 'mtmfft'; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; cfg.tapsmofrq = 1; cfg.foi = 0.1:100; [pow] = ft_freqanalysis(cfg,VC); Any help or suggestions would be greatly appreciated. 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” -------------- next part -------------- A non-text attachment was scrubbed... Name: virtual_channel_DICS_power_reduction.jpg Type: image/jpeg Size: 132452 bytes Desc: not available URL: From erin.white at sickkids.ca Thu Nov 26 13:48:25 2015 From: erin.white at sickkids.ca (Erin White) Date: Thu, 26 Nov 2015 12:48:25 +0000 Subject: [FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images Message-ID: <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D@SKMBXX03.sickkids.ca> Hi, I'm new at programming and was wondering if someone could help with something that I'm sure is simple. I'd like to add tick marks to my multiplotER and multiplotTFR figures so that the timing and amplitude (for multiplotER) and timing and frequency (for multiplotTFR) scales are presented clearly. For example, I'd like a tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER images and every 5 Hz for TFR images. Could anyone suggest what I should add to my code to show this? Thanks very much! Erin ---------------------------------------------------- Erin White, PhD Post-Doctoral Research Fellow Neurosciences and Mental Health The Hospital for Sick Children 555 University Avenue Toronto, Ontario Canada Telephone: (647)834-7813 ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Nov 27 13:28:58 2015 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 27 Nov 2015 12:28:58 +0000 Subject: [FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images Message-ID: Hi Erin, I don't use the multiplot functions much, so my solution is clunky and there may be others on the list with a better way to do this. But just in case, here's how I do it: Rather than using multiplot, I make each plot individually, and use the subplot() command to arrange multiple plots into a figure. Within each subplot, I just use some custom code to draw the ticks. For example: tickspots = [-200:200:1000]; % one tick every 200 ms, from -200 to 1000 ms tickheight = [-.5 .5]; % how high and low the ticks will go for tickspots = tickspot % iterate through tick spots plot( [tickspot tickspot], tickheight, 'k' ); % plot each tick as a black line end; Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > ------------------------------ > > Message: 2 > Date: Thu, 26 Nov 2015 12:48:25 +0000 > From: Erin White > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Adding tick marks to the X and Y axes in > multiplotER and multiplotTFR images > Message-ID: > <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D at SKMBXX03.sickkids.ca> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I'm new at programming and was wondering if someone could help with > something that I'm sure is simple. > I'd like to add tick marks to my multiplotER and multiplotTFR figures so > that the timing and amplitude (for multiplotER) and timing and frequency > (for multiplotTFR) scales are presented clearly. For example, I'd like a > tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER > images and every 5 Hz for TFR images. > > Could anyone suggest what I should add to my code to show this? > > Thanks very much! > > Erin > > > > > > > > > > > > > ---------------------------------------------------- > Erin White, PhD > Post-Doctoral Research Fellow > Neurosciences and Mental Health > The Hospital for Sick Children > 555 University Avenue > Toronto, Ontario > Canada > Telephone: (647)834-7813 > > ________________________________ > > This e-mail may contain confidential, personal and/or health > information(information which may be subject to legal restrictions on use, > retention and/or disclosure) for the sole use of the intended recipient. > Any review or distribution by anyone other than the person for whom it was > originally intended is strictly prohibited. If you have received this > e-mail in error, please contact the sender and delete all copies. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151126/f0640a71/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 60, Issue 23 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Fri Nov 27 16:19:27 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Fri, 27 Nov 2015 16:19:27 +0100 Subject: [FieldTrip] why "fixedori"=yes? Message-ID: Dear Fieldtrip users, I am currently working on beamformer source estimation using EEG data. My question is about the meaning behind cfg.fixedori in ft_sourceanalysis. As one of the fieldtrip tutorials explains, cfg.fixedori = 'yes' leads to only the largest of the three dipole directions per spatial filter being kept, the other two get discarded. My specific questions are: (1) why should this be done? (2) is this an MEG-specific setting due to the fact that MEG is somewhat blind to particular dipole orientations? (in which case cfg.fixedori = 'no' for EEG data?) (3) does anyone have an article in mind where the need for this processing step is explained/illustrated? Best wishes, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From vpapenm at uni-koeln.de Sun Nov 29 19:43:02 2015 From: vpapenm at uni-koeln.de (vpapenm at uni-koeln.de) Date: Sun, 29 Nov 2015 19:43:02 +0100 Subject: [FieldTrip] Spectral factorization: Wilson-Burg algorithm does not converge Message-ID: <20151129194302.Horde.q4hgBAr5av_BdvL_7VvPuv8@webmail.uni-koeln.de> Dear all, I use sfactorization_wilson.m (in my own pipeline outside field trip actually) to estimate the spectral Granger causality of my time series (local field potentials from deep brain stimulation electrodes). As input I use a 3D spectral matrix S with dimensions 2x2x32 calculated from wavelet transformation at frequencies f=[0:1:31] Hz. It consists of time-averaged auto- (Sxx, Syy) and cross-spectral densities (Sxy, conj(Sxy)), obtained from smoothing the wavelet matrix. My problem is that the implemented Wilson-Burg algorithm quite often does not converge at all and I wonder if anybody else has that problem. The non-convergence leads to a new spectral matrix Snew=psi*psi', which has non-zero imaginary parts or which is simply too different from the original matrix S. I also wonder why the only criteria to stop the iteration is when the increment step psi_old-psi becomes small. Why is there no criterion to stop the iteration if the new spectral matrix is close enough to the original one (e.g. S-Snew References: <20151129194302.Horde.q4hgBAr5av_BdvL_7VvPuv8@webmail.uni-koeln.de> Message-ID: <427A0885-F577-4FE0-9583-B3BDCBBA3C08@fcdonders.ru.nl> Hi Mitch, It could be that your dysconvergence is due to 1) you using a wavelet transform, and 2) you using a very limited bandwidth. In my experience the algorithm performs best if you use a multitapered FFT approach, estimating frequencies from 0 up until the Nyquist frequency, and using a lot of zero-padding before the spectral estimation. Best, Jan-Mathijs On Nov 29, 2015, at 7:43 PM, vpapenm at uni-koeln.de wrote: > Dear all, > > I use sfactorization_wilson.m (in my own pipeline outside field trip actually) to estimate the spectral Granger causality of my time series (local field potentials from deep brain stimulation electrodes). As input I use a 3D spectral matrix S with dimensions 2x2x32 calculated from wavelet transformation at frequencies f=[0:1:31] Hz. It consists of time-averaged auto- (Sxx, Syy) and cross-spectral densities (Sxy, conj(Sxy)), obtained from smoothing the wavelet matrix. > > My problem is that the implemented Wilson-Burg algorithm quite often does not converge at all and I wonder if anybody else has that problem. The non-convergence leads to a new spectral matrix Snew=psi*psi', which has non-zero imaginary parts or which is simply too different from the original matrix S. > > I also wonder why the only criteria to stop the iteration is when the increment step psi_old-psi becomes small. Why is there no criterion to stop the iteration if the new spectral matrix is close enough to the original one (e.g. S-Snew > At the moment I have tried two different approaches to estimate the power at f=0 Hz: 1) I use the power at f=0Hz from FFT [which is mean( sum(x).^2/N*dt ); for the auto-spectra, e.g.] and 2) I use a linear extrapolation of the PSD to get P(f=0). However, both methods do not lead to sufficient convergence of the algorithm. > > I would be very grateful if someone found the time to answer. > > Best regards, > Mitch > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From barbara.schorr at uni-ulm.de Mon Nov 30 10:52:32 2015 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Mon, 30 Nov 2015 10:52:32 +0100 Subject: [FieldTrip] SCD and coherence analysis Message-ID: <52d6-565c1c80-25-55c3b400@102538225> Dear Fieltripers, I would like to do coherence analysis. I did a SCD analysis on my data first ('finite' method), and want to run ft_mvaranalysis now. I get the error Error using ft_datatype_sens (line 186) inconsistent number of channels in sensor description As cfg.elec I use the GSN-HydroCel-257.sfp file which is included in fieldtrip (my raw data set has 257 channels), but there are only 256 channels left after the SCD analysis. Can this cause the problem? Has anyone had this problem before and can provide a solution? I only found one prior entry with this topic, but there was no final solution for it. Thanks and all the best, Barbara From maity_winky at yahoo.es Mon Nov 30 16:31:20 2015 From: maity_winky at yahoo.es (=?UTF-8?Q?Mait=C3=A9_Crespo_Garc=C3=ADa?=) Date: Mon, 30 Nov 2015 15:31:20 +0000 (UTC) Subject: [FieldTrip] power suppression during DICS beamforming ? In-Reply-To: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> References: <1813427967.1666810.1448541283897.JavaMail.zimbra@bcbl.eu> Message-ID: <1881724873.21184223.1448897480847.JavaMail.yahoo@mail.yahoo.com> Dear Frédéri, maybe you have the solution already. In case not, could you explain how did you get the last two plots? Are spectra computed after averaging across all virtual channel spectra or you are representing the spectrum of the source with maximal power? Best,Maite El Jueves 26 de noviembre de 2015 13:55, Frédéric Roux escribió: Dear all, I am observing a counter-intuitive result after applying the spatial filters obtained from DICS beamforming to my MEG data. The plot in the attachment summarizes the issue: The raw data shows a clear peak of activity at 10 Hz, however, after applying the spatial filter to the MEG data the spectrum of the virtual channels shows that power in this frequency band is reduced. The same also happens when I apply a spatial filter in the gamma range for power at 70 Hz to the raw MEG signals. Is this something that falls out of the beamformer math due to the fact how the algorithm suppresses power at all locations by minimizing the noise level, or is there something wrong with my code? I (maybe naively) assumed that the results should come out the opposite. On the other hand, when plotting the noise normalized maps (NAI) of both the alpha and gamma beamformers the sources look quite accurate. Should I normalize with the level of noise first before plotting the spectrum to see the expected results (ie an upregulation of power instead of a downregulation of power)? The code that I use to generate the figures is: % 1) compute CSD matrix cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foilim = [10 10]; cfg.tapsmofrq = 2; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; [csd] = ft_freqanalysis(cfg,meg_data); % 2) compute DICS filter cfg = []; cfg.method = 'dics'; cfg.grad = meg_data.grad; cfg.headmodel = vol; cfg.frequency = csd.freq; cfg.dics.realfiter = 'yes'; cfg.dics.fixedori = 'yes'; [alpha_filter]= ft_sourceanalysis(cfg,csd); % 3) compute the virtual channel data VC = meg_data; VC.trial = cell(1,length(meg_data.trial)); VC.label = cell(1,length(alpha_filter.avg.pow)); for i = 1:length(VC.trial)   for j = 1:length(VC.label)       VC.trial{i}(j,:) = alpha_filter{j}*meg_data.trial{i};       VC.label(j) = {['virtual_channel',num2str(j)]};   end; end; % 4) compute the spectrum of the virtual channel data cfg = []; cfg.method = 'mtmfft'; cfg.pad = 'maxperlen'; cfg.taper = 'dpss'; cfg.tapsmofrq = 1; cfg.foi = 0.1:100; [pow] = ft_freqanalysis(cfg,VC); Any help or suggestions would be greatly appreciated. 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 --------------------------------------------------------------------------- “The probability of success is difficult to estimate; but if we never search the chance of success is zero.” _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: