From mark.noordenbos at gmail.com Mon Oct 1 14:58:10 2012 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Mon, 1 Oct 2012 14:58:10 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 23, Issue 1 In-Reply-To: References: Message-ID: Hi Steve, Thank you for the answer. Kind regards, Mark 2012/10/1 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: cluster analysis (Stephen Politzer-Ahles) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 30 Sep 2012 08:46:09 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] cluster analysis > Message-ID: > < > CAJT2k_9cJCBFKnhkSBYL7Uf3c95uOrzXWh4wNqY-CfLb3kF_Ow at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Mark, > > The Fieldtrip wiki has examples of published papers that report cluster > analyses. In what I've seen, usually just the *p* is reported (if even > that), along with the latency and topography of the cluster. See e.g. > Pijnacker et al. (2011, *Journal of Cognitive Neuroscience*) and Meltzer & > Braun (2011, *Frontiers in Human Neuroscience*). There may be others in > http://fieldtrip.fcdonders.nl/publications > > As for your second question, my understanding is that the test statistic > doesn't matter (one of the points of the cluster test is that it works no > matter which test statistic you use (Maris & Oostenveld, 2007)). Also, to > the best of my knowledge, there are no degrees of freedom for the cluster > test, since it's non-parametric (it's not based on the distribution of a > test statistic, it's based on Monte Carlo estimation). > > Best, > Steve > > > Message: 1 > > Date: Sun, 30 Sep 2012 11:30:35 +0200 > > From: Mark Noordenbos > > To: fieldtrip at science.ru.nl > > Subject: [FieldTrip] cluster analysis > > Message-ID: > > > 7qVRZp7goj3AhoE7xaq8tqTPsg at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Dear Fieldtrippers, > > > > I was wondering how you report the results of the cluster analysis in > your > > papers. I have seen different types of how the results are reported. > > For example, some report only the p-value of the cluster whereas others > > report clusters as T(degrees of freedom) = [clusterstat value], p-value. > > > > Is T (multivariate t) the correct test statisic for the cluster analysis > > (like F for anova)? > > Where can I find (or calculate) the degrees of freedom of the clusterstat > > value? > > > > Thanks > > > > Best, > > Mark > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120930/fe6908ab/attachment-0001.html > > > > > > > ------------------------------ > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120930/d5471f2a/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 23, Issue 1 > **************************************** > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Wed Oct 3 12:59:11 2012 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Wed, 3 Oct 2012 11:59:11 +0100 (BST) Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: References: Message-ID: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> Dear all, I need to repair a couple of channels of my EEG (edf format). I'm in trouble reading the reference, because I don't understand how I have to prepare cfg for electrode position. for example  elec.elecpos and elec.channelpos : wich argument must I provide? Furthermore, in ft_channelselection I read  " 'gui' a graphical user interface will pop up to select the channels" How does it works? How can I make a gui pops up ? Ivano -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Oct 3 14:47:52 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 03 Oct 2012 14:47:52 +0200 Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> References: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> Message-ID: <506C33F8.6010006@donders.ru.nl> Dear Ivano, There is a template directory in FieldTrip, which contains a subfolder called elec. If you do not have any electrode positions, you can load a template from there. Alternatively, you can load a file from there and see how to set the structure up. For channelselection, I think you misunderstood something/someone. I never heard of the fact that there should be a gui, where do you got that information from? Since I'm in the dev team, I would be rather surprised if there would be a gui given that I never heard anything about that ;) I'm afraid you have to specify the channel names manually. You can try to use ft_prepare_layout with cfg.feedback = 'yes' for information about channelpositions, given that you provide an elec structure (or use a layout-template) Best, Jörn On 10/3/2012 12:59 PM, Ivano Triggiani wrote: > Dear all, > > I need to repair a couple of channels of my EEG (edf format). I'm in > trouble reading the reference, because I don't understand how I have > to prepare cfg for electrode position. for example elec.elecpos and > elec.channelpos : wich argument must I provide? > Furthermore, in ft_channelselection I read " 'gui' a graphical user > interface will pop up to select the channels" How does it works? How > can I make a gui pops up ? > > Ivano > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Wed Oct 3 15:14:12 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Wed, 3 Oct 2012 15:14:12 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Dear Fieldtrippers, I am trying to locate the source of an oscillatory effect at the frequency of 30Hz in a time window of interest. Before running the ft_sourceanalysis function, I run a ft_freqanalysis with a frequency smoothing of 8 (cfg.tapsmofrq =8). My question is whether there is any rule of thumb by which I could reliably determine the extent of the smoothing? I found out that even small changes in the 'tapsmofrq' value, significantly alter the spatial localization of the resulting sources. For instance, a tapsmofreq value of 8 would point to an effect in the frontal lobe, whereas a value of 10 would point to an effect in the parietal lobe. Any advice would be appreciated. Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Oct 3 15:42:22 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 3 Oct 2012 15:42:22 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni! The extend of the smoothing, I would say, is under normal circumstances simply what you request as a smoothing paramater (given the dpss characteristics), so I don't understand that formulation exactly. If different smoothings give drastically different result you might be sampling frequencies that behave differently from your frequency of interest. In your case, e.g. perhaps you are adding alpha in your estimate that might behave differently in your paradigm? I would therefor try to first figure out if your effect is, in fact, frequency specific and try to not to smooth more than necessary to capture that effect. So starting with no (extra) smoothing and looking at the TFR for instance. A simple FFT would give you a frequency smoothing of +/- 1/datalength already (e.g. half a second would be +/- 2 Hz). Simply averaging over frequencies (estimated with a Hanning taper) instead of using the slepian tapers might be a better option. Then again, you are limited in frequency specificity by the length of the data on which you calculate them. If that is too short you might have suboptimal and unexpected effects. In the case of slepian filters make sure you have at least a minimum of 3 tapers (which is shown in the output of freqanalysis). There is a lot more to say about tapers, smoothing etc, but I hope this helps. All the best, Stephen On 3 October 2012 15:14, Yoni Levy wrote: > Dear Fieldtrippers, > > I am trying to locate the source of an oscillatory effect at the frequency > of 30Hz in a time window of interest. > Before running the ft_sourceanalysis function, I run a ft_freqanalysis > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > My question is whether there is any rule of thumb by which I could > reliably determine the extent of the smoothing? > I found out that even small changes in the 'tapsmofrq' value, > significantly alter the spatial localization of the resulting sources. > For instance, a tapsmofreq value of 8 would point to an effect in the > frontal lobe, whereas a value of 10 would point to an effect in the > parietal lobe. > > Any advice would be appreciated. > > Yoni > > _______________________________________________ > 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 Lilla.Magyari at mpi.nl Wed Oct 3 15:55:00 2012 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Wed, 3 Oct 2012 15:55:00 +0200 (CEST) Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: <506C33F8.6010006@donders.ru.nl> References: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> <506C33F8.6010006@donders.ru.nl> Message-ID: <50904.131.174.45.70.1349272500.squirrel@131.174.45.70> hi Ivano, I have also checked the issue with the structure which defines the electrode positions. It worked fine for me when I defined the electrode positions with the following fields: elec.label = MX1 cell-array with strings (the labels of the electrodes) elec.chanpos=MX3 matrix with electrode positions When I used elecpos instead of chanpos, it did not work (I have already filed a bug about it because .elecpos is defined indeed in the reference of ft_datatype_sens). And the gui worked for me when I specified cfg.channel = 'gui' and called the ft_topoplotER function. But otherwise, you can just do it manually as Jorn described it. Best, Lilla > Dear Ivano, > > There is a template directory in FieldTrip, which contains a subfolder > called elec. If you do not have any electrode positions, you can load a > template from there. Alternatively, you can load a file from there and > see how to set the structure up. > > For channelselection, I think you misunderstood something/someone. I > never heard of the fact that there should be a gui, where do you got > that information from? Since I'm in the dev team, I would be rather > surprised if there would be a gui given that I never heard anything > about that ;) I'm afraid you have to specify the channel names manually. > You can try to use ft_prepare_layout with cfg.feedback = 'yes' for > information about channelpositions, given that you provide an elec > structure (or use a layout-template) > > Best, > Jörn > > On 10/3/2012 12:59 PM, Ivano Triggiani wrote: >> Dear all, >> >> I need to repair a couple of channels of my EEG (edf format). I'm in >> trouble reading the reference, because I don't understand how I have >> to prepare cfg for electrode position. for example elec.elecpos and >> elec.channelpos : wich argument must I provide? >> Furthermore, in ft_channelselection I read " 'gui' a graphical user >> interface will pop up to select the channels" How does it works? How >> can I make a gui pops up ? >> >> Ivano >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Wed Oct 3 17:14:47 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 3 Oct 2012 17:14:47 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni, Just to chime in quickly, please keep in mind that a tapsmofrq of 8 Hz actually indicates a smoothing window of 16Hz. I.e. cfg.tapsmofrq specifies the half-width of your smoothing window. So a tapsmofrq of 8 would mean that, for 30Hz, you are looking at signal coming from 22Hz to 38Hz. Also, the efficacy of the smoothing is largely dependent on the number of tapers (the more tapers, the closer your smoothing is to a 'box'). All the best, Roemer On Wed, Oct 3, 2012 at 3:42 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Yoni! > > The extend of the smoothing, I would say, is under normal circumstances > simply what you > request as a smoothing paramater (given the dpss characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you might be > sampling > frequencies that behave differently from your frequency of interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might behave > differently in your > paradigm? > > I would therefor try to first figure out if your effect is, in fact, > frequency specific > and try to not to smooth more than necessary to capture that effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the length of the > data on which > you calculate them. If that is too short you might have suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy wrote: > >> Dear Fieldtrippers, >> >> I am trying to locate the source of an oscillatory effect at the >> frequency of 30Hz in a time window of interest. >> Before running the ft_sourceanalysis function, I run a ft_freqanalysis >> with a frequency smoothing of 8 (cfg.tapsmofrq =8). >> My question is whether there is any rule of thumb by which I could >> reliably determine the extent of the smoothing? >> I found out that even small changes in the 'tapsmofrq' value, >> significantly alter the spatial localization of the resulting sources. >> For instance, a tapsmofreq value of 8 would point to an effect in the >> frontal lobe, whereas a value of 10 would point to an effect in the >> parietal lobe. >> >> Any advice would be appreciated. >> >> Yoni >> >> _______________________________________________ >> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From veganathlete at ymail.com Wed Oct 3 18:20:00 2012 From: veganathlete at ymail.com (Steph) Date: Wed, 03 Oct 2012 18:20:00 +0200 Subject: [FieldTrip] one EEG channel as trigger channel In-Reply-To: References: Message-ID: <506C65B0.5090409@ymail.com> Dear all, I'm new to Fieldtrip and I've been reading through the tutorial and reference pages, but still not able to solve my problem: there's raw EEG data, and one of the channels contains the trigger codes, i.e. it's not a trigger channel per se, so it can't be adressed via cfg.trialdef.eventtype. I want to get through the preprocessing, but simply don't know how to properly define the event. maybe writing my own trialfunction similar to http://fieldtrip.fcdonders.nl/example/detect_the_muscle_activity_in_an_emg_channel_and_use_that_as_trial_definition might be the solution? I don't get the last few lines of the example script, though. Hope you can help me make this work! Best wishes From yoniilevy at gmail.com Thu Oct 4 11:56:46 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 4 Oct 2012 11:56:46 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Hi Stephen! Thanks for your reply. My FOI is 29-31Hz; Since my time window is of 300ms, then my freq smoothing should now be of +/-3.33Hz. If I use a hanning taper, the parameters that i use for the freqanal (for further on doing beamformer-statistics) are: cfg.method ='mtmfft'; cfg.output ='fourier'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.taper = 'hanning'; cfg.foilim = [29 31]; However, if I get it right, multitapering should also be an option as 30Hz is not a relatively very low frequency. In that case, i remove the hanning and instead include a cfg.tapsmofrq =8, so that the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? Also, about the time window which is theoretically 300ms, but i think this depends on the length of every trial; for instance, before freqanal, when i redefine the trial, i input cfg.minlength = 'maxperlen'. So if i alter that, the freq smoothing should be different as well, correct? Ye, anyway, I wonder how to optimize all those parameters for my source localization statistics. Thanks in advance, Yoni On Wed, Oct 3, 2012 at 3:55 PM, wrote: > > Hi Yoni! > > The extend of the smoothing, I would say, is under normal circumstances > simply what you > request as a smoothing paramater (given the dpss characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you might be > sampling > frequencies that behave differently from your frequency of interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might behave differently > in your > paradigm? > > I would therefor try to first figure out if your effect is, in fact, > frequency specific > and try to not to smooth more than necessary to capture that effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the length of the > data on which > you calculate them. If that is too short you might have suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy wrote: > > > Dear Fieldtrippers, > > > > I am trying to locate the source of an oscillatory effect at the > frequency > > of 30Hz in a time window of interest. > > Before running the ft_sourceanalysis function, I run a ft_freqanalysis > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > My question is whether there is any rule of thumb by which I could > > reliably determine the extent of the smoothing? > > I found out that even small changes in the 'tapsmofrq' value, > > significantly alter the spatial localization of the resulting sources. > > For instance, a tapsmofreq value of 8 would point to an effect in the > > frontal lobe, whereas a value of 10 would point to an effect in the > > parietal lobe. > > > > Any advice would be appreciated. > > > > Yoni > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Oct 4 12:55:30 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 4 Oct 2012 12:55:30 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming (Roemer van der Meij) Message-ID: Hi Roemer, Sure, thanks. I am just noting that even tiny differences in both the values of 'tapsmofrq' that i feed in freqanalysis, and in 'cfg.minlength' that i feed in the redefinetrial function (just before running the freqanalysis) -- significantly alter the localization of sources that beamformer is (or is not) outputting. Best, Yoni On Thu, Oct 4, 2012 at 12:00 PM, wrote: > > > Hi Yoni, > > Just to chime in quickly, please keep in mind that a tapsmofrq of 8 Hz > actually indicates a smoothing window of 16Hz. I.e. cfg.tapsmofrq specifies > the half-width of your smoothing window. So a tapsmofrq of 8 would mean > that, for 30Hz, you are looking at signal coming from 22Hz to 38Hz. Also, > the efficacy of the smoothing is largely dependent on the number of tapers > (the more tapers, the closer your smoothing is to a 'box'). > > All the best, > Roemer > > > > On Wed, Oct 3, 2012 at 3:42 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > > > Hi Yoni! > > > > The extend of the smoothing, I would say, is under normal circumstances > > simply what you > > request as a smoothing paramater (given the dpss characteristics), so I > > don't understand > > that formulation exactly. > > > > If different smoothings give drastically different result you might be > > sampling > > frequencies that behave differently from your frequency of interest. In > > your case, e.g. > > perhaps you are adding alpha in your estimate that might behave > > differently in your > > paradigm? > > > > I would therefor try to first figure out if your effect is, in fact, > > frequency specific > > and try to not to smooth more than necessary to capture that effect. So > > starting with no > > (extra) smoothing and looking at the TFR for instance. A simple FFT would > > give you a > > frequency smoothing of +/- 1/datalength already (e.g. half a second would > > be +/- 2 Hz). > > Simply averaging over frequencies (estimated with a Hanning taper) > instead > > of using the > > slepian tapers might be a better option. > > > > Then again, you are limited in frequency specificity by the length of the > > data on which > > you calculate them. If that is too short you might have suboptimal and > > unexpected > > effects. In the case of slepian filters make sure you have at least a > > minimum of 3 tapers > > (which is shown in the output of freqanalysis). > > > > There is a lot more to say about tapers, smoothing etc, but I hope this > > helps. > > > > All the best, > > Stephen > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Thu Oct 4 14:13:35 2012 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Thu, 4 Oct 2012 14:13:35 +0200 Subject: [FieldTrip] PhD/postdoc positions for project on hippocampus oscillations (MEG+intracranial EEG) Message-ID: <5C1FBC99-9D3E-4585-817F-F8D82894ABBF@uni-konstanz.de> A new research group on neural oscillations, led by Dr. Sarang Dalal at the University of Konstanz (Germany), is searching for postdoctoral fellows and/or PhD students for a project involving MEG and intracranial EEG. This project will investigate the role of hippocampus oscillations in navigation- and memory-related networks using magnetoencephalography (MEG) and intracranial electroencephalography (iEEG), both separately and simultaneously. Group members will be trained in MEG/iEEG data acquisition and analysis, including quantification of oscillatory power/coupling and source localization. The project will involve substantial collaboration with the University Hospital Erlangen (Dr. Stefan Rampp & Prof. Hajo Hamer). The working language of the laboratory and most department meetings is English. The ideal applicant will have a background in cognitive neuroscience or neural signal processing. PhD positions are funded for 3 years (usual PhD duration in Germany), and postdoc positions for 2 years with a possibility for extension to 3 years. The starting date can be between December 2012 and April 2013. Interested applicants may send a CV and a brief letter of interest by e-mail to sarang.dalal -at- uni-konstanz.de, preferably by November 1, 2012. Dr. Dalal will be present at the Society for Neuroscience meeting in New Orleans and would be happy to meet with anybody interested to apply. ---------------------------------------------------- Sarang S. Dalal, Ph.D. Zukunftskolleg / Dept. of Psychology University of Konstanz http://nutmeg.berkeley.edu/sarang/ tel: +49 7531 88 5706 From stephen.whitmarsh at gmail.com Thu Oct 4 15:47:21 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 4 Oct 2012 15:47:21 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni, Indeed, a simple hanning taper will already give you a frequency smoothing of +/- 3Hz. Adding tapers can only increase this, and I don't see why you would beamform 22 to 38 Hz if you are interested between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper = 'hanning', giving you a measure of power between of about 27 and 33? You're right that having different trial lenghts will indeed give you a different frequency resolution per trial. If this is a problem is hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial would indeed make sure they are all of the same length (i.e. the maximal length) - but if that is different between subjects/conditions that might not be enough. Best, Stephen On 4 October 2012 11:56, Yoni Levy wrote: > Hi Stephen! > Thanks for your reply. > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > smoothing should now be of +/-3.33Hz. If I use a hanning taper, the > parameters that i use for the freqanal (for further on doing > beamformer-statistics) are: > cfg.method ='mtmfft'; > cfg.output ='fourier'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.taper = 'hanning'; > cfg.foilim = [29 31]; > However, if I get it right, multitapering should also be an option as 30Hz > is not a relatively very low frequency. In that case, i remove the hanning > and instead include a cfg.tapsmofrq =8, so that the number of tapers > results in 8*0.3*2-1= 3 (I think?). Is it so? > > Also, about the time window which is theoretically 300ms, but i think this > depends on the length of every trial; for instance, before freqanal, when i > redefine the trial, i input cfg.minlength = 'maxperlen'. So if i alter > that, the freq smoothing should be different as well, correct? Ye, anyway, > I wonder how to optimize all those parameters for my source localization > statistics. > > Thanks in advance, > > Yoni > > > On Wed, Oct 3, 2012 at 3:55 PM, wrote: > >> >> Hi Yoni! >> >> The extend of the smoothing, I would say, is under normal circumstances >> simply what you >> request as a smoothing paramater (given the dpss characteristics), so I >> don't understand >> that formulation exactly. >> >> If different smoothings give drastically different result you might be >> sampling >> frequencies that behave differently from your frequency of interest. In >> your case, e.g. >> perhaps you are adding alpha in your estimate that might behave >> differently >> in your >> paradigm? >> >> I would therefor try to first figure out if your effect is, in fact, >> frequency specific >> and try to not to smooth more than necessary to capture that effect. So >> starting with no >> (extra) smoothing and looking at the TFR for instance. A simple FFT would >> give you a >> frequency smoothing of +/- 1/datalength already (e.g. half a second would >> be +/- 2 Hz). >> Simply averaging over frequencies (estimated with a Hanning taper) instead >> of using the >> slepian tapers might be a better option. >> >> Then again, you are limited in frequency specificity by the length of the >> data on which >> you calculate them. If that is too short you might have suboptimal and >> unexpected >> effects. In the case of slepian filters make sure you have at least a >> minimum of 3 tapers >> (which is shown in the output of freqanalysis). >> >> There is a lot more to say about tapers, smoothing etc, but I hope this >> helps. >> >> All the best, >> Stephen >> >> On 3 October 2012 15:14, Yoni Levy wrote: >> >> > Dear Fieldtrippers, >> > >> > I am trying to locate the source of an oscillatory effect at the >> frequency >> > of 30Hz in a time window of interest. >> > Before running the ft_sourceanalysis function, I run a ft_freqanalysis >> > with a frequency smoothing of 8 (cfg.tapsmofrq =8). >> > My question is whether there is any rule of thumb by which I could >> > reliably determine the extent of the smoothing? >> > I found out that even small changes in the 'tapsmofrq' value, >> > significantly alter the spatial localization of the resulting sources. >> > For instance, a tapsmofreq value of 8 would point to an effect in the >> > frontal lobe, whereas a value of 10 would point to an effect in the >> > parietal lobe. >> > >> > Any advice would be appreciated. >> > >> > Yoni >> > >> > > _______________________________________________ > 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 jose.herrero66 at gmail.com Thu Oct 4 23:40:44 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Thu, 4 Oct 2012 17:40:44 -0400 Subject: [FieldTrip] query on Analysis of corticomuscular coherence Message-ID: Hey, just starting using fieldtrip today ... but did not get very far: I tried to do the example Analysis of corticomuscular coherence but got the error: >> clear matlabroot = c:\data_fieldtrip\ evaluating trialfunction 'trialfun_left' Warning: adding c:\data_fieldtrip\fieldtrip-20120530\external\ctf toolbox to your Matlab path readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 696768000 bytes (from res4 file) ??? Index exceeds matrix dimensions. Error in ==> getCTFdata at 280 if trials(kt)<=meg4Trial(openFile) | trials(kt)>meg4Trial(openFile+1) Error in ==> ft_read_data at 479 dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', 'double'); Error in ==> read_trigger at 69 dat = ft_read_data(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', 0); Error in ==> ft_read_event at 481 trigger = read_trigger(filename, 'header', hdr, 'begsample', flt_minsample, 'endsample', flt_maxsample, 'chanindx', trigchanindx, 'dataformat', dataformat, 'detectflank', detectflank, 'trigshif Error in ==> trialfun_left at 7 event = ft_read_event(cfg.dataset); Error in ==> ft_definetrial at 170 trl = feval(cfg.trialfun, cfg); Error in ==> ex_corticomuscle at 5 cfg = ft_definetrial(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Oct 5 08:56:27 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 05 Oct 2012 08:56:27 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: <506E849B.7050602@donders.ru.nl> Hey Yoni, Stephen is right, and just to make this really clear, a Hanning taper will always give you a smoothing of your Raleigh frequency (which in your case is 3.33Hz). Any taper can only (effectively) smooth in terms of your frequency resolution or Raleigh frequency, thus a Hann taper gives you the minimal smoothing (apart from a boxcar). Then, the problem with different trial becomes more apparent, because since the frequency resolution changes, also the smoothing of the Hanning taper changes accordingly. I also think that making the trials having equal length is the best approach. Having unequal trial lengths also constitutes a problem for multitapering, cause you will end up with different tapers and different number of tapers per trial. And also your frequency smoothing should be a multiple of the Raleigh frequency. You can ask for other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you will see the smoothing at 6.66 or 9.99Hz (depending on where you define the end of smoothing) - it's just because you sample in 3.33Hz steps. Here you can maybe also see, that having different trial lengths might constitute a problem, because you will effectively get different smoothing per trial, depending on your Raleigh frequency. The computation of the tapers was however correct, so with 8Hz smoothing and a 0.3s time window you get 3 tapers ;) Btw, I once played around with it and realized that the 3 tapers you obtain are not always the same for different parameters, e.g. for 8Hz and 0.25s window you will also get 8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you get with a 0.3s time window. So even that can cause a problem. Btw, I never heard that different frequency smoothing ends up in different part of the brain when beaming. The only reason I can see is what Stephen already pointed out, that other frequency bands with different functional characteristics smear into your power spectrum. Best, Jörn On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote: > Hi Yoni, > > Indeed, a simple hanning taper will already give you a frequency > smoothing of +/- 3Hz. Adding tapers can only increase this, and I > don't see why you would beamform 22 to 38 Hz if you are interested > between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper > = 'hanning', giving you a measure of power between of about 27 and 33? > > You're right that having different trial lenghts will indeed give you > a different frequency resolution per trial. If this is a problem is > hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial > would indeed make sure they are all of the same length (i.e. the > maximal length) - but if that is different between subjects/conditions > that might not be enough. > > Best, > Stephen > > > > On 4 October 2012 11:56, Yoni Levy > wrote: > > Hi Stephen! > Thanks for your reply. > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > smoothing should now be of +/-3.33Hz. If I use a hanning taper, > the parameters that i use for the freqanal (for further on doing > beamformer-statistics) are: > cfg.method ='mtmfft'; > cfg.output ='fourier'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.taper = 'hanning'; > cfg.foilim = [29 31]; > However, if I get it right, multitapering should also be an option > as 30Hz is not a relatively very low frequency. In that case, i > remove the hanning and instead include a cfg.tapsmofrq =8, so that > the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? > > Also, about the time window which is theoretically 300ms, but i > think this depends on the length of every trial; for instance, > before freqanal, when i redefine the trial, i input cfg.minlength > = 'maxperlen'. So if i alter that, the freq smoothing should be > different as well, correct? Ye, anyway, I wonder how to optimize > all those parameters for my source localization statistics. > > Thanks in advance, > > Yoni > > > On Wed, Oct 3, 2012 at 3:55 PM, > wrote: > > > Hi Yoni! > > The extend of the smoothing, I would say, is under normal > circumstances > simply what you > request as a smoothing paramater (given the dpss > characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you > might be > sampling > frequencies that behave differently from your frequency of > interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might > behave differently > in your > paradigm? > > I would therefor try to first figure out if your effect is, in > fact, > frequency specific > and try to not to smooth more than necessary to capture that > effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A > simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a > second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning > taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the > length of the > data on which > you calculate them. If that is too short you might have > suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at > least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I > hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy > wrote: > > > Dear Fieldtrippers, > > > > I am trying to locate the source of an oscillatory effect at > the frequency > > of 30Hz in a time window of interest. > > Before running the ft_sourceanalysis function, I run a > ft_freqanalysis > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > My question is whether there is any rule of thumb by which I > could > > reliably determine the extent of the smoothing? > > I found out that even small changes in the 'tapsmofrq' value, > > significantly alter the spatial localization of the > resulting sources. > > For instance, a tapsmofreq value of 8 would point to an > effect in the > > frontal lobe, whereas a value of 10 would point to an effect > in the > > parietal lobe. > > > > Any advice would be appreciated. > > > > Yoni > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Fri Oct 5 17:10:31 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Fri, 5 Oct 2012 17:10:31 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies Message-ID: Dear fieldtrippers, does anyone know how I can find the peak maximum of an erp? And how to calculate the latency until the maximum? Timelockanalysis and the grand average of all erps are already done. Best, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From vale.niccolai at gmail.com Fri Oct 5 18:30:02 2012 From: vale.niccolai at gmail.com (Valentina Niccolai) Date: Fri, 5 Oct 2012 18:30:02 +0200 Subject: [FieldTrip] problem with ICA Message-ID: Hallo. I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. I am thankful for any help. Valentina Niccolai cfg.method = 'runica'; cfg.channel = {'all','-EOG','-EMG'}; comp = ft_componentanalysis(cfg, rej_vis_res); The result of my component analysis looks like this: comp = fsample: 600 time: {1x237 cell} trial: {1x237 cell} topo: [306x2 double] unmixing: [2x306 double] label: {2x1 cell} topolabel: {306x1 cell} grad: [1x1 struct] trialinfo: [237x1 double] cfg: [1x1 struct] and in comp.trial I get imaginary numbers: >> comp.trial{1} ans = 1.0e-18 * Columns 1 through 6 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ica.jpg Type: image/jpeg Size: 39895 bytes Desc: not available URL: From politzerahless at gmail.com Fri Oct 5 18:45:00 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 5 Oct 2012 11:45:00 -0500 Subject: [FieldTrip] Calculate amplitudes and latencies Message-ID: Hi Daria, I'm not aware of a built-in FieldTrip function that does these things, but since it involves basic math you can do it with MATLAB functions (e.g., max() to find the maximum amplitude, and find() to get the latency of that point). However, see Steve Luck's (2005) *An Introduction to the Event-Related Potential Technique* for a discussion of why peak latency and peak amplitude measures are often not good. I would recommend using mean amplitude (there is an example of how to do it in FieldTrip at http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics#t-test_with_fieldtrip_function, although it's also straightforward to do just in MATLAB) and fractional area latency as your measures. Or, better yet, you could just do a cluster test, which will tell you where and when significant clusters are without your having to try and measure latencies ( http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock). Best, Steve Message: 1 > Date: Fri, 5 Oct 2012 17:10:31 +0200 > From: Daria Laptinskaya > To: FieldTrip discussion list > Subject: [FieldTrip] Calculate amplitudes and latencies > Message-ID: > < > CADcxnnNwXEo3MJuYRrkUfzOq-+bgDj-qmMHiFbytjMRX6_vt9A at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear fieldtrippers, > > does anyone know how I can find the peak maximum of an erp? > And how to calculate the latency until the maximum? > > Timelockanalysis and the grand average of all erps are already done. > > Best, > Daria > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Oct 5 18:48:20 2012 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 5 Oct 2012 18:48:20 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi Daria, you can either use the function "min" or "max" to find the minima and maxima in your data, or you can use the "peakdetect2"-function that can be found in the "private" folder of field trip. Another function, that is quite similar to the field trip-function is the "findpeaks"-function, in which you can even set parameters how exactly you want to define your peaks. Fo the latency: all the above functions can give you the index (i.e. sample point) of your peak, if you then compare this to your time-vector, you can get the latency until the maximum. Good Luck, Julian Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > Dear fieldtrippers, > > does anyone know how I can find the peak maximum of an erp? > And how to calculate the latency until the maximum? > > Timelockanalysis and the grand average of all erps are already done. > > Best, > Daria > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Fri Oct 5 20:34:05 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Fri, 5 Oct 2012 14:34:05 -0400 Subject: [FieldTrip] time-resolved psd/csd Message-ID: Hey, I like very much the tuto in http://fieldtrip.fcdonders.nl/tutorial/fourier where the power-spectral densities (psd) and cross-spectral densities (csd) calculations are exemplified. do you know if there is a similar example showing a time-resolved psd and csd (e.g. where you can see power/coherence changes across time). thanks Jose Herrero -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Fri Oct 5 20:39:31 2012 From: jdien07 at mac.com (Joseph Dien) Date: Fri, 05 Oct 2012 14:39:31 -0400 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: One typically gets the complex numbers from ICA when the data have less than full rank. For example, if there is a channel that is a flat line (maybe a bad channel or a reference) or when two channels are perfectly correlated (as when the data is mean mastoid referenced and one has included both mastoid channels as they will have a perfect -1 correlation). Cheers! Joe On Oct 5, 2012, at 12:30 PM, Valentina Niccolai wrote: > Hallo. > > I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. > > Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. > > I am thankful for any help. > > > Valentina Niccolai > > > cfg.method = 'runica'; > > cfg.channel = {'all','-EOG','-EMG'}; > > comp = ft_componentanalysis(cfg, rej_vis_res); > > > > The result of my component analysis looks like this: > > comp = > > > fsample: 600 > > time: {1x237 cell} > > trial: {1x237 cell} > > topo: [306x2 double] > > unmixing: [2x306 double] > > label: {2x1 cell} > > topolabel: {306x1 cell} > > grad: [1x1 struct] > > trialinfo: [237x1 double] > > cfg: [1x1 struct] > > > and in comp.trial I get imaginary numbers: > > > >> comp.trial{1} > > ans = > > 1.0e-18 * > > Columns 1 through 6 > > 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i > > -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Fri Oct 5 20:39:31 2012 From: jdien07 at mac.com (Joseph Dien) Date: Fri, 05 Oct 2012 14:39:31 -0400 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: One typically gets the complex numbers from ICA when the data have less than full rank. For example, if there is a channel that is a flat line (maybe a bad channel or a reference) or when two channels are perfectly correlated (as when the data is mean mastoid referenced and one has included both mastoid channels as they will have a perfect -1 correlation). Cheers! Joe On Oct 5, 2012, at 12:30 PM, Valentina Niccolai wrote: > Hallo. > > I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. > > Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. > > I am thankful for any help. > > > Valentina Niccolai > > > cfg.method = 'runica'; > > cfg.channel = {'all','-EOG','-EMG'}; > > comp = ft_componentanalysis(cfg, rej_vis_res); > > > > The result of my component analysis looks like this: > > comp = > > > fsample: 600 > > time: {1x237 cell} > > trial: {1x237 cell} > > topo: [306x2 double] > > unmixing: [2x306 double] > > label: {2x1 cell} > > topolabel: {306x1 cell} > > grad: [1x1 struct] > > trialinfo: [237x1 double] > > cfg: [1x1 struct] > > > and in comp.trial I get imaginary numbers: > > > >> comp.trial{1} > > ans = > > 1.0e-18 * > > Columns 1 through 6 > > 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i > > -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat Oct 6 07:39:32 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 6 Oct 2012 08:39:32 +0300 Subject: [FieldTrip] Fisher classifier Message-ID: Hello, Does anyone know how can I classfy my data using Fisher classifier? (Is there such function in the Fieldtrip list?) Thanks for help. Best, -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Sat Oct 6 12:18:54 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sat, 6 Oct 2012 12:18:54 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Many thanks-I will try to do! Best, Daria 2012/10/5 Julian Keil > Hi Daria, > > you can either use the function "min" or "max" to find the minima and > maxima in your data, or you can use the "peakdetect2"-function that can be > found in the "private" folder of field trip. > Another function, that is quite similar to the field trip-function is the > "findpeaks"-function, in which you can even set parameters how exactly you > want to define your peaks. > Fo the latency: all the above functions can give you the index (i.e. > sample point) of your peak, if you then compare this to your time-vector, > you can get the latency until the maximum. > > Good Luck, > > Julian > > Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > > > Dear fieldtrippers, > > > > does anyone know how I can find the peak maximum of an erp? > > And how to calculate the latency until the maximum? > > > > Timelockanalysis and the grand average of all erps are already done. > > > > Best, > > Daria > > > > > > _______________________________________________ > > 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 veganathlete at ymail.com Sat Oct 6 17:37:58 2012 From: veganathlete at ymail.com (Steph) Date: Sat, 06 Oct 2012 17:37:58 +0200 Subject: [FieldTrip] correct use of ft_read_data Message-ID: <50705056.6050709@ymail.com> Dear Fieldtrippers, could you help me make ft_read_data work? the data is a <34x48128 double>. the header looks like this: h = nChans: 34 nSamples: 48128 nSamplesPre: 0 nTrials: 1 Fs: 512 label: {34x1 cell} orig: [1x1 struct] chantype: {34x1 cell} chanunit: {34x1 cell} I want to read one channel to define the trials in my trialfunction. t=ft_read_data(cfg.dataset,'header',h,'chanindx',17) Attempted to access dat(17,:); index out of bounds because size(dat)=[1,48128]. Error in ft_read_data (line 294) dat(i,:) = dat(i,:).* parameters.SourceChGain.NumericValue(i) + parameters.SourceChOffset.NumericValue(i); Best Steph From jose.herrero66 at gmail.com Sat Oct 6 22:02:53 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Sat, 6 Oct 2012 16:02:53 -0400 Subject: [FieldTrip] query Message-ID: hi, I have posted several questions to fieldtrip at science.ru.nl but I am not able to see them e-mail to me.did you receive them? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Sun Oct 7 00:01:06 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 6 Oct 2012 18:01:06 -0400 Subject: [FieldTrip] Fisher classifier In-Reply-To: References: Message-ID: If you have access to Matlab Statistics toolbox It has LDA (Fisher classifier) among all standard classifiers. http://www.mathworks.com/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html I personally prefer scikit-learn(Python), which is much more complete package. http://scikit-learn.org/dev/auto_examples/plot_lda_qda.html Sheraz Khan Martinos Center On Sat, Oct 6, 2012 at 1:39 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > Does anyone know how can I classfy my data using Fisher classifier? > (Is there such function in the Fieldtrip list?) > > Thanks for help. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sun Oct 7 02:01:47 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 7 Oct 2012 03:01:47 +0300 Subject: [FieldTrip] Fisher classifier In-Reply-To: References: Message-ID: Thank you Sheraz, Yes, and there is also fisher classifier function under prtools. But the people in Fieldtrip made a function for classification called ft_timelockstatistics, I thought I can play with its parameters so that the kind of classifier can be changed. I don't know whether people use fieldtrip functions just for preprocessing and then use the classifiers from other libraries? Hamza On Sun, Oct 7, 2012 at 1:01 AM, Sheraz Khan wrote: > If you have access to Matlab Statistics toolbox It has LDA (Fisher > classifier) among all standard classifiers. > > http://www.mathworks.com/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html > > I personally prefer scikit-learn(Python), which is much more complete > package. > > http://scikit-learn.org/dev/auto_examples/plot_lda_qda.html > > Sheraz Khan > Martinos Center > > On Sat, Oct 6, 2012 at 1:39 AM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Hello, >> >> Does anyone know how can I classfy my data using Fisher classifier? >> (Is there such function in the Fieldtrip list?) >> >> Thanks for help. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Sun Oct 7 11:34:31 2012 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Sun, 7 Oct 2012 11:34:31 +0200 Subject: [FieldTrip] Brain imaging PhD projects available Message-ID: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> Dear all, Please find below three PhD projects I am posting on behalf of my group leader. Cheers, Diederick ------------- Three brain imaging PhD projects are available at the Sleep & Cognition group of the Netherlands Institute for Neuroscience in Amsterdam, The Netherlands. Projects are in collaboration with one or more partners in Freiburg, Basel or Strasbourg. Project 8: Individual differences in the spatiotemporal profile of brain activity during wake and sleep The project aims to elucidate how spatiotemporal profiles of brain activity develop from wakefulness to deep sleep. Assessments in good and poor sleepers will be done using the EGI MR-compatible 256-channel high density EEG-system in the quietest 3T MRI system presently available, a Toshiba Vantage Titan 3T with the Pianissimo technology. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam, Freiburg and Basel. Project 6: Spatiotemporal patterns of cortical oscillations that determine subjective wake time during sleep The project aims to elucidate the neural correlates of the loss of consciousness during sleep. Spatiotemporal profiles of brain activity in good and poor sleepers will be obtained using the EGI 256-channel high density EEG-system, both during unperturbed sleep and in response to sensory stimulation. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam and Freiburg. Project 4: Reward effects of light: phototherapy as a treatment for pathologies with motivational deficits The project aims to elucidate the involvement of brain regions regulating reward and motivation in the mood-improving effects of bright light. 3T MRI assessments will be done in good and poor sleepers. Assessments of behavior, circadian genes, proteins, neurotransmitters and hormones will be done in transgenic animals. Human studies will be performed in Amsterdam, animal studies in Strasbourg. Projects are open to students with a (pending) master (or equivalent) degree in Physics, Mathematics, Biology, Psychology, Neuroscience or Engineering or comparable. Experience with brain imaging, EEG, or sleep is an advantage for all projects. Experience with animal studies is an advantage for project 4. Especially students with some affinity with and/or background in mathematics and/or scientific programming are also encouraged to apply. A proficient level of familiarity with large datasets and programming is commendable, e.g. using Matlab. Mastery of the English language is essential for writing papers and a thesis; mastery of the local languages will facilitate recordings. If you're interested, please read additional information on http://www.neurotime-erasmus.org/ and contact e.van.someren at nin.knaw.nl. Thank you for your interest! Prof. dr. Eus J.W. Van Someren http://www.nin.knaw.nl/research_groups/van_someren_group/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Sun Oct 7 11:40:51 2012 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Sun, 7 Oct 2012 11:40:51 +0200 Subject: [FieldTrip] Brain imaging PhD projects available In-Reply-To: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> References: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> Message-ID: <33CC1C48-5922-4C31-94EA-69B5EB5920ED@gmail.com> Dear all, Relevant keywords for these projects are: sleep - consciousness - mood - combined high-density EEG + silent fMRI - network analysis Cheers, Diederick On 7 okt. 2012, at 11:34, Diederick Stoffers wrote: > Dear all, > > Please find below three PhD projects I am posting on behalf of my group leader. > > Cheers, > > Diederick > > ------------- > > Three brain imaging PhD projects are available at the Sleep & Cognition group of the Netherlands Institute for Neuroscience in Amsterdam, The Netherlands. Projects are in collaboration with one or more partners in Freiburg, Basel or Strasbourg. > > > > > Project 8: Individual differences in the spatiotemporal profile of brain activity during wake and sleep > > The project aims to elucidate how spatiotemporal profiles of brain activity develop from wakefulness to deep sleep. Assessments in good and poor sleepers will be done using the EGI MR-compatible 256-channel high density EEG-system in the quietest 3T MRI system presently available, a Toshiba Vantage Titan 3T with the Pianissimo technology. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam, Freiburg and Basel. > > > > Project 6: Spatiotemporal patterns of cortical oscillations that determine subjective wake time during sleep > > The project aims to elucidate the neural correlates of the loss of consciousness during sleep. Spatiotemporal profiles of brain activity in good and poor sleepers will be obtained using the EGI 256-channel high density EEG-system, both during unperturbed sleep and in response to sensory stimulation. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam and Freiburg. > > > > Project 4: Reward effects of light: phototherapy as a treatment for pathologies with motivational deficits > > The project aims to elucidate the involvement of brain regions regulating reward and motivation in the mood-improving effects of bright light. 3T MRI assessments will be done in good and poor sleepers. Assessments of behavior, circadian genes, proteins, neurotransmitters and hormones will be done in transgenic animals. Human studies will be performed in Amsterdam, animal studies in Strasbourg. > > > > Projects are open to students with a (pending) master (or equivalent) degree in Physics, Mathematics, Biology, Psychology, Neuroscience or Engineering or comparable. Experience with brain imaging, EEG, or sleep is an advantage for all projects. Experience with animal studies is an advantage for project 4. Especially students with some affinity with and/or background in mathematics and/or scientific programming are also encouraged to apply. A proficient level of familiarity with large datasets and programming is commendable, e.g. using Matlab. Mastery of the English language is essential for writing papers and a thesis; mastery of the local languages will facilitate recordings. > > > If you're interested, please read additional information on http://www.neurotime-erasmus.org/ and contact e.van.someren at nin.knaw.nl. > > > Thank you for your interest! > > Prof. dr. Eus J.W. Van Someren > > > http://www.nin.knaw.nl/research_groups/van_someren_group/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobrobbrown at googlemail.com Sun Oct 7 12:52:52 2012 From: bobrobbrown at googlemail.com (Robert Brown) Date: Sun, 7 Oct 2012 13:52:52 +0300 Subject: [FieldTrip] query In-Reply-To: References: Message-ID: hi man, everybody sees your posts but you should think first, try first, try even harder, try for a week, before you post a question here - respect the time of others! your first two questions were really really basic that you would figure out yourself in a few hours or days. cheers, Bob 2012/10/6 Jose Herrero > > hi, I have posted several questions to fieldtrip at science.ru.nl but I am > not able to see them e-mail to me.did you receive them? > > > _______________________________________________ > 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 daria.laptinskaya at googlemail.com Sun Oct 7 13:23:27 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sun, 7 Oct 2012 13:23:27 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi Julian, by using the peakdetect2- or the findpeaks-function I get an error: ??? Undefined function or method 'peakdetect2' for input arguments of type 'double' (I use EGI-data with 149 channels and 113 timepoints). Do you have any idea, what the problem could be? Daria 2012/10/6 Daria Laptinskaya > Many thanks-I will try to do! > > Best, > Daria > > > > 2012/10/5 Julian Keil > >> Hi Daria, >> >> you can either use the function "min" or "max" to find the minima and >> maxima in your data, or you can use the "peakdetect2"-function that can be >> found in the "private" folder of field trip. >> Another function, that is quite similar to the field trip-function is the >> "findpeaks"-function, in which you can even set parameters how exactly you >> want to define your peaks. >> Fo the latency: all the above functions can give you the index (i.e. >> sample point) of your peak, if you then compare this to your time-vector, >> you can get the latency until the maximum. >> >> Good Luck, >> >> Julian >> >> Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: >> >> > Dear fieldtrippers, >> > >> > does anyone know how I can find the peak maximum of an erp? >> > And how to calculate the latency until the maximum? >> > >> > Timelockanalysis and the grand average of all erps are already done. >> > >> > Best, >> > Daria >> > >> > >> > _______________________________________________ >> > 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 julian.keil at gmail.com Sun Oct 7 15:24:02 2012 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 7 Oct 2012 15:24:02 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi, I suppose your "peakdetect2" is located in the "private" folder. Matlab by default does not include private folders in the path. You can either rename it (e.g. to "notprivate") or manually copy the function to another folder. The "findpeaks" should actually be a built-in function, but maybe you have to check the math works file exchange. As usual, if you are not sure, if you have the respective function in your matlab path, check with "which". Best, Julian Am 07.10.2012 um 13:23 schrieb Daria Laptinskaya: > Hi Julian, > > by using the peakdetect2- or the findpeaks-function I get an error: > ??? Undefined function or method 'peakdetect2' for input arguments of type 'double' > (I use EGI-data with 149 channels and 113 timepoints). > > Do you have any idea, what the problem could be? > > Daria > > > > > > > 2012/10/6 Daria Laptinskaya > Many thanks-I will try to do! > > Best, > Daria > > > > 2012/10/5 Julian Keil > Hi Daria, > > you can either use the function "min" or "max" to find the minima and maxima in your data, or you can use the "peakdetect2"-function that can be found in the "private" folder of field trip. > Another function, that is quite similar to the field trip-function is the "findpeaks"-function, in which you can even set parameters how exactly you want to define your peaks. > Fo the latency: all the above functions can give you the index (i.e. sample point) of your peak, if you then compare this to your time-vector, you can get the latency until the maximum. > > Good Luck, > > Julian > > Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > > > Dear fieldtrippers, > > > > does anyone know how I can find the peak maximum of an erp? > > And how to calculate the latency until the maximum? > > > > Timelockanalysis and the grand average of all erps are already done. > > > > Best, > > Daria > > > > > > _______________________________________________ > > 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 akiko.ikkai at gmail.com Sun Oct 7 17:36:50 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Sun, 7 Oct 2012 11:36:50 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem Message-ID: Dear Fieldtrip users, I've been trying to run group stats on my EEG source data, which contains 14 subjects' normalized beamformer data, and having serious swap memory issue (not Matlab memory issue, but OS swap memory). I'm trying to contrast 2 conditions (within subject design). Each subject's normalized beamformer data (1 condition) is source_lTMI_intNorm = anatomy: [181x217x181 double] inside: [181x217x181 logical] avg: [1x1 struct] transform: [4x4 double] dim: [181 217 181] cfg: [1x1 struct] >whos Name Size Bytes Class Attributes source_lTMI_intNorm 1x1 520114791 struct therefore, when I open all subjects' data ("data1group" and "data2group"), it's huge... Name Size Bytes Class Attributes data1group 1x14 5909429438 cell data2group 1x14 6705652782 cell data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, >data1group{1} anatomy: [181x217x181 double] inside: [181x217x181 logical] avg: [1x1 struct] transform: [4x4 double] dim: [181 217 181] cfg: [1x1 struct] So, when I try to run cfg=[]; cfg.dim = data1group{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 100; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(data1group); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); stat.anatomy = data1group{1}.anatomy; my computer (os 10.6.8, 6G memory) runs out of swap memory (startup memory?), which forces me to quit Matlab. I'm running above processes in a function, so I'm not running into Matlab memory error. Could someone help me how it could run more efficiently? I guess cfg.inputfile is not available for ft_sourcestatistics, so I have to eventually load 2 group data in Matlab workspace...? Thank you in advance! Akiko -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Sun Oct 7 19:31:48 2012 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Sun, 7 Oct 2012 13:31:48 -0400 Subject: [FieldTrip] correct use of ft_read_data In-Reply-To: <50705056.6050709@ymail.com> References: <50705056.6050709@ymail.com> Message-ID: <1471CFF1-771E-486C-A6E3-C8C287531936@gmail.com> Have you tried to use ft_read_event? Take a look at trialfun_general it will help you understand how to read in your events. Best, Raquel Sent from my iPhone On Oct 6, 2012, at 11:37 AM, Steph wrote: > Dear Fieldtrippers, > > could you help me make ft_read_data work? > > the data is a <34x48128 double>. > > the header looks like this: > > h = > nChans: 34 > nSamples: 48128 > nSamplesPre: 0 > nTrials: 1 > Fs: 512 > label: {34x1 cell} > orig: [1x1 struct] > chantype: {34x1 cell} > chanunit: {34x1 cell} > > I want to read one channel to define the trials in my trialfunction. > > t=ft_read_data(cfg.dataset,'header',h,'chanindx',17) > > Attempted to access dat(17,:); index out of bounds > because size(dat)=[1,48128]. > > Error in ft_read_data (line 294) > dat(i,:) = dat(i,:).* > parameters.SourceChGain.NumericValue(i) + > parameters.SourceChOffset.NumericValue(i); > > Best > Steph > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From shaegens at gmail.com Sun Oct 7 20:16:28 2012 From: shaegens at gmail.com (Saskia Haegens) Date: Sun, 7 Oct 2012 14:16:28 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, In my experience with grandavg source structs, sometimes the cfg (that's attached to the data struct) becomes very large and can consume a considerable amount of memory. I'm not sure if that's the case/problem here, but might be worth checking and removing the cfg. You could even use checkconfig to cleanup your cfg with: data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') Hope this helps! Best, Saskia On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai wrote: > Dear Fieldtrip users, > > I've been trying to run group stats on my EEG source data, which contains 14 > subjects' normalized beamformer data, and having serious swap memory issue > (not Matlab memory issue, but OS swap memory). > > I'm trying to contrast 2 conditions (within subject design). Each subject's > normalized beamformer data (1 condition) is > > source_lTMI_intNorm = > > anatomy: [181x217x181 double] > > inside: [181x217x181 logical] > > avg: [1x1 struct] > > transform: [4x4 double] > > dim: [181 217 181] > > cfg: [1x1 struct] > > >>whos > > > > Name Size Bytes Class Attributes > > source_lTMI_intNorm 1x1 520114791 struct > > > therefore, when I open all subjects' data ("data1group" and "data2group"), > it's huge... > > Name Size Bytes Class Attributes > > data1group 1x14 5909429438 cell > > data2group 1x14 6705652782 cell > > > data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, > >>data1group{1} > > anatomy: [181x217x181 double] > > inside: [181x217x181 logical] > > avg: [1x1 struct] > > transform: [4x4 double] > > dim: [181 217 181] > > cfg: [1x1 struct] > > So, when I try to run > > cfg=[]; > > cfg.dim = data1group{1}.dim; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'depsamplesT'; > > cfg.parameter = 'avg.pow'; > > cfg.correctm = 'cluster'; > > cfg.numrandomization = 100; > > cfg.alpha = 0.05; > > cfg.tail = 0; > > nsubj=length(data1group); > > cfg.design(1,:) = [1:nsubj 1:nsubj]; > > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > > cfg.uvar = 1; > > cfg.ivar = 2; > > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > > stat.anatomy = data1group{1}.anatomy; > > > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup > memory?), which forces me to quit Matlab. I'm running above processes in a > function, so I'm not running into Matlab memory error. > > Could someone help me how it could run more efficiently? I guess > cfg.inputfile is not available for ft_sourcestatistics, so I have to > eventually load 2 group data in Matlab workspace...? > > Thank you in advance! Akiko > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Elena.Orekhova at neuro.gu.se Sun Oct 7 20:17:19 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 7 Oct 2012 18:17:19 +0000 Subject: [FieldTrip] EGI .ses import Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> Dear FieldTrippers, I try to read EGI .ses file using hdr = ft_read_header('myfile.ses'), or hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') but get an error message: 'unsupported header format (unknown)' It is stated that FT reads EGI .ses files. Have anybody tried or have some tips? Elena From matt.mollison at gmail.com Sun Oct 7 20:33:55 2012 From: matt.mollison at gmail.com (Matt Mollison) Date: Sun, 7 Oct 2012 12:33:55 -0600 Subject: [FieldTrip] EGI .ses import In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> Message-ID: Elena, The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. Best, Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova wrote: > Dear FieldTrippers, > > I try to read EGI .ses file using > > hdr = ft_read_header('myfile.ses'), or > hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') > > but get an error message: > > 'unsupported header format (unknown)' > > It is stated that FT reads EGI .ses files. > > Have anybody tried or have some tips? > > > Elena > _______________________________________________ > 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 akiko.ikkai at gmail.com Sun Oct 7 22:20:29 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Sun, 7 Oct 2012 16:20:29 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Saskia, Thank you for the quick advise! Removing cfg definitely works well. Each of the group data is now 1.3G (I also used "single" to convert everything into single precision), which is definitely manageable. Computation time has also been reduced to 3 times less now. Thanks! Akiko On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: > Hi Akiko, > > In my experience with grandavg source structs, sometimes the cfg > (that's attached to the data struct) becomes very large and can > consume a considerable amount of memory. I'm not sure if that's the > case/problem here, but might be worth checking and removing the cfg. > You could even use checkconfig to cleanup your cfg with: > data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') > Hope this helps! > > Best, > Saskia > > On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai > wrote: > > Dear Fieldtrip users, > > > > I've been trying to run group stats on my EEG source data, which > contains 14 > > subjects' normalized beamformer data, and having serious swap memory > issue > > (not Matlab memory issue, but OS swap memory). > > > > I'm trying to contrast 2 conditions (within subject design). Each > subject's > > normalized beamformer data (1 condition) is > > > > source_lTMI_intNorm = > > > > anatomy: [181x217x181 double] > > > > inside: [181x217x181 logical] > > > > avg: [1x1 struct] > > > > transform: [4x4 double] > > > > dim: [181 217 181] > > > > cfg: [1x1 struct] > > > > > >>whos > > > > > > > > Name Size Bytes Class Attributes > > > > source_lTMI_intNorm 1x1 520114791 struct > > > > > > therefore, when I open all subjects' data ("data1group" and > "data2group"), > > it's huge... > > > > Name Size Bytes Class Attributes > > > > data1group 1x14 5909429438 cell > > > > data2group 1x14 6705652782 cell > > > > > > data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, > > > >>data1group{1} > > > > anatomy: [181x217x181 double] > > > > inside: [181x217x181 logical] > > > > avg: [1x1 struct] > > > > transform: [4x4 double] > > > > dim: [181 217 181] > > > > cfg: [1x1 struct] > > > > So, when I try to run > > > > cfg=[]; > > > > cfg.dim = data1group{1}.dim; > > > > cfg.method = 'montecarlo'; > > > > cfg.statistic = 'depsamplesT'; > > > > cfg.parameter = 'avg.pow'; > > > > cfg.correctm = 'cluster'; > > > > cfg.numrandomization = 100; > > > > cfg.alpha = 0.05; > > > > cfg.tail = 0; > > > > nsubj=length(data1group); > > > > cfg.design(1,:) = [1:nsubj 1:nsubj]; > > > > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > > > > cfg.uvar = 1; > > > > cfg.ivar = 2; > > > > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > > > > stat.anatomy = data1group{1}.anatomy; > > > > > > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup > > memory?), which forces me to quit Matlab. I'm running above processes in > a > > function, so I'm not running into Matlab memory error. > > > > Could someone help me how it could run more efficiently? I guess > > cfg.inputfile is not available for ft_sourcestatistics, so I have to > > eventually load 2 group data in Matlab workspace...? > > > > Thank you in advance! Akiko > > > > -- > > Akiko Ikkai, Ph.D. > > Postdoctoral Fellow > > Department of Psychological and Brain Sciences > > Johns Hopkins University > > Ames Hall, 3400 N. Charles St. > > Baltimore, MD 21218 > > > > > > > > _______________________________________________ > > 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Mon Oct 8 00:15:13 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 7 Oct 2012 22:15:13 +0000 Subject: [FieldTrip] EGI .ses import In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> Matt, Thank you for the explanations. Just in case you know, do .egs or .sbin contain information about real time/date? Elena ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Matt Mollison [matt.mollison at gmail.com] Sent: Sunday, October 07, 2012 8:33 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EGI .ses import Elena, The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. Best, Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova > wrote: Dear FieldTrippers, I try to read EGI .ses file using hdr = ft_read_header('myfile.ses'), or hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') but get an error message: 'unsupported header format (unknown)' It is stated that FT reads EGI .ses files. Have anybody tried or have some tips? Elena _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Mon Oct 8 02:37:15 2012 From: jdien07 at mac.com (Joseph Dien) Date: Sun, 07 Oct 2012 20:37:15 -0400 Subject: [FieldTrip] EGI .ses import In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> Message-ID: The problem is that there is some ambiguity about file naming conventions. The egis file format has historically gone with different suffixes including .egis, .ses, .ave, and .raw. Likewise the simple binary format has likewise gone with different suffixes including .sbin and .raw. It started on the Mac where suffix standardization is not as important as on the PC, where suffixes are used by the operating system to tell different file types apart (Macs have historically relied on a separate metadata file, although they are now shifting to more reliance on suffixes, which I think is a mistake). Anyway, the question for you is what you mean by an EGI .ses file? It could refer to a number of things. If you mean the native NetStation file format, only NetStation can read them since the file format relies on some 3rd party software and other folks haven't wanted to pay the license fees. By real time/date, do you mean when the session was recorded (as opposed to event time stamps)? If so, the answer is yes to both. Cheers! Joe On Oct 7, 2012, at 6:15 PM, Elena Orekhova wrote: > Matt, > > Thank you for the explanations. > Just in case you know, do .egs or .sbin contain information about real time/date? > > Elena > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Matt Mollison [matt.mollison at gmail.com] > Sent: Sunday, October 07, 2012 8:33 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] EGI .ses import > > Elena, > > The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. > > Best, > Matt > > -- > Univ. of Colorado at Boulder > Dept. of Psychology and Neuroscience > matthew.mollison at colorado.edu > http://psych.colorado.edu/~mollison/ > > On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova wrote: > Dear FieldTrippers, > > I try to read EGI .ses file using > > hdr = ft_read_header('myfile.ses'), or > hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') > > but get an error message: > > 'unsupported header format (unknown)' > > It is stated that FT reads EGI .ses files. > > Have anybody tried or have some tips? > > > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Mon Oct 8 10:21:10 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Mon, 8 Oct 2012 10:21:10 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Thanks :-)!! 2012/10/7 Julian Keil > Hi, > > I suppose your "peakdetect2" is located in the "private" folder. Matlab by > default does not include private folders in the path. You can either rename > it (e.g. to "notprivate") or manually copy the function to another folder. > The "findpeaks" should actually be a built-in function, but maybe you have > to check the math works file exchange. > > As usual, if you are not sure, if you have the respective function in your > matlab path, check with "which". > > Best, > > Julian > > Am 07.10.2012 um 13:23 schrieb Daria Laptinskaya: > > Hi Julian, > > by using the peakdetect2- or the findpeaks-function I get an error: > ??? Undefined function or method 'peakdetect2' for input arguments of type > 'double' > (I use EGI-data with 149 channels and 113 timepoints). > > Do you have any idea, what the problem could be? > > Daria > > > > > > > 2012/10/6 Daria Laptinskaya > >> Many thanks-I will try to do! >> >> Best, >> Daria >> >> >> >> 2012/10/5 Julian Keil >> >>> Hi Daria, >>> >>> you can either use the function "min" or "max" to find the minima and >>> maxima in your data, or you can use the "peakdetect2"-function that can be >>> found in the "private" folder of field trip. >>> Another function, that is quite similar to the field trip-function is >>> the "findpeaks"-function, in which you can even set parameters how exactly >>> you want to define your peaks. >>> Fo the latency: all the above functions can give you the index (i.e. >>> sample point) of your peak, if you then compare this to your time-vector, >>> you can get the latency until the maximum. >>> >>> Good Luck, >>> >>> Julian >>> >>> Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: >>> >>> > Dear fieldtrippers, >>> > >>> > does anyone know how I can find the peak maximum of an erp? >>> > And how to calculate the latency until the maximum? >>> > >>> > Timelockanalysis and the grand average of all erps are already done. >>> > >>> > Best, >>> > Daria >>> > >>> > >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Mon Oct 8 12:02:32 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Mon, 8 Oct 2012 12:02:32 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, In addition to Saskia's comment (which is very useful!) remember also that if you create the subject's grid from the warped MNI template grid (explained here http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) then you can keep each subject's source data in a 'source' structure with .pos field and still do group level statistics, without need to convert to 'volume' structure which upsamples the spatial resolution perhaps artificially too high. Cheers, Johanna 2012/10/7 Akiko Ikkai > Hi Saskia, > > Thank you for the quick advise! Removing cfg definitely works well. Each > of the group data is now 1.3G (I also used "single" to convert everything > into single precision), which is definitely manageable. Computation time > has also been reduced to 3 times less now. > > Thanks! Akiko > > > On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: > >> Hi Akiko, >> >> In my experience with grandavg source structs, sometimes the cfg >> (that's attached to the data struct) becomes very large and can >> consume a considerable amount of memory. I'm not sure if that's the >> case/problem here, but might be worth checking and removing the cfg. >> You could even use checkconfig to cleanup your cfg with: >> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >> Hope this helps! >> >> Best, >> Saskia >> >> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >> wrote: >> > Dear Fieldtrip users, >> > >> > I've been trying to run group stats on my EEG source data, which >> contains 14 >> > subjects' normalized beamformer data, and having serious swap memory >> issue >> > (not Matlab memory issue, but OS swap memory). >> > >> > I'm trying to contrast 2 conditions (within subject design). Each >> subject's >> > normalized beamformer data (1 condition) is >> > >> > source_lTMI_intNorm = >> > >> > anatomy: [181x217x181 double] >> > >> > inside: [181x217x181 logical] >> > >> > avg: [1x1 struct] >> > >> > transform: [4x4 double] >> > >> > dim: [181 217 181] >> > >> > cfg: [1x1 struct] >> > >> > >> >>whos >> > >> > >> > >> > Name Size Bytes Class Attributes >> > >> > source_lTMI_intNorm 1x1 520114791 struct >> > >> > >> > therefore, when I open all subjects' data ("data1group" and >> "data2group"), >> > it's huge... >> > >> > Name Size Bytes Class Attributes >> > >> > data1group 1x14 5909429438 cell >> > >> > data2group 1x14 6705652782 cell >> > >> > >> > data1group & data2group are both 1x14 struct (1 cell/subject). >> Therefore, >> > >> >>data1group{1} >> > >> > anatomy: [181x217x181 double] >> > >> > inside: [181x217x181 logical] >> > >> > avg: [1x1 struct] >> > >> > transform: [4x4 double] >> > >> > dim: [181 217 181] >> > >> > cfg: [1x1 struct] >> > >> > So, when I try to run >> > >> > cfg=[]; >> > >> > cfg.dim = data1group{1}.dim; >> > >> > cfg.method = 'montecarlo'; >> > >> > cfg.statistic = 'depsamplesT'; >> > >> > cfg.parameter = 'avg.pow'; >> > >> > cfg.correctm = 'cluster'; >> > >> > cfg.numrandomization = 100; >> > >> > cfg.alpha = 0.05; >> > >> > cfg.tail = 0; >> > >> > nsubj=length(data1group); >> > >> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >> > >> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >> > >> > cfg.uvar = 1; >> > >> > cfg.ivar = 2; >> > >> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >> > >> > stat.anatomy = data1group{1}.anatomy; >> > >> > >> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >> > memory?), which forces me to quit Matlab. I'm running above processes >> in a >> > function, so I'm not running into Matlab memory error. >> > >> > Could someone help me how it could run more efficiently? I guess >> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >> > eventually load 2 group data in Matlab workspace...? >> > >> > Thank you in advance! Akiko >> > >> > -- >> > Akiko Ikkai, Ph.D. >> > Postdoctoral Fellow >> > Department of Psychological and Brain Sciences >> > Johns Hopkins University >> > Ames Hall, 3400 N. Charles St. >> > Baltimore, MD 21218 >> > >> > >> > >> > _______________________________________________ >> > 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 >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > 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 gmail.com Mon Oct 8 12:14:09 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 8 Oct 2012 12:14:09 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko! Just to chime in - your source grid is very, very large indeed! ALthough I started with a very fine grid, at one point I also had to downside it (going to 5mm), and had to stop using interpolated source data for stats and the like. Johanna's suggestion will certainly do the trick and it will speed up your analysis enormously as well. You then only need to do interpolate for plotting purposes. all the best, Stephen On 8 October 2012 12:02, Johanna Zumer wrote: > Hi Akiko, > > In addition to Saskia's comment (which is very useful!) remember also that > if you create the subject's grid from the warped MNI template grid > (explained here > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) > then you can keep each subject's source data in a 'source' structure with > .pos field and still do group level statistics, without need to convert to > 'volume' structure which upsamples the spatial resolution perhaps > artificially too high. > > Cheers, > Johanna > > > 2012/10/7 Akiko Ikkai > >> Hi Saskia, >> >> Thank you for the quick advise! Removing cfg definitely works well. Each >> of the group data is now 1.3G (I also used "single" to convert everything >> into single precision), which is definitely manageable. Computation time >> has also been reduced to 3 times less now. >> >> Thanks! Akiko >> >> >> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >> >>> Hi Akiko, >>> >>> In my experience with grandavg source structs, sometimes the cfg >>> (that's attached to the data struct) becomes very large and can >>> consume a considerable amount of memory. I'm not sure if that's the >>> case/problem here, but might be worth checking and removing the cfg. >>> You could even use checkconfig to cleanup your cfg with: >>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>> Hope this helps! >>> >>> Best, >>> Saskia >>> >>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>> wrote: >>> > Dear Fieldtrip users, >>> > >>> > I've been trying to run group stats on my EEG source data, which >>> contains 14 >>> > subjects' normalized beamformer data, and having serious swap memory >>> issue >>> > (not Matlab memory issue, but OS swap memory). >>> > >>> > I'm trying to contrast 2 conditions (within subject design). Each >>> subject's >>> > normalized beamformer data (1 condition) is >>> > >>> > source_lTMI_intNorm = >>> > >>> > anatomy: [181x217x181 double] >>> > >>> > inside: [181x217x181 logical] >>> > >>> > avg: [1x1 struct] >>> > >>> > transform: [4x4 double] >>> > >>> > dim: [181 217 181] >>> > >>> > cfg: [1x1 struct] >>> > >>> > >>> >>whos >>> > >>> > >>> > >>> > Name Size Bytes Class >>> Attributes >>> > >>> > source_lTMI_intNorm 1x1 520114791 struct >>> > >>> > >>> > therefore, when I open all subjects' data ("data1group" and >>> "data2group"), >>> > it's huge... >>> > >>> > Name Size Bytes Class Attributes >>> > >>> > data1group 1x14 5909429438 cell >>> > >>> > data2group 1x14 6705652782 cell >>> > >>> > >>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>> Therefore, >>> > >>> >>data1group{1} >>> > >>> > anatomy: [181x217x181 double] >>> > >>> > inside: [181x217x181 logical] >>> > >>> > avg: [1x1 struct] >>> > >>> > transform: [4x4 double] >>> > >>> > dim: [181 217 181] >>> > >>> > cfg: [1x1 struct] >>> > >>> > So, when I try to run >>> > >>> > cfg=[]; >>> > >>> > cfg.dim = data1group{1}.dim; >>> > >>> > cfg.method = 'montecarlo'; >>> > >>> > cfg.statistic = 'depsamplesT'; >>> > >>> > cfg.parameter = 'avg.pow'; >>> > >>> > cfg.correctm = 'cluster'; >>> > >>> > cfg.numrandomization = 100; >>> > >>> > cfg.alpha = 0.05; >>> > >>> > cfg.tail = 0; >>> > >>> > nsubj=length(data1group); >>> > >>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>> > >>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>> > >>> > cfg.uvar = 1; >>> > >>> > cfg.ivar = 2; >>> > >>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>> > >>> > stat.anatomy = data1group{1}.anatomy; >>> > >>> > >>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>> > memory?), which forces me to quit Matlab. I'm running above processes >>> in a >>> > function, so I'm not running into Matlab memory error. >>> > >>> > Could someone help me how it could run more efficiently? I guess >>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>> > eventually load 2 group data in Matlab workspace...? >>> > >>> > Thank you in advance! Akiko >>> > >>> > -- >>> > Akiko Ikkai, Ph.D. >>> > Postdoctoral Fellow >>> > Department of Psychological and Brain Sciences >>> > Johns Hopkins University >>> > Ames Hall, 3400 N. Charles St. >>> > Baltimore, MD 21218 >>> > >>> > >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> >> >> -- >> Akiko Ikkai, Ph.D. >> Postdoctoral Fellow >> Department of Psychological and Brain Sciences >> Johns Hopkins University >> Ames Hall, 3400 N. Charles St. >> Baltimore, MD 21218 >> >> >> >> _______________________________________________ >> 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 karl.doron at gmail.com Tue Oct 9 00:54:25 2012 From: karl.doron at gmail.com (Karl Doron) Date: Mon, 8 Oct 2012 15:54:25 -0700 Subject: [FieldTrip] diff_itc design matrix error Message-ID: <06DCC434-3BCE-4C6A-8F0F-5F6498BCE918@gmail.com> Hello, I'm getting a design matrix error when running ft_freqstatistics method='diff_itc'. Error using ft_freqstatistics (line 265) the number of observations in the design does not match the number of observations in the data However, the same data and design matrix do work when output='pow' and method='indepsamplesT' I've pasted the design matrix and configuration below. % Make design matrix design=zeros(1,size(freqCor.fourierspctrm,1)+ size(freqInc.fourierspctrm,1)); design(1,1:size(freqCor.fourierspctrm,1))=1; design(1,(size(freqCor.fourierspctrm,1)+1):size(freqCor.fourierspctrm,1)+size(freqInc.fourierspctrm,1))=2; imagesc(design) % Freqstats configuration cfg = [ ]; cfg.statistic ='diff_itc'; cfg.method ='montecarlo'; cfg.parameter ='fourierspctrm'; cfg.complex ='absdiff'; cfg.design ='design'; cfg.ivar = 1; cfg.numrandomization = 500; [ITC_diff]=ft_freqstatistics(cfg, freqCor, freqInc); Thanks for any help, karl Karl Doron, Ph.D. UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.herrero66 at gmail.com Tue Oct 9 01:43:39 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Mon, 8 Oct 2012 19:43:39 -0400 Subject: [FieldTrip] import .cnt file Message-ID: Dear FTrip users, matlab crashes when trying to import a .cnt data file using cfg=ft_definetrial(cfg). my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so this is not the problem cfg=[]; cfg.dataset='ab001002012.cnt' error in loadcnt.m (line 551) because nevents=0.125 such that ev2(nevents).stimtype=[] cannot exist! in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 because r.ldnsamples=1....why? other question is about the type of file cfg.dataset gets. I only have one raw data file (e.g. 'ab001002012.cnt') while the others have already been filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a similar error. any ideas? Jose H. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 9 16:06:56 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 9 Oct 2012 09:06:56 -0500 Subject: [FieldTrip] import .cnt file Message-ID: Hi Jose, Can you show the code you are using (i.e., the whole cfg that you set up before using ft_definetrial() ? It should look something like the example at http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials Best, Steve Politzer-Ahles Message: 2 > Date: Mon, 8 Oct 2012 19:43:39 -0400 > From: Jose Herrero > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] import .cnt file > Message-ID: > GZCDZSWdgDciYFm0vKEg at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FTrip users, > > matlab crashes when trying to import a .cnt data file using > cfg=ft_definetrial(cfg). > > my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so > this is not the problem > > cfg=[]; > cfg.dataset='ab001002012.cnt' > error in loadcnt.m (line 551) because nevents=0.125 such that > ev2(nevents).stimtype=[] cannot exist! > in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 > because r.ldnsamples=1....why? > > other question is about the type of file cfg.dataset gets. I only have one > raw data file (e.g. 'ab001002012.cnt') while the others have already been > filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua > and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a > similar error. > > any ideas? > Jose H. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121008/4c49ba3a/attachment-0001.html > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Tue Oct 9 17:58:16 2012 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Tue, 09 Oct 2012 16:58:16 +0100 Subject: [FieldTrip] ft_volumerealign Message-ID: <7540f0d221800.507457a8@uni-duesseldorf.de> Dear list when running ft_volumerealign with the spm template MRI in the interactive mode, I get something like:  ============================================================================ voxel 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 80.000000 -52.000000] lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 -20.000000 -52.000000] rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 -20.000000 -52.000000] xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 -20.000000 96.000000] the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB Now I would like to rerun it in the fiducial mode, using the above information. According to help, I need to do this: For realigning to the fiducials, you should specify the position of the fiducials in voxel indices.     cfg.fiducial.nas  = [i j k], position of nasion     cfg.fiducial.lpa  = [i j k], position of LPA     cfg.fiducial.rpa  = [i j k], position of RPA I used the voxel indices (code below), but ended up with the MRI upside-down (see attached picture). Trying the landmark mode was also without success. Am I doing something silly here? Thanks in advance Markus % Load SPM8 T1 template   template     = '/Documents/MATLAB/spm8/templates/T1.nii';  template_mri = ft_read_mri(template);  disp(template_mri)    % 2. Realign the coordinate system  cfg                = [];   cfg.method         = 'fiducial'; % 'interactive';  cfg.fiducial.nas   = [46 104 11];  cfg.fiducial.lpa   = [5 54 11];  cfg.fiducial.rpa   = [85 54 12];  cfg.fiducial.zpoint= [46 54 85];  cfg.coordsys       = 'ctf';  template_mri_realigned  = ft_volumerealign(cfg, template_mri);    % 3. Check the coordinate system  cfg                     = [];  cfg.interactive         = 'yes';  template_mri_checked    = ft_determine_coordsys(template_mri_realigned); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: upsidedown.jpg Type: image/jpeg Size: 16088 bytes Desc: not available URL: From Lilla.Magyari at mpi.nl Tue Oct 9 19:39:44 2012 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Tue, 9 Oct 2012 19:39:44 +0200 (CEST) Subject: [FieldTrip] ft_volumerealign In-Reply-To: <7540f0d221800.507457a8@uni-duesseldorf.de> References: <7540f0d221800.507457a8@uni-duesseldorf.de> Message-ID: <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> hi Markus, When you use the ft_volumerealign function it doesn't necessarily will show the right side of the brain on the right side of the image. Orientation of the image depends on the coordinate system of the mri you read in. I tried also align the template mri to the fiducials, and I got the same problem as you (z+ going to inferior in the aligned volume), but when I switched the lpa with the rpa the orientation was fine. So, my conclusion is that the right side shows up on the left of the image when you use ft_volumerealign. Therefore, you have to mark the lpa on the right side of the image and the rpa on the left side of the image. But there is also another option implemented exactly because of this left/right flipping: You can determine also a "z-point" (by pressing z in the image) that can be anywhere at the top of the head. Then, the function will give you the right alignment even if you did not determine the lpa and rpa on the right side of the brain. For this, you just have to do this: cfg.fiducial.zpoint = [i j k], position of zpoint when you also determine the positions for the nasion, lpa and rpa. And one more remark: I do not know if you have realized this yourself, and I have just misunderstood your email: When you call ft_volumerealign in interactive mode like this: cfg=[]; cfg.method='interactive'; mri_realigned=ft_volumerealign(cfg,mri); And you press the keys r/l/n/z at the right places in the volume (and quit with q), the output (mri_realigned) will be the already aligned volume, you do not need to call ft_volumerealign again with method 'fiducials'. Best, Lilla > Dear list > > when running ft_volumerealign with the spm template MRI in the interactive > mode, I get something like:  > > > ===========================================================================voxel > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 > 80.000000 -52.000000] > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 > -20.000000 -52.000000] > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 > -20.000000 -52.000000] > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 > -20.000000 96.000000] > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB > > > Now I would like to rerun it in the fiducial mode, using the above > information. > According to help, I need to do this: > > > For realigning to the fiducials, you should specify the position of > the fiducials in voxel indices. >     cfg.fiducial.nas  = [i j k], position of nasion >     cfg.fiducial.lpa  = [i j k], position of LPA >     cfg.fiducial.rpa  = [i j k], position of RPA > > > > I used the voxel indices (code below), but ended up with the MRI > upside-down (see attached picture). > Trying the landmark mode was also without success. > > > Am I doing something silly here? > > > > Thanks in advance > Markus > > > > > % Load SPM8 T1 template  > > >  template     = '/Documents/MATLAB/spm8/templates/T1.nii'; > > >  template_mri = ft_read_mri(template); > > >  disp(template_mri) > > >   > > >  % 2. Realign the coordinate system > > >  cfg                = [];  > > >  cfg.method         = 'fiducial'; % 'interactive'; > > >  cfg.fiducial.nas   = [46 104 11]; > > >  cfg.fiducial.lpa   = [5 54 11]; > > >  cfg.fiducial.rpa   = [85 54 12]; > > >  cfg.fiducial.zpoint= [46 54 85]; > > >  cfg.coordsys       = 'ctf'; > > >  template_mri_realigned  = ft_volumerealign(cfg, template_mri); > > > > > > >   > > >  % 3. Check the coordinate system > > >  cfg                     = []; > > >  cfg.interactive         = 'yes'; > > >  template_mri_checked    = ft_determine_coordsys(template_mri_realigned); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Tue Oct 9 19:45:29 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Tue, 9 Oct 2012 13:45:29 -0400 Subject: [FieldTrip] import .cnt file In-Reply-To: References: Message-ID: Hi Steve, the problem is before using ft_definetrial() I'd like to read the .cnt data from file as one long continuous segment without any additional filtering...so this is all the code cfg=[]; cfg.dataset ='ab001002012.cnt' data_org = ft_preprocessing(cfg) error in loadcnt.m (line 551) because nevents=0.125 such that ev2(nevents).stimtype=[] cannot exist! % On Tue, Oct 9, 2012 at 10:06 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Hi Jose, > > Can you show the code you are using (i.e., the whole cfg that you set up > before using ft_definetrial() ? It should look something like the example > at > http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials > > Best, > Steve Politzer-Ahles > > > Message: 2 >> Date: Mon, 8 Oct 2012 19:43:39 -0400 >> From: Jose Herrero >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] import .cnt file >> Message-ID: >> > GZCDZSWdgDciYFm0vKEg at mail.gmail.com> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> Dear FTrip users, >> >> matlab crashes when trying to import a .cnt data file using >> cfg=ft_definetrial(cfg). >> >> my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so >> this is not the problem >> >> cfg=[]; >> cfg.dataset='ab001002012.cnt' >> error in loadcnt.m (line 551) because nevents=0.125 such that >> ev2(nevents).stimtype=[] cannot exist! >> in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 >> because r.ldnsamples=1....why? >> >> other question is about the type of file cfg.dataset gets. I only have one >> raw data file (e.g. 'ab001002012.cnt') while the others have already been >> filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua >> and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a >> similar error. >> >> any ideas? >> Jose H. >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121008/4c49ba3a/attachment-0001.html >> > >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Jose L Herrero, PhD Department of Psychiatry Columbia University College of Physicians and Surgeons Cognitive Neuroscience and Schizophrenia Program Nathan S. Kline Institute for Psychiatric Research -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregory.Perry at govirtual.tv Wed Oct 10 01:00:56 2012 From: Gregory.Perry at govirtual.tv (Gregory Perry) Date: Tue, 9 Oct 2012 23:00:56 +0000 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> References: <718DFA7882181D45B8BD18F31C46D554215A0639@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0702@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0723@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0759@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0843@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> Message-ID: <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> Something of interest for the list members; I've been working on this photic stimulation system for about a year now, to facilitate EEG-research and experimentation using an alternative to conventional visual cortex-based photic stimulation systems. This method involves only the ear canal: http://www.indiegogo.com/GoVirtualCognition?a=1579195 http://www.quirky.com/ideations/320242 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Oct 10 09:01:33 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 10 Oct 2012 09:01:33 +0200 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> References: <718DFA7882181D45B8BD18F31C46D554215A0639@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0702@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0723@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0759@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0843@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> Message-ID: Dear Gregory, Thank you for this mightily interesting invention, which has the potential to revolutionize EEG research. However, I am still a bit puzzled as to the mechanism of action. By what route do you imagine the stimulators would entrain brain activity? Any references describing photoreceptors in the ear canal would be very helpful. All the best, Eelke Spaak On 10 October 2012 01:00, Gregory Perry wrote: > Something of interest for the list members; I've been working on this photic > stimulation system for about a year now, to facilitate EEG-research and > experimentation using an alternative to conventional visual cortex-based > photic stimulation systems. This method involves only the ear canal: > > http://www.indiegogo.com/GoVirtualCognition?a=1579195 > http://www.quirky.com/ideations/320242 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Markus.Butz at uni-duesseldorf.de Wed Oct 10 11:04:48 2012 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Wed, 10 Oct 2012 10:04:48 +0100 Subject: [FieldTrip] ft_volumerealign In-Reply-To: <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> References: <7540f0d221800.507457a8@uni-duesseldorf.de> <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> Message-ID: <75e0a7de4b08.50754840@uni-duesseldorf.de> Dear Lilla thank you very much for your response. Swapping lpa and rpa does the trick. Now my brain looks much better. ;-) The extra zpoint does not really help and I had it already implemented in my initial code. All the best Markus Am 09.10.12, schrieb Lilla.Magyari at mpi.nl: > > hi Markus, > > When you use the ft_volumerealign function it doesn't necessarily will > show the right side of the brain on the right side of the image. > Orientation of the image depends on the coordinate system of the mri you > read in. > > I tried also align the template mri to the fiducials, and I got the same > problem as you (z+ going to inferior in the aligned volume), but when I > switched the lpa with the rpa the orientation was fine. So, my conclusion > is that the right side shows up on the left of the image when you use > ft_volumerealign. Therefore, you have to mark the lpa on the right side > of the image and the rpa on the left side of the image. But there is also > another option implemented exactly because of this left/right flipping: > You can determine also a "z-point" (by pressing z in the image) that can > be anywhere at the top of the head. Then, the function will give you the > right alignment even if you did not determine the lpa and rpa on the > right side of the brain. > For this, you just have to do this: > cfg.fiducial.zpoint = [i j k], position of zpoint > when you also determine the positions for the nasion, lpa and rpa. > > And one more remark: I do not know if you have realized this yourself, and > I have just misunderstood your email: When you call ft_volumerealign in > interactive mode like this: > > cfg=[]; > cfg.method='interactive'; > mri_realigned=ft_volumerealign(cfg,mri); > > And you press the keys r/l/n/z at the right places in the volume (and quit > with q), the output (mri_realigned) will be the already aligned volume, > you do not need to call ft_volumerealign again with method 'fiducials'. > > Best, > Lilla > > > Dear list > > > > when running ft_volumerealign with the spm template MRI in the interactive > > mode, I get something like: > > > > > > ===========================================================================voxel > > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm > > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 > > 80.000000 -52.000000] > > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 > > -20.000000 -52.000000] > > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 > > -20.000000 -52.000000] > > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 > > -20.000000 96.000000] > > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB > > > > > > Now I would like to rerun it in the fiducial mode, using the above > > information. > > According to help, I need to do this: > > > > > > For realigning to the fiducials, you should specify the position of > > the fiducials in voxel indices. > > cfg.fiducial.nas = [i j k], position of nasion > > cfg.fiducial.lpa = [i j k], position of LPA > > cfg.fiducial.rpa = [i j k], position of RPA > > > > > > > > I used the voxel indices (code below), but ended up with the MRI > > upside-down (see attached picture). > > Trying the landmark mode was also without success. > > > > > > Am I doing something silly here? > > > > > > > > Thanks in advance > > Markus > > > > > > > > > > % Load SPM8 T1 template > > > > > > template = '/Documents/MATLAB/spm8/templates/T1.nii'; > > > > > > template_mri = ft_read_mri(template); > > > > > > disp(template_mri) > > > > > > > > > > > > % 2. Realign the coordinate system > > > > > > cfg = []; > > > > > > cfg.method = 'fiducial'; % 'interactive'; > > > > > > cfg.fiducial.nas = [46 104 11]; > > > > > > cfg.fiducial.lpa = [5 54 11]; > > > > > > cfg.fiducial.rpa = [85 54 12]; > > > > > > cfg.fiducial.zpoint= [46 54 85]; > > > > > > cfg.coordsys = 'ctf'; > > > > > > template_mri_realigned = ft_volumerealign(cfg, template_mri); > > > > > > > > > > > > > > > > > > > > % 3. Check the coordinate system > > > > > > cfg = []; > > > > > > cfg.interactive = 'yes'; > > > > > > template_mri_checked = ft_determine_coordsys(template_mri_realigned); > > > > > > _______________________________________________ > > 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 Gregory.Perry at govirtual.tv Wed Oct 10 15:42:34 2012 From: Gregory.Perry at govirtual.tv (Gregory Perry) Date: Wed, 10 Oct 2012 13:42:34 +0000 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: Message-ID: <718DFA7882181D45B8BD18F31C46D554215A0F5A@MBX204.domain.local> I am not aware of any photoreceptors in the ear canal, and I am not quite sure exactly why this method works the way it does. Different wavelengths at varying intensities focused into the ear canal evoke different brainwave responses, and the effects are quite dramatic - insert a light source into the ear and an immediate response is seen on the EEG FFT analysis and charting output, remove the pulsing light source and it immediately does away. I do not currently have access to an fMRI setup so I cannot say with any level of accuracy which major cortexes are directly implicated beyond associating the 10/20 region/scalp electrode that is reporting back strong FFT activity. The light sources are optically coupled with light pipes so I believe electromagnetic interference with the scalp electrodes can be safely ruled out. The light pipes are insulated with 1mm black jackets and with only about 2mm of light pipe exposed inside the ear canal, so I think that side channel light from the ear receptacles themselves can be safely ruled out as influencing the EEG charting via the visual cortex as well. So far my best guestimate is that light projected through the inner ear is close enough to the brain to permeate through any obstructing tissue, depending on the intensity and wavelength of light being used. Green and blue seem to be the dominant wavelengths in terms of the measured EEG responses I've observed so far. More testing is needed from a diverse user base, hence the Indiegogo crowdsourced funding project to develop an open source experimentation platform for widespread community participation in testing of this method of brainwave stimulation. I will be posting more detailed screencasts illustrating the EEG FFT results in the upcoming days; the strongest responses so far are in the delta band which is strange as well. ----- Original Message ----- From: Eelke Spaak [mailto:eelke.spaak at donders.ru.nl] Sent: Wednesday, October 10, 2012 03:01 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Eyes-open EEG stimulation via the ear canals Dear Gregory, Thank you for this mightily interesting invention, which has the potential to revolutionize EEG research. However, I am still a bit puzzled as to the mechanism of action. By what route do you imagine the stimulators would entrain brain activity? Any references describing photoreceptors in the ear canal would be very helpful. All the best, Eelke Spaak On 10 October 2012 01:00, Gregory Perry wrote: > Something of interest for the list members; I've been working on this photic > stimulation system for about a year now, to facilitate EEG-research and > experimentation using an alternative to conventional visual cortex-based > photic stimulation systems. This method involves only the ear canal: > > http://www.indiegogo.com/GoVirtualCognition?a=1579195 > http://www.quirky.com/ideations/320242 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Wed Oct 10 19:26:07 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Wed, 10 Oct 2012 19:26:07 +0200 (CEST) Subject: [FieldTrip] dipole position and moment Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From yoniilevy at gmail.com Thu Oct 11 16:55:06 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 11 Oct 2012 16:55:06 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Hi All, I am trying to locate a source using beamforming to a short lasting (during 100ms) oscillatory (frequency=28Hz) effect that I find at the sensor level. The thing is that because of the short time window, the frequency smoothing is bound to be high, whereas I would like to limit it as much as possible; not to mention that because trial length varies across subjects and trials, 100ms is the maximal window, but in truth segments are shorter. Any idea of how I could beamform on such short time window? Thanks in advance for any ideas, Yoni On Fri, Oct 5, 2012 at 12:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Frequency smoothing for beamforming (J?rn M. Horschig) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 05 Oct 2012 08:56:27 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Frequency smoothing for beamforming > Message-ID: <506E849B.7050602 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Yoni, > > Stephen is right, and just to make this really clear, a Hanning taper > will always give you a smoothing of your Raleigh frequency (which in > your case is 3.33Hz). Any taper can only (effectively) smooth in terms > of your frequency resolution or Raleigh frequency, thus a Hann taper > gives you the minimal smoothing (apart from a boxcar). Then, the problem > with different trial becomes more apparent, because since the frequency > resolution changes, also the smoothing of the Hanning taper changes > accordingly. I also think that making the trials having equal length is > the best approach. Having unequal trial lengths also constitutes a > problem for multitapering, cause you will end up with different tapers > and different number of tapers per trial. And also your frequency > smoothing should be a multiple of the Raleigh frequency. You can ask for > other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you > will see the smoothing at 6.66 or 9.99Hz (depending on where you define > the end of smoothing) - it's just because you sample in 3.33Hz steps. > Here you can maybe also see, that having different trial lengths might > constitute a problem, because you will effectively get different > smoothing per trial, depending on your Raleigh frequency. The > computation of the tapers was however correct, so with 8Hz smoothing and > a 0.3s time window you get 3 tapers ;) Btw, I once played around with it > and realized that the 3 tapers you obtain are not always the same for > different parameters, e.g. for 8Hz and 0.25s window you will also get > 8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you > get with a 0.3s time window. So even that can cause a problem. > > Btw, I never heard that different frequency smoothing ends up in > different part of the brain when beaming. The only reason I can see is > what Stephen already pointed out, that other frequency bands with > different functional characteristics smear into your power spectrum. > > Best, > J?rn > > > > > On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote: > > Hi Yoni, > > > > Indeed, a simple hanning taper will already give you a frequency > > smoothing of +/- 3Hz. Adding tapers can only increase this, and I > > don't see why you would beamform 22 to 38 Hz if you are interested > > between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper > > = 'hanning', giving you a measure of power between of about 27 and 33? > > > > You're right that having different trial lenghts will indeed give you > > a different frequency resolution per trial. If this is a problem is > > hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial > > would indeed make sure they are all of the same length (i.e. the > > maximal length) - but if that is different between subjects/conditions > > that might not be enough. > > > > Best, > > Stephen > > > > > > > > On 4 October 2012 11:56, Yoni Levy > > wrote: > > > > Hi Stephen! > > Thanks for your reply. > > > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > > smoothing should now be of +/-3.33Hz. If I use a hanning taper, > > the parameters that i use for the freqanal (for further on doing > > beamformer-statistics) are: > > cfg.method ='mtmfft'; > > cfg.output ='fourier'; > > cfg.keeptrials = 'yes'; > > cfg.keeptapers = 'yes'; > > cfg.taper = 'hanning'; > > cfg.foilim = [29 31]; > > However, if I get it right, multitapering should also be an option > > as 30Hz is not a relatively very low frequency. In that case, i > > remove the hanning and instead include a cfg.tapsmofrq =8, so that > > the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? > > > > Also, about the time window which is theoretically 300ms, but i > > think this depends on the length of every trial; for instance, > > before freqanal, when i redefine the trial, i input cfg.minlength > > = 'maxperlen'. So if i alter that, the freq smoothing should be > > different as well, correct? Ye, anyway, I wonder how to optimize > > all those parameters for my source localization statistics. > > > > Thanks in advance, > > > > Yoni > > > > > > On Wed, Oct 3, 2012 at 3:55 PM, > > wrote: > > > > > > Hi Yoni! > > > > The extend of the smoothing, I would say, is under normal > > circumstances > > simply what you > > request as a smoothing paramater (given the dpss > > characteristics), so I > > don't understand > > that formulation exactly. > > > > If different smoothings give drastically different result you > > might be > > sampling > > frequencies that behave differently from your frequency of > > interest. In > > your case, e.g. > > perhaps you are adding alpha in your estimate that might > > behave differently > > in your > > paradigm? > > > > I would therefor try to first figure out if your effect is, in > > fact, > > frequency specific > > and try to not to smooth more than necessary to capture that > > effect. So > > starting with no > > (extra) smoothing and looking at the TFR for instance. A > > simple FFT would > > give you a > > frequency smoothing of +/- 1/datalength already (e.g. half a > > second would > > be +/- 2 Hz). > > Simply averaging over frequencies (estimated with a Hanning > > taper) instead > > of using the > > slepian tapers might be a better option. > > > > Then again, you are limited in frequency specificity by the > > length of the > > data on which > > you calculate them. If that is too short you might have > > suboptimal and > > unexpected > > effects. In the case of slepian filters make sure you have at > > least a > > minimum of 3 tapers > > (which is shown in the output of freqanalysis). > > > > There is a lot more to say about tapers, smoothing etc, but I > > hope this > > helps. > > > > All the best, > > Stephen > > > > On 3 October 2012 15:14, Yoni Levy > > wrote: > > > > > Dear Fieldtrippers, > > > > > > I am trying to locate the source of an oscillatory effect at > > the frequency > > > of 30Hz in a time window of interest. > > > Before running the ft_sourceanalysis function, I run a > > ft_freqanalysis > > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > > My question is whether there is any rule of thumb by which I > > could > > > reliably determine the extent of the smoothing? > > > I found out that even small changes in the 'tapsmofrq' value, > > > significantly alter the spatial localization of the > > resulting sources. > > > For instance, a tapsmofreq value of 8 would point to an > > effect in the > > > frontal lobe, whereas a value of 10 would point to an effect > > in the > > > parietal lobe. > > > > > > Any advice would be appreciated. > > > > > > Yoni > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121005/aed5f036/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 23, Issue 6 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Oct 12 09:23:44 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Fri, 12 Oct 2012 09:23:44 +0200 (CEST) Subject: [FieldTrip] help with dipole position and dipole moment Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From f.roux at bcbl.eu Wed Oct 17 15:17:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Wed, 17 Oct 2012 15:17:24 +0200 (CEST) Subject: [FieldTrip] help with dipole position and orientation Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From Maximilian.Bruchmann at uni-muenster.de Thu Oct 18 15:55:53 2012 From: Maximilian.Bruchmann at uni-muenster.de (Maximilian Bruchmann) Date: Thu, 18 Oct 2012 15:55:53 +0200 Subject: [FieldTrip] Problem with visualizing individual minimum source activity (ft_plot_mesh, ft_sourcemovie, ft_sourceplot) Message-ID: Dear FieldTrippers, there used to be a very convenient way to get a look at individual mne source reconstructions using either ft_plot_mesh or ft_sourcemovie, but both no longer seem to work. When I follow the minimum norm estimate tutorial up to the point of visualization the code that worked fine some weeks ago now produces the following errors: cfg=[]; cfg.method = 'mne'; cfg.grid.leadfield = leadfield; cfg.vol = vol; cfg.mne.lambda = 1e11; myMne = ft_sourceanalysis(cfg,timeLock); bnd.pnt = sourcespace.pnt; bnd.tri = sourcespace.tri; m=myMne.avg.pow(:,450); ft_plot_mesh(bnd, 'vertexcolor', m); produces the error: Error using ft_plot_mesh (line 191) Unknown color As it seems, 'vertexcolor' accepts only a single RGB triplet. In fact, none of the options of ft_plot_mesh seems to support the visualization of functional data anymore, am I right? The other way using ft_sourcemovie used to work fine like this: figure myMne.tri = sourcespace.tri; cfg = []; cfg.alim = [0 8e-14]; cfg.zlim = [0 4e-13]; cfg.maskparameter = 'avg.pow'; ft_sourcemovie(cfg,myMne); But now it produces the warning Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering and I get an empty figure window. I tried ft_sourceplot: cfg = []; cfg.method = 'surface'; cfg.funparameter = 'avg.pow'; ft_sourceplot(cfg,myMne); but irrespective of the method I get Error using ft_sourceplot (line 188) the input data needs to be defined on a regular 3D grid Any help on how I can view my source reconstruction results as a colored source space model would be very appreciated! Thanks in advance! Best, Max From akiko.ikkai at gmail.com Thu Oct 18 22:29:37 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 18 Oct 2012 16:29:37 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Everyone, Thank you very much for your advise. I just came back from SfN, and just found your replies, so I will test these options and report back what I find. Thank you again! Akiko On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Akiko! > > Just to chime in - your source grid is very, very large indeed! ALthough I > started with a very fine grid, at one point I also had to downside it > (going to 5mm), and had to stop using interpolated source data for stats > and the like. Johanna's suggestion will certainly do the trick and it will > speed up your analysis enormously as well. You then only need to do > interpolate for plotting purposes. > > all the best, > Stephen > > > On 8 October 2012 12:02, Johanna Zumer wrote: > >> Hi Akiko, >> >> In addition to Saskia's comment (which is very useful!) remember also >> that if you create the subject's grid from the warped MNI template grid >> (explained here >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >> then you can keep each subject's source data in a 'source' structure with >> .pos field and still do group level statistics, without need to convert to >> 'volume' structure which upsamples the spatial resolution perhaps >> artificially too high. >> >> Cheers, >> Johanna >> >> >> 2012/10/7 Akiko Ikkai >> >>> Hi Saskia, >>> >>> Thank you for the quick advise! Removing cfg definitely works well. Each >>> of the group data is now 1.3G (I also used "single" to convert everything >>> into single precision), which is definitely manageable. Computation time >>> has also been reduced to 3 times less now. >>> >>> Thanks! Akiko >>> >>> >>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >>> >>>> Hi Akiko, >>>> >>>> In my experience with grandavg source structs, sometimes the cfg >>>> (that's attached to the data struct) becomes very large and can >>>> consume a considerable amount of memory. I'm not sure if that's the >>>> case/problem here, but might be worth checking and removing the cfg. >>>> You could even use checkconfig to cleanup your cfg with: >>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>> Hope this helps! >>>> >>>> Best, >>>> Saskia >>>> >>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>> wrote: >>>> > Dear Fieldtrip users, >>>> > >>>> > I've been trying to run group stats on my EEG source data, which >>>> contains 14 >>>> > subjects' normalized beamformer data, and having serious swap memory >>>> issue >>>> > (not Matlab memory issue, but OS swap memory). >>>> > >>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>> subject's >>>> > normalized beamformer data (1 condition) is >>>> > >>>> > source_lTMI_intNorm = >>>> > >>>> > anatomy: [181x217x181 double] >>>> > >>>> > inside: [181x217x181 logical] >>>> > >>>> > avg: [1x1 struct] >>>> > >>>> > transform: [4x4 double] >>>> > >>>> > dim: [181 217 181] >>>> > >>>> > cfg: [1x1 struct] >>>> > >>>> > >>>> >>whos >>>> > >>>> > >>>> > >>>> > Name Size Bytes Class >>>> Attributes >>>> > >>>> > source_lTMI_intNorm 1x1 520114791 struct >>>> > >>>> > >>>> > therefore, when I open all subjects' data ("data1group" and >>>> "data2group"), >>>> > it's huge... >>>> > >>>> > Name Size Bytes Class Attributes >>>> > >>>> > data1group 1x14 5909429438 cell >>>> > >>>> > data2group 1x14 6705652782 cell >>>> > >>>> > >>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>> Therefore, >>>> > >>>> >>data1group{1} >>>> > >>>> > anatomy: [181x217x181 double] >>>> > >>>> > inside: [181x217x181 logical] >>>> > >>>> > avg: [1x1 struct] >>>> > >>>> > transform: [4x4 double] >>>> > >>>> > dim: [181 217 181] >>>> > >>>> > cfg: [1x1 struct] >>>> > >>>> > So, when I try to run >>>> > >>>> > cfg=[]; >>>> > >>>> > cfg.dim = data1group{1}.dim; >>>> > >>>> > cfg.method = 'montecarlo'; >>>> > >>>> > cfg.statistic = 'depsamplesT'; >>>> > >>>> > cfg.parameter = 'avg.pow'; >>>> > >>>> > cfg.correctm = 'cluster'; >>>> > >>>> > cfg.numrandomization = 100; >>>> > >>>> > cfg.alpha = 0.05; >>>> > >>>> > cfg.tail = 0; >>>> > >>>> > nsubj=length(data1group); >>>> > >>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>> > >>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>> > >>>> > cfg.uvar = 1; >>>> > >>>> > cfg.ivar = 2; >>>> > >>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>> > >>>> > stat.anatomy = data1group{1}.anatomy; >>>> > >>>> > >>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>> > memory?), which forces me to quit Matlab. I'm running above processes >>>> in a >>>> > function, so I'm not running into Matlab memory error. >>>> > >>>> > Could someone help me how it could run more efficiently? I guess >>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>> > eventually load 2 group data in Matlab workspace...? >>>> > >>>> > Thank you in advance! Akiko >>>> > >>>> > -- >>>> > Akiko Ikkai, Ph.D. >>>> > Postdoctoral Fellow >>>> > Department of Psychological and Brain Sciences >>>> > Johns Hopkins University >>>> > Ames Hall, 3400 N. Charles St. >>>> > Baltimore, MD 21218 >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>>> >>> >>> >>> >>> -- >>> Akiko Ikkai, Ph.D. >>> Postdoctoral Fellow >>> Department of Psychological and Brain Sciences >>> Johns Hopkins University >>> Ames Hall, 3400 N. Charles St. >>> Baltimore, MD 21218 >>> >>> >>> >>> _______________________________________________ >>> 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Fri Oct 19 11:46:34 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 19 Oct 2012 11:46:34 +0200 Subject: [FieldTrip] problem with ft_freqanalysis Message-ID: Dear all, I have one problem with the ft_freqanalysis. When I calculate time-frequency analysis with the Hanning taper everything works ok, but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I get empty plots. You can check that in the attached image. However, when I calculate time-frequency with the multitapers plot looks fine. Here is my problematic code: %Hanning taper cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.toi = -0.5:0.05:1.5; % time window "slides" from -0.5 to 1.5 sec in steps of 0.05 sec cfg.polyremoval = -1; wr11_freq = ft_freqanalysis(cfg, data_clean); cfg = []; cfg.baseline = [-0.2 -0.1]; cfg.baselinetype = 'absolute'; cfg.zlim = [-4e-29 1e-28]; cfg.showlabels = 'yes'; cfg.layout = 'CTF275.lay'; cfg.colorbar= 'yes'; cfg.interactive= 'yes'; cfg.hotkeys = 'yes'; figure ft_multiplotTFR(cfg, wr11_freq); Please help! Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: empty.jpg Type: image/jpeg Size: 124582 bytes Desc: not available URL: From jm.horschig at donders.ru.nl Fri Oct 19 12:13:32 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 19 Oct 2012 12:13:32 +0200 Subject: [FieldTrip] problem with ft_freqanalysis In-Reply-To: References: Message-ID: <508127CC.7000002@donders.ru.nl> Hey Nenad, the problem is simply that in the beginning of your TFR there are nans and you are using that part as a baseline. You cannot have a 0.5s timewindow at t=-0.5s up until t=0s when your preprocessed data starts at t=-0.5s, you would need preprocessed starting at -1s. When plotting, you chose to use a baseline which starts within the nan area, so all your data will be substracted with nans resulting in nans itself. Three solution possible: 1) Use a baseline outside the nan area (for you t>=0) 2) Re-do your processing starting at t=-1s or 3) Use shorter time windows for your freq analysis of only 300ms (because then your baseline starting at 200ms would work, since 500-300 = 200) I'd recommend the second one - always use data padding when doing analysis. Best regards, Jörn On 10/19/2012 11:46 AM, Nenad Polomac wrote: > Dear all, > > I have one problem with the ft_freqanalysis. When I calculate > time-frequency analysis with the Hanning taper everything works ok, > but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I > get empty plots. You can check that in the attached image. However, > when I calculate time-frequency with the multitapers plot looks fine. > Here is my problematic code: > > > %Hanning taper > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time > window = 0.5 sec > cfg.toi = -0.5:0.05:1.5; % time window > "slides" from -0.5 to 1.5 sec in steps of 0.05 sec > cfg.polyremoval = -1; > wr11_freq = ft_freqanalysis(cfg, data_clean); > > > cfg = []; > cfg.baseline = [-0.2 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.zlim = [-4e-29 1e-28]; > cfg.showlabels = 'yes'; > cfg.layout = 'CTF275.lay'; > cfg.colorbar= 'yes'; > cfg.interactive= 'yes'; > cfg.hotkeys = 'yes'; > figure > ft_multiplotTFR(cfg, wr11_freq); > > Please help! > Thank you in advance! > > Nenad > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Fri Oct 19 13:03:58 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 19 Oct 2012 13:03:58 +0200 Subject: [FieldTrip] problem with ft_freqanalysis Message-ID: Dear Jörn, Thank you very much! You solved my problem :) All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.schubert at uni-hamburg.de Fri Oct 19 13:23:09 2012 From: jonathan.schubert at uni-hamburg.de (Jonathan Schubert) Date: Fri, 19 Oct 2012 13:23:09 +0200 Subject: [FieldTrip] TFR with mtmconvol Message-ID: Dear all, I have a question regarding frequency analysis using the multitaper approach. I transformed my data using the following code: cfg = []; cfg.channel = 'all'; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 40:1:100; cfg.toi = -1.0:0.02:1.0; cfg.t_ftimwin = 7./cfg.foi; cfg.tapsmofrq = cfg.foi*0.4; cfg.pad = 'maxperlen'; cfg.keeptrials = 'no'; freq = ft_freqanalysis(cfg, data); When I plot the TFR it looks strange in a similiar way to what I found on the fieldtrip homepage: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange Following the help on the homepage did not improve the outcome. I attached an example of my TFR. What can I do to improve the outcome of the frequency analysis? Best, Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample_pic.jpg Type: image/jpeg Size: 38461 bytes Desc: not available URL: From r.vandermeij at donders.ru.nl Fri Oct 19 13:50:56 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 19 Oct 2012 13:50:56 +0200 Subject: [FieldTrip] TFR with mtmconvol In-Reply-To: References: Message-ID: Hi Jonathan, This indeed looks like a bleeding in of the 0Hz component. How did you exactly follow the help on the wiki? Could you post your entire analysis pipeline? (i.e. your call to ft_preprocessing, your call to ft_singleplotTFR, baselining that you do, etc.). That would help in diagnosing the problem. All the best, Roemer On Fri, Oct 19, 2012 at 1:23 PM, Jonathan Schubert < jonathan.schubert at uni-hamburg.de> wrote: > Dear all, > > I have a question regarding frequency analysis using the multitaper > approach. I transformed my data using the following code: > > cfg = []; > cfg.channel = 'all'; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.foi = 40:1:100; > cfg.toi = -1.0:0.02:1.0; > cfg.t_ftimwin = 7./cfg.foi; > cfg.tapsmofrq = cfg.foi*0.4; > cfg.pad = 'maxperlen'; > cfg.keeptrials = 'no'; > freq = ft_freqanalysis(cfg, data); > > When I plot the TFR it looks strange in a similiar way to what I found on > the fieldtrip homepage: > http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > Following the help on the homepage did not improve the outcome. I attached > an example of my TFR. > > What can I do to improve the outcome of the frequency analysis? > > Best, > Jonathan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.schubert at uni-hamburg.de Fri Oct 19 16:20:46 2012 From: jonathan.schubert at uni-hamburg.de (Jonathan Schubert) Date: Fri, 19 Oct 2012 16:20:46 +0200 Subject: [FieldTrip] TFR with mtmconvol In-Reply-To: References: Message-ID: Hi Roemer, I did the preprocessing with eeglab. I'm going to include the eeglab commands at the end of this mail. So first the fieldtrip commands only: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % reading in the data from eeglab [data]=eeglab2fieldtrip(EEG, 'preprocessing', 'none'); % This step is from the fieldtrip wiki cfg = []; cfg.demean = 'yes'; data = ft_preprocessing(cfg, data); % frequency analysis cfg = []; cfg.channel = 'all'; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 40:1:100; cfg.toi = -1.0:0.02:1.0; cfg.t_ftimwin = 7./cfg.foi; cfg.tapsmofrq = cfg.foi*0.4; cfg.pad = 'maxperlen'; cfg.keeptrials = 'no'; freq = ft_freqanalysis(cfg, data); % baseline correction -300 to -100 ms base = freq; bix = find(freq.time < -0.1 & freq.time >-0.3); totalbase = repmat(nanmean(freq.powspctrm(:,:,bix),3),[1,1,length(freq.time)]); freq.powspctrm = 100 * ((freq.powspctrm-totalbase)./totalbase); % plotting the results lay = ft_prepare_layout(freq); figure cfg = []; cfg.layout = lay; cfg.interactive = 'yes'; cfg.marker = 'labels'; cfg.channel = {'M_4'}; cfg.xparam = 'time'; cfg.yparam = 'freq'; cfg.zparam = 'powspctrm'; cfg.xlim = [-0.3 1.0]; cfg.zlim = 'maxabs' ; ft_singleplotTFR (cfg, freq); %%%%%%%%%%%%%%%%%%%%%%%%% % So here is what I did with eeglab, before calling the eeglab2fieldtrip % reading in data EEG = pop_loadset('filename',[setname, '.set'],'filepath', pathname); [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'setname', setname); % edit channels and reading in their locations and set reference EEG=pop_chanedit(EEG, 'load',{'E:\\E176_data\\TF_Matlab_scripts\\electrode_pos61.elp' 'filetype' 'autodetect'},'append',64,'changefield',{65 'labels' 'ref_right_ear'},'setref',{'1:64' 'ref_right_ear'}); [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); EEG = eeg_checkset( EEG ); % lowpass filter EEG = pop_eegfilt( EEG, 0, 110, [], [0]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % change sampling rate to 250Hz EEG = pop_resample( EEG, 250); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % highpass filter EEG = pop_eegfilt( EEG, 0.3, 0, [], [0]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % re-referencing to linked earlobe reference EEG = pop_reref( EEG, [],'refloc',struct('type',{''},'labels',{'ref_ear_right'},'radius',{0.65556},'sph_theta',{-90},'sph_phi',{-28},'theta',{90},'sph_radius',{1},'X',{5.4065e-017},'Y',{-0.88295},'Z',{-0.46947},'ref',{''},'urchan',{65})); EEG = pop_reref( EEG, [62 65] ); % run ICA EEG = pop_runica(EEG, 'extended',1,'chanind', [1:61],'stop',1e-007,'maxsteps',600); % Identification of components reflecting eyeblinks and -movements, % heartbeat, noise is done by hand % get rid of artifact components artcomp = sort([EEG.artifact.eyeblink, EEG.artifact.noise, EEG.artifact.heyem, EEG.artifact.ecg]); EEG = pop_subcomp(EEG, artcomp, 0); EEG = pop_saveset(EEG, savename, pathname); [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); %notch filter to take out the electrical %current at 50 HZ and 100 Hz EEG = pop_eegfilt( EEG, 49, 51, [], [1]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); EEG = pop_eegfilt( EEG, 99, 101, [], [1]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % epoching the data and removing thresh = 100; condition = {'111'}; for j=1:length(condition) EEG = pop_loadset('filename', savename,'filepath', pathname); EEG = pop_epoch( EEG, {condition{j}}, [-1.0 1.2], 'newname', ['L' subject{i},' resampled pruned with ICA epochs'], 'epochinfo', 'yes'); EEG = pop_rmbase( EEG, [-100 0]); [EEG, Ind1] = pop_eegthresh( EEG, 1, [1:61], -thresh, thresh, -0.5, 0.5, 0, 1); % get rid of artifacts end % re-referencing to avg reference: do not use EOG channels for average reference EEG = pop_select( EEG, 'nochannel',[62 63]); % re-reference to average reference EEG = pop_reref(EEG, []); Best, Jonathan 2012/10/19 Roemer van der Meij > Hi Jonathan, > > This indeed looks like a bleeding in of the 0Hz component. How did you > exactly follow the help on the wiki? Could you post your entire analysis > pipeline? (i.e. your call to ft_preprocessing, your call to > ft_singleplotTFR, baselining that you do, etc.). That would help in > diagnosing the problem. > > All the best, > Roemer > > > On Fri, Oct 19, 2012 at 1:23 PM, Jonathan Schubert < > jonathan.schubert at uni-hamburg.de> wrote: > >> Dear all, >> >> I have a question regarding frequency analysis using the multitaper >> approach. I transformed my data using the following code: >> >> cfg = []; >> cfg.channel = 'all'; >> cfg.output = 'pow'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 40:1:100; >> cfg.toi = -1.0:0.02:1.0; >> cfg.t_ftimwin = 7./cfg.foi; >> cfg.tapsmofrq = cfg.foi*0.4; >> cfg.pad = 'maxperlen'; >> cfg.keeptrials = 'no'; >> freq = ft_freqanalysis(cfg, data); >> >> When I plot the TFR it looks strange in a similiar way to what I found on >> the fieldtrip homepage: >> http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange >> Following the help on the homepage did not improve the outcome. I >> attached an example of my TFR. >> >> What can I do to improve the outcome of the frequency analysis? >> >> Best, >> Jonathan >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Roemer van der Meij M.Sc. > PhD Candidate > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3655932 > E-mail: r.vandermeij at donders.ru.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Jonathan Schubert University of Hamburg Biological Psychology and Neuropsychology Von-Melle-Park 11, Room 301 D-20146 Hamburg Germany - Phone: (49) 40 - 42838 7626 Fax: (49) 40 - 42838 6591 jonathan.schubert at uni-hamburg.de www.bpn.uni-hamburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Sat Oct 20 00:10:07 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 19 Oct 2012 18:10:07 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi, So I have followed Johanna and Stephan's advise to create template_grid and each subject's grid from MNI image, which is now 1cm spacing instead of .5cm. These steps seem to run, and I'm able to create a common spatial filter to run beamformer using DICS. However, I get an error when I apply the commom filter to each condition. I had to tweak a few things on example on the page http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid , since my data is EEG and electrode locations vary between subjects, such that: cfg = []; cfg.grid.xgrid = -20:1:20; cfg.grid.ygrid = -20:1:20; cfg.grid.zgrid = -20:1:20; cfg.grid.tight = 'yes'; cfg.inwardshift = -1.5; cfg.vol = template_vol; *cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add this (got error otherwise)* template_grid = ft_prepare_sourcemodel(cfg); then cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri_aligned; *cfg.elec = ft_data.elec; **% individual sub's electrode locations: had to add this (got error otherwise)* grid = ft_prepare_sourcemodel(cfg); These create grids in MNI space, both for template and individual fine. To create a common spatial filter, I run the following command, which runs: cfg = []; cfg.grid.pos = grid.pos; cfg.grid.dim = grid.dim; cfg.grid.inside = grid.inside; cfg.grid.outside = grid.outside; cfg.inwardshift = -1.5; cfg.vol = vol_cm; cfg.channel = {'all'}; cfg.frequency = 10.5; cfg.method = 'dics'; cfg.dics.projectnoise = 'yes'; cfg.dics.keepfilter = 'yes'; cfg.dics.feedback = 'no'; source_common = ft_sourceanalysis(cfg, freq_common); however, when I apply this spatial filter to a task condition, I get an error message cfg = []; cfg.elec = freq_common.elec; cfg.grid.pos = source_common.pos; cfg.grid.filter = source_common.avg.filter; cfg.inwardshift = -1.5; cfg.vol = vol_cm; cfg.channel = {'all'}; cfg.frequency = 10.5; cfg.method = 'dics'; cfg.dics.projectnoise = 'yes'; cfg.dics.keepfilter = 'yes'; cfg.dics.feedback = 'no'; source_itemL = ft_sourceanalysis(cfg, freq_itemL); source_itemL.unit = 'cm'; ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> beamformer_dics at 316 csd = filt * Cf * ctranspose(filt); % Gross eqn. 4 and 5 Error in ==> ft_sourceanalysis at 588 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot where exactly the error is originating from. Am I missing some steps when I create template grids that I feed into ft_sourceanalysis? Thank you in advance for your help! Akiko On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai wrote: > Hi Everyone, > > Thank you very much for your advise. I just came back from SfN, and just > found your replies, so I will test these options and report back what I > find. > > Thank you again! Akiko > > > On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Hi Akiko! >> >> Just to chime in - your source grid is very, very large indeed! ALthough >> I started with a very fine grid, at one point I also had to downside it >> (going to 5mm), and had to stop using interpolated source data for stats >> and the like. Johanna's suggestion will certainly do the trick and it will >> speed up your analysis enormously as well. You then only need to do >> interpolate for plotting purposes. >> >> all the best, >> Stephen >> >> >> On 8 October 2012 12:02, Johanna Zumer wrote: >> >>> Hi Akiko, >>> >>> In addition to Saskia's comment (which is very useful!) remember also >>> that if you create the subject's grid from the warped MNI template grid >>> (explained here >>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >>> then you can keep each subject's source data in a 'source' structure with >>> .pos field and still do group level statistics, without need to convert to >>> 'volume' structure which upsamples the spatial resolution perhaps >>> artificially too high. >>> >>> Cheers, >>> Johanna >>> >>> >>> 2012/10/7 Akiko Ikkai >>> >>>> Hi Saskia, >>>> >>>> Thank you for the quick advise! Removing cfg definitely works well. >>>> Each of the group data is now 1.3G (I also used "single" to convert >>>> everything into single precision), which is definitely manageable. >>>> Computation time has also been reduced to 3 times less now. >>>> >>>> Thanks! Akiko >>>> >>>> >>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >>>> >>>>> Hi Akiko, >>>>> >>>>> In my experience with grandavg source structs, sometimes the cfg >>>>> (that's attached to the data struct) becomes very large and can >>>>> consume a considerable amount of memory. I'm not sure if that's the >>>>> case/problem here, but might be worth checking and removing the cfg. >>>>> You could even use checkconfig to cleanup your cfg with: >>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>>> Hope this helps! >>>>> >>>>> Best, >>>>> Saskia >>>>> >>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>>> wrote: >>>>> > Dear Fieldtrip users, >>>>> > >>>>> > I've been trying to run group stats on my EEG source data, which >>>>> contains 14 >>>>> > subjects' normalized beamformer data, and having serious swap memory >>>>> issue >>>>> > (not Matlab memory issue, but OS swap memory). >>>>> > >>>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>>> subject's >>>>> > normalized beamformer data (1 condition) is >>>>> > >>>>> > source_lTMI_intNorm = >>>>> > >>>>> > anatomy: [181x217x181 double] >>>>> > >>>>> > inside: [181x217x181 logical] >>>>> > >>>>> > avg: [1x1 struct] >>>>> > >>>>> > transform: [4x4 double] >>>>> > >>>>> > dim: [181 217 181] >>>>> > >>>>> > cfg: [1x1 struct] >>>>> > >>>>> > >>>>> >>whos >>>>> > >>>>> > >>>>> > >>>>> > Name Size Bytes Class >>>>> Attributes >>>>> > >>>>> > source_lTMI_intNorm 1x1 520114791 struct >>>>> > >>>>> > >>>>> > therefore, when I open all subjects' data ("data1group" and >>>>> "data2group"), >>>>> > it's huge... >>>>> > >>>>> > Name Size Bytes Class Attributes >>>>> > >>>>> > data1group 1x14 5909429438 cell >>>>> > >>>>> > data2group 1x14 6705652782 cell >>>>> > >>>>> > >>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>>> Therefore, >>>>> > >>>>> >>data1group{1} >>>>> > >>>>> > anatomy: [181x217x181 double] >>>>> > >>>>> > inside: [181x217x181 logical] >>>>> > >>>>> > avg: [1x1 struct] >>>>> > >>>>> > transform: [4x4 double] >>>>> > >>>>> > dim: [181 217 181] >>>>> > >>>>> > cfg: [1x1 struct] >>>>> > >>>>> > So, when I try to run >>>>> > >>>>> > cfg=[]; >>>>> > >>>>> > cfg.dim = data1group{1}.dim; >>>>> > >>>>> > cfg.method = 'montecarlo'; >>>>> > >>>>> > cfg.statistic = 'depsamplesT'; >>>>> > >>>>> > cfg.parameter = 'avg.pow'; >>>>> > >>>>> > cfg.correctm = 'cluster'; >>>>> > >>>>> > cfg.numrandomization = 100; >>>>> > >>>>> > cfg.alpha = 0.05; >>>>> > >>>>> > cfg.tail = 0; >>>>> > >>>>> > nsubj=length(data1group); >>>>> > >>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>>> > >>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>>> > >>>>> > cfg.uvar = 1; >>>>> > >>>>> > cfg.ivar = 2; >>>>> > >>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>>> > >>>>> > stat.anatomy = data1group{1}.anatomy; >>>>> > >>>>> > >>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>>> > memory?), which forces me to quit Matlab. I'm running above >>>>> processes in a >>>>> > function, so I'm not running into Matlab memory error. >>>>> > >>>>> > Could someone help me how it could run more efficiently? I guess >>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>>> > eventually load 2 group data in Matlab workspace...? >>>>> > >>>>> > Thank you in advance! Akiko >>>>> > >>>>> > -- >>>>> > Akiko Ikkai, Ph.D. >>>>> > Postdoctoral Fellow >>>>> > Department of Psychological and Brain Sciences >>>>> > Johns Hopkins University >>>>> > Ames Hall, 3400 N. Charles St. >>>>> > Baltimore, MD 21218 >>>>> > >>>>> > >>>>> > >>>>> > _______________________________________________ >>>>> > 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Akiko Ikkai, Ph.D. >>>> Postdoctoral Fellow >>>> Department of Psychological and Brain Sciences >>>> Johns Hopkins University >>>> Ames Hall, 3400 N. Charles St. >>>> Baltimore, MD 21218 >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Oct 20 14:32:16 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 20 Oct 2012 14:32:16 +0200 Subject: [FieldTrip] help with dipole position and orientation In-Reply-To: References: Message-ID: <722AE19C-4347-4804-A9AE-3443C7FBBD9B@donders.ru.nl> Hi Fred, > In a paper by Osipova et al. (2008) I read that the position can > be chosen based on the sensor array of a CTF system with respect > to head coordinates. > In this paper the dipole position was chose to be r = [-5 0 1] which > should correspond to a dipole close to the hemispheric midline and > in the occipital cortex. > > Can anyone tell me based on which data / how these coordinates were > chosen? I have been searching the grad structure of my data > for comparable info, but did not find anything. Neither did I looking > at cfg.layout.pos. Why would you want to look into the grad structure, or in the layout.pos? I guess the most straightforward would be to ask one of the authors of said paper why they chose the parameters. Very generally, I think that the coordinates were chosen based on knowledge with respect to the coordinate system. Indeed, the negative x-axis points to the back, and a y-coordinate of 0 represents the midline. > My second question concerns the dipole moment. > Am I right in assuming the following: > > cfg.dip.mom = [1 0 0] % dipole points towards NAS > cfg.dip.mpm = [-1 0 0] % dipole points away from NAS > > cfg.dip.mom = [0 1 0] % dipole points towards LPA > cfg.dip.mom = [0 -1 0]% dipole points towards RPA > > cfg.dip.mom = [0 0 1]% dipole points towards vertex > cfg.dip.mon = [0 0 -1]% dipole points away from vertex > Yes, that's correct. Best, Jan-Mathijs > Any help or suggestions would be highly appreciated. > > Best, > Fred > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Sat Oct 20 23:06:41 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Sat, 20 Oct 2012 23:06:41 +0200 (CEST) Subject: [FieldTrip] help with dipole position and orientation In-Reply-To: <722AE19C-4347-4804-A9AE-3443C7FBBD9B@donders.ru.nl> Message-ID: <2ebb2c59-67fe-4796-ba11-fc3ce3ed65e6@thalamus_p> Dear Jan-Mathijs, thank you for your response. Why would you want to look into the grad structure, or in the layout.pos? As I wrote in my question: In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. I thought that I could get some info out of grad.pos or cfg.layout.pos that would correspond to the head position with respect to the sensor array. I just don't know any better where to find / access these data. I think that the coordinates were chosen based on knowledge with respect to the coordinate system. Indeed, the negative x-axis points to the back, and a y-coordinate of 0 represents the midline. Great, but which coordinate system is it? And where in my data can I find similar information? Best Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Sun Oct 21 17:32:37 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Sun, 21 Oct 2012 17:32:37 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, Can you type 'dbstop if error' before running the last step, so that it goes to debug mode when it crashes there? What are the sizes of 'filt' and 'Cf' for the 40th position? Another thing to try is, during your last call to ft_sourceanalysis, cfg = []; cfg.grid = grid; cfg.grid.filter = source_common.avg.filter; so that all the .inside and .outside information is transfered as well. A note to all users: you can skip the first step by loading the precomuted template grids in */fieldtrip/template/sourcemodel. Cheers, Johanna 2012/10/20 Akiko Ikkai : > Hi, > > So I have followed Johanna and Stephan's advise to create template_grid and > each subject's grid from MNI image, which is now 1cm spacing instead of > .5cm. These steps seem to run, and I'm able to create a common spatial > filter to run beamformer using DICS. However, I get an error when I apply > the commom filter to each condition. > > I had to tweak a few things on example on the page > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > , since my data is EEG and electrode locations vary between subjects, such > that: > > cfg = []; > cfg.grid.xgrid = -20:1:20; > cfg.grid.ygrid = -20:1:20; > cfg.grid.zgrid = -20:1:20; > cfg.grid.tight = 'yes'; > cfg.inwardshift = -1.5; > cfg.vol = template_vol; > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add > this (got error otherwise) > template_grid = ft_prepare_sourcemodel(cfg); > > then > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.mri = mri_aligned; > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add > this (got error otherwise) > grid = ft_prepare_sourcemodel(cfg); > > These create grids in MNI space, both for template and individual fine. To > create a common spatial filter, I run the following command, which runs: > cfg = []; > cfg.grid.pos = grid.pos; > cfg.grid.dim = grid.dim; > cfg.grid.inside = grid.inside; > cfg.grid.outside = grid.outside; > cfg.inwardshift = -1.5; > cfg.vol = vol_cm; > cfg.channel = {'all'}; > cfg.frequency = 10.5; > cfg.method = 'dics'; > cfg.dics.projectnoise = 'yes'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.feedback = 'no'; > source_common = ft_sourceanalysis(cfg, freq_common); > > however, when I apply this spatial filter to a task condition, I get an > error message > cfg = []; > cfg.elec = freq_common.elec; > cfg.grid.pos = source_common.pos; > cfg.grid.filter = source_common.avg.filter; > cfg.inwardshift = -1.5; > cfg.vol = vol_cm; > cfg.channel = {'all'}; > cfg.frequency = 10.5; > cfg.method = 'dics'; > cfg.dics.projectnoise = 'yes'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.feedback = 'no'; > source_itemL = ft_sourceanalysis(cfg, freq_itemL); > source_itemL.unit = 'cm'; > > ??? Error using ==> mtimes > Inner matrix dimensions must agree. > > Error in ==> beamformer_dics at 316 > csd = filt * Cf * ctranspose(filt); % Gross > eqn. 4 > and 5 > > Error in ==> ft_sourceanalysis at 588 > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot > where exactly the error is originating from. Am I missing some steps when I > create template grids that I feed into ft_sourceanalysis? > > Thank you in advance for your help! Akiko > > > On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai wrote: >> >> Hi Everyone, >> >> Thank you very much for your advise. I just came back from SfN, and just >> found your replies, so I will test these options and report back what I >> find. >> >> Thank you again! Akiko >> >> >> On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh >> wrote: >>> >>> Hi Akiko! >>> >>> Just to chime in - your source grid is very, very large indeed! ALthough >>> I started with a very fine grid, at one point I also had to downside it >>> (going to 5mm), and had to stop using interpolated source data for stats and >>> the like. Johanna's suggestion will certainly do the trick and it will speed >>> up your analysis enormously as well. You then only need to do interpolate >>> for plotting purposes. >>> >>> all the best, >>> Stephen >>> >>> >>> On 8 October 2012 12:02, Johanna Zumer >>> wrote: >>>> >>>> Hi Akiko, >>>> >>>> In addition to Saskia's comment (which is very useful!) remember also >>>> that if you create the subject's grid from the warped MNI template grid >>>> (explained here >>>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >>>> then you can keep each subject's source data in a 'source' structure with >>>> .pos field and still do group level statistics, without need to convert to >>>> 'volume' structure which upsamples the spatial resolution perhaps >>>> artificially too high. >>>> >>>> Cheers, >>>> Johanna >>>> >>>> >>>> 2012/10/7 Akiko Ikkai >>>>> >>>>> Hi Saskia, >>>>> >>>>> Thank you for the quick advise! Removing cfg definitely works well. >>>>> Each of the group data is now 1.3G (I also used "single" to convert >>>>> everything into single precision), which is definitely manageable. >>>>> Computation time has also been reduced to 3 times less now. >>>>> >>>>> Thanks! Akiko >>>>> >>>>> >>>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens >>>>> wrote: >>>>>> >>>>>> Hi Akiko, >>>>>> >>>>>> In my experience with grandavg source structs, sometimes the cfg >>>>>> (that's attached to the data struct) becomes very large and can >>>>>> consume a considerable amount of memory. I'm not sure if that's the >>>>>> case/problem here, but might be worth checking and removing the cfg. >>>>>> You could even use checkconfig to cleanup your cfg with: >>>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>>>> Hope this helps! >>>>>> >>>>>> Best, >>>>>> Saskia >>>>>> >>>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>>>> wrote: >>>>>> > Dear Fieldtrip users, >>>>>> > >>>>>> > I've been trying to run group stats on my EEG source data, which >>>>>> > contains 14 >>>>>> > subjects' normalized beamformer data, and having serious swap memory >>>>>> > issue >>>>>> > (not Matlab memory issue, but OS swap memory). >>>>>> > >>>>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>>>> > subject's >>>>>> > normalized beamformer data (1 condition) is >>>>>> > >>>>>> > source_lTMI_intNorm = >>>>>> > >>>>>> > anatomy: [181x217x181 double] >>>>>> > >>>>>> > inside: [181x217x181 logical] >>>>>> > >>>>>> > avg: [1x1 struct] >>>>>> > >>>>>> > transform: [4x4 double] >>>>>> > >>>>>> > dim: [181 217 181] >>>>>> > >>>>>> > cfg: [1x1 struct] >>>>>> > >>>>>> > >>>>>> >>whos >>>>>> > >>>>>> > >>>>>> > >>>>>> > Name Size Bytes Class >>>>>> > Attributes >>>>>> > >>>>>> > source_lTMI_intNorm 1x1 520114791 struct >>>>>> > >>>>>> > >>>>>> > therefore, when I open all subjects' data ("data1group" and >>>>>> > "data2group"), >>>>>> > it's huge... >>>>>> > >>>>>> > Name Size Bytes Class Attributes >>>>>> > >>>>>> > data1group 1x14 5909429438 cell >>>>>> > >>>>>> > data2group 1x14 6705652782 cell >>>>>> > >>>>>> > >>>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>>>> > Therefore, >>>>>> > >>>>>> >>data1group{1} >>>>>> > >>>>>> > anatomy: [181x217x181 double] >>>>>> > >>>>>> > inside: [181x217x181 logical] >>>>>> > >>>>>> > avg: [1x1 struct] >>>>>> > >>>>>> > transform: [4x4 double] >>>>>> > >>>>>> > dim: [181 217 181] >>>>>> > >>>>>> > cfg: [1x1 struct] >>>>>> > >>>>>> > So, when I try to run >>>>>> > >>>>>> > cfg=[]; >>>>>> > >>>>>> > cfg.dim = data1group{1}.dim; >>>>>> > >>>>>> > cfg.method = 'montecarlo'; >>>>>> > >>>>>> > cfg.statistic = 'depsamplesT'; >>>>>> > >>>>>> > cfg.parameter = 'avg.pow'; >>>>>> > >>>>>> > cfg.correctm = 'cluster'; >>>>>> > >>>>>> > cfg.numrandomization = 100; >>>>>> > >>>>>> > cfg.alpha = 0.05; >>>>>> > >>>>>> > cfg.tail = 0; >>>>>> > >>>>>> > nsubj=length(data1group); >>>>>> > >>>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>>>> > >>>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>>>> > >>>>>> > cfg.uvar = 1; >>>>>> > >>>>>> > cfg.ivar = 2; >>>>>> > >>>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>>>> > >>>>>> > stat.anatomy = data1group{1}.anatomy; >>>>>> > >>>>>> > >>>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>>>> > memory?), which forces me to quit Matlab. I'm running above >>>>>> > processes in a >>>>>> > function, so I'm not running into Matlab memory error. >>>>>> > >>>>>> > Could someone help me how it could run more efficiently? I guess >>>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>>>> > eventually load 2 group data in Matlab workspace...? >>>>>> > >>>>>> > Thank you in advance! Akiko >>>>>> > >>>>>> > -- >>>>>> > Akiko Ikkai, Ph.D. >>>>>> > Postdoctoral Fellow >>>>>> > Department of Psychological and Brain Sciences >>>>>> > Johns Hopkins University >>>>>> > Ames Hall, 3400 N. Charles St. >>>>>> > Baltimore, MD 21218 >>>>>> > >>>>>> > >>>>>> > >>>>>> > _______________________________________________ >>>>>> > 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 >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Akiko Ikkai, Ph.D. >>>>> Postdoctoral Fellow >>>>> Department of Psychological and Brain Sciences >>>>> Johns Hopkins University >>>>> Ames Hall, 3400 N. Charles St. >>>>> Baltimore, MD 21218 >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> >> >> -- >> Akiko Ikkai, Ph.D. >> Postdoctoral Fellow >> Department of Psychological and Brain Sciences >> Johns Hopkins University >> Ames Hall, 3400 N. Charles St. >> Baltimore, MD 21218 >> >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Maximilian.Bruchmann at uni-muenster.de Mon Oct 22 16:19:33 2012 From: Maximilian.Bruchmann at uni-muenster.de (Maximilian Bruchmann) Date: Mon, 22 Oct 2012 16:19:33 +0200 Subject: [FieldTrip] Problem with visualizing individual minimum source activity (ft_plot_mesh, ft_sourcemovie, ft_sourceplot) In-Reply-To: References: Message-ID: Dear all, I found the error in my code and I like to describe it in case someone else makes the same mistake: First of all, ft_plot_mesh and ft_sourcemovie are perfectly fine, and so is the minimum norm tutorial, as far as I can tell. My error was that I misinterpreted a part of the help section of ft_sourceanalysis, where it says: % Besides the source positions, you may also include previously computed % spatial filters and/or leadfields like this % cfg.grid.filter % cfg.grid.leadfield so I wrote cfg.grid.leadfield = leadfield; This is wrong. It has to be: cfg.grid = leadfield; just as described in the tutorial. Sorry for the false alarm! Best, Max Am 18.10.2012 um 15:55 schrieb Maximilian Bruchmann : > Dear FieldTrippers, > > there used to be a very convenient way to get a look at individual mne source reconstructions using either ft_plot_mesh or ft_sourcemovie, but both no longer seem to work. When I follow the minimum norm estimate tutorial up to the point of visualization the code that worked fine some weeks ago now produces the following errors: > > cfg=[]; > cfg.method = 'mne'; > cfg.grid.leadfield = leadfield; > cfg.vol = vol; > cfg.mne.lambda = 1e11; > myMne = ft_sourceanalysis(cfg,timeLock); > > bnd.pnt = sourcespace.pnt; > bnd.tri = sourcespace.tri; > m=myMne.avg.pow(:,450); > ft_plot_mesh(bnd, 'vertexcolor', m); > > produces the error: > Error using ft_plot_mesh (line 191) > Unknown color > > As it seems, 'vertexcolor' accepts only a single RGB triplet. In fact, none of the options of ft_plot_mesh seems to support the visualization of functional data anymore, am I right? > > The other way using ft_sourcemovie used to work fine like this: > > > figure > myMne.tri = sourcespace.tri; > cfg = []; > cfg.alim = [0 8e-14]; > cfg.zlim = [0 4e-13]; > cfg.maskparameter = 'avg.pow'; > ft_sourcemovie(cfg,myMne); > > > But now it produces the warning > Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering > and I get an empty figure window. > > I tried ft_sourceplot: > > cfg = []; > cfg.method = 'surface'; > cfg.funparameter = 'avg.pow'; > ft_sourceplot(cfg,myMne); > > but irrespective of the method I get > Error using ft_sourceplot (line 188) > the input data needs to be defined on a regular 3D grid > > Any help on how I can view my source reconstruction results as a colored source space model would be very appreciated! > Thanks in advance! > Best, > Max > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _____________________________________________________________ Dr. phil. Maximilian Bruchmann, Dipl. Psych. Institut für Biomagnetismus und Biosignalanalyse Universitätsklinikum Münster Adresse: Malmedyweg 15 48149 Münster Telefon: +49-(0)251-83-52547 E-Mail: Maximilian.Bruchmann at uni-muenster.de Internet: http://biomag.uni-muenster.de _____________________________________________________________ From akiko.ikkai at gmail.com Mon Oct 22 19:37:59 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Mon, 22 Oct 2012 13:37:59 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Johanna, you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis for each condition runs to the completion :) However, since my data is EEG and the electrode locations vary (hence the grid coordinates vary) between subjects, running stats across subjects without normalizing might be causing a problem. For example, the first 3 points in subject1's .pos are (after creating template grid etc.., and run ft_sourceanalysis using MNI grid): d1group{1}.pos(1:3,:) ans = -8.7000 -7.5000 -7.6000 -7.7000 -7.5000 -7.6000 -6.7000 -7.5000 -7.6000 and the same points for the subject2's are: d1group{2}.pos(1:3,:) ans = -8.3000 -7.6000 -8.2000 -7.3000 -7.6000 -8.2000 -6.3000 -7.6000 -8.2000 So when I try to run ft_sourcestatistics. I get an error message: ??? Error using ==> statistics_wrapper at 109 grid locations of the source reconstructions do not match, use NORMALISEVOLUME first Error in ==> ft_sourcestatistics at 100 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Perhaps I should interpolate and normalize each subject, and run group stats afterall? Thanks! Akiko On Sun, Oct 21, 2012 at 11:32 AM, Johanna Zumer wrote: > Hi Akiko, > > Can you type 'dbstop if error' before running the last step, so that > it goes to debug mode when it crashes there? What are the sizes of > 'filt' and 'Cf' for the 40th position? > > Another thing to try is, during your last call to ft_sourceanalysis, > cfg = []; > cfg.grid = grid; > cfg.grid.filter = source_common.avg.filter; > > so that all the .inside and .outside information is transfered as well. > > A note to all users: you can skip the first step by loading the > precomuted template grids in */fieldtrip/template/sourcemodel. > > Cheers, > Johanna > > > 2012/10/20 Akiko Ikkai : > > Hi, > > > > So I have followed Johanna and Stephan's advise to create template_grid > and > > each subject's grid from MNI image, which is now 1cm spacing instead of > > .5cm. These steps seem to run, and I'm able to create a common spatial > > filter to run beamformer using DICS. However, I get an error when I apply > > the commom filter to each condition. > > > > I had to tweak a few things on example on the page > > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > > , since my data is EEG and electrode locations vary between subjects, > such > > that: > > > > cfg = []; > > cfg.grid.xgrid = -20:1:20; > > cfg.grid.ygrid = -20:1:20; > > cfg.grid.zgrid = -20:1:20; > > cfg.grid.tight = 'yes'; > > cfg.inwardshift = -1.5; > > cfg.vol = template_vol; > > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to > add > > this (got error otherwise) > > template_grid = ft_prepare_sourcemodel(cfg); > > > > then > > cfg = []; > > cfg.grid.warpmni = 'yes'; > > cfg.grid.template = template_grid; > > cfg.grid.nonlinear = 'yes'; > > cfg.mri = mri_aligned; > > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to > add > > this (got error otherwise) > > grid = ft_prepare_sourcemodel(cfg); > > > > These create grids in MNI space, both for template and individual fine. > To > > create a common spatial filter, I run the following command, which runs: > > cfg = []; > > cfg.grid.pos = grid.pos; > > cfg.grid.dim = grid.dim; > > cfg.grid.inside = grid.inside; > > cfg.grid.outside = grid.outside; > > cfg.inwardshift = -1.5; > > cfg.vol = vol_cm; > > cfg.channel = {'all'}; > > cfg.frequency = 10.5; > > cfg.method = 'dics'; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.feedback = 'no'; > > source_common = ft_sourceanalysis(cfg, freq_common); > > > > however, when I apply this spatial filter to a task condition, I get an > > error message > > cfg = []; > > cfg.elec = freq_common.elec; > > cfg.grid.pos = source_common.pos; > > cfg.grid.filter = source_common.avg.filter; > > cfg.inwardshift = -1.5; > > cfg.vol = vol_cm; > > cfg.channel = {'all'}; > > cfg.frequency = 10.5; > > cfg.method = 'dics'; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.feedback = 'no'; > > source_itemL = ft_sourceanalysis(cfg, freq_itemL); > > source_itemL.unit = 'cm'; > > > > ??? Error using ==> mtimes > > Inner matrix dimensions must agree. > > > > Error in ==> beamformer_dics at 316 > > csd = filt * Cf * ctranspose(filt); % Gross > > eqn. 4 > > and 5 > > > > Error in ==> ft_sourceanalysis at 588 > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > > optarg{:}); > > > > The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot > > where exactly the error is originating from. Am I missing some steps > when I > > create template grids that I feed into ft_sourceanalysis? > > > > Thank you in advance for your help! Akiko > > > > > > On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai > wrote: > >> > >> Hi Everyone, > >> > >> Thank you very much for your advise. I just came back from SfN, and just > >> found your replies, so I will test these options and report back what I > >> find. > >> > >> Thank you again! Akiko > >> > >> > >> On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh > >> wrote: > >>> > >>> Hi Akiko! > >>> > >>> Just to chime in - your source grid is very, very large indeed! > ALthough > >>> I started with a very fine grid, at one point I also had to downside it > >>> (going to 5mm), and had to stop using interpolated source data for > stats and > >>> the like. Johanna's suggestion will certainly do the trick and it will > speed > >>> up your analysis enormously as well. You then only need to do > interpolate > >>> for plotting purposes. > >>> > >>> all the best, > >>> Stephen > >>> > >>> > >>> On 8 October 2012 12:02, Johanna Zumer > >>> wrote: > >>>> > >>>> Hi Akiko, > >>>> > >>>> In addition to Saskia's comment (which is very useful!) remember also > >>>> that if you create the subject's grid from the warped MNI template > grid > >>>> (explained here > >>>> > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > ) > >>>> then you can keep each subject's source data in a 'source' structure > with > >>>> .pos field and still do group level statistics, without need to > convert to > >>>> 'volume' structure which upsamples the spatial resolution perhaps > >>>> artificially too high. > >>>> > >>>> Cheers, > >>>> Johanna > >>>> > >>>> > >>>> 2012/10/7 Akiko Ikkai > >>>>> > >>>>> Hi Saskia, > >>>>> > >>>>> Thank you for the quick advise! Removing cfg definitely works well. > >>>>> Each of the group data is now 1.3G (I also used "single" to convert > >>>>> everything into single precision), which is definitely manageable. > >>>>> Computation time has also been reduced to 3 times less now. > >>>>> > >>>>> Thanks! Akiko > >>>>> > >>>>> > >>>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens > >>>>> wrote: > >>>>>> > >>>>>> Hi Akiko, > >>>>>> > >>>>>> In my experience with grandavg source structs, sometimes the cfg > >>>>>> (that's attached to the data struct) becomes very large and can > >>>>>> consume a considerable amount of memory. I'm not sure if that's the > >>>>>> case/problem here, but might be worth checking and removing the cfg. > >>>>>> You could even use checkconfig to cleanup your cfg with: > >>>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') > >>>>>> Hope this helps! > >>>>>> > >>>>>> Best, > >>>>>> Saskia > >>>>>> > >>>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai > > >>>>>> wrote: > >>>>>> > Dear Fieldtrip users, > >>>>>> > > >>>>>> > I've been trying to run group stats on my EEG source data, which > >>>>>> > contains 14 > >>>>>> > subjects' normalized beamformer data, and having serious swap > memory > >>>>>> > issue > >>>>>> > (not Matlab memory issue, but OS swap memory). > >>>>>> > > >>>>>> > I'm trying to contrast 2 conditions (within subject design). Each > >>>>>> > subject's > >>>>>> > normalized beamformer data (1 condition) is > >>>>>> > > >>>>>> > source_lTMI_intNorm = > >>>>>> > > >>>>>> > anatomy: [181x217x181 double] > >>>>>> > > >>>>>> > inside: [181x217x181 logical] > >>>>>> > > >>>>>> > avg: [1x1 struct] > >>>>>> > > >>>>>> > transform: [4x4 double] > >>>>>> > > >>>>>> > dim: [181 217 181] > >>>>>> > > >>>>>> > cfg: [1x1 struct] > >>>>>> > > >>>>>> > > >>>>>> >>whos > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > Name Size Bytes Class > >>>>>> > Attributes > >>>>>> > > >>>>>> > source_lTMI_intNorm 1x1 520114791 struct > >>>>>> > > >>>>>> > > >>>>>> > therefore, when I open all subjects' data ("data1group" and > >>>>>> > "data2group"), > >>>>>> > it's huge... > >>>>>> > > >>>>>> > Name Size Bytes Class Attributes > >>>>>> > > >>>>>> > data1group 1x14 5909429438 cell > >>>>>> > > >>>>>> > data2group 1x14 6705652782 cell > >>>>>> > > >>>>>> > > >>>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). > >>>>>> > Therefore, > >>>>>> > > >>>>>> >>data1group{1} > >>>>>> > > >>>>>> > anatomy: [181x217x181 double] > >>>>>> > > >>>>>> > inside: [181x217x181 logical] > >>>>>> > > >>>>>> > avg: [1x1 struct] > >>>>>> > > >>>>>> > transform: [4x4 double] > >>>>>> > > >>>>>> > dim: [181 217 181] > >>>>>> > > >>>>>> > cfg: [1x1 struct] > >>>>>> > > >>>>>> > So, when I try to run > >>>>>> > > >>>>>> > cfg=[]; > >>>>>> > > >>>>>> > cfg.dim = data1group{1}.dim; > >>>>>> > > >>>>>> > cfg.method = 'montecarlo'; > >>>>>> > > >>>>>> > cfg.statistic = 'depsamplesT'; > >>>>>> > > >>>>>> > cfg.parameter = 'avg.pow'; > >>>>>> > > >>>>>> > cfg.correctm = 'cluster'; > >>>>>> > > >>>>>> > cfg.numrandomization = 100; > >>>>>> > > >>>>>> > cfg.alpha = 0.05; > >>>>>> > > >>>>>> > cfg.tail = 0; > >>>>>> > > >>>>>> > nsubj=length(data1group); > >>>>>> > > >>>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; > >>>>>> > > >>>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > >>>>>> > > >>>>>> > cfg.uvar = 1; > >>>>>> > > >>>>>> > cfg.ivar = 2; > >>>>>> > > >>>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > >>>>>> > > >>>>>> > stat.anatomy = data1group{1}.anatomy; > >>>>>> > > >>>>>> > > >>>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory > (startup > >>>>>> > memory?), which forces me to quit Matlab. I'm running above > >>>>>> > processes in a > >>>>>> > function, so I'm not running into Matlab memory error. > >>>>>> > > >>>>>> > Could someone help me how it could run more efficiently? I guess > >>>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have > to > >>>>>> > eventually load 2 group data in Matlab workspace...? > >>>>>> > > >>>>>> > Thank you in advance! Akiko > >>>>>> > > >>>>>> > -- > >>>>>> > Akiko Ikkai, Ph.D. > >>>>>> > Postdoctoral Fellow > >>>>>> > Department of Psychological and Brain Sciences > >>>>>> > Johns Hopkins University > >>>>>> > Ames Hall, 3400 N. Charles St. > >>>>>> > Baltimore, MD 21218 > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > _______________________________________________ > >>>>>> > 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 > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Akiko Ikkai, Ph.D. > >>>>> Postdoctoral Fellow > >>>>> Department of Psychological and Brain Sciences > >>>>> Johns Hopkins University > >>>>> Ames Hall, 3400 N. Charles St. > >>>>> Baltimore, MD 21218 > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> 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 > >> > >> > >> > >> > >> -- > >> Akiko Ikkai, Ph.D. > >> Postdoctoral Fellow > >> Department of Psychological and Brain Sciences > >> Johns Hopkins University > >> Ames Hall, 3400 N. Charles St. > >> Baltimore, MD 21218 > >> > >> > > > > > > > > -- > > Akiko Ikkai, Ph.D. > > Postdoctoral Fellow > > Department of Psychological and Brain Sciences > > Johns Hopkins University > > Ames Hall, 3400 N. Charles St. > > Baltimore, MD 21218 > > > > > > > > _______________________________________________ > > 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Mon Oct 22 22:43:19 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 22 Oct 2012 20:43:19 +0000 Subject: [FieldTrip] Post Doc Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816F9E998@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to a research associate (Post Doc) job opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Research Associate (Post Doc)- Ref: 1288813 Closing Date: 22/11/2012 A research associate (Post Doc) position (starting salary £32,055 per annum Inclusive if London allowance) is available to work on a BBSRC funded project that will use psychophysics, eye tracking and MEG functional brain imaging to investigate the neural systems that support listeners ability to detect changes in acoustic scenes. You will be supervised by Dr Maria Chait. The post holder will be based at UCL Ear Institute and MEG scanning will be carried out at UCL's Wellcome Trust Centre for Neuroimaging. Initial funding for this post is available for 36 months. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. The Wellcome Trust Centre for Neuroimaging is a leading centre for brain imaging, bringing together clinicians and scientists who study higher cognitive function using neuroimaging techniques. Key Requirements Applicants should hold a PhD degree (or equivalent) in an engineering or Neuroscience-related subject and have substantial experience in digital signal processing and computer programming. Previous experience with auditory research and/or functional brain imaging is desirable. Further Details You should apply for this post (Ref #: 1288813) through UCL's online recruitment website, www.ucl.ac.uk/hr/jobs, where you can download a job description and person specifications. For an informal discussion please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue Oct 23 09:08:18 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 23 Oct 2012 09:08:18 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, The .pos entries are (as expected) different for every subject due to the different coregistration of that subject to the standard MNI. However, the grid positions all originate from the same original MNI-based positions, and are in the same order. Thus, d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so forth. You can substitue d1group{n}.pos=template_grid.pos for all subjects, and then call the stats function, and the results are now in the MNI template grid space. Cheers, Johanna 2012/10/22 Akiko Ikkai : > Hi Johanna, > > you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis > for each condition runs to the completion :) > > However, since my data is EEG and the electrode locations vary (hence the > grid coordinates vary) between subjects, running stats across subjects > without normalizing might be causing a problem. For example, the first 3 > points in subject1's .pos are (after creating template grid etc.., and run > ft_sourceanalysis using MNI grid): > > d1group{1}.pos(1:3,:) > ans = > -8.7000 -7.5000 -7.6000 > -7.7000 -7.5000 -7.6000 > -6.7000 -7.5000 -7.6000 > > and the same points for the subject2's are: > > d1group{2}.pos(1:3,:) > ans = > -8.3000 -7.6000 -8.2000 > -7.3000 -7.6000 -8.2000 > -6.3000 -7.6000 -8.2000 > > So when I try to run ft_sourcestatistics. I get an error message: > ??? Error using ==> statistics_wrapper at 109 > grid locations of the source reconstructions do not match, use > NORMALISEVOLUME > first > > Error in ==> ft_sourcestatistics at 100 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > Perhaps I should interpolate and normalize each subject, and run group stats > afterall? > > Thanks! Akiko > From stephen.whitmarsh at gmail.com Tue Oct 23 10:06:49 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 23 Oct 2012 10:06:49 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: yes, that's the beauty of it! On 23 October 2012 09:08, Johanna Zumer wrote: > Hi Akiko, > > The .pos entries are (as expected) different for every subject due to > the different coregistration of that subject to the standard MNI. > However, the grid positions all originate from the same original > MNI-based positions, and are in the same order. Thus, > d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so > forth. You can substitue d1group{n}.pos=template_grid.pos for all > subjects, and then call the stats function, and the results are now in > the MNI template grid space. > > Cheers, > Johanna > > 2012/10/22 Akiko Ikkai : > > Hi Johanna, > > > > you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis > > for each condition runs to the completion :) > > > > However, since my data is EEG and the electrode locations vary (hence the > > grid coordinates vary) between subjects, running stats across subjects > > without normalizing might be causing a problem. For example, the first 3 > > points in subject1's .pos are (after creating template grid etc.., and > run > > ft_sourceanalysis using MNI grid): > > > > d1group{1}.pos(1:3,:) > > ans = > > -8.7000 -7.5000 -7.6000 > > -7.7000 -7.5000 -7.6000 > > -6.7000 -7.5000 -7.6000 > > > > and the same points for the subject2's are: > > > > d1group{2}.pos(1:3,:) > > ans = > > -8.3000 -7.6000 -8.2000 > > -7.3000 -7.6000 -8.2000 > > -6.3000 -7.6000 -8.2000 > > > > So when I try to run ft_sourcestatistics. I get an error message: > > ??? Error using ==> statistics_wrapper at 109 > > grid locations of the source reconstructions do not match, use > > NORMALISEVOLUME > > first > > > > Error in ==> ft_sourcestatistics at 100 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > Perhaps I should interpolate and normalize each subject, and run group > stats > > afterall? > > > > Thanks! Akiko > > > _______________________________________________ > 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 hjpark05 at snu.ac.kr Tue Oct 23 16:06:10 2012 From: hjpark05 at snu.ac.kr (Hyojin Park) Date: Tue, 23 Oct 2012 23:06:10 +0900 Subject: [FieldTrip] lambda regularization using Neuromag data Message-ID: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> Dear all, I'm working on LCMV beamforming using Neuromag data applied with Maxfilter. I am using 204 gradiometer sensors. I have rank deficiency problem, maybe because of Maxfilter since it reduces the rank. When I checked the data, the rank is 60. I removed EOG and ECG components using ICA. 2 or 3 components in sum in most subjects. So for some, the rank is 58, for some, it's 57. When I tested with different lambda from 0% to 10%, (or above, even 100%), I got the same warning ('covariance matrix is rank deficient'). Does anyone have suggestions for which lambda is most appropriate in this case? Or any other useful advice/experience for how to apply beamforming in combination with Maxfilter? Thank you in advance. Hyojin Park -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue Oct 23 17:17:58 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 23 Oct 2012 17:17:58 +0200 Subject: [FieldTrip] lambda regularization using Neuromag data In-Reply-To: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> References: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> Message-ID: Dear Hyojin, If you look inside beamformer_lcmv.m, you will see that the warning you mention gets generated before the lambda regularization is applied (i.e. the warning applies to your input rank 57 covariance matrix, not the matrix that actually is inverted to generate InvCy which takes the lambda into account). Maybe someone else with experience with Maxfilter Neuromag data can comment as to what level of lambda is appropriate. But I would suggest looking at your results from lambda at around 10% and see if they are reasonable. At the extreme, the 100% lambda case should look similar to a min-norm result. Cheers, Johanna 2012/10/23 Hyojin Park : > Dear all, > > > > I’m working on LCMV beamforming using Neuromag data applied with Maxfilter. > > I am using 204 gradiometer sensors. > > > > I have rank deficiency problem, maybe because of Maxfilter since it reduces > the rank. > > When I checked the data, the rank is 60. > > I removed EOG and ECG components using ICA. > > 2 or 3 components in sum in most subjects. > > So for some, the rank is 58, for some, it’s 57… > > > > When I tested with different lambda from 0% to 10%, (or above, even 100%), I > got the same warning ('covariance matrix is rank deficient'). > > > > Does anyone have suggestions for which lambda is most appropriate in this > case? Or any other useful advice/experience for how to apply beamforming in > combination with Maxfilter? > > > > Thank you in advance. > > Hyojin Park > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From akiko.ikkai at gmail.com Wed Oct 24 00:04:43 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Tue, 23 Oct 2012 18:04:43 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Johanna & Stephen It turned out ft_prepare_sourcemodel in the version I was using (20120103) did not have cfg.grid.template options, so I was never using "template_grid" to create "grid" in MNI space for each subject. I downloaded the latest version, ran as you suggested... and victory! Thank you for your patience. The results look great :) Akiko On Tue, Oct 23, 2012 at 4:06 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > yes, that's the beauty of it! > > > On 23 October 2012 09:08, Johanna Zumer wrote: > >> Hi Akiko, >> >> The .pos entries are (as expected) different for every subject due to >> the different coregistration of that subject to the standard MNI. >> However, the grid positions all originate from the same original >> MNI-based positions, and are in the same order. Thus, >> d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so >> forth. You can substitue d1group{n}.pos=template_grid.pos for all >> subjects, and then call the stats function, and the results are now in >> the MNI template grid space. >> >> Cheers, >> Johanna >> >> 2012/10/22 Akiko Ikkai : >> > Hi Johanna, >> > >> > you are right! specifying cfg.grid = grid; was the key; >> ft_sourceanalysis >> > for each condition runs to the completion :) >> > >> > However, since my data is EEG and the electrode locations vary (hence >> the >> > grid coordinates vary) between subjects, running stats across subjects >> > without normalizing might be causing a problem. For example, the first 3 >> > points in subject1's .pos are (after creating template grid etc.., and >> run >> > ft_sourceanalysis using MNI grid): >> > >> > d1group{1}.pos(1:3,:) >> > ans = >> > -8.7000 -7.5000 -7.6000 >> > -7.7000 -7.5000 -7.6000 >> > -6.7000 -7.5000 -7.6000 >> > >> > and the same points for the subject2's are: >> > >> > d1group{2}.pos(1:3,:) >> > ans = >> > -8.3000 -7.6000 -8.2000 >> > -7.3000 -7.6000 -8.2000 >> > -6.3000 -7.6000 -8.2000 >> > >> > So when I try to run ft_sourcestatistics. I get an error message: >> > ??? Error using ==> statistics_wrapper at 109 >> > grid locations of the source reconstructions do not match, use >> > NORMALISEVOLUME >> > first >> > >> > Error in ==> ft_sourcestatistics at 100 >> > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> > >> > Perhaps I should interpolate and normalize each subject, and run group >> stats >> > afterall? >> > >> > Thanks! Akiko >> > >> _______________________________________________ >> 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Oct 25 18:00:13 2012 From: lihqih at gmail.com (qi li) Date: Thu, 25 Oct 2012 12:00:13 -0400 Subject: [FieldTrip] co registration of the mesh points to the atlas Message-ID: Hi, Is there any function to co-register the individual cortical mesh points(8196 in total) generate by fieldtrip to the standard brain. Thanks! Qi From mcgoiv0 at wfu.edu Thu Oct 25 20:33:57 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Thu, 25 Oct 2012 14:33:57 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis Message-ID: Hello, I would like to know if Signal Space Separation method for MEG data analysis is available in the FieldTrip toolbox. Thanks, -- Inna -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.N.Vardy at tudelft.nl Thu Oct 25 22:40:17 2012 From: A.N.Vardy at tudelft.nl (Alistair Vardy - 3ME) Date: Thu, 25 Oct 2012 20:40:17 +0000 Subject: [FieldTrip] LCMV beamformer source reconstruction Message-ID: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> Hi all, I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source. The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom: sourceDiff = dim: [17 13 14] time: [1x819 double] pos: [3094x3 double] inside: [1x1567 double] outside: [1x1527 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] sourceDiff.avg ans = pow: [1x3094 double] mom: {1x3094 cell} noise: [1x3094 double] filter: {1x3094 cell} The moment entries are sized 3 x 819, the filter 3 x 65. I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below. Kind regards, Alistair channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; cfg1 = []; cfg1.keeptrials = 'yes'; cfg1.covariance = 'yes'; cfg1.channel = channel; dataPre = ft_redefinetrial(cfg1, data1FIC); timelock1 = ft_timelockanalysis(cfg1, dataPre); cfg2 = []; cfg2.keeptrials = 'yes'; cfg2.covariance = 'yes'; cfg2.channel = channel; dataPost = ft_redefinetrial(cfg2, data2FIC); timelock2 = ft_timelockanalysis(cfg2, dataPost); %% Source analysis cfg = []; cfg.grid = grid; cfg.hdmfile = volname; cfg.elec = sens; cfg.vol = vol; cfg.method = 'lcmv'; cfg.channel = channel; cfg.lcmv.keeptrials = 'yes'; % cfg.lcmv.projectnoise = 'yes'; cfg.lmvc.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; [source1] = ft_sourceanalysis(cfg, timelock1); [source2] = ft_sourceanalysis(cfg, timelock2); sourceDiff = source2; sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow; -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Fri Oct 26 16:52:18 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 26 Oct 2012 10:52:18 -0400 Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: References: <1376177301.1612.1340961039830.JavaMail.root@zimbra> <1659120385.1619.1340961051346.JavaMail.root@zimbra> Message-ID: Hi, I know this is not a recent post, but please allow me to ask a follow-up question; can you use cfg.pad for ft_freqanalysis for the baseline in this case (assuming post-baseline period of interest is uniform length, say 1000ms)? Such as: % extract baseline (500ms) cfg = []; cfg.toilim = [-.7 -.2]; data_BL = ft_redefinetrial(cfg,ft_data); % pad to make it 1000ms and run ft_freqanalysis cfg = []; *cfg.pad = 1;* cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foi = foi; cfg.taper = 'dpss'; cfg.tapsmofrq = smooth; freq_BL = ft_freqanalysis(cfg,data_BL); Thanks! Akiko On Mon, Jul 2, 2012 at 4:07 PM, Johanna Zumer wrote: > Dear Anna, > > Ideally for the common filter, you want the same amount of data T(s) per > condition, where T = N x tw (and N is number of trials and tw is timewindow > length). In your case, if the baselines for each conditions can be > combined into one general baseline, and if you happen to have 100 trials > per condition, then T_baseline = 3 x 100 x 0.5s = 150s. If you then use > 1.5s length post-baseline, then T_each_condition = 100 x 1.5s = 150s, so > you now have equal T for each condition for the common filter. > > However, in order to have an equal effect of tapers and edge-effects on > the different conditions, you should use equal time window lengths in > freqanalysis. Thus it would be better to split your post-baseline data > into 3 segments of 500ms each before calling ft_freqanalysis, which again > gives T = 100 x 0.5 x 3 = 150s. > > Cheers, > Johanna > > 2012/6/29 Anna Wilsch > >> >> Dear Fieldtrippers, >> >> I'm trying to beamform my MEG data by building a common filter including >> three conditions and a baseline for each condition. The baseline intervals >> have a duration of 500 ms. I was wondering if it is ok if the post-baseline >> data are longer than that (1000 - 2000 ms). Does it have any negative >> impact on the cross-spectral-density matrix and/or the common filter? Would >> that still be a valid operation to do or is it necessary that baseline and >> post baseline data have the same length? >> Thank you for your comments. >> >> Cheers, >> Anna >> >> >> Anna Wilsch, Dipl.-Psych. >> Auditory Cognition Research Group >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstr. 1a - Leipzig, Germany >> (p) +49 (0)341 9940 2641 >> (e) wilsch at cbs.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dadair at NKI.RFMH.ORG Fri Oct 26 17:49:31 2012 From: dadair at NKI.RFMH.ORG (Adair, Devin) Date: Fri, 26 Oct 2012 11:49:31 -0400 Subject: [FieldTrip] Plotting use ft_multiplot Message-ID: <2586A1048152BE4D861E64A98700AD420BCED7E9@nki-mail.NKI.rfmh.org> Hello, I am currently designing my own n-way ANOVA script for time frequency data using a mixture of fieldtrip functions and my own scripting. I currently have a 2x2x4x10 design that I managed (after some effort) to output 25x24x17 (electrode x frequency x time) matrices with the p-values for each interaction. I know would like to plot this data using ft_multiplot by using the cfg.inputfile option that specifies a single *.mat file with a 'data' variable contained a cell array. My question is about the format of the cell array - does it need to come in a certain order? (frequency first, time second, etc) or by specifying the other configuration parameters will it automatically detect how my data is arranged? Thanks for the help, Devin Adair Research Assistant Brain Stimulation Program, Division of Experimental Therapeutics Department of Psychiatry, Columbia University Medical Center New York State Psychiatric Institute (p) 212-543-1339 Conserve Resources. Print only when necessary. IMPORTANT NOTICE: This e-mail is meant only for the use of the intended recipient. It may contain confidential information which is legally privilegedor otherwise protected by law. If you received this e-mail in error or from someone who is not authorized to send it to you, you are strictly prohibited from reviewing, using, disseminating, distributing or copying the e-mail. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND DELETE THIS MESSAGE FROM YOUR SYSTEM. Thank you for your cooperation. From polomacnenad at gmail.com Mon Oct 29 10:04:23 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 29 Oct 2012 10:04:23 +0100 Subject: [FieldTrip] ICA question Message-ID: Dear all, I have one question concerning ft_componentanalysis. I want to calculate ICA for my data in order to detect EOG artifacts and remove those ICA components. I have recorded EOG electrodes as well, but I am not sure where I should enter channels' label for them. I assume that ICA calculation will be more accurate if I provide data from EOG electrodes. So my question is how to inform ft_componentanalysis about EOG data? My configuration for the ICA analysis looks like this: cfg = []; cfg.method = 'runica'; cfg.runica.pca = 90; cfg.runica.maxsteps = 600; cfg.runica.stop = 1e-7; cfg.runica.extended = 1; ica_comp = ft_componentanalysis(cfg, data); Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Oct 29 10:27:14 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 29 Oct 2012 10:27:14 +0100 Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: References: <1376177301.1612.1340961039830.JavaMail.root@zimbra> <1659120385.1619.1340961051346.JavaMail.root@zimbra> Message-ID: <508E4BF2.9050203@donders.ru.nl> Hi Akiko, of course you can use it, but freqanalysis will pad zeros thereby increasing the spectral resolution but not add any data specifically. In the end, your result will be a more smoothed spectral estimate for the padded trials, which allows you to average across trials with different length (since they the spectral resolution is now equal across trials) or in this case contrast conditions of different lengths. I don't see much sense in doing that for the baseline, apart from tricking the algorithm, but from a more pragmatic point of view: if no reviewer complaints then it's fine ;) I bet there are some other consequences that I don't foresee; if someone knows, please let me/us know :) Best, Jörn On 10/26/2012 4:52 PM, Akiko Ikkai wrote: > Hi, > > I know this is not a recent post, but please allow me to ask a > follow-up question; can you use cfg.pad for ft_freqanalysis for the > baseline in this case (assuming post-baseline period of interest is > uniform length, say 1000ms)? > > Such as: > % extract baseline (500ms) > cfg = []; > cfg.toilim = [-.7 -.2]; > data_BL = ft_redefinetrial(cfg,ft_data); > > % pad to make it 1000ms and run ft_freqanalysis > cfg = []; > *cfg.pad = 1;* > cfg.method = 'mtmfft'; > cfg.output = 'powandcsd'; > cfg.foi = foi; > cfg.taper = 'dpss'; > cfg.tapsmofrq = smooth; > freq_BL = ft_freqanalysis(cfg,data_BL); > > Thanks! Akiko > > On Mon, Jul 2, 2012 at 4:07 PM, Johanna Zumer > > wrote: > > Dear Anna, > > Ideally for the common filter, you want the same amount of data > T(s) per condition, where T = N x tw (and N is number of trials > and tw is timewindow length). In your case, if the baselines for > each conditions can be combined into one general baseline, and if > you happen to have 100 trials per condition, then T_baseline = 3 x > 100 x 0.5s = 150s. If you then use 1.5s length post-baseline, > then T_each_condition = 100 x 1.5s = 150s, so you now have equal T > for each condition for the common filter. > > However, in order to have an equal effect of tapers and > edge-effects on the different conditions, you should use equal > time window lengths in freqanalysis. Thus it would be better to > split your post-baseline data into 3 segments of 500ms each before > calling ft_freqanalysis, which again gives T = 100 x 0.5 x 3 = 150s. > > Cheers, > Johanna > > 2012/6/29 Anna Wilsch > > > > Dear Fieldtrippers, > > I'm trying to beamform my MEG data by building a common filter > including three conditions and a baseline for each condition. > The baseline intervals have a duration of 500 ms. I was > wondering if it is ok if the post-baseline data are longer > than that (1000 - 2000 ms). Does it have any negative impact > on the cross-spectral-density matrix and/or the common filter? > Would that still be a valid operation to do or is it necessary > that baseline and post baseline data have the same length? > Thank you for your comments. > > Cheers, > Anna > > > Anna Wilsch, Dipl.-Psych. > Auditory Cognition Research Group > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstr. 1a - Leipzig, Germany > (p) +49 (0)341 9940 2641 > (e) wilsch at cbs.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Oct 29 10:49:12 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 29 Oct 2012 10:49:12 +0100 Subject: [FieldTrip] ICA question In-Reply-To: References: Message-ID: Dear Nenad, If you do not specify a cfg.channel in your call to ft_componentanalysis, it will default to 'all'. So, if your data structure contains EOG channels, they will be used in the decomposition with no further action required on your part. If your data is MEG, however, I don't know whether it is wise to attempt an ICA on the joint data set, including EOG. It is not standard practice here at the Donders, at least. One possibility to combine EOG and MEG/ICA data is to correlate your MEG component time courses with the EOG signal, and then inspect the most highly correlated components and (if inspection reveals them to be artifactual) remove them. This hybrid automatic/manual approach seems to be quite efficient in getting rid of eye artifacts. But perhaps you can combine them after all; if someone has a more informed opinion about this please let me know. (Another possibility is that the story is different for EEG and EOG combined.) Best, Eelke On 29 October 2012 10:04, Nenad Polomac wrote: > Dear all, > > I have one question concerning ft_componentanalysis. > > I want to calculate ICA for my data in order to detect EOG artifacts and > remove those ICA components. I have recorded EOG electrodes as well, but I > am not sure where I should enter channels' label for them. I assume that ICA > calculation will be more accurate if I provide data from EOG electrodes. > > So my question is how to inform ft_componentanalysis about EOG data? > > My configuration for the ICA analysis looks like this: > > cfg = []; > cfg.method = 'runica'; > cfg.runica.pca = 90; > cfg.runica.maxsteps = 600; > cfg.runica.stop = 1e-7; > cfg.runica.extended = 1; > ica_comp = ft_componentanalysis(cfg, data); > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Oct 30 10:03:24 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:03:24 +0100 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: References: Message-ID: <508F97DC.9080009@donders.ru.nl> Dear Qi, I guess this page might help: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=warp Best, Jörn On 10/25/2012 6:00 PM, qi li wrote: > Hi, > > Is there any function to co-register the individual cortical mesh > points(8196 in total) generate by fieldtrip to the standard brain. > Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Oct 30 10:07:48 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:07:48 +0100 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: Message-ID: <508F98E4.7010701@donders.ru.nl> Dear Inna, I'm not aware of any implementation in FieldTrip. For the CTF system we got the ft_denoise_synthetic function, but afaik SSS is something NeuroMag specific and (I might be wrong here, because...) since we do not have a NeuroMag system I would guess that no one bothered to implement it. If you want to do so, you're welcome and we would be most happy to help out on various ends with all our abilities ;) Best, Jörn On 10/25/2012 8:33 PM, McGowin, Inna wrote: > Hello, > I would like to know if Signal Space Separation method for MEG data > analysis is available in the FieldTrip toolbox. > > Thanks, > > -- > Inna > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Oct 30 10:21:26 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:21:26 +0100 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> Message-ID: <508F9C16.8040604@donders.ru.nl> Dear Alistair, I am not quite sure whether I understand your request correctly, but you are looking for help to get the maximum activity per trial in your source reconstructed data? I guess your confusion arises because of the different subfields, so here a short explanation: Every dipole has strengths in 3 directions (think of it as magnetic field strength in the x,y and z direction), this is stored in .mom In order to get it down to one number instead of three, there are different possibilities, but what's roughly happening by default is that an SVD is computed then the principal direction is taken, i.e. the strongest of these three vectors. This is what you find back in .pow. The filter matrix is the filter per grid position to get from your sensor data to the source data. Noise is an approximation of the noise level per trial. So, if you want to get the maximum activity, I would suggest to take [~, idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position of maximal power. If you are interested in the maximum over e.g. the posterior part of the brain, you should limit your search. You can best do that by using sourceDiff.pos and an atlas. If that does not answer your question, feel free to clarify your request ;) Best, Jörn On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: > > Hi all, > > I trying to reconstruct the activity in a source using the LCMV > beamformer with EEG data. My code follows several examples that stop > at the source localization. Unfortunately, I am unable to reconstruct > the source. > > The data is a series of 198 button presses, self-paced. The two time > locked data sets are pre- and post-event windows. The data is filtered > in the beta band (13-30 Hz). There are 128 EEG channels, three of > which are excluded due to excessive noise. The data was re-referenced > to the common average. The source that provides the normalized > difference in power between the two time windows has a field avg with > subfields, filter, noise, pow, and mom: > > sourceDiff = > > dim: [17 13 14] > > time: [1x819 double] > > pos: [3094x3 double] > > inside: [1x1567 double] > > outside: [1x1527 double] > > method: 'average' > > avg: [1x1 struct] > > cfg: [1x1 struct] > > sourceDiff.avg > > ans = > > pow: [1x3094 double] > > mom: {1x3094 cell} > > noise: [1x3094 double] > > filter: {1x3094 cell} > > The moment entries are sized 3 x 819, the filter 3 x 65. > > I hope someone can help me with the code required to reconstruct the > source at the voxel with the largest power during the entire duration > of each trial. The code used to determine the source is below. MRI, > head model and leadfield were computed as well but are not included in > the code below. > > Kind regards, > > Alistair > > channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; > > cfg1 = []; > > cfg1.keeptrials = 'yes'; > > cfg1.covariance = 'yes'; > > cfg1.channel = channel; > > dataPre = ft_redefinetrial(cfg1, data1FIC); > > timelock1 = ft_timelockanalysis(cfg1, dataPre); > > cfg2 = []; > > cfg2.keeptrials = 'yes'; > > cfg2.covariance = 'yes'; > > cfg2.channel = channel; > > dataPost = ft_redefinetrial(cfg2, data2FIC); > > timelock2 = ft_timelockanalysis(cfg2, dataPost); > > %% Source analysis > > cfg = []; > > cfg.grid = grid; > > cfg.hdmfile = volname; > > cfg.elec = sens; > > cfg.vol = vol; > > cfg.method = 'lcmv'; > > cfg.channel = channel; > > cfg.lcmv.keeptrials = 'yes'; > > % cfg.lcmv.projectnoise = 'yes'; > > cfg.lmvc.lambda = '5%'; > > cfg.lcmv.keepfilter = 'yes'; > > [source1] = ft_sourceanalysis(cfg, timelock1); > > [source2] = ft_sourceanalysis(cfg, timelock2); > > sourceDiff = source2; > > sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ > source1.avg.pow; > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Tue Oct 30 10:37:02 2012 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Tue, 30 Oct 2012 10:37:02 +0100 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: <508F9C16.8040604@donders.ru.nl> References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> <508F9C16.8040604@donders.ru.nl> Message-ID: Dear Alistair, In addition to the informative response from Jörn, I just wanted to add: One tiny thing I note is that you type cfg.lmvc.lambda which should be cfg.lcmv.lambda. Why is your filter of size 3x65? Shouldn't it be 3x125 (3 source orientations x 125 EEG channels)? Cheers, Johanna 2012/10/30 "Jörn M. Horschig" > Dear Alistair, > > I am not quite sure whether I understand your request correctly, but you > are looking for help to get the maximum activity per trial in your source > reconstructed data? I guess your confusion arises because of the different > subfields, so here a short explanation: > > Every dipole has strengths in 3 directions (think of it as magnetic field > strength in the x,y and z direction), this is stored in .mom > In order to get it down to one number instead of three, there are > different possibilities, but what's roughly happening by default is that an > SVD is computed then the principal direction is taken, i.e. the strongest > of these three vectors. This is what you find back in .pow. The filter > matrix is the filter per grid position to get from your sensor data to the > source data. Noise is an approximation of the noise level per trial. > > So, if you want to get the maximum activity, I would suggest to take [~, > idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position > of maximal power. If you are interested in the maximum over e.g. the > posterior part of the brain, you should limit your search. You can best do > that by using sourceDiff.pos and an atlas. > > If that does not answer your question, feel free to clarify your request ;) > > Best, > Jörn > > > On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: > > Hi all,**** > > ** ** > > I trying to reconstruct the activity in a source using the LCMV beamformer > with EEG data. My code follows several examples that stop at the source > localization. Unfortunately, I am unable to reconstruct the source. **** > > ** ** > > The data is a series of 198 button presses, self-paced. The two time > locked data sets are pre- and post-event windows. The data is filtered in > the beta band (13-30 Hz). There are 128 EEG channels, three of which are > excluded due to excessive noise. The data was re-referenced to the common > average. The source that provides the normalized difference in power > between the two time windows has a field avg with subfields, filter, noise, > pow, and mom:**** > > ** ** > > sourceDiff = **** > > ** ** > > dim: [17 13 14]**** > > time: [1x819 double]**** > > pos: [3094x3 double]**** > > inside: [1x1567 double]**** > > outside: [1x1527 double]**** > > method: 'average'**** > > avg: [1x1 struct]**** > > cfg: [1x1 struct]**** > > ** ** > > sourceDiff.avg**** > > ** ** > > ans = **** > > ** ** > > pow: [1x3094 double]**** > > mom: {1x3094 cell}**** > > noise: [1x3094 double]**** > > filter: {1x3094 cell}**** > > ** ** > > The moment entries are sized 3 x 819, the filter 3 x 65.**** > > ** ** > > I hope someone can help me with the code required to reconstruct the > source at the voxel with the largest power during the entire duration of > each trial. The code used to determine the source is below. MRI, head model > and leadfield were computed as well but are not included in the code below. > **** > > ** ** > > Kind regards,**** > > ** ** > > Alistair**** > > ** ** > > channel = {'EEG', '-AFF1', '-AFZ', '-AF1'};**** > > ** ** > > ** ** > > cfg1 = [];**** > > cfg1.keeptrials = 'yes';**** > > cfg1.covariance = 'yes';**** > > cfg1.channel = channel;**** > > dataPre = ft_redefinetrial(cfg1, data1FIC);**** > > timelock1 = ft_timelockanalysis(cfg1, dataPre);**** > > **** > > cfg2 = []; **** > > cfg2.keeptrials = 'yes';**** > > cfg2.covariance = 'yes';**** > > cfg2.channel = channel;**** > > dataPost = ft_redefinetrial(cfg2, data2FIC);**** > > timelock2 = ft_timelockanalysis(cfg2, dataPost);**** > > **** > > ** ** > > %% Source analysis**** > > cfg = [];**** > > cfg.grid = grid;**** > > cfg.hdmfile = volname;**** > > cfg.elec = sens;**** > > cfg.vol = vol;**** > > cfg.method = 'lcmv';**** > > cfg.channel = channel;**** > > cfg.lcmv.keeptrials = 'yes';**** > > % cfg.lcmv.projectnoise = 'yes';**** > > **** > > cfg.lmvc.lambda = '5%';**** > > cfg.lcmv.keepfilter = 'yes';**** > > [source1] = ft_sourceanalysis(cfg, timelock1);**** > > [source2] = ft_sourceanalysis(cfg, timelock2);**** > > ** ** > > sourceDiff = source2;**** > > sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ > source1.avg.pow;**** > > ** ** > > ** ** > > ** ** > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Tue Oct 30 14:20:25 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Tue, 30 Oct 2012 09:20:25 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: <508F98E4.7010701@donders.ru.nl> References: <508F98E4.7010701@donders.ru.nl> Message-ID: Thank you Jörn for the info. I was looking for SSS to perform a DC analysis of MEG data with no motion correction. We have MEG datasets that are collected from subjects with high magnetic noise such as dental work and/or brain surgery contamination. We wanted to remove the signal that comes from these areas. Do you work with such problems? Thanks, Inna On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Inna, > > I'm not aware of any implementation in FieldTrip. For the CTF system we > got the ft_denoise_synthetic function, but afaik SSS is something NeuroMag > specific and (I might be wrong here, because...) since we do not have a > NeuroMag system I would guess that no one bothered to implement it. If you > want to do so, you're welcome and we would be most happy to help out on > various ends with all our abilities ;) > > Best, > Jörn > > > On 10/25/2012 8:33 PM, McGowin, Inna wrote: > > Hello, > I would like to know if Signal Space Separation method for MEG data > analysis is available in the FieldTrip toolbox. > > Thanks, > > -- > Inna > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.N.Vardy at tudelft.nl Tue Oct 30 15:45:59 2012 From: A.N.Vardy at tudelft.nl (Alistair Vardy - 3ME) Date: Tue, 30 Oct 2012 14:45:59 +0000 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> <508F9C16.8040604@donders.ru.nl> Message-ID: <7E8E8A2DF53088489583543F38570D7A1F58F40C@SRV363.tudelft.net> Dear Jorn, Johanna, Thank you for your replies. I was making a couple of mistakes. I wasn't using the parameters correctly and now use cfg.lcmv. which works. The mismatch between the number of channels and the size of the filter was due to the strange situation that ASA channel labels sometimes uppercase letters (from the electrode file) and sometimes lowercase (from the header file). Fieldtrip does not understand AFZ but knows AFz for example. The routine ft_prepare_vol_sense.m thus discarded half of the channels. I found the voxel with the maximal power and reconstructing the dipole moment at that particular source for each trial using the following code which I found in an earlier post somewhere: trialN = size(timelock0.trial,1); for trial_tel = 1:trialN sourceDiff.trial(trial_tel).mom = sourceDiff.avg.filter{maxind}*data0FIC.trial{trial_tel}; end where maxind is the index of the voxel with maximum power. Timelock0 takes each trial with a window of [-0.5 0.5] s around each event. I will use a SVD to determine the power of the source for each trial separately. Thanks again for your help! Alistair From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: Tuesday, October 30, 2012 10:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV beamformer source reconstruction Dear Alistair, In addition to the informative response from Jörn, I just wanted to add: One tiny thing I note is that you type cfg.lmvc.lambda which should be cfg.lcmv.lambda. Why is your filter of size 3x65? Shouldn't it be 3x125 (3 source orientations x 125 EEG channels)? Cheers, Johanna 2012/10/30 "Jörn M. Horschig" > Dear Alistair, I am not quite sure whether I understand your request correctly, but you are looking for help to get the maximum activity per trial in your source reconstructed data? I guess your confusion arises because of the different subfields, so here a short explanation: Every dipole has strengths in 3 directions (think of it as magnetic field strength in the x,y and z direction), this is stored in .mom In order to get it down to one number instead of three, there are different possibilities, but what's roughly happening by default is that an SVD is computed then the principal direction is taken, i.e. the strongest of these three vectors. This is what you find back in .pow. The filter matrix is the filter per grid position to get from your sensor data to the source data. Noise is an approximation of the noise level per trial. So, if you want to get the maximum activity, I would suggest to take [~, idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position of maximal power. If you are interested in the maximum over e.g. the posterior part of the brain, you should limit your search. You can best do that by using sourceDiff.pos and an atlas. If that does not answer your question, feel free to clarify your request ;) Best, Jörn On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: Hi all, I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source. The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom: sourceDiff = dim: [17 13 14] time: [1x819 double] pos: [3094x3 double] inside: [1x1567 double] outside: [1x1527 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] sourceDiff.avg ans = pow: [1x3094 double] mom: {1x3094 cell} noise: [1x3094 double] filter: {1x3094 cell} The moment entries are sized 3 x 819, the filter 3 x 65. I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below. Kind regards, Alistair channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; cfg1 = []; cfg1.keeptrials = 'yes'; cfg1.covariance = 'yes'; cfg1.channel = channel; dataPre = ft_redefinetrial(cfg1, data1FIC); timelock1 = ft_timelockanalysis(cfg1, dataPre); cfg2 = []; cfg2.keeptrials = 'yes'; cfg2.covariance = 'yes'; cfg2.channel = channel; dataPost = ft_redefinetrial(cfg2, data2FIC); timelock2 = ft_timelockanalysis(cfg2, dataPost); %% Source analysis cfg = []; cfg.grid = grid; cfg.hdmfile = volname; cfg.elec = sens; cfg.vol = vol; cfg.method = 'lcmv'; cfg.channel = channel; cfg.lcmv.keeptrials = 'yes'; % cfg.lcmv.projectnoise = 'yes'; cfg.lmvc.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; [source1] = ft_sourceanalysis(cfg, timelock1); [source2] = ft_sourceanalysis(cfg, timelock2); sourceDiff = source2; sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow; _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Oct 30 17:58:34 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Tue, 30 Oct 2012 17:58:34 +0100 (CET) Subject: [FieldTrip] converting sensor coordinates to MNI coordinates Message-ID: <8a8a0a83-5383-45f1-b64e-a18c9a5c49c6@thalamus_p> Dear List members, this post is related to a question that I have been posting several times now, but for which I haven't found an answer yet. I have a set of coordinates [5,0,-1] which should correspond to a point in sensor space. Is it possible to compute the corresponding coordinates in MNI space using a transformation matrix or anything similar? Any help or suggestions would be highly appreciated. Fred From tomh at kurage.nimh.nih.gov Tue Oct 30 22:08:22 2012 From: tomh at kurage.nimh.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Tue, 30 Oct 2012 17:08:22 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> Message-ID: <509041C6.7020609@kurage.nimh.nih.gov> Just wanted to mention, the "SSS" method separates the signal into "inside" and "outside" the helmet (this is what MaxFilter does). So it is useless for removing dental artifacts. McGowin, Inna wrote: > Thank you Jörn for the info. > > I was looking for SSS to perform a DC analysis of MEG data with no > motion correction. > We have MEG datasets that are collected from subjects with high magnetic > noise such as dental work and/or brain surgery contamination. We wanted > to remove the signal that comes from these areas. Do you work with such > problems? > > Thanks, > Inna > > On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" > > wrote: > > Dear Inna, > > I'm not aware of any implementation in FieldTrip. For the CTF system > we got the ft_denoise_synthetic function, but afaik SSS is something > NeuroMag specific and (I might be wrong here, because...) since we > do not have a NeuroMag system I would guess that no one bothered to > implement it. If you want to do so, you're welcome and we would be > most happy to help out on various ends with all our abilities ;) > > Best, > Jörn > > > On 10/25/2012 8:33 PM, McGowin, Inna wrote: >> Hello, >> I would like to know if Signal Space Separation method for MEG >> data analysis is available in the FieldTrip toolbox. >> >> Thanks, >> >> -- >> Inna >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Inna McGowin > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- The white knight is talking backwards. From jan.schoffelen at donders.ru.nl Wed Oct 31 08:03:01 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 08:03:01 +0100 Subject: [FieldTrip] request for 4d users Message-ID: Dear community and 4d-users in particular, I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? Thanks for any input, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Wed Oct 31 13:07:44 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Wed, 31 Oct 2012 14:07:44 +0200 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: Dear Jan-Mathijs I don't have such data at the moment I think you can get to the information in the config. it is in user_data_block{1,12} here is how I get to it with pdf4D pdf=pdf4D('c2,rfDC'); header = get(pdf, 'Header'); chi=channel_index(pdf,'EEG'); config = get(pdf, 'config'); % chi(1) % chan_no = header.channel_data{chi(1)}.chan_no config.user_block_data{1,12}.hdr.type config.user_block_data{1,12}.reserved I may collect some data later today or in the next few days, I'll let you know if I do. here is the data for eeg with no digitization of eeg ans = b_eeg_elec_locs ans = Columns 1 through 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 23 through 32 0 0 0 0 0 0 0 0 0 0 On 31 October 2012 09:03, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio > module to deal with simultaneous MEG/EEG measurements using the > 4D-neuroimaging system. Specifically, I want to improve the reading of EEG > electrode positions, when these have been digitized using the Polhemus in > combination with the 4D acquisition software. This question has been raised > on this list over a year ago by Margit Schönherr (who kindly sent me a > dataset to work with: thanks Margit), but it would be really helpful if I > could benefit from your knowledge/input. At the moment FT can extract > electrode positions from the header, but it is based on reverse engineering > based on 1 dataset only. Therefore I would like to ask you whether you > could send me some (as small as possible) datasets, which contain digitized > electrode positions (in combination with the corresponding config and > hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in > combination with their labels according to the 10/20 convention. Does > anybody know whether information is stored in the file-header that links > the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Oct 31 13:09:35 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 31 Oct 2012 08:09:35 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: <509041C6.7020609@kurage.nimh.nih.gov> References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Tom, In theory SSS method allows to extract signal from the dental work (due to its magnetization) if correction of motion is implemented. MEG SQUIDS can only detect DC magnetic fields if the source is in motion but removing the motion from the raw signal with SSS allows to detected DC signals. I have a reference paper if you are interested. Thanks On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < tomh at kurage.nimh.nih.gov> wrote: > Just wanted to mention, the "SSS" method separates the signal into > "inside" and "outside" the helmet (this is what MaxFilter does). So it is > useless for removing dental artifacts. > > McGowin, Inna wrote: > >> Thank you Jörn for the info. >> >> I was looking for SSS to perform a DC analysis of MEG data with no motion >> correction. >> We have MEG datasets that are collected from subjects with high magnetic >> noise such as dental work and/or brain surgery contamination. We wanted to >> remove the signal that comes from these areas. Do you work with such >> problems? >> >> Thanks, >> Inna >> >> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >> jm.horschig at donders.ru.nl >> >> wrote: >> >> Dear Inna, >> >> I'm not aware of any implementation in FieldTrip. For the CTF system >> we got the ft_denoise_synthetic function, but afaik SSS is something >> NeuroMag specific and (I might be wrong here, because...) since we >> do not have a NeuroMag system I would guess that no one bothered to >> implement it. If you want to do so, you're welcome and we would be >> most happy to help out on various ends with all our abilities ;) >> >> Best, >> Jörn >> >> >> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >> >>> Hello, >>> I would like to know if Signal Space Separation method for MEG >>> data analysis is available in the FieldTrip toolbox. >>> >>> Thanks, >>> >>> -- Inna >>> >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> >> -- Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour Centre for >> Cognitive Neuroimaging >> Radboud University Nijmegen Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> > >> Tel: +31-(0)24-36-68493 >> >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> > >> >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Inna McGowin >> >> >> ------------------------------**------------------------------** >> ------------ >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > -- > The white knight is talking backwards. > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 31 14:12:57 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 14:12:57 +0100 Subject: [FieldTrip] converting sensor coordinates to MNI coordinates References: Message-ID: Hi Frederic, What is the question exactly? This is the first time that you mention the word 'MNI' so I am a bit puzzled what you're after (and with me perhaps the rest of us mortals as well, which could explain the lack of answers). What you refer to as 'sensor space' is a coordinate system that is defined based on the head of the participant, i.e. based on three anatomical landmarks: LPA, RPA, and Nasion. The transformation to MNI-space is not straightforward because this is generally based on a non-linear warp. If you are happy with an approximation, then you could use ft_volumenormalise to extract the linear transformation from individual head space into +/- MNI-space. This coordinate system is defined based on three other anatomical landmarks: AC, PC and a point defining the positive z-axis. You can do either of the following things: -Take an individual MRI (that is coregistered to the individual's head, i.e. it has a transform that defines the head coordinate system correctly). -Call ft_volumenormalise (with cfg.nonlinear = 'no') -The output volume (let's call this variable normalise) contains a transformation matrix in normalise.cfg.final, that transforms from head space into 'MNI-space'. -You can use warp_apply to transform between the different coordinate systems, using the transformation matrix (or its inverse) to toggle coordinates back and forth. -Take an individual MRI. -specify mri.transform = eye(4) (assuming that the MRI is 1mm isotropic). -call ft_volumerealign twice with cfg.interactive = 'yes'. -once you specify lpa, rpa and nasion interactively. -once you specify ac, pc and a z-point interactively. -these two calls result in two transformation matrices, the first defining how to interpret the MRI voxels in coordinate system 1, the other defining how to interpret the MRI voxels in coordinate system 2. -I leave it as an exercise to you how to combine these to in order to toggle from one coordinate system to the other directly. Good luck, Jan-Mathijs Schoffelen On Oct 30, 2012, at 5:58 PM, Frederic Roux wrote: > > Dear List members, > > this post is related to a question that I have > been posting several times now, but for which > I haven't found an answer yet. > > I have a set of coordinates [5,0,-1] which should > correspond to a point in sensor space. > > Is it possible to compute the corresponding coordinates > in MNI space using a transformation matrix or anything > similar? > > Any help or suggestions would be highly appreciated. > > Fred > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 31 14:16:03 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 14:16:03 +0100 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: <0ADACA7A-A5F9-455C-9F69-642D7279F920@donders.ru.nl> Dear Yuval, Thanks for the feedback. It would be awesome if you could digitize some 'electrodes' and send some data (obviously I am now not anymore working in a lab with a 4d-machine). At present FT's read_4d_hdr indeed tries to interpret the 'b_eeg_elec_locs' user-block. In addition to (what I expect) the digitized electrode positions, this block also contains the digitized coil positions in combination with the anatomical landmarks, yielding useful coregistration information. Cheers, JM On Oct 31, 2012, at 1:07 PM, Yuval Harpaz wrote: > Dear Jan-Mathijs > I don't have such data at the moment > I think you can get to the information in the config. > it is in user_data_block{1,12} > here is how I get to it with pdf4D > > > pdf=pdf4D('c2,rfDC'); > header = get(pdf, 'Header'); > chi=channel_index(pdf,'EEG'); > config = get(pdf, 'config'); > % chi(1) > % chan_no = header.channel_data{chi(1)}.chan_no > config.user_block_data{1,12}.hdr.type > config.user_block_data{1,12}.reserved > > > I may collect some data later today or in the next few days, I'll let you know if I do. > here is the data for eeg with no digitization of eeg > > ans = > > b_eeg_elec_locs > > > ans = > > Columns 1 through 22 > > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > Columns 23 through 32 > > 0 0 0 0 0 0 0 0 0 0 > > > > On 31 October 2012 09:03, jan-mathijs schoffelen wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > Dr .Harpaz > > BIU MEG lab > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed Oct 31 16:23:39 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 31 Oct 2012 16:23:39 +0100 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Dear Inna, Would you mind posting the citation of the reference paper you mention, for the whole list to benefit? Cheers, Johanna 2012/10/31 McGowin, Inna > Tom, > In theory SSS method allows to extract signal from the dental work (due to > its magnetization) if correction of motion is implemented. MEG SQUIDS can > only detect DC magnetic fields if the source is in motion but removing the > motion from the raw signal with SSS allows to detected DC signals. I have a > reference paper if you are interested. Thanks > > > On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < > tomh at kurage.nimh.nih.gov> wrote: > >> Just wanted to mention, the "SSS" method separates the signal into >> "inside" and "outside" the helmet (this is what MaxFilter does). So it is >> useless for removing dental artifacts. >> >> McGowin, Inna wrote: >> >>> Thank you Jörn for the info. >>> >>> I was looking for SSS to perform a DC analysis of MEG data with no >>> motion correction. >>> We have MEG datasets that are collected from subjects with high magnetic >>> noise such as dental work and/or brain surgery contamination. We wanted to >>> remove the signal that comes from these areas. Do you work with such >>> problems? >>> >>> Thanks, >>> Inna >>> >>> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >>> jm.horschig at donders.ru.nl >> >>> wrote: >>> >>> Dear Inna, >>> >>> I'm not aware of any implementation in FieldTrip. For the CTF system >>> we got the ft_denoise_synthetic function, but afaik SSS is something >>> NeuroMag specific and (I might be wrong here, because...) since we >>> do not have a NeuroMag system I would guess that no one bothered to >>> implement it. If you want to do so, you're welcome and we would be >>> most happy to help out on various ends with all our abilities ;) >>> >>> Best, >>> Jörn >>> >>> >>> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >>> >>>> Hello, >>>> I would like to know if Signal Space Separation method for MEG >>>> data analysis is available in the FieldTrip toolbox. >>>> >>>> Thanks, >>>> >>>> -- Inna >>>> >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> >>> -- Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour Centre for >>> Cognitive Neuroimaging >>> Radboud University Nijmegen Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >> ru.nl > >>> Tel: +31-(0)24-36-68493 >>> >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> -- >>> Inna McGowin >>> >>> >>> ------------------------------**------------------------------** >>> ------------ >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> -- >> The white knight is talking backwards. >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > > > -- > Inna McGowin > > > _______________________________________________ > 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 Don.Rojas at ucdenver.edu Wed Oct 31 16:14:35 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Wed, 31 Oct 2012 09:14:35 -0600 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: <5ED4573D-ED4E-4BD6-A9EE-ABFD01517BBA@ucdenver.edu> Dear Jan-Mathijs, We do not routinely digitize EEG electrodes, but I will look and see if we still have an old test dataset that we acquired to learn the process years ago. Like Yuval, we use Eugene Kronberg's pdf4D matlab object code. To get the labels (e.g., FP1), as opposed to the names (e.g., E1), we do something like this: pdf=pdf4D('c,rfhp0.1Hz') hdr=get(pdf,'header') idx=channel_index(pdf,'EEG','name') Variable idx holds the indices for the EEG channels. Then, for a specific channel label, if they are entered by the user, you can get it this way: hdr.channel_data{idx(1)}.chan_label In this case, that label is FP1 and the channel name is E1, in the dataset that I am looking at now. But, other than the index association, there is no standard convention for association of names and labels. The names are a 4d convention. The labels are user specified in the template configuration file used for acquisition. Or if looking for the indices of a specific EEG label, this way: idx=channel_index(pdf,'FP1','label') Don On Oct 31, 2012, at 1:03 AM, jan-mathijs schoffelen wrote: Dear community and 4d-users in particular, I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? Thanks for any input, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Oct 31 18:41:05 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 31 Oct 2012 13:41:05 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Johanna, no problem. "Presentation of electromagnetic multichannel data: The signal space separation method" by Samu Taulu and Matti Kajola. If anybody is interested in the SSS method implementation with FieldTrip it would be great. On Wed, Oct 31, 2012 at 11:23 AM, Johanna Zumer wrote: > Dear Inna, > > Would you mind posting the citation of the reference paper you mention, > for the whole list to benefit? > > Cheers, > Johanna > > 2012/10/31 McGowin, Inna > > Tom, >> In theory SSS method allows to extract signal from the dental work (due >> to its magnetization) if correction of motion is implemented. MEG SQUIDS >> can only detect DC magnetic fields if the source is in motion but removing >> the motion from the raw signal with SSS allows to detected DC signals. I >> have a reference paper if you are interested. Thanks >> >> >> On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < >> tomh at kurage.nimh.nih.gov> wrote: >> >>> Just wanted to mention, the "SSS" method separates the signal into >>> "inside" and "outside" the helmet (this is what MaxFilter does). So it is >>> useless for removing dental artifacts. >>> >>> McGowin, Inna wrote: >>> >>>> Thank you Jörn for the info. >>>> >>>> I was looking for SSS to perform a DC analysis of MEG data with no >>>> motion correction. >>>> We have MEG datasets that are collected from subjects with high >>>> magnetic noise such as dental work and/or brain surgery contamination. We >>>> wanted to remove the signal that comes from these areas. Do you work with >>>> such problems? >>>> >>>> Thanks, >>>> Inna >>>> >>>> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >>>> jm.horschig at donders.ru.nl >> >>>> wrote: >>>> >>>> Dear Inna, >>>> >>>> I'm not aware of any implementation in FieldTrip. For the CTF system >>>> we got the ft_denoise_synthetic function, but afaik SSS is something >>>> NeuroMag specific and (I might be wrong here, because...) since we >>>> do not have a NeuroMag system I would guess that no one bothered to >>>> implement it. If you want to do so, you're welcome and we would be >>>> most happy to help out on various ends with all our abilities ;) >>>> >>>> Best, >>>> Jörn >>>> >>>> >>>> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >>>> >>>>> Hello, >>>>> I would like to know if Signal Space Separation method for MEG >>>>> data analysis is available in the FieldTrip toolbox. >>>>> >>>>> Thanks, >>>>> >>>>> -- Inna >>>>> >>>>> >>>>> >>>>> ______________________________**_________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> > >>>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> -- Jörn M. Horschig >>>> PhD Student >>>> Donders Institute for Brain, Cognition and Behaviour Centre for >>>> Cognitive Neuroimaging >>>> Radboud University Nijmegen Neuronal Oscillations Group >>>> FieldTrip Development Team >>>> >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Contact: >>>> E-Mail: jm.horschig at donders.ru.nl >>> ru.nl > >>>> Tel: +31-(0)24-36-68493 >>>> >>>> Web: http://www.ru.nl/donders >>>> >>>> Visiting address: >>>> Trigon, room 2.30 >>>> Kapittelweg 29 >>>> NL-6525 EN Nijmegen >>>> The Netherlands >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> >>>> -- >>>> Inna McGowin >>>> >>>> >>>> ------------------------------**------------------------------** >>>> ------------ >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> -- >>> The white knight is talking backwards. >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Inna McGowin >> >> >> _______________________________________________ >> 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 > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Wed Oct 31 22:38:30 2012 From: lihqih at gmail.com (qi li) Date: Wed, 31 Oct 2012 17:38:30 -0400 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: <508F97DC.9080009@donders.ru.nl> References: <508F97DC.9080009@donders.ru.nl> Message-ID: Hi Jörn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "Jörn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > Jörn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mark.noordenbos at gmail.com Mon Oct 1 14:58:10 2012 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Mon, 1 Oct 2012 14:58:10 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 23, Issue 1 In-Reply-To: References: Message-ID: Hi Steve, Thank you for the answer. Kind regards, Mark 2012/10/1 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: cluster analysis (Stephen Politzer-Ahles) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 30 Sep 2012 08:46:09 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] cluster analysis > Message-ID: > < > CAJT2k_9cJCBFKnhkSBYL7Uf3c95uOrzXWh4wNqY-CfLb3kF_Ow at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Mark, > > The Fieldtrip wiki has examples of published papers that report cluster > analyses. In what I've seen, usually just the *p* is reported (if even > that), along with the latency and topography of the cluster. See e.g. > Pijnacker et al. (2011, *Journal of Cognitive Neuroscience*) and Meltzer & > Braun (2011, *Frontiers in Human Neuroscience*). There may be others in > http://fieldtrip.fcdonders.nl/publications > > As for your second question, my understanding is that the test statistic > doesn't matter (one of the points of the cluster test is that it works no > matter which test statistic you use (Maris & Oostenveld, 2007)). Also, to > the best of my knowledge, there are no degrees of freedom for the cluster > test, since it's non-parametric (it's not based on the distribution of a > test statistic, it's based on Monte Carlo estimation). > > Best, > Steve > > > Message: 1 > > Date: Sun, 30 Sep 2012 11:30:35 +0200 > > From: Mark Noordenbos > > To: fieldtrip at science.ru.nl > > Subject: [FieldTrip] cluster analysis > > Message-ID: > > > 7qVRZp7goj3AhoE7xaq8tqTPsg at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Dear Fieldtrippers, > > > > I was wondering how you report the results of the cluster analysis in > your > > papers. I have seen different types of how the results are reported. > > For example, some report only the p-value of the cluster whereas others > > report clusters as T(degrees of freedom) = [clusterstat value], p-value. > > > > Is T (multivariate t) the correct test statisic for the cluster analysis > > (like F for anova)? > > Where can I find (or calculate) the degrees of freedom of the clusterstat > > value? > > > > Thanks > > > > Best, > > Mark > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120930/fe6908ab/attachment-0001.html > > > > > > > ------------------------------ > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120930/d5471f2a/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 23, Issue 1 > **************************************** > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Wed Oct 3 12:59:11 2012 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Wed, 3 Oct 2012 11:59:11 +0100 (BST) Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: References: Message-ID: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> Dear all, I need to repair a couple of channels of my EEG (edf format). I'm in trouble reading the reference, because I don't understand how I have to prepare cfg for electrode position. for example  elec.elecpos and elec.channelpos : wich argument must I provide? Furthermore, in ft_channelselection I read  " 'gui' a graphical user interface will pop up to select the channels" How does it works? How can I make a gui pops up ? Ivano -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Oct 3 14:47:52 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 03 Oct 2012 14:47:52 +0200 Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> References: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> Message-ID: <506C33F8.6010006@donders.ru.nl> Dear Ivano, There is a template directory in FieldTrip, which contains a subfolder called elec. If you do not have any electrode positions, you can load a template from there. Alternatively, you can load a file from there and see how to set the structure up. For channelselection, I think you misunderstood something/someone. I never heard of the fact that there should be a gui, where do you got that information from? Since I'm in the dev team, I would be rather surprised if there would be a gui given that I never heard anything about that ;) I'm afraid you have to specify the channel names manually. You can try to use ft_prepare_layout with cfg.feedback = 'yes' for information about channelpositions, given that you provide an elec structure (or use a layout-template) Best, Jörn On 10/3/2012 12:59 PM, Ivano Triggiani wrote: > Dear all, > > I need to repair a couple of channels of my EEG (edf format). I'm in > trouble reading the reference, because I don't understand how I have > to prepare cfg for electrode position. for example elec.elecpos and > elec.channelpos : wich argument must I provide? > Furthermore, in ft_channelselection I read " 'gui' a graphical user > interface will pop up to select the channels" How does it works? How > can I make a gui pops up ? > > Ivano > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Wed Oct 3 15:14:12 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Wed, 3 Oct 2012 15:14:12 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Dear Fieldtrippers, I am trying to locate the source of an oscillatory effect at the frequency of 30Hz in a time window of interest. Before running the ft_sourceanalysis function, I run a ft_freqanalysis with a frequency smoothing of 8 (cfg.tapsmofrq =8). My question is whether there is any rule of thumb by which I could reliably determine the extent of the smoothing? I found out that even small changes in the 'tapsmofrq' value, significantly alter the spatial localization of the resulting sources. For instance, a tapsmofreq value of 8 would point to an effect in the frontal lobe, whereas a value of 10 would point to an effect in the parietal lobe. Any advice would be appreciated. Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Oct 3 15:42:22 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 3 Oct 2012 15:42:22 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni! The extend of the smoothing, I would say, is under normal circumstances simply what you request as a smoothing paramater (given the dpss characteristics), so I don't understand that formulation exactly. If different smoothings give drastically different result you might be sampling frequencies that behave differently from your frequency of interest. In your case, e.g. perhaps you are adding alpha in your estimate that might behave differently in your paradigm? I would therefor try to first figure out if your effect is, in fact, frequency specific and try to not to smooth more than necessary to capture that effect. So starting with no (extra) smoothing and looking at the TFR for instance. A simple FFT would give you a frequency smoothing of +/- 1/datalength already (e.g. half a second would be +/- 2 Hz). Simply averaging over frequencies (estimated with a Hanning taper) instead of using the slepian tapers might be a better option. Then again, you are limited in frequency specificity by the length of the data on which you calculate them. If that is too short you might have suboptimal and unexpected effects. In the case of slepian filters make sure you have at least a minimum of 3 tapers (which is shown in the output of freqanalysis). There is a lot more to say about tapers, smoothing etc, but I hope this helps. All the best, Stephen On 3 October 2012 15:14, Yoni Levy wrote: > Dear Fieldtrippers, > > I am trying to locate the source of an oscillatory effect at the frequency > of 30Hz in a time window of interest. > Before running the ft_sourceanalysis function, I run a ft_freqanalysis > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > My question is whether there is any rule of thumb by which I could > reliably determine the extent of the smoothing? > I found out that even small changes in the 'tapsmofrq' value, > significantly alter the spatial localization of the resulting sources. > For instance, a tapsmofreq value of 8 would point to an effect in the > frontal lobe, whereas a value of 10 would point to an effect in the > parietal lobe. > > Any advice would be appreciated. > > Yoni > > _______________________________________________ > 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 Lilla.Magyari at mpi.nl Wed Oct 3 15:55:00 2012 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Wed, 3 Oct 2012 15:55:00 +0200 (CEST) Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: <506C33F8.6010006@donders.ru.nl> References: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> <506C33F8.6010006@donders.ru.nl> Message-ID: <50904.131.174.45.70.1349272500.squirrel@131.174.45.70> hi Ivano, I have also checked the issue with the structure which defines the electrode positions. It worked fine for me when I defined the electrode positions with the following fields: elec.label = MX1 cell-array with strings (the labels of the electrodes) elec.chanpos=MX3 matrix with electrode positions When I used elecpos instead of chanpos, it did not work (I have already filed a bug about it because .elecpos is defined indeed in the reference of ft_datatype_sens). And the gui worked for me when I specified cfg.channel = 'gui' and called the ft_topoplotER function. But otherwise, you can just do it manually as Jorn described it. Best, Lilla > Dear Ivano, > > There is a template directory in FieldTrip, which contains a subfolder > called elec. If you do not have any electrode positions, you can load a > template from there. Alternatively, you can load a file from there and > see how to set the structure up. > > For channelselection, I think you misunderstood something/someone. I > never heard of the fact that there should be a gui, where do you got > that information from? Since I'm in the dev team, I would be rather > surprised if there would be a gui given that I never heard anything > about that ;) I'm afraid you have to specify the channel names manually. > You can try to use ft_prepare_layout with cfg.feedback = 'yes' for > information about channelpositions, given that you provide an elec > structure (or use a layout-template) > > Best, > Jörn > > On 10/3/2012 12:59 PM, Ivano Triggiani wrote: >> Dear all, >> >> I need to repair a couple of channels of my EEG (edf format). I'm in >> trouble reading the reference, because I don't understand how I have >> to prepare cfg for electrode position. for example elec.elecpos and >> elec.channelpos : wich argument must I provide? >> Furthermore, in ft_channelselection I read " 'gui' a graphical user >> interface will pop up to select the channels" How does it works? How >> can I make a gui pops up ? >> >> Ivano >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Wed Oct 3 17:14:47 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 3 Oct 2012 17:14:47 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni, Just to chime in quickly, please keep in mind that a tapsmofrq of 8 Hz actually indicates a smoothing window of 16Hz. I.e. cfg.tapsmofrq specifies the half-width of your smoothing window. So a tapsmofrq of 8 would mean that, for 30Hz, you are looking at signal coming from 22Hz to 38Hz. Also, the efficacy of the smoothing is largely dependent on the number of tapers (the more tapers, the closer your smoothing is to a 'box'). All the best, Roemer On Wed, Oct 3, 2012 at 3:42 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Yoni! > > The extend of the smoothing, I would say, is under normal circumstances > simply what you > request as a smoothing paramater (given the dpss characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you might be > sampling > frequencies that behave differently from your frequency of interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might behave > differently in your > paradigm? > > I would therefor try to first figure out if your effect is, in fact, > frequency specific > and try to not to smooth more than necessary to capture that effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the length of the > data on which > you calculate them. If that is too short you might have suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy wrote: > >> Dear Fieldtrippers, >> >> I am trying to locate the source of an oscillatory effect at the >> frequency of 30Hz in a time window of interest. >> Before running the ft_sourceanalysis function, I run a ft_freqanalysis >> with a frequency smoothing of 8 (cfg.tapsmofrq =8). >> My question is whether there is any rule of thumb by which I could >> reliably determine the extent of the smoothing? >> I found out that even small changes in the 'tapsmofrq' value, >> significantly alter the spatial localization of the resulting sources. >> For instance, a tapsmofreq value of 8 would point to an effect in the >> frontal lobe, whereas a value of 10 would point to an effect in the >> parietal lobe. >> >> Any advice would be appreciated. >> >> Yoni >> >> _______________________________________________ >> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From veganathlete at ymail.com Wed Oct 3 18:20:00 2012 From: veganathlete at ymail.com (Steph) Date: Wed, 03 Oct 2012 18:20:00 +0200 Subject: [FieldTrip] one EEG channel as trigger channel In-Reply-To: References: Message-ID: <506C65B0.5090409@ymail.com> Dear all, I'm new to Fieldtrip and I've been reading through the tutorial and reference pages, but still not able to solve my problem: there's raw EEG data, and one of the channels contains the trigger codes, i.e. it's not a trigger channel per se, so it can't be adressed via cfg.trialdef.eventtype. I want to get through the preprocessing, but simply don't know how to properly define the event. maybe writing my own trialfunction similar to http://fieldtrip.fcdonders.nl/example/detect_the_muscle_activity_in_an_emg_channel_and_use_that_as_trial_definition might be the solution? I don't get the last few lines of the example script, though. Hope you can help me make this work! Best wishes From yoniilevy at gmail.com Thu Oct 4 11:56:46 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 4 Oct 2012 11:56:46 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Hi Stephen! Thanks for your reply. My FOI is 29-31Hz; Since my time window is of 300ms, then my freq smoothing should now be of +/-3.33Hz. If I use a hanning taper, the parameters that i use for the freqanal (for further on doing beamformer-statistics) are: cfg.method ='mtmfft'; cfg.output ='fourier'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.taper = 'hanning'; cfg.foilim = [29 31]; However, if I get it right, multitapering should also be an option as 30Hz is not a relatively very low frequency. In that case, i remove the hanning and instead include a cfg.tapsmofrq =8, so that the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? Also, about the time window which is theoretically 300ms, but i think this depends on the length of every trial; for instance, before freqanal, when i redefine the trial, i input cfg.minlength = 'maxperlen'. So if i alter that, the freq smoothing should be different as well, correct? Ye, anyway, I wonder how to optimize all those parameters for my source localization statistics. Thanks in advance, Yoni On Wed, Oct 3, 2012 at 3:55 PM, wrote: > > Hi Yoni! > > The extend of the smoothing, I would say, is under normal circumstances > simply what you > request as a smoothing paramater (given the dpss characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you might be > sampling > frequencies that behave differently from your frequency of interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might behave differently > in your > paradigm? > > I would therefor try to first figure out if your effect is, in fact, > frequency specific > and try to not to smooth more than necessary to capture that effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the length of the > data on which > you calculate them. If that is too short you might have suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy wrote: > > > Dear Fieldtrippers, > > > > I am trying to locate the source of an oscillatory effect at the > frequency > > of 30Hz in a time window of interest. > > Before running the ft_sourceanalysis function, I run a ft_freqanalysis > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > My question is whether there is any rule of thumb by which I could > > reliably determine the extent of the smoothing? > > I found out that even small changes in the 'tapsmofrq' value, > > significantly alter the spatial localization of the resulting sources. > > For instance, a tapsmofreq value of 8 would point to an effect in the > > frontal lobe, whereas a value of 10 would point to an effect in the > > parietal lobe. > > > > Any advice would be appreciated. > > > > Yoni > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Oct 4 12:55:30 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 4 Oct 2012 12:55:30 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming (Roemer van der Meij) Message-ID: Hi Roemer, Sure, thanks. I am just noting that even tiny differences in both the values of 'tapsmofrq' that i feed in freqanalysis, and in 'cfg.minlength' that i feed in the redefinetrial function (just before running the freqanalysis) -- significantly alter the localization of sources that beamformer is (or is not) outputting. Best, Yoni On Thu, Oct 4, 2012 at 12:00 PM, wrote: > > > Hi Yoni, > > Just to chime in quickly, please keep in mind that a tapsmofrq of 8 Hz > actually indicates a smoothing window of 16Hz. I.e. cfg.tapsmofrq specifies > the half-width of your smoothing window. So a tapsmofrq of 8 would mean > that, for 30Hz, you are looking at signal coming from 22Hz to 38Hz. Also, > the efficacy of the smoothing is largely dependent on the number of tapers > (the more tapers, the closer your smoothing is to a 'box'). > > All the best, > Roemer > > > > On Wed, Oct 3, 2012 at 3:42 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > > > Hi Yoni! > > > > The extend of the smoothing, I would say, is under normal circumstances > > simply what you > > request as a smoothing paramater (given the dpss characteristics), so I > > don't understand > > that formulation exactly. > > > > If different smoothings give drastically different result you might be > > sampling > > frequencies that behave differently from your frequency of interest. In > > your case, e.g. > > perhaps you are adding alpha in your estimate that might behave > > differently in your > > paradigm? > > > > I would therefor try to first figure out if your effect is, in fact, > > frequency specific > > and try to not to smooth more than necessary to capture that effect. So > > starting with no > > (extra) smoothing and looking at the TFR for instance. A simple FFT would > > give you a > > frequency smoothing of +/- 1/datalength already (e.g. half a second would > > be +/- 2 Hz). > > Simply averaging over frequencies (estimated with a Hanning taper) > instead > > of using the > > slepian tapers might be a better option. > > > > Then again, you are limited in frequency specificity by the length of the > > data on which > > you calculate them. If that is too short you might have suboptimal and > > unexpected > > effects. In the case of slepian filters make sure you have at least a > > minimum of 3 tapers > > (which is shown in the output of freqanalysis). > > > > There is a lot more to say about tapers, smoothing etc, but I hope this > > helps. > > > > All the best, > > Stephen > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Thu Oct 4 14:13:35 2012 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Thu, 4 Oct 2012 14:13:35 +0200 Subject: [FieldTrip] PhD/postdoc positions for project on hippocampus oscillations (MEG+intracranial EEG) Message-ID: <5C1FBC99-9D3E-4585-817F-F8D82894ABBF@uni-konstanz.de> A new research group on neural oscillations, led by Dr. Sarang Dalal at the University of Konstanz (Germany), is searching for postdoctoral fellows and/or PhD students for a project involving MEG and intracranial EEG. This project will investigate the role of hippocampus oscillations in navigation- and memory-related networks using magnetoencephalography (MEG) and intracranial electroencephalography (iEEG), both separately and simultaneously. Group members will be trained in MEG/iEEG data acquisition and analysis, including quantification of oscillatory power/coupling and source localization. The project will involve substantial collaboration with the University Hospital Erlangen (Dr. Stefan Rampp & Prof. Hajo Hamer). The working language of the laboratory and most department meetings is English. The ideal applicant will have a background in cognitive neuroscience or neural signal processing. PhD positions are funded for 3 years (usual PhD duration in Germany), and postdoc positions for 2 years with a possibility for extension to 3 years. The starting date can be between December 2012 and April 2013. Interested applicants may send a CV and a brief letter of interest by e-mail to sarang.dalal -at- uni-konstanz.de, preferably by November 1, 2012. Dr. Dalal will be present at the Society for Neuroscience meeting in New Orleans and would be happy to meet with anybody interested to apply. ---------------------------------------------------- Sarang S. Dalal, Ph.D. Zukunftskolleg / Dept. of Psychology University of Konstanz http://nutmeg.berkeley.edu/sarang/ tel: +49 7531 88 5706 From stephen.whitmarsh at gmail.com Thu Oct 4 15:47:21 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 4 Oct 2012 15:47:21 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni, Indeed, a simple hanning taper will already give you a frequency smoothing of +/- 3Hz. Adding tapers can only increase this, and I don't see why you would beamform 22 to 38 Hz if you are interested between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper = 'hanning', giving you a measure of power between of about 27 and 33? You're right that having different trial lenghts will indeed give you a different frequency resolution per trial. If this is a problem is hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial would indeed make sure they are all of the same length (i.e. the maximal length) - but if that is different between subjects/conditions that might not be enough. Best, Stephen On 4 October 2012 11:56, Yoni Levy wrote: > Hi Stephen! > Thanks for your reply. > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > smoothing should now be of +/-3.33Hz. If I use a hanning taper, the > parameters that i use for the freqanal (for further on doing > beamformer-statistics) are: > cfg.method ='mtmfft'; > cfg.output ='fourier'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.taper = 'hanning'; > cfg.foilim = [29 31]; > However, if I get it right, multitapering should also be an option as 30Hz > is not a relatively very low frequency. In that case, i remove the hanning > and instead include a cfg.tapsmofrq =8, so that the number of tapers > results in 8*0.3*2-1= 3 (I think?). Is it so? > > Also, about the time window which is theoretically 300ms, but i think this > depends on the length of every trial; for instance, before freqanal, when i > redefine the trial, i input cfg.minlength = 'maxperlen'. So if i alter > that, the freq smoothing should be different as well, correct? Ye, anyway, > I wonder how to optimize all those parameters for my source localization > statistics. > > Thanks in advance, > > Yoni > > > On Wed, Oct 3, 2012 at 3:55 PM, wrote: > >> >> Hi Yoni! >> >> The extend of the smoothing, I would say, is under normal circumstances >> simply what you >> request as a smoothing paramater (given the dpss characteristics), so I >> don't understand >> that formulation exactly. >> >> If different smoothings give drastically different result you might be >> sampling >> frequencies that behave differently from your frequency of interest. In >> your case, e.g. >> perhaps you are adding alpha in your estimate that might behave >> differently >> in your >> paradigm? >> >> I would therefor try to first figure out if your effect is, in fact, >> frequency specific >> and try to not to smooth more than necessary to capture that effect. So >> starting with no >> (extra) smoothing and looking at the TFR for instance. A simple FFT would >> give you a >> frequency smoothing of +/- 1/datalength already (e.g. half a second would >> be +/- 2 Hz). >> Simply averaging over frequencies (estimated with a Hanning taper) instead >> of using the >> slepian tapers might be a better option. >> >> Then again, you are limited in frequency specificity by the length of the >> data on which >> you calculate them. If that is too short you might have suboptimal and >> unexpected >> effects. In the case of slepian filters make sure you have at least a >> minimum of 3 tapers >> (which is shown in the output of freqanalysis). >> >> There is a lot more to say about tapers, smoothing etc, but I hope this >> helps. >> >> All the best, >> Stephen >> >> On 3 October 2012 15:14, Yoni Levy wrote: >> >> > Dear Fieldtrippers, >> > >> > I am trying to locate the source of an oscillatory effect at the >> frequency >> > of 30Hz in a time window of interest. >> > Before running the ft_sourceanalysis function, I run a ft_freqanalysis >> > with a frequency smoothing of 8 (cfg.tapsmofrq =8). >> > My question is whether there is any rule of thumb by which I could >> > reliably determine the extent of the smoothing? >> > I found out that even small changes in the 'tapsmofrq' value, >> > significantly alter the spatial localization of the resulting sources. >> > For instance, a tapsmofreq value of 8 would point to an effect in the >> > frontal lobe, whereas a value of 10 would point to an effect in the >> > parietal lobe. >> > >> > Any advice would be appreciated. >> > >> > Yoni >> > >> > > _______________________________________________ > 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 jose.herrero66 at gmail.com Thu Oct 4 23:40:44 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Thu, 4 Oct 2012 17:40:44 -0400 Subject: [FieldTrip] query on Analysis of corticomuscular coherence Message-ID: Hey, just starting using fieldtrip today ... but did not get very far: I tried to do the example Analysis of corticomuscular coherence but got the error: >> clear matlabroot = c:\data_fieldtrip\ evaluating trialfunction 'trialfun_left' Warning: adding c:\data_fieldtrip\fieldtrip-20120530\external\ctf toolbox to your Matlab path readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 696768000 bytes (from res4 file) ??? Index exceeds matrix dimensions. Error in ==> getCTFdata at 280 if trials(kt)<=meg4Trial(openFile) | trials(kt)>meg4Trial(openFile+1) Error in ==> ft_read_data at 479 dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', 'double'); Error in ==> read_trigger at 69 dat = ft_read_data(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', 0); Error in ==> ft_read_event at 481 trigger = read_trigger(filename, 'header', hdr, 'begsample', flt_minsample, 'endsample', flt_maxsample, 'chanindx', trigchanindx, 'dataformat', dataformat, 'detectflank', detectflank, 'trigshif Error in ==> trialfun_left at 7 event = ft_read_event(cfg.dataset); Error in ==> ft_definetrial at 170 trl = feval(cfg.trialfun, cfg); Error in ==> ex_corticomuscle at 5 cfg = ft_definetrial(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Oct 5 08:56:27 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 05 Oct 2012 08:56:27 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: <506E849B.7050602@donders.ru.nl> Hey Yoni, Stephen is right, and just to make this really clear, a Hanning taper will always give you a smoothing of your Raleigh frequency (which in your case is 3.33Hz). Any taper can only (effectively) smooth in terms of your frequency resolution or Raleigh frequency, thus a Hann taper gives you the minimal smoothing (apart from a boxcar). Then, the problem with different trial becomes more apparent, because since the frequency resolution changes, also the smoothing of the Hanning taper changes accordingly. I also think that making the trials having equal length is the best approach. Having unequal trial lengths also constitutes a problem for multitapering, cause you will end up with different tapers and different number of tapers per trial. And also your frequency smoothing should be a multiple of the Raleigh frequency. You can ask for other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you will see the smoothing at 6.66 or 9.99Hz (depending on where you define the end of smoothing) - it's just because you sample in 3.33Hz steps. Here you can maybe also see, that having different trial lengths might constitute a problem, because you will effectively get different smoothing per trial, depending on your Raleigh frequency. The computation of the tapers was however correct, so with 8Hz smoothing and a 0.3s time window you get 3 tapers ;) Btw, I once played around with it and realized that the 3 tapers you obtain are not always the same for different parameters, e.g. for 8Hz and 0.25s window you will also get 8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you get with a 0.3s time window. So even that can cause a problem. Btw, I never heard that different frequency smoothing ends up in different part of the brain when beaming. The only reason I can see is what Stephen already pointed out, that other frequency bands with different functional characteristics smear into your power spectrum. Best, Jörn On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote: > Hi Yoni, > > Indeed, a simple hanning taper will already give you a frequency > smoothing of +/- 3Hz. Adding tapers can only increase this, and I > don't see why you would beamform 22 to 38 Hz if you are interested > between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper > = 'hanning', giving you a measure of power between of about 27 and 33? > > You're right that having different trial lenghts will indeed give you > a different frequency resolution per trial. If this is a problem is > hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial > would indeed make sure they are all of the same length (i.e. the > maximal length) - but if that is different between subjects/conditions > that might not be enough. > > Best, > Stephen > > > > On 4 October 2012 11:56, Yoni Levy > wrote: > > Hi Stephen! > Thanks for your reply. > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > smoothing should now be of +/-3.33Hz. If I use a hanning taper, > the parameters that i use for the freqanal (for further on doing > beamformer-statistics) are: > cfg.method ='mtmfft'; > cfg.output ='fourier'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.taper = 'hanning'; > cfg.foilim = [29 31]; > However, if I get it right, multitapering should also be an option > as 30Hz is not a relatively very low frequency. In that case, i > remove the hanning and instead include a cfg.tapsmofrq =8, so that > the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? > > Also, about the time window which is theoretically 300ms, but i > think this depends on the length of every trial; for instance, > before freqanal, when i redefine the trial, i input cfg.minlength > = 'maxperlen'. So if i alter that, the freq smoothing should be > different as well, correct? Ye, anyway, I wonder how to optimize > all those parameters for my source localization statistics. > > Thanks in advance, > > Yoni > > > On Wed, Oct 3, 2012 at 3:55 PM, > wrote: > > > Hi Yoni! > > The extend of the smoothing, I would say, is under normal > circumstances > simply what you > request as a smoothing paramater (given the dpss > characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you > might be > sampling > frequencies that behave differently from your frequency of > interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might > behave differently > in your > paradigm? > > I would therefor try to first figure out if your effect is, in > fact, > frequency specific > and try to not to smooth more than necessary to capture that > effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A > simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a > second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning > taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the > length of the > data on which > you calculate them. If that is too short you might have > suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at > least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I > hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy > wrote: > > > Dear Fieldtrippers, > > > > I am trying to locate the source of an oscillatory effect at > the frequency > > of 30Hz in a time window of interest. > > Before running the ft_sourceanalysis function, I run a > ft_freqanalysis > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > My question is whether there is any rule of thumb by which I > could > > reliably determine the extent of the smoothing? > > I found out that even small changes in the 'tapsmofrq' value, > > significantly alter the spatial localization of the > resulting sources. > > For instance, a tapsmofreq value of 8 would point to an > effect in the > > frontal lobe, whereas a value of 10 would point to an effect > in the > > parietal lobe. > > > > Any advice would be appreciated. > > > > Yoni > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Fri Oct 5 17:10:31 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Fri, 5 Oct 2012 17:10:31 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies Message-ID: Dear fieldtrippers, does anyone know how I can find the peak maximum of an erp? And how to calculate the latency until the maximum? Timelockanalysis and the grand average of all erps are already done. Best, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From vale.niccolai at gmail.com Fri Oct 5 18:30:02 2012 From: vale.niccolai at gmail.com (Valentina Niccolai) Date: Fri, 5 Oct 2012 18:30:02 +0200 Subject: [FieldTrip] problem with ICA Message-ID: Hallo. I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. I am thankful for any help. Valentina Niccolai cfg.method = 'runica'; cfg.channel = {'all','-EOG','-EMG'}; comp = ft_componentanalysis(cfg, rej_vis_res); The result of my component analysis looks like this: comp = fsample: 600 time: {1x237 cell} trial: {1x237 cell} topo: [306x2 double] unmixing: [2x306 double] label: {2x1 cell} topolabel: {306x1 cell} grad: [1x1 struct] trialinfo: [237x1 double] cfg: [1x1 struct] and in comp.trial I get imaginary numbers: >> comp.trial{1} ans = 1.0e-18 * Columns 1 through 6 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ica.jpg Type: image/jpeg Size: 39895 bytes Desc: not available URL: From politzerahless at gmail.com Fri Oct 5 18:45:00 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 5 Oct 2012 11:45:00 -0500 Subject: [FieldTrip] Calculate amplitudes and latencies Message-ID: Hi Daria, I'm not aware of a built-in FieldTrip function that does these things, but since it involves basic math you can do it with MATLAB functions (e.g., max() to find the maximum amplitude, and find() to get the latency of that point). However, see Steve Luck's (2005) *An Introduction to the Event-Related Potential Technique* for a discussion of why peak latency and peak amplitude measures are often not good. I would recommend using mean amplitude (there is an example of how to do it in FieldTrip at http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics#t-test_with_fieldtrip_function, although it's also straightforward to do just in MATLAB) and fractional area latency as your measures. Or, better yet, you could just do a cluster test, which will tell you where and when significant clusters are without your having to try and measure latencies ( http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock). Best, Steve Message: 1 > Date: Fri, 5 Oct 2012 17:10:31 +0200 > From: Daria Laptinskaya > To: FieldTrip discussion list > Subject: [FieldTrip] Calculate amplitudes and latencies > Message-ID: > < > CADcxnnNwXEo3MJuYRrkUfzOq-+bgDj-qmMHiFbytjMRX6_vt9A at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear fieldtrippers, > > does anyone know how I can find the peak maximum of an erp? > And how to calculate the latency until the maximum? > > Timelockanalysis and the grand average of all erps are already done. > > Best, > Daria > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Oct 5 18:48:20 2012 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 5 Oct 2012 18:48:20 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi Daria, you can either use the function "min" or "max" to find the minima and maxima in your data, or you can use the "peakdetect2"-function that can be found in the "private" folder of field trip. Another function, that is quite similar to the field trip-function is the "findpeaks"-function, in which you can even set parameters how exactly you want to define your peaks. Fo the latency: all the above functions can give you the index (i.e. sample point) of your peak, if you then compare this to your time-vector, you can get the latency until the maximum. Good Luck, Julian Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > Dear fieldtrippers, > > does anyone know how I can find the peak maximum of an erp? > And how to calculate the latency until the maximum? > > Timelockanalysis and the grand average of all erps are already done. > > Best, > Daria > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Fri Oct 5 20:34:05 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Fri, 5 Oct 2012 14:34:05 -0400 Subject: [FieldTrip] time-resolved psd/csd Message-ID: Hey, I like very much the tuto in http://fieldtrip.fcdonders.nl/tutorial/fourier where the power-spectral densities (psd) and cross-spectral densities (csd) calculations are exemplified. do you know if there is a similar example showing a time-resolved psd and csd (e.g. where you can see power/coherence changes across time). thanks Jose Herrero -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Fri Oct 5 20:39:31 2012 From: jdien07 at mac.com (Joseph Dien) Date: Fri, 05 Oct 2012 14:39:31 -0400 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: One typically gets the complex numbers from ICA when the data have less than full rank. For example, if there is a channel that is a flat line (maybe a bad channel or a reference) or when two channels are perfectly correlated (as when the data is mean mastoid referenced and one has included both mastoid channels as they will have a perfect -1 correlation). Cheers! Joe On Oct 5, 2012, at 12:30 PM, Valentina Niccolai wrote: > Hallo. > > I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. > > Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. > > I am thankful for any help. > > > Valentina Niccolai > > > cfg.method = 'runica'; > > cfg.channel = {'all','-EOG','-EMG'}; > > comp = ft_componentanalysis(cfg, rej_vis_res); > > > > The result of my component analysis looks like this: > > comp = > > > fsample: 600 > > time: {1x237 cell} > > trial: {1x237 cell} > > topo: [306x2 double] > > unmixing: [2x306 double] > > label: {2x1 cell} > > topolabel: {306x1 cell} > > grad: [1x1 struct] > > trialinfo: [237x1 double] > > cfg: [1x1 struct] > > > and in comp.trial I get imaginary numbers: > > > >> comp.trial{1} > > ans = > > 1.0e-18 * > > Columns 1 through 6 > > 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i > > -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Fri Oct 5 20:39:31 2012 From: jdien07 at mac.com (Joseph Dien) Date: Fri, 05 Oct 2012 14:39:31 -0400 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: One typically gets the complex numbers from ICA when the data have less than full rank. For example, if there is a channel that is a flat line (maybe a bad channel or a reference) or when two channels are perfectly correlated (as when the data is mean mastoid referenced and one has included both mastoid channels as they will have a perfect -1 correlation). Cheers! Joe On Oct 5, 2012, at 12:30 PM, Valentina Niccolai wrote: > Hallo. > > I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. > > Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. > > I am thankful for any help. > > > Valentina Niccolai > > > cfg.method = 'runica'; > > cfg.channel = {'all','-EOG','-EMG'}; > > comp = ft_componentanalysis(cfg, rej_vis_res); > > > > The result of my component analysis looks like this: > > comp = > > > fsample: 600 > > time: {1x237 cell} > > trial: {1x237 cell} > > topo: [306x2 double] > > unmixing: [2x306 double] > > label: {2x1 cell} > > topolabel: {306x1 cell} > > grad: [1x1 struct] > > trialinfo: [237x1 double] > > cfg: [1x1 struct] > > > and in comp.trial I get imaginary numbers: > > > >> comp.trial{1} > > ans = > > 1.0e-18 * > > Columns 1 through 6 > > 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i > > -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat Oct 6 07:39:32 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 6 Oct 2012 08:39:32 +0300 Subject: [FieldTrip] Fisher classifier Message-ID: Hello, Does anyone know how can I classfy my data using Fisher classifier? (Is there such function in the Fieldtrip list?) Thanks for help. Best, -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Sat Oct 6 12:18:54 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sat, 6 Oct 2012 12:18:54 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Many thanks-I will try to do! Best, Daria 2012/10/5 Julian Keil > Hi Daria, > > you can either use the function "min" or "max" to find the minima and > maxima in your data, or you can use the "peakdetect2"-function that can be > found in the "private" folder of field trip. > Another function, that is quite similar to the field trip-function is the > "findpeaks"-function, in which you can even set parameters how exactly you > want to define your peaks. > Fo the latency: all the above functions can give you the index (i.e. > sample point) of your peak, if you then compare this to your time-vector, > you can get the latency until the maximum. > > Good Luck, > > Julian > > Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > > > Dear fieldtrippers, > > > > does anyone know how I can find the peak maximum of an erp? > > And how to calculate the latency until the maximum? > > > > Timelockanalysis and the grand average of all erps are already done. > > > > Best, > > Daria > > > > > > _______________________________________________ > > 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 veganathlete at ymail.com Sat Oct 6 17:37:58 2012 From: veganathlete at ymail.com (Steph) Date: Sat, 06 Oct 2012 17:37:58 +0200 Subject: [FieldTrip] correct use of ft_read_data Message-ID: <50705056.6050709@ymail.com> Dear Fieldtrippers, could you help me make ft_read_data work? the data is a <34x48128 double>. the header looks like this: h = nChans: 34 nSamples: 48128 nSamplesPre: 0 nTrials: 1 Fs: 512 label: {34x1 cell} orig: [1x1 struct] chantype: {34x1 cell} chanunit: {34x1 cell} I want to read one channel to define the trials in my trialfunction. t=ft_read_data(cfg.dataset,'header',h,'chanindx',17) Attempted to access dat(17,:); index out of bounds because size(dat)=[1,48128]. Error in ft_read_data (line 294) dat(i,:) = dat(i,:).* parameters.SourceChGain.NumericValue(i) + parameters.SourceChOffset.NumericValue(i); Best Steph From jose.herrero66 at gmail.com Sat Oct 6 22:02:53 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Sat, 6 Oct 2012 16:02:53 -0400 Subject: [FieldTrip] query Message-ID: hi, I have posted several questions to fieldtrip at science.ru.nl but I am not able to see them e-mail to me.did you receive them? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Sun Oct 7 00:01:06 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 6 Oct 2012 18:01:06 -0400 Subject: [FieldTrip] Fisher classifier In-Reply-To: References: Message-ID: If you have access to Matlab Statistics toolbox It has LDA (Fisher classifier) among all standard classifiers. http://www.mathworks.com/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html I personally prefer scikit-learn(Python), which is much more complete package. http://scikit-learn.org/dev/auto_examples/plot_lda_qda.html Sheraz Khan Martinos Center On Sat, Oct 6, 2012 at 1:39 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > Does anyone know how can I classfy my data using Fisher classifier? > (Is there such function in the Fieldtrip list?) > > Thanks for help. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sun Oct 7 02:01:47 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 7 Oct 2012 03:01:47 +0300 Subject: [FieldTrip] Fisher classifier In-Reply-To: References: Message-ID: Thank you Sheraz, Yes, and there is also fisher classifier function under prtools. But the people in Fieldtrip made a function for classification called ft_timelockstatistics, I thought I can play with its parameters so that the kind of classifier can be changed. I don't know whether people use fieldtrip functions just for preprocessing and then use the classifiers from other libraries? Hamza On Sun, Oct 7, 2012 at 1:01 AM, Sheraz Khan wrote: > If you have access to Matlab Statistics toolbox It has LDA (Fisher > classifier) among all standard classifiers. > > http://www.mathworks.com/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html > > I personally prefer scikit-learn(Python), which is much more complete > package. > > http://scikit-learn.org/dev/auto_examples/plot_lda_qda.html > > Sheraz Khan > Martinos Center > > On Sat, Oct 6, 2012 at 1:39 AM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Hello, >> >> Does anyone know how can I classfy my data using Fisher classifier? >> (Is there such function in the Fieldtrip list?) >> >> Thanks for help. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Sun Oct 7 11:34:31 2012 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Sun, 7 Oct 2012 11:34:31 +0200 Subject: [FieldTrip] Brain imaging PhD projects available Message-ID: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> Dear all, Please find below three PhD projects I am posting on behalf of my group leader. Cheers, Diederick ------------- Three brain imaging PhD projects are available at the Sleep & Cognition group of the Netherlands Institute for Neuroscience in Amsterdam, The Netherlands. Projects are in collaboration with one or more partners in Freiburg, Basel or Strasbourg. Project 8: Individual differences in the spatiotemporal profile of brain activity during wake and sleep The project aims to elucidate how spatiotemporal profiles of brain activity develop from wakefulness to deep sleep. Assessments in good and poor sleepers will be done using the EGI MR-compatible 256-channel high density EEG-system in the quietest 3T MRI system presently available, a Toshiba Vantage Titan 3T with the Pianissimo technology. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam, Freiburg and Basel. Project 6: Spatiotemporal patterns of cortical oscillations that determine subjective wake time during sleep The project aims to elucidate the neural correlates of the loss of consciousness during sleep. Spatiotemporal profiles of brain activity in good and poor sleepers will be obtained using the EGI 256-channel high density EEG-system, both during unperturbed sleep and in response to sensory stimulation. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam and Freiburg. Project 4: Reward effects of light: phototherapy as a treatment for pathologies with motivational deficits The project aims to elucidate the involvement of brain regions regulating reward and motivation in the mood-improving effects of bright light. 3T MRI assessments will be done in good and poor sleepers. Assessments of behavior, circadian genes, proteins, neurotransmitters and hormones will be done in transgenic animals. Human studies will be performed in Amsterdam, animal studies in Strasbourg. Projects are open to students with a (pending) master (or equivalent) degree in Physics, Mathematics, Biology, Psychology, Neuroscience or Engineering or comparable. Experience with brain imaging, EEG, or sleep is an advantage for all projects. Experience with animal studies is an advantage for project 4. Especially students with some affinity with and/or background in mathematics and/or scientific programming are also encouraged to apply. A proficient level of familiarity with large datasets and programming is commendable, e.g. using Matlab. Mastery of the English language is essential for writing papers and a thesis; mastery of the local languages will facilitate recordings. If you're interested, please read additional information on http://www.neurotime-erasmus.org/ and contact e.van.someren at nin.knaw.nl. Thank you for your interest! Prof. dr. Eus J.W. Van Someren http://www.nin.knaw.nl/research_groups/van_someren_group/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Sun Oct 7 11:40:51 2012 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Sun, 7 Oct 2012 11:40:51 +0200 Subject: [FieldTrip] Brain imaging PhD projects available In-Reply-To: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> References: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> Message-ID: <33CC1C48-5922-4C31-94EA-69B5EB5920ED@gmail.com> Dear all, Relevant keywords for these projects are: sleep - consciousness - mood - combined high-density EEG + silent fMRI - network analysis Cheers, Diederick On 7 okt. 2012, at 11:34, Diederick Stoffers wrote: > Dear all, > > Please find below three PhD projects I am posting on behalf of my group leader. > > Cheers, > > Diederick > > ------------- > > Three brain imaging PhD projects are available at the Sleep & Cognition group of the Netherlands Institute for Neuroscience in Amsterdam, The Netherlands. Projects are in collaboration with one or more partners in Freiburg, Basel or Strasbourg. > > > > > Project 8: Individual differences in the spatiotemporal profile of brain activity during wake and sleep > > The project aims to elucidate how spatiotemporal profiles of brain activity develop from wakefulness to deep sleep. Assessments in good and poor sleepers will be done using the EGI MR-compatible 256-channel high density EEG-system in the quietest 3T MRI system presently available, a Toshiba Vantage Titan 3T with the Pianissimo technology. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam, Freiburg and Basel. > > > > Project 6: Spatiotemporal patterns of cortical oscillations that determine subjective wake time during sleep > > The project aims to elucidate the neural correlates of the loss of consciousness during sleep. Spatiotemporal profiles of brain activity in good and poor sleepers will be obtained using the EGI 256-channel high density EEG-system, both during unperturbed sleep and in response to sensory stimulation. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam and Freiburg. > > > > Project 4: Reward effects of light: phototherapy as a treatment for pathologies with motivational deficits > > The project aims to elucidate the involvement of brain regions regulating reward and motivation in the mood-improving effects of bright light. 3T MRI assessments will be done in good and poor sleepers. Assessments of behavior, circadian genes, proteins, neurotransmitters and hormones will be done in transgenic animals. Human studies will be performed in Amsterdam, animal studies in Strasbourg. > > > > Projects are open to students with a (pending) master (or equivalent) degree in Physics, Mathematics, Biology, Psychology, Neuroscience or Engineering or comparable. Experience with brain imaging, EEG, or sleep is an advantage for all projects. Experience with animal studies is an advantage for project 4. Especially students with some affinity with and/or background in mathematics and/or scientific programming are also encouraged to apply. A proficient level of familiarity with large datasets and programming is commendable, e.g. using Matlab. Mastery of the English language is essential for writing papers and a thesis; mastery of the local languages will facilitate recordings. > > > If you're interested, please read additional information on http://www.neurotime-erasmus.org/ and contact e.van.someren at nin.knaw.nl. > > > Thank you for your interest! > > Prof. dr. Eus J.W. Van Someren > > > http://www.nin.knaw.nl/research_groups/van_someren_group/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobrobbrown at googlemail.com Sun Oct 7 12:52:52 2012 From: bobrobbrown at googlemail.com (Robert Brown) Date: Sun, 7 Oct 2012 13:52:52 +0300 Subject: [FieldTrip] query In-Reply-To: References: Message-ID: hi man, everybody sees your posts but you should think first, try first, try even harder, try for a week, before you post a question here - respect the time of others! your first two questions were really really basic that you would figure out yourself in a few hours or days. cheers, Bob 2012/10/6 Jose Herrero > > hi, I have posted several questions to fieldtrip at science.ru.nl but I am > not able to see them e-mail to me.did you receive them? > > > _______________________________________________ > 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 daria.laptinskaya at googlemail.com Sun Oct 7 13:23:27 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sun, 7 Oct 2012 13:23:27 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi Julian, by using the peakdetect2- or the findpeaks-function I get an error: ??? Undefined function or method 'peakdetect2' for input arguments of type 'double' (I use EGI-data with 149 channels and 113 timepoints). Do you have any idea, what the problem could be? Daria 2012/10/6 Daria Laptinskaya > Many thanks-I will try to do! > > Best, > Daria > > > > 2012/10/5 Julian Keil > >> Hi Daria, >> >> you can either use the function "min" or "max" to find the minima and >> maxima in your data, or you can use the "peakdetect2"-function that can be >> found in the "private" folder of field trip. >> Another function, that is quite similar to the field trip-function is the >> "findpeaks"-function, in which you can even set parameters how exactly you >> want to define your peaks. >> Fo the latency: all the above functions can give you the index (i.e. >> sample point) of your peak, if you then compare this to your time-vector, >> you can get the latency until the maximum. >> >> Good Luck, >> >> Julian >> >> Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: >> >> > Dear fieldtrippers, >> > >> > does anyone know how I can find the peak maximum of an erp? >> > And how to calculate the latency until the maximum? >> > >> > Timelockanalysis and the grand average of all erps are already done. >> > >> > Best, >> > Daria >> > >> > >> > _______________________________________________ >> > 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 julian.keil at gmail.com Sun Oct 7 15:24:02 2012 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 7 Oct 2012 15:24:02 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi, I suppose your "peakdetect2" is located in the "private" folder. Matlab by default does not include private folders in the path. You can either rename it (e.g. to "notprivate") or manually copy the function to another folder. The "findpeaks" should actually be a built-in function, but maybe you have to check the math works file exchange. As usual, if you are not sure, if you have the respective function in your matlab path, check with "which". Best, Julian Am 07.10.2012 um 13:23 schrieb Daria Laptinskaya: > Hi Julian, > > by using the peakdetect2- or the findpeaks-function I get an error: > ??? Undefined function or method 'peakdetect2' for input arguments of type 'double' > (I use EGI-data with 149 channels and 113 timepoints). > > Do you have any idea, what the problem could be? > > Daria > > > > > > > 2012/10/6 Daria Laptinskaya > Many thanks-I will try to do! > > Best, > Daria > > > > 2012/10/5 Julian Keil > Hi Daria, > > you can either use the function "min" or "max" to find the minima and maxima in your data, or you can use the "peakdetect2"-function that can be found in the "private" folder of field trip. > Another function, that is quite similar to the field trip-function is the "findpeaks"-function, in which you can even set parameters how exactly you want to define your peaks. > Fo the latency: all the above functions can give you the index (i.e. sample point) of your peak, if you then compare this to your time-vector, you can get the latency until the maximum. > > Good Luck, > > Julian > > Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > > > Dear fieldtrippers, > > > > does anyone know how I can find the peak maximum of an erp? > > And how to calculate the latency until the maximum? > > > > Timelockanalysis and the grand average of all erps are already done. > > > > Best, > > Daria > > > > > > _______________________________________________ > > 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 akiko.ikkai at gmail.com Sun Oct 7 17:36:50 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Sun, 7 Oct 2012 11:36:50 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem Message-ID: Dear Fieldtrip users, I've been trying to run group stats on my EEG source data, which contains 14 subjects' normalized beamformer data, and having serious swap memory issue (not Matlab memory issue, but OS swap memory). I'm trying to contrast 2 conditions (within subject design). Each subject's normalized beamformer data (1 condition) is source_lTMI_intNorm = anatomy: [181x217x181 double] inside: [181x217x181 logical] avg: [1x1 struct] transform: [4x4 double] dim: [181 217 181] cfg: [1x1 struct] >whos Name Size Bytes Class Attributes source_lTMI_intNorm 1x1 520114791 struct therefore, when I open all subjects' data ("data1group" and "data2group"), it's huge... Name Size Bytes Class Attributes data1group 1x14 5909429438 cell data2group 1x14 6705652782 cell data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, >data1group{1} anatomy: [181x217x181 double] inside: [181x217x181 logical] avg: [1x1 struct] transform: [4x4 double] dim: [181 217 181] cfg: [1x1 struct] So, when I try to run cfg=[]; cfg.dim = data1group{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 100; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(data1group); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); stat.anatomy = data1group{1}.anatomy; my computer (os 10.6.8, 6G memory) runs out of swap memory (startup memory?), which forces me to quit Matlab. I'm running above processes in a function, so I'm not running into Matlab memory error. Could someone help me how it could run more efficiently? I guess cfg.inputfile is not available for ft_sourcestatistics, so I have to eventually load 2 group data in Matlab workspace...? Thank you in advance! Akiko -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Sun Oct 7 19:31:48 2012 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Sun, 7 Oct 2012 13:31:48 -0400 Subject: [FieldTrip] correct use of ft_read_data In-Reply-To: <50705056.6050709@ymail.com> References: <50705056.6050709@ymail.com> Message-ID: <1471CFF1-771E-486C-A6E3-C8C287531936@gmail.com> Have you tried to use ft_read_event? Take a look at trialfun_general it will help you understand how to read in your events. Best, Raquel Sent from my iPhone On Oct 6, 2012, at 11:37 AM, Steph wrote: > Dear Fieldtrippers, > > could you help me make ft_read_data work? > > the data is a <34x48128 double>. > > the header looks like this: > > h = > nChans: 34 > nSamples: 48128 > nSamplesPre: 0 > nTrials: 1 > Fs: 512 > label: {34x1 cell} > orig: [1x1 struct] > chantype: {34x1 cell} > chanunit: {34x1 cell} > > I want to read one channel to define the trials in my trialfunction. > > t=ft_read_data(cfg.dataset,'header',h,'chanindx',17) > > Attempted to access dat(17,:); index out of bounds > because size(dat)=[1,48128]. > > Error in ft_read_data (line 294) > dat(i,:) = dat(i,:).* > parameters.SourceChGain.NumericValue(i) + > parameters.SourceChOffset.NumericValue(i); > > Best > Steph > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From shaegens at gmail.com Sun Oct 7 20:16:28 2012 From: shaegens at gmail.com (Saskia Haegens) Date: Sun, 7 Oct 2012 14:16:28 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, In my experience with grandavg source structs, sometimes the cfg (that's attached to the data struct) becomes very large and can consume a considerable amount of memory. I'm not sure if that's the case/problem here, but might be worth checking and removing the cfg. You could even use checkconfig to cleanup your cfg with: data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') Hope this helps! Best, Saskia On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai wrote: > Dear Fieldtrip users, > > I've been trying to run group stats on my EEG source data, which contains 14 > subjects' normalized beamformer data, and having serious swap memory issue > (not Matlab memory issue, but OS swap memory). > > I'm trying to contrast 2 conditions (within subject design). Each subject's > normalized beamformer data (1 condition) is > > source_lTMI_intNorm = > > anatomy: [181x217x181 double] > > inside: [181x217x181 logical] > > avg: [1x1 struct] > > transform: [4x4 double] > > dim: [181 217 181] > > cfg: [1x1 struct] > > >>whos > > > > Name Size Bytes Class Attributes > > source_lTMI_intNorm 1x1 520114791 struct > > > therefore, when I open all subjects' data ("data1group" and "data2group"), > it's huge... > > Name Size Bytes Class Attributes > > data1group 1x14 5909429438 cell > > data2group 1x14 6705652782 cell > > > data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, > >>data1group{1} > > anatomy: [181x217x181 double] > > inside: [181x217x181 logical] > > avg: [1x1 struct] > > transform: [4x4 double] > > dim: [181 217 181] > > cfg: [1x1 struct] > > So, when I try to run > > cfg=[]; > > cfg.dim = data1group{1}.dim; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'depsamplesT'; > > cfg.parameter = 'avg.pow'; > > cfg.correctm = 'cluster'; > > cfg.numrandomization = 100; > > cfg.alpha = 0.05; > > cfg.tail = 0; > > nsubj=length(data1group); > > cfg.design(1,:) = [1:nsubj 1:nsubj]; > > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > > cfg.uvar = 1; > > cfg.ivar = 2; > > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > > stat.anatomy = data1group{1}.anatomy; > > > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup > memory?), which forces me to quit Matlab. I'm running above processes in a > function, so I'm not running into Matlab memory error. > > Could someone help me how it could run more efficiently? I guess > cfg.inputfile is not available for ft_sourcestatistics, so I have to > eventually load 2 group data in Matlab workspace...? > > Thank you in advance! Akiko > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Elena.Orekhova at neuro.gu.se Sun Oct 7 20:17:19 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 7 Oct 2012 18:17:19 +0000 Subject: [FieldTrip] EGI .ses import Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> Dear FieldTrippers, I try to read EGI .ses file using hdr = ft_read_header('myfile.ses'), or hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') but get an error message: 'unsupported header format (unknown)' It is stated that FT reads EGI .ses files. Have anybody tried or have some tips? Elena From matt.mollison at gmail.com Sun Oct 7 20:33:55 2012 From: matt.mollison at gmail.com (Matt Mollison) Date: Sun, 7 Oct 2012 12:33:55 -0600 Subject: [FieldTrip] EGI .ses import In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> Message-ID: Elena, The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. Best, Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova wrote: > Dear FieldTrippers, > > I try to read EGI .ses file using > > hdr = ft_read_header('myfile.ses'), or > hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') > > but get an error message: > > 'unsupported header format (unknown)' > > It is stated that FT reads EGI .ses files. > > Have anybody tried or have some tips? > > > Elena > _______________________________________________ > 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 akiko.ikkai at gmail.com Sun Oct 7 22:20:29 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Sun, 7 Oct 2012 16:20:29 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Saskia, Thank you for the quick advise! Removing cfg definitely works well. Each of the group data is now 1.3G (I also used "single" to convert everything into single precision), which is definitely manageable. Computation time has also been reduced to 3 times less now. Thanks! Akiko On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: > Hi Akiko, > > In my experience with grandavg source structs, sometimes the cfg > (that's attached to the data struct) becomes very large and can > consume a considerable amount of memory. I'm not sure if that's the > case/problem here, but might be worth checking and removing the cfg. > You could even use checkconfig to cleanup your cfg with: > data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') > Hope this helps! > > Best, > Saskia > > On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai > wrote: > > Dear Fieldtrip users, > > > > I've been trying to run group stats on my EEG source data, which > contains 14 > > subjects' normalized beamformer data, and having serious swap memory > issue > > (not Matlab memory issue, but OS swap memory). > > > > I'm trying to contrast 2 conditions (within subject design). Each > subject's > > normalized beamformer data (1 condition) is > > > > source_lTMI_intNorm = > > > > anatomy: [181x217x181 double] > > > > inside: [181x217x181 logical] > > > > avg: [1x1 struct] > > > > transform: [4x4 double] > > > > dim: [181 217 181] > > > > cfg: [1x1 struct] > > > > > >>whos > > > > > > > > Name Size Bytes Class Attributes > > > > source_lTMI_intNorm 1x1 520114791 struct > > > > > > therefore, when I open all subjects' data ("data1group" and > "data2group"), > > it's huge... > > > > Name Size Bytes Class Attributes > > > > data1group 1x14 5909429438 cell > > > > data2group 1x14 6705652782 cell > > > > > > data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, > > > >>data1group{1} > > > > anatomy: [181x217x181 double] > > > > inside: [181x217x181 logical] > > > > avg: [1x1 struct] > > > > transform: [4x4 double] > > > > dim: [181 217 181] > > > > cfg: [1x1 struct] > > > > So, when I try to run > > > > cfg=[]; > > > > cfg.dim = data1group{1}.dim; > > > > cfg.method = 'montecarlo'; > > > > cfg.statistic = 'depsamplesT'; > > > > cfg.parameter = 'avg.pow'; > > > > cfg.correctm = 'cluster'; > > > > cfg.numrandomization = 100; > > > > cfg.alpha = 0.05; > > > > cfg.tail = 0; > > > > nsubj=length(data1group); > > > > cfg.design(1,:) = [1:nsubj 1:nsubj]; > > > > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > > > > cfg.uvar = 1; > > > > cfg.ivar = 2; > > > > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > > > > stat.anatomy = data1group{1}.anatomy; > > > > > > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup > > memory?), which forces me to quit Matlab. I'm running above processes in > a > > function, so I'm not running into Matlab memory error. > > > > Could someone help me how it could run more efficiently? I guess > > cfg.inputfile is not available for ft_sourcestatistics, so I have to > > eventually load 2 group data in Matlab workspace...? > > > > Thank you in advance! Akiko > > > > -- > > Akiko Ikkai, Ph.D. > > Postdoctoral Fellow > > Department of Psychological and Brain Sciences > > Johns Hopkins University > > Ames Hall, 3400 N. Charles St. > > Baltimore, MD 21218 > > > > > > > > _______________________________________________ > > 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Mon Oct 8 00:15:13 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 7 Oct 2012 22:15:13 +0000 Subject: [FieldTrip] EGI .ses import In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> Matt, Thank you for the explanations. Just in case you know, do .egs or .sbin contain information about real time/date? Elena ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Matt Mollison [matt.mollison at gmail.com] Sent: Sunday, October 07, 2012 8:33 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EGI .ses import Elena, The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. Best, Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova > wrote: Dear FieldTrippers, I try to read EGI .ses file using hdr = ft_read_header('myfile.ses'), or hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') but get an error message: 'unsupported header format (unknown)' It is stated that FT reads EGI .ses files. Have anybody tried or have some tips? Elena _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Mon Oct 8 02:37:15 2012 From: jdien07 at mac.com (Joseph Dien) Date: Sun, 07 Oct 2012 20:37:15 -0400 Subject: [FieldTrip] EGI .ses import In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> Message-ID: The problem is that there is some ambiguity about file naming conventions. The egis file format has historically gone with different suffixes including .egis, .ses, .ave, and .raw. Likewise the simple binary format has likewise gone with different suffixes including .sbin and .raw. It started on the Mac where suffix standardization is not as important as on the PC, where suffixes are used by the operating system to tell different file types apart (Macs have historically relied on a separate metadata file, although they are now shifting to more reliance on suffixes, which I think is a mistake). Anyway, the question for you is what you mean by an EGI .ses file? It could refer to a number of things. If you mean the native NetStation file format, only NetStation can read them since the file format relies on some 3rd party software and other folks haven't wanted to pay the license fees. By real time/date, do you mean when the session was recorded (as opposed to event time stamps)? If so, the answer is yes to both. Cheers! Joe On Oct 7, 2012, at 6:15 PM, Elena Orekhova wrote: > Matt, > > Thank you for the explanations. > Just in case you know, do .egs or .sbin contain information about real time/date? > > Elena > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Matt Mollison [matt.mollison at gmail.com] > Sent: Sunday, October 07, 2012 8:33 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] EGI .ses import > > Elena, > > The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. > > Best, > Matt > > -- > Univ. of Colorado at Boulder > Dept. of Psychology and Neuroscience > matthew.mollison at colorado.edu > http://psych.colorado.edu/~mollison/ > > On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova wrote: > Dear FieldTrippers, > > I try to read EGI .ses file using > > hdr = ft_read_header('myfile.ses'), or > hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') > > but get an error message: > > 'unsupported header format (unknown)' > > It is stated that FT reads EGI .ses files. > > Have anybody tried or have some tips? > > > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Mon Oct 8 10:21:10 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Mon, 8 Oct 2012 10:21:10 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Thanks :-)!! 2012/10/7 Julian Keil > Hi, > > I suppose your "peakdetect2" is located in the "private" folder. Matlab by > default does not include private folders in the path. You can either rename > it (e.g. to "notprivate") or manually copy the function to another folder. > The "findpeaks" should actually be a built-in function, but maybe you have > to check the math works file exchange. > > As usual, if you are not sure, if you have the respective function in your > matlab path, check with "which". > > Best, > > Julian > > Am 07.10.2012 um 13:23 schrieb Daria Laptinskaya: > > Hi Julian, > > by using the peakdetect2- or the findpeaks-function I get an error: > ??? Undefined function or method 'peakdetect2' for input arguments of type > 'double' > (I use EGI-data with 149 channels and 113 timepoints). > > Do you have any idea, what the problem could be? > > Daria > > > > > > > 2012/10/6 Daria Laptinskaya > >> Many thanks-I will try to do! >> >> Best, >> Daria >> >> >> >> 2012/10/5 Julian Keil >> >>> Hi Daria, >>> >>> you can either use the function "min" or "max" to find the minima and >>> maxima in your data, or you can use the "peakdetect2"-function that can be >>> found in the "private" folder of field trip. >>> Another function, that is quite similar to the field trip-function is >>> the "findpeaks"-function, in which you can even set parameters how exactly >>> you want to define your peaks. >>> Fo the latency: all the above functions can give you the index (i.e. >>> sample point) of your peak, if you then compare this to your time-vector, >>> you can get the latency until the maximum. >>> >>> Good Luck, >>> >>> Julian >>> >>> Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: >>> >>> > Dear fieldtrippers, >>> > >>> > does anyone know how I can find the peak maximum of an erp? >>> > And how to calculate the latency until the maximum? >>> > >>> > Timelockanalysis and the grand average of all erps are already done. >>> > >>> > Best, >>> > Daria >>> > >>> > >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Mon Oct 8 12:02:32 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Mon, 8 Oct 2012 12:02:32 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, In addition to Saskia's comment (which is very useful!) remember also that if you create the subject's grid from the warped MNI template grid (explained here http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) then you can keep each subject's source data in a 'source' structure with .pos field and still do group level statistics, without need to convert to 'volume' structure which upsamples the spatial resolution perhaps artificially too high. Cheers, Johanna 2012/10/7 Akiko Ikkai > Hi Saskia, > > Thank you for the quick advise! Removing cfg definitely works well. Each > of the group data is now 1.3G (I also used "single" to convert everything > into single precision), which is definitely manageable. Computation time > has also been reduced to 3 times less now. > > Thanks! Akiko > > > On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: > >> Hi Akiko, >> >> In my experience with grandavg source structs, sometimes the cfg >> (that's attached to the data struct) becomes very large and can >> consume a considerable amount of memory. I'm not sure if that's the >> case/problem here, but might be worth checking and removing the cfg. >> You could even use checkconfig to cleanup your cfg with: >> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >> Hope this helps! >> >> Best, >> Saskia >> >> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >> wrote: >> > Dear Fieldtrip users, >> > >> > I've been trying to run group stats on my EEG source data, which >> contains 14 >> > subjects' normalized beamformer data, and having serious swap memory >> issue >> > (not Matlab memory issue, but OS swap memory). >> > >> > I'm trying to contrast 2 conditions (within subject design). Each >> subject's >> > normalized beamformer data (1 condition) is >> > >> > source_lTMI_intNorm = >> > >> > anatomy: [181x217x181 double] >> > >> > inside: [181x217x181 logical] >> > >> > avg: [1x1 struct] >> > >> > transform: [4x4 double] >> > >> > dim: [181 217 181] >> > >> > cfg: [1x1 struct] >> > >> > >> >>whos >> > >> > >> > >> > Name Size Bytes Class Attributes >> > >> > source_lTMI_intNorm 1x1 520114791 struct >> > >> > >> > therefore, when I open all subjects' data ("data1group" and >> "data2group"), >> > it's huge... >> > >> > Name Size Bytes Class Attributes >> > >> > data1group 1x14 5909429438 cell >> > >> > data2group 1x14 6705652782 cell >> > >> > >> > data1group & data2group are both 1x14 struct (1 cell/subject). >> Therefore, >> > >> >>data1group{1} >> > >> > anatomy: [181x217x181 double] >> > >> > inside: [181x217x181 logical] >> > >> > avg: [1x1 struct] >> > >> > transform: [4x4 double] >> > >> > dim: [181 217 181] >> > >> > cfg: [1x1 struct] >> > >> > So, when I try to run >> > >> > cfg=[]; >> > >> > cfg.dim = data1group{1}.dim; >> > >> > cfg.method = 'montecarlo'; >> > >> > cfg.statistic = 'depsamplesT'; >> > >> > cfg.parameter = 'avg.pow'; >> > >> > cfg.correctm = 'cluster'; >> > >> > cfg.numrandomization = 100; >> > >> > cfg.alpha = 0.05; >> > >> > cfg.tail = 0; >> > >> > nsubj=length(data1group); >> > >> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >> > >> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >> > >> > cfg.uvar = 1; >> > >> > cfg.ivar = 2; >> > >> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >> > >> > stat.anatomy = data1group{1}.anatomy; >> > >> > >> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >> > memory?), which forces me to quit Matlab. I'm running above processes >> in a >> > function, so I'm not running into Matlab memory error. >> > >> > Could someone help me how it could run more efficiently? I guess >> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >> > eventually load 2 group data in Matlab workspace...? >> > >> > Thank you in advance! Akiko >> > >> > -- >> > Akiko Ikkai, Ph.D. >> > Postdoctoral Fellow >> > Department of Psychological and Brain Sciences >> > Johns Hopkins University >> > Ames Hall, 3400 N. Charles St. >> > Baltimore, MD 21218 >> > >> > >> > >> > _______________________________________________ >> > 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 >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > 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 gmail.com Mon Oct 8 12:14:09 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 8 Oct 2012 12:14:09 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko! Just to chime in - your source grid is very, very large indeed! ALthough I started with a very fine grid, at one point I also had to downside it (going to 5mm), and had to stop using interpolated source data for stats and the like. Johanna's suggestion will certainly do the trick and it will speed up your analysis enormously as well. You then only need to do interpolate for plotting purposes. all the best, Stephen On 8 October 2012 12:02, Johanna Zumer wrote: > Hi Akiko, > > In addition to Saskia's comment (which is very useful!) remember also that > if you create the subject's grid from the warped MNI template grid > (explained here > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) > then you can keep each subject's source data in a 'source' structure with > .pos field and still do group level statistics, without need to convert to > 'volume' structure which upsamples the spatial resolution perhaps > artificially too high. > > Cheers, > Johanna > > > 2012/10/7 Akiko Ikkai > >> Hi Saskia, >> >> Thank you for the quick advise! Removing cfg definitely works well. Each >> of the group data is now 1.3G (I also used "single" to convert everything >> into single precision), which is definitely manageable. Computation time >> has also been reduced to 3 times less now. >> >> Thanks! Akiko >> >> >> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >> >>> Hi Akiko, >>> >>> In my experience with grandavg source structs, sometimes the cfg >>> (that's attached to the data struct) becomes very large and can >>> consume a considerable amount of memory. I'm not sure if that's the >>> case/problem here, but might be worth checking and removing the cfg. >>> You could even use checkconfig to cleanup your cfg with: >>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>> Hope this helps! >>> >>> Best, >>> Saskia >>> >>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>> wrote: >>> > Dear Fieldtrip users, >>> > >>> > I've been trying to run group stats on my EEG source data, which >>> contains 14 >>> > subjects' normalized beamformer data, and having serious swap memory >>> issue >>> > (not Matlab memory issue, but OS swap memory). >>> > >>> > I'm trying to contrast 2 conditions (within subject design). Each >>> subject's >>> > normalized beamformer data (1 condition) is >>> > >>> > source_lTMI_intNorm = >>> > >>> > anatomy: [181x217x181 double] >>> > >>> > inside: [181x217x181 logical] >>> > >>> > avg: [1x1 struct] >>> > >>> > transform: [4x4 double] >>> > >>> > dim: [181 217 181] >>> > >>> > cfg: [1x1 struct] >>> > >>> > >>> >>whos >>> > >>> > >>> > >>> > Name Size Bytes Class >>> Attributes >>> > >>> > source_lTMI_intNorm 1x1 520114791 struct >>> > >>> > >>> > therefore, when I open all subjects' data ("data1group" and >>> "data2group"), >>> > it's huge... >>> > >>> > Name Size Bytes Class Attributes >>> > >>> > data1group 1x14 5909429438 cell >>> > >>> > data2group 1x14 6705652782 cell >>> > >>> > >>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>> Therefore, >>> > >>> >>data1group{1} >>> > >>> > anatomy: [181x217x181 double] >>> > >>> > inside: [181x217x181 logical] >>> > >>> > avg: [1x1 struct] >>> > >>> > transform: [4x4 double] >>> > >>> > dim: [181 217 181] >>> > >>> > cfg: [1x1 struct] >>> > >>> > So, when I try to run >>> > >>> > cfg=[]; >>> > >>> > cfg.dim = data1group{1}.dim; >>> > >>> > cfg.method = 'montecarlo'; >>> > >>> > cfg.statistic = 'depsamplesT'; >>> > >>> > cfg.parameter = 'avg.pow'; >>> > >>> > cfg.correctm = 'cluster'; >>> > >>> > cfg.numrandomization = 100; >>> > >>> > cfg.alpha = 0.05; >>> > >>> > cfg.tail = 0; >>> > >>> > nsubj=length(data1group); >>> > >>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>> > >>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>> > >>> > cfg.uvar = 1; >>> > >>> > cfg.ivar = 2; >>> > >>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>> > >>> > stat.anatomy = data1group{1}.anatomy; >>> > >>> > >>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>> > memory?), which forces me to quit Matlab. I'm running above processes >>> in a >>> > function, so I'm not running into Matlab memory error. >>> > >>> > Could someone help me how it could run more efficiently? I guess >>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>> > eventually load 2 group data in Matlab workspace...? >>> > >>> > Thank you in advance! Akiko >>> > >>> > -- >>> > Akiko Ikkai, Ph.D. >>> > Postdoctoral Fellow >>> > Department of Psychological and Brain Sciences >>> > Johns Hopkins University >>> > Ames Hall, 3400 N. Charles St. >>> > Baltimore, MD 21218 >>> > >>> > >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> >> >> -- >> Akiko Ikkai, Ph.D. >> Postdoctoral Fellow >> Department of Psychological and Brain Sciences >> Johns Hopkins University >> Ames Hall, 3400 N. Charles St. >> Baltimore, MD 21218 >> >> >> >> _______________________________________________ >> 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 karl.doron at gmail.com Tue Oct 9 00:54:25 2012 From: karl.doron at gmail.com (Karl Doron) Date: Mon, 8 Oct 2012 15:54:25 -0700 Subject: [FieldTrip] diff_itc design matrix error Message-ID: <06DCC434-3BCE-4C6A-8F0F-5F6498BCE918@gmail.com> Hello, I'm getting a design matrix error when running ft_freqstatistics method='diff_itc'. Error using ft_freqstatistics (line 265) the number of observations in the design does not match the number of observations in the data However, the same data and design matrix do work when output='pow' and method='indepsamplesT' I've pasted the design matrix and configuration below. % Make design matrix design=zeros(1,size(freqCor.fourierspctrm,1)+ size(freqInc.fourierspctrm,1)); design(1,1:size(freqCor.fourierspctrm,1))=1; design(1,(size(freqCor.fourierspctrm,1)+1):size(freqCor.fourierspctrm,1)+size(freqInc.fourierspctrm,1))=2; imagesc(design) % Freqstats configuration cfg = [ ]; cfg.statistic ='diff_itc'; cfg.method ='montecarlo'; cfg.parameter ='fourierspctrm'; cfg.complex ='absdiff'; cfg.design ='design'; cfg.ivar = 1; cfg.numrandomization = 500; [ITC_diff]=ft_freqstatistics(cfg, freqCor, freqInc); Thanks for any help, karl Karl Doron, Ph.D. UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.herrero66 at gmail.com Tue Oct 9 01:43:39 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Mon, 8 Oct 2012 19:43:39 -0400 Subject: [FieldTrip] import .cnt file Message-ID: Dear FTrip users, matlab crashes when trying to import a .cnt data file using cfg=ft_definetrial(cfg). my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so this is not the problem cfg=[]; cfg.dataset='ab001002012.cnt' error in loadcnt.m (line 551) because nevents=0.125 such that ev2(nevents).stimtype=[] cannot exist! in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 because r.ldnsamples=1....why? other question is about the type of file cfg.dataset gets. I only have one raw data file (e.g. 'ab001002012.cnt') while the others have already been filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a similar error. any ideas? Jose H. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 9 16:06:56 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 9 Oct 2012 09:06:56 -0500 Subject: [FieldTrip] import .cnt file Message-ID: Hi Jose, Can you show the code you are using (i.e., the whole cfg that you set up before using ft_definetrial() ? It should look something like the example at http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials Best, Steve Politzer-Ahles Message: 2 > Date: Mon, 8 Oct 2012 19:43:39 -0400 > From: Jose Herrero > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] import .cnt file > Message-ID: > GZCDZSWdgDciYFm0vKEg at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FTrip users, > > matlab crashes when trying to import a .cnt data file using > cfg=ft_definetrial(cfg). > > my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so > this is not the problem > > cfg=[]; > cfg.dataset='ab001002012.cnt' > error in loadcnt.m (line 551) because nevents=0.125 such that > ev2(nevents).stimtype=[] cannot exist! > in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 > because r.ldnsamples=1....why? > > other question is about the type of file cfg.dataset gets. I only have one > raw data file (e.g. 'ab001002012.cnt') while the others have already been > filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua > and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a > similar error. > > any ideas? > Jose H. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121008/4c49ba3a/attachment-0001.html > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Tue Oct 9 17:58:16 2012 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Tue, 09 Oct 2012 16:58:16 +0100 Subject: [FieldTrip] ft_volumerealign Message-ID: <7540f0d221800.507457a8@uni-duesseldorf.de> Dear list when running ft_volumerealign with the spm template MRI in the interactive mode, I get something like:  ============================================================================ voxel 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 80.000000 -52.000000] lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 -20.000000 -52.000000] rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 -20.000000 -52.000000] xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 -20.000000 96.000000] the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB Now I would like to rerun it in the fiducial mode, using the above information. According to help, I need to do this: For realigning to the fiducials, you should specify the position of the fiducials in voxel indices.     cfg.fiducial.nas  = [i j k], position of nasion     cfg.fiducial.lpa  = [i j k], position of LPA     cfg.fiducial.rpa  = [i j k], position of RPA I used the voxel indices (code below), but ended up with the MRI upside-down (see attached picture). Trying the landmark mode was also without success. Am I doing something silly here? Thanks in advance Markus % Load SPM8 T1 template   template     = '/Documents/MATLAB/spm8/templates/T1.nii';  template_mri = ft_read_mri(template);  disp(template_mri)    % 2. Realign the coordinate system  cfg                = [];   cfg.method         = 'fiducial'; % 'interactive';  cfg.fiducial.nas   = [46 104 11];  cfg.fiducial.lpa   = [5 54 11];  cfg.fiducial.rpa   = [85 54 12];  cfg.fiducial.zpoint= [46 54 85];  cfg.coordsys       = 'ctf';  template_mri_realigned  = ft_volumerealign(cfg, template_mri);    % 3. Check the coordinate system  cfg                     = [];  cfg.interactive         = 'yes';  template_mri_checked    = ft_determine_coordsys(template_mri_realigned); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: upsidedown.jpg Type: image/jpeg Size: 16088 bytes Desc: not available URL: From Lilla.Magyari at mpi.nl Tue Oct 9 19:39:44 2012 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Tue, 9 Oct 2012 19:39:44 +0200 (CEST) Subject: [FieldTrip] ft_volumerealign In-Reply-To: <7540f0d221800.507457a8@uni-duesseldorf.de> References: <7540f0d221800.507457a8@uni-duesseldorf.de> Message-ID: <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> hi Markus, When you use the ft_volumerealign function it doesn't necessarily will show the right side of the brain on the right side of the image. Orientation of the image depends on the coordinate system of the mri you read in. I tried also align the template mri to the fiducials, and I got the same problem as you (z+ going to inferior in the aligned volume), but when I switched the lpa with the rpa the orientation was fine. So, my conclusion is that the right side shows up on the left of the image when you use ft_volumerealign. Therefore, you have to mark the lpa on the right side of the image and the rpa on the left side of the image. But there is also another option implemented exactly because of this left/right flipping: You can determine also a "z-point" (by pressing z in the image) that can be anywhere at the top of the head. Then, the function will give you the right alignment even if you did not determine the lpa and rpa on the right side of the brain. For this, you just have to do this: cfg.fiducial.zpoint = [i j k], position of zpoint when you also determine the positions for the nasion, lpa and rpa. And one more remark: I do not know if you have realized this yourself, and I have just misunderstood your email: When you call ft_volumerealign in interactive mode like this: cfg=[]; cfg.method='interactive'; mri_realigned=ft_volumerealign(cfg,mri); And you press the keys r/l/n/z at the right places in the volume (and quit with q), the output (mri_realigned) will be the already aligned volume, you do not need to call ft_volumerealign again with method 'fiducials'. Best, Lilla > Dear list > > when running ft_volumerealign with the spm template MRI in the interactive > mode, I get something like:  > > > ===========================================================================voxel > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 > 80.000000 -52.000000] > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 > -20.000000 -52.000000] > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 > -20.000000 -52.000000] > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 > -20.000000 96.000000] > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB > > > Now I would like to rerun it in the fiducial mode, using the above > information. > According to help, I need to do this: > > > For realigning to the fiducials, you should specify the position of > the fiducials in voxel indices. >     cfg.fiducial.nas  = [i j k], position of nasion >     cfg.fiducial.lpa  = [i j k], position of LPA >     cfg.fiducial.rpa  = [i j k], position of RPA > > > > I used the voxel indices (code below), but ended up with the MRI > upside-down (see attached picture). > Trying the landmark mode was also without success. > > > Am I doing something silly here? > > > > Thanks in advance > Markus > > > > > % Load SPM8 T1 template  > > >  template     = '/Documents/MATLAB/spm8/templates/T1.nii'; > > >  template_mri = ft_read_mri(template); > > >  disp(template_mri) > > >   > > >  % 2. Realign the coordinate system > > >  cfg                = [];  > > >  cfg.method         = 'fiducial'; % 'interactive'; > > >  cfg.fiducial.nas   = [46 104 11]; > > >  cfg.fiducial.lpa   = [5 54 11]; > > >  cfg.fiducial.rpa   = [85 54 12]; > > >  cfg.fiducial.zpoint= [46 54 85]; > > >  cfg.coordsys       = 'ctf'; > > >  template_mri_realigned  = ft_volumerealign(cfg, template_mri); > > > > > > >   > > >  % 3. Check the coordinate system > > >  cfg                     = []; > > >  cfg.interactive         = 'yes'; > > >  template_mri_checked    = ft_determine_coordsys(template_mri_realigned); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Tue Oct 9 19:45:29 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Tue, 9 Oct 2012 13:45:29 -0400 Subject: [FieldTrip] import .cnt file In-Reply-To: References: Message-ID: Hi Steve, the problem is before using ft_definetrial() I'd like to read the .cnt data from file as one long continuous segment without any additional filtering...so this is all the code cfg=[]; cfg.dataset ='ab001002012.cnt' data_org = ft_preprocessing(cfg) error in loadcnt.m (line 551) because nevents=0.125 such that ev2(nevents).stimtype=[] cannot exist! % On Tue, Oct 9, 2012 at 10:06 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Hi Jose, > > Can you show the code you are using (i.e., the whole cfg that you set up > before using ft_definetrial() ? It should look something like the example > at > http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials > > Best, > Steve Politzer-Ahles > > > Message: 2 >> Date: Mon, 8 Oct 2012 19:43:39 -0400 >> From: Jose Herrero >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] import .cnt file >> Message-ID: >> > GZCDZSWdgDciYFm0vKEg at mail.gmail.com> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> Dear FTrip users, >> >> matlab crashes when trying to import a .cnt data file using >> cfg=ft_definetrial(cfg). >> >> my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so >> this is not the problem >> >> cfg=[]; >> cfg.dataset='ab001002012.cnt' >> error in loadcnt.m (line 551) because nevents=0.125 such that >> ev2(nevents).stimtype=[] cannot exist! >> in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 >> because r.ldnsamples=1....why? >> >> other question is about the type of file cfg.dataset gets. I only have one >> raw data file (e.g. 'ab001002012.cnt') while the others have already been >> filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua >> and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a >> similar error. >> >> any ideas? >> Jose H. >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121008/4c49ba3a/attachment-0001.html >> > >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Jose L Herrero, PhD Department of Psychiatry Columbia University College of Physicians and Surgeons Cognitive Neuroscience and Schizophrenia Program Nathan S. Kline Institute for Psychiatric Research -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregory.Perry at govirtual.tv Wed Oct 10 01:00:56 2012 From: Gregory.Perry at govirtual.tv (Gregory Perry) Date: Tue, 9 Oct 2012 23:00:56 +0000 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> References: <718DFA7882181D45B8BD18F31C46D554215A0639@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0702@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0723@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0759@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0843@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> Message-ID: <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> Something of interest for the list members; I've been working on this photic stimulation system for about a year now, to facilitate EEG-research and experimentation using an alternative to conventional visual cortex-based photic stimulation systems. This method involves only the ear canal: http://www.indiegogo.com/GoVirtualCognition?a=1579195 http://www.quirky.com/ideations/320242 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Oct 10 09:01:33 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 10 Oct 2012 09:01:33 +0200 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> References: <718DFA7882181D45B8BD18F31C46D554215A0639@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0702@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0723@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0759@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0843@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> Message-ID: Dear Gregory, Thank you for this mightily interesting invention, which has the potential to revolutionize EEG research. However, I am still a bit puzzled as to the mechanism of action. By what route do you imagine the stimulators would entrain brain activity? Any references describing photoreceptors in the ear canal would be very helpful. All the best, Eelke Spaak On 10 October 2012 01:00, Gregory Perry wrote: > Something of interest for the list members; I've been working on this photic > stimulation system for about a year now, to facilitate EEG-research and > experimentation using an alternative to conventional visual cortex-based > photic stimulation systems. This method involves only the ear canal: > > http://www.indiegogo.com/GoVirtualCognition?a=1579195 > http://www.quirky.com/ideations/320242 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Markus.Butz at uni-duesseldorf.de Wed Oct 10 11:04:48 2012 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Wed, 10 Oct 2012 10:04:48 +0100 Subject: [FieldTrip] ft_volumerealign In-Reply-To: <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> References: <7540f0d221800.507457a8@uni-duesseldorf.de> <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> Message-ID: <75e0a7de4b08.50754840@uni-duesseldorf.de> Dear Lilla thank you very much for your response. Swapping lpa and rpa does the trick. Now my brain looks much better. ;-) The extra zpoint does not really help and I had it already implemented in my initial code. All the best Markus Am 09.10.12, schrieb Lilla.Magyari at mpi.nl: > > hi Markus, > > When you use the ft_volumerealign function it doesn't necessarily will > show the right side of the brain on the right side of the image. > Orientation of the image depends on the coordinate system of the mri you > read in. > > I tried also align the template mri to the fiducials, and I got the same > problem as you (z+ going to inferior in the aligned volume), but when I > switched the lpa with the rpa the orientation was fine. So, my conclusion > is that the right side shows up on the left of the image when you use > ft_volumerealign. Therefore, you have to mark the lpa on the right side > of the image and the rpa on the left side of the image. But there is also > another option implemented exactly because of this left/right flipping: > You can determine also a "z-point" (by pressing z in the image) that can > be anywhere at the top of the head. Then, the function will give you the > right alignment even if you did not determine the lpa and rpa on the > right side of the brain. > For this, you just have to do this: > cfg.fiducial.zpoint = [i j k], position of zpoint > when you also determine the positions for the nasion, lpa and rpa. > > And one more remark: I do not know if you have realized this yourself, and > I have just misunderstood your email: When you call ft_volumerealign in > interactive mode like this: > > cfg=[]; > cfg.method='interactive'; > mri_realigned=ft_volumerealign(cfg,mri); > > And you press the keys r/l/n/z at the right places in the volume (and quit > with q), the output (mri_realigned) will be the already aligned volume, > you do not need to call ft_volumerealign again with method 'fiducials'. > > Best, > Lilla > > > Dear list > > > > when running ft_volumerealign with the spm template MRI in the interactive > > mode, I get something like: > > > > > > ===========================================================================voxel > > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm > > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 > > 80.000000 -52.000000] > > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 > > -20.000000 -52.000000] > > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 > > -20.000000 -52.000000] > > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 > > -20.000000 96.000000] > > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB > > > > > > Now I would like to rerun it in the fiducial mode, using the above > > information. > > According to help, I need to do this: > > > > > > For realigning to the fiducials, you should specify the position of > > the fiducials in voxel indices. > > cfg.fiducial.nas = [i j k], position of nasion > > cfg.fiducial.lpa = [i j k], position of LPA > > cfg.fiducial.rpa = [i j k], position of RPA > > > > > > > > I used the voxel indices (code below), but ended up with the MRI > > upside-down (see attached picture). > > Trying the landmark mode was also without success. > > > > > > Am I doing something silly here? > > > > > > > > Thanks in advance > > Markus > > > > > > > > > > % Load SPM8 T1 template > > > > > > template = '/Documents/MATLAB/spm8/templates/T1.nii'; > > > > > > template_mri = ft_read_mri(template); > > > > > > disp(template_mri) > > > > > > > > > > > > % 2. Realign the coordinate system > > > > > > cfg = []; > > > > > > cfg.method = 'fiducial'; % 'interactive'; > > > > > > cfg.fiducial.nas = [46 104 11]; > > > > > > cfg.fiducial.lpa = [5 54 11]; > > > > > > cfg.fiducial.rpa = [85 54 12]; > > > > > > cfg.fiducial.zpoint= [46 54 85]; > > > > > > cfg.coordsys = 'ctf'; > > > > > > template_mri_realigned = ft_volumerealign(cfg, template_mri); > > > > > > > > > > > > > > > > > > > > % 3. Check the coordinate system > > > > > > cfg = []; > > > > > > cfg.interactive = 'yes'; > > > > > > template_mri_checked = ft_determine_coordsys(template_mri_realigned); > > > > > > _______________________________________________ > > 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 Gregory.Perry at govirtual.tv Wed Oct 10 15:42:34 2012 From: Gregory.Perry at govirtual.tv (Gregory Perry) Date: Wed, 10 Oct 2012 13:42:34 +0000 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: Message-ID: <718DFA7882181D45B8BD18F31C46D554215A0F5A@MBX204.domain.local> I am not aware of any photoreceptors in the ear canal, and I am not quite sure exactly why this method works the way it does. Different wavelengths at varying intensities focused into the ear canal evoke different brainwave responses, and the effects are quite dramatic - insert a light source into the ear and an immediate response is seen on the EEG FFT analysis and charting output, remove the pulsing light source and it immediately does away. I do not currently have access to an fMRI setup so I cannot say with any level of accuracy which major cortexes are directly implicated beyond associating the 10/20 region/scalp electrode that is reporting back strong FFT activity. The light sources are optically coupled with light pipes so I believe electromagnetic interference with the scalp electrodes can be safely ruled out. The light pipes are insulated with 1mm black jackets and with only about 2mm of light pipe exposed inside the ear canal, so I think that side channel light from the ear receptacles themselves can be safely ruled out as influencing the EEG charting via the visual cortex as well. So far my best guestimate is that light projected through the inner ear is close enough to the brain to permeate through any obstructing tissue, depending on the intensity and wavelength of light being used. Green and blue seem to be the dominant wavelengths in terms of the measured EEG responses I've observed so far. More testing is needed from a diverse user base, hence the Indiegogo crowdsourced funding project to develop an open source experimentation platform for widespread community participation in testing of this method of brainwave stimulation. I will be posting more detailed screencasts illustrating the EEG FFT results in the upcoming days; the strongest responses so far are in the delta band which is strange as well. ----- Original Message ----- From: Eelke Spaak [mailto:eelke.spaak at donders.ru.nl] Sent: Wednesday, October 10, 2012 03:01 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Eyes-open EEG stimulation via the ear canals Dear Gregory, Thank you for this mightily interesting invention, which has the potential to revolutionize EEG research. However, I am still a bit puzzled as to the mechanism of action. By what route do you imagine the stimulators would entrain brain activity? Any references describing photoreceptors in the ear canal would be very helpful. All the best, Eelke Spaak On 10 October 2012 01:00, Gregory Perry wrote: > Something of interest for the list members; I've been working on this photic > stimulation system for about a year now, to facilitate EEG-research and > experimentation using an alternative to conventional visual cortex-based > photic stimulation systems. This method involves only the ear canal: > > http://www.indiegogo.com/GoVirtualCognition?a=1579195 > http://www.quirky.com/ideations/320242 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Wed Oct 10 19:26:07 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Wed, 10 Oct 2012 19:26:07 +0200 (CEST) Subject: [FieldTrip] dipole position and moment Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From yoniilevy at gmail.com Thu Oct 11 16:55:06 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 11 Oct 2012 16:55:06 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Hi All, I am trying to locate a source using beamforming to a short lasting (during 100ms) oscillatory (frequency=28Hz) effect that I find at the sensor level. The thing is that because of the short time window, the frequency smoothing is bound to be high, whereas I would like to limit it as much as possible; not to mention that because trial length varies across subjects and trials, 100ms is the maximal window, but in truth segments are shorter. Any idea of how I could beamform on such short time window? Thanks in advance for any ideas, Yoni On Fri, Oct 5, 2012 at 12:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Frequency smoothing for beamforming (J?rn M. Horschig) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 05 Oct 2012 08:56:27 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Frequency smoothing for beamforming > Message-ID: <506E849B.7050602 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Yoni, > > Stephen is right, and just to make this really clear, a Hanning taper > will always give you a smoothing of your Raleigh frequency (which in > your case is 3.33Hz). Any taper can only (effectively) smooth in terms > of your frequency resolution or Raleigh frequency, thus a Hann taper > gives you the minimal smoothing (apart from a boxcar). Then, the problem > with different trial becomes more apparent, because since the frequency > resolution changes, also the smoothing of the Hanning taper changes > accordingly. I also think that making the trials having equal length is > the best approach. Having unequal trial lengths also constitutes a > problem for multitapering, cause you will end up with different tapers > and different number of tapers per trial. And also your frequency > smoothing should be a multiple of the Raleigh frequency. You can ask for > other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you > will see the smoothing at 6.66 or 9.99Hz (depending on where you define > the end of smoothing) - it's just because you sample in 3.33Hz steps. > Here you can maybe also see, that having different trial lengths might > constitute a problem, because you will effectively get different > smoothing per trial, depending on your Raleigh frequency. The > computation of the tapers was however correct, so with 8Hz smoothing and > a 0.3s time window you get 3 tapers ;) Btw, I once played around with it > and realized that the 3 tapers you obtain are not always the same for > different parameters, e.g. for 8Hz and 0.25s window you will also get > 8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you > get with a 0.3s time window. So even that can cause a problem. > > Btw, I never heard that different frequency smoothing ends up in > different part of the brain when beaming. The only reason I can see is > what Stephen already pointed out, that other frequency bands with > different functional characteristics smear into your power spectrum. > > Best, > J?rn > > > > > On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote: > > Hi Yoni, > > > > Indeed, a simple hanning taper will already give you a frequency > > smoothing of +/- 3Hz. Adding tapers can only increase this, and I > > don't see why you would beamform 22 to 38 Hz if you are interested > > between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper > > = 'hanning', giving you a measure of power between of about 27 and 33? > > > > You're right that having different trial lenghts will indeed give you > > a different frequency resolution per trial. If this is a problem is > > hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial > > would indeed make sure they are all of the same length (i.e. the > > maximal length) - but if that is different between subjects/conditions > > that might not be enough. > > > > Best, > > Stephen > > > > > > > > On 4 October 2012 11:56, Yoni Levy > > wrote: > > > > Hi Stephen! > > Thanks for your reply. > > > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > > smoothing should now be of +/-3.33Hz. If I use a hanning taper, > > the parameters that i use for the freqanal (for further on doing > > beamformer-statistics) are: > > cfg.method ='mtmfft'; > > cfg.output ='fourier'; > > cfg.keeptrials = 'yes'; > > cfg.keeptapers = 'yes'; > > cfg.taper = 'hanning'; > > cfg.foilim = [29 31]; > > However, if I get it right, multitapering should also be an option > > as 30Hz is not a relatively very low frequency. In that case, i > > remove the hanning and instead include a cfg.tapsmofrq =8, so that > > the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? > > > > Also, about the time window which is theoretically 300ms, but i > > think this depends on the length of every trial; for instance, > > before freqanal, when i redefine the trial, i input cfg.minlength > > = 'maxperlen'. So if i alter that, the freq smoothing should be > > different as well, correct? Ye, anyway, I wonder how to optimize > > all those parameters for my source localization statistics. > > > > Thanks in advance, > > > > Yoni > > > > > > On Wed, Oct 3, 2012 at 3:55 PM, > > wrote: > > > > > > Hi Yoni! > > > > The extend of the smoothing, I would say, is under normal > > circumstances > > simply what you > > request as a smoothing paramater (given the dpss > > characteristics), so I > > don't understand > > that formulation exactly. > > > > If different smoothings give drastically different result you > > might be > > sampling > > frequencies that behave differently from your frequency of > > interest. In > > your case, e.g. > > perhaps you are adding alpha in your estimate that might > > behave differently > > in your > > paradigm? > > > > I would therefor try to first figure out if your effect is, in > > fact, > > frequency specific > > and try to not to smooth more than necessary to capture that > > effect. So > > starting with no > > (extra) smoothing and looking at the TFR for instance. A > > simple FFT would > > give you a > > frequency smoothing of +/- 1/datalength already (e.g. half a > > second would > > be +/- 2 Hz). > > Simply averaging over frequencies (estimated with a Hanning > > taper) instead > > of using the > > slepian tapers might be a better option. > > > > Then again, you are limited in frequency specificity by the > > length of the > > data on which > > you calculate them. If that is too short you might have > > suboptimal and > > unexpected > > effects. In the case of slepian filters make sure you have at > > least a > > minimum of 3 tapers > > (which is shown in the output of freqanalysis). > > > > There is a lot more to say about tapers, smoothing etc, but I > > hope this > > helps. > > > > All the best, > > Stephen > > > > On 3 October 2012 15:14, Yoni Levy > > wrote: > > > > > Dear Fieldtrippers, > > > > > > I am trying to locate the source of an oscillatory effect at > > the frequency > > > of 30Hz in a time window of interest. > > > Before running the ft_sourceanalysis function, I run a > > ft_freqanalysis > > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > > My question is whether there is any rule of thumb by which I > > could > > > reliably determine the extent of the smoothing? > > > I found out that even small changes in the 'tapsmofrq' value, > > > significantly alter the spatial localization of the > > resulting sources. > > > For instance, a tapsmofreq value of 8 would point to an > > effect in the > > > frontal lobe, whereas a value of 10 would point to an effect > > in the > > > parietal lobe. > > > > > > Any advice would be appreciated. > > > > > > Yoni > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121005/aed5f036/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 23, Issue 6 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Oct 12 09:23:44 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Fri, 12 Oct 2012 09:23:44 +0200 (CEST) Subject: [FieldTrip] help with dipole position and dipole moment Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From f.roux at bcbl.eu Wed Oct 17 15:17:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Wed, 17 Oct 2012 15:17:24 +0200 (CEST) Subject: [FieldTrip] help with dipole position and orientation Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From Maximilian.Bruchmann at uni-muenster.de Thu Oct 18 15:55:53 2012 From: Maximilian.Bruchmann at uni-muenster.de (Maximilian Bruchmann) Date: Thu, 18 Oct 2012 15:55:53 +0200 Subject: [FieldTrip] Problem with visualizing individual minimum source activity (ft_plot_mesh, ft_sourcemovie, ft_sourceplot) Message-ID: Dear FieldTrippers, there used to be a very convenient way to get a look at individual mne source reconstructions using either ft_plot_mesh or ft_sourcemovie, but both no longer seem to work. When I follow the minimum norm estimate tutorial up to the point of visualization the code that worked fine some weeks ago now produces the following errors: cfg=[]; cfg.method = 'mne'; cfg.grid.leadfield = leadfield; cfg.vol = vol; cfg.mne.lambda = 1e11; myMne = ft_sourceanalysis(cfg,timeLock); bnd.pnt = sourcespace.pnt; bnd.tri = sourcespace.tri; m=myMne.avg.pow(:,450); ft_plot_mesh(bnd, 'vertexcolor', m); produces the error: Error using ft_plot_mesh (line 191) Unknown color As it seems, 'vertexcolor' accepts only a single RGB triplet. In fact, none of the options of ft_plot_mesh seems to support the visualization of functional data anymore, am I right? The other way using ft_sourcemovie used to work fine like this: figure myMne.tri = sourcespace.tri; cfg = []; cfg.alim = [0 8e-14]; cfg.zlim = [0 4e-13]; cfg.maskparameter = 'avg.pow'; ft_sourcemovie(cfg,myMne); But now it produces the warning Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering and I get an empty figure window. I tried ft_sourceplot: cfg = []; cfg.method = 'surface'; cfg.funparameter = 'avg.pow'; ft_sourceplot(cfg,myMne); but irrespective of the method I get Error using ft_sourceplot (line 188) the input data needs to be defined on a regular 3D grid Any help on how I can view my source reconstruction results as a colored source space model would be very appreciated! Thanks in advance! Best, Max From akiko.ikkai at gmail.com Thu Oct 18 22:29:37 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 18 Oct 2012 16:29:37 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Everyone, Thank you very much for your advise. I just came back from SfN, and just found your replies, so I will test these options and report back what I find. Thank you again! Akiko On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Akiko! > > Just to chime in - your source grid is very, very large indeed! ALthough I > started with a very fine grid, at one point I also had to downside it > (going to 5mm), and had to stop using interpolated source data for stats > and the like. Johanna's suggestion will certainly do the trick and it will > speed up your analysis enormously as well. You then only need to do > interpolate for plotting purposes. > > all the best, > Stephen > > > On 8 October 2012 12:02, Johanna Zumer wrote: > >> Hi Akiko, >> >> In addition to Saskia's comment (which is very useful!) remember also >> that if you create the subject's grid from the warped MNI template grid >> (explained here >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >> then you can keep each subject's source data in a 'source' structure with >> .pos field and still do group level statistics, without need to convert to >> 'volume' structure which upsamples the spatial resolution perhaps >> artificially too high. >> >> Cheers, >> Johanna >> >> >> 2012/10/7 Akiko Ikkai >> >>> Hi Saskia, >>> >>> Thank you for the quick advise! Removing cfg definitely works well. Each >>> of the group data is now 1.3G (I also used "single" to convert everything >>> into single precision), which is definitely manageable. Computation time >>> has also been reduced to 3 times less now. >>> >>> Thanks! Akiko >>> >>> >>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >>> >>>> Hi Akiko, >>>> >>>> In my experience with grandavg source structs, sometimes the cfg >>>> (that's attached to the data struct) becomes very large and can >>>> consume a considerable amount of memory. I'm not sure if that's the >>>> case/problem here, but might be worth checking and removing the cfg. >>>> You could even use checkconfig to cleanup your cfg with: >>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>> Hope this helps! >>>> >>>> Best, >>>> Saskia >>>> >>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>> wrote: >>>> > Dear Fieldtrip users, >>>> > >>>> > I've been trying to run group stats on my EEG source data, which >>>> contains 14 >>>> > subjects' normalized beamformer data, and having serious swap memory >>>> issue >>>> > (not Matlab memory issue, but OS swap memory). >>>> > >>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>> subject's >>>> > normalized beamformer data (1 condition) is >>>> > >>>> > source_lTMI_intNorm = >>>> > >>>> > anatomy: [181x217x181 double] >>>> > >>>> > inside: [181x217x181 logical] >>>> > >>>> > avg: [1x1 struct] >>>> > >>>> > transform: [4x4 double] >>>> > >>>> > dim: [181 217 181] >>>> > >>>> > cfg: [1x1 struct] >>>> > >>>> > >>>> >>whos >>>> > >>>> > >>>> > >>>> > Name Size Bytes Class >>>> Attributes >>>> > >>>> > source_lTMI_intNorm 1x1 520114791 struct >>>> > >>>> > >>>> > therefore, when I open all subjects' data ("data1group" and >>>> "data2group"), >>>> > it's huge... >>>> > >>>> > Name Size Bytes Class Attributes >>>> > >>>> > data1group 1x14 5909429438 cell >>>> > >>>> > data2group 1x14 6705652782 cell >>>> > >>>> > >>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>> Therefore, >>>> > >>>> >>data1group{1} >>>> > >>>> > anatomy: [181x217x181 double] >>>> > >>>> > inside: [181x217x181 logical] >>>> > >>>> > avg: [1x1 struct] >>>> > >>>> > transform: [4x4 double] >>>> > >>>> > dim: [181 217 181] >>>> > >>>> > cfg: [1x1 struct] >>>> > >>>> > So, when I try to run >>>> > >>>> > cfg=[]; >>>> > >>>> > cfg.dim = data1group{1}.dim; >>>> > >>>> > cfg.method = 'montecarlo'; >>>> > >>>> > cfg.statistic = 'depsamplesT'; >>>> > >>>> > cfg.parameter = 'avg.pow'; >>>> > >>>> > cfg.correctm = 'cluster'; >>>> > >>>> > cfg.numrandomization = 100; >>>> > >>>> > cfg.alpha = 0.05; >>>> > >>>> > cfg.tail = 0; >>>> > >>>> > nsubj=length(data1group); >>>> > >>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>> > >>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>> > >>>> > cfg.uvar = 1; >>>> > >>>> > cfg.ivar = 2; >>>> > >>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>> > >>>> > stat.anatomy = data1group{1}.anatomy; >>>> > >>>> > >>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>> > memory?), which forces me to quit Matlab. I'm running above processes >>>> in a >>>> > function, so I'm not running into Matlab memory error. >>>> > >>>> > Could someone help me how it could run more efficiently? I guess >>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>> > eventually load 2 group data in Matlab workspace...? >>>> > >>>> > Thank you in advance! Akiko >>>> > >>>> > -- >>>> > Akiko Ikkai, Ph.D. >>>> > Postdoctoral Fellow >>>> > Department of Psychological and Brain Sciences >>>> > Johns Hopkins University >>>> > Ames Hall, 3400 N. Charles St. >>>> > Baltimore, MD 21218 >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>>> >>> >>> >>> >>> -- >>> Akiko Ikkai, Ph.D. >>> Postdoctoral Fellow >>> Department of Psychological and Brain Sciences >>> Johns Hopkins University >>> Ames Hall, 3400 N. Charles St. >>> Baltimore, MD 21218 >>> >>> >>> >>> _______________________________________________ >>> 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Fri Oct 19 11:46:34 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 19 Oct 2012 11:46:34 +0200 Subject: [FieldTrip] problem with ft_freqanalysis Message-ID: Dear all, I have one problem with the ft_freqanalysis. When I calculate time-frequency analysis with the Hanning taper everything works ok, but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I get empty plots. You can check that in the attached image. However, when I calculate time-frequency with the multitapers plot looks fine. Here is my problematic code: %Hanning taper cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.toi = -0.5:0.05:1.5; % time window "slides" from -0.5 to 1.5 sec in steps of 0.05 sec cfg.polyremoval = -1; wr11_freq = ft_freqanalysis(cfg, data_clean); cfg = []; cfg.baseline = [-0.2 -0.1]; cfg.baselinetype = 'absolute'; cfg.zlim = [-4e-29 1e-28]; cfg.showlabels = 'yes'; cfg.layout = 'CTF275.lay'; cfg.colorbar= 'yes'; cfg.interactive= 'yes'; cfg.hotkeys = 'yes'; figure ft_multiplotTFR(cfg, wr11_freq); Please help! Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: empty.jpg Type: image/jpeg Size: 124582 bytes Desc: not available URL: From jm.horschig at donders.ru.nl Fri Oct 19 12:13:32 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 19 Oct 2012 12:13:32 +0200 Subject: [FieldTrip] problem with ft_freqanalysis In-Reply-To: References: Message-ID: <508127CC.7000002@donders.ru.nl> Hey Nenad, the problem is simply that in the beginning of your TFR there are nans and you are using that part as a baseline. You cannot have a 0.5s timewindow at t=-0.5s up until t=0s when your preprocessed data starts at t=-0.5s, you would need preprocessed starting at -1s. When plotting, you chose to use a baseline which starts within the nan area, so all your data will be substracted with nans resulting in nans itself. Three solution possible: 1) Use a baseline outside the nan area (for you t>=0) 2) Re-do your processing starting at t=-1s or 3) Use shorter time windows for your freq analysis of only 300ms (because then your baseline starting at 200ms would work, since 500-300 = 200) I'd recommend the second one - always use data padding when doing analysis. Best regards, Jörn On 10/19/2012 11:46 AM, Nenad Polomac wrote: > Dear all, > > I have one problem with the ft_freqanalysis. When I calculate > time-frequency analysis with the Hanning taper everything works ok, > but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I > get empty plots. You can check that in the attached image. However, > when I calculate time-frequency with the multitapers plot looks fine. > Here is my problematic code: > > > %Hanning taper > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time > window = 0.5 sec > cfg.toi = -0.5:0.05:1.5; % time window > "slides" from -0.5 to 1.5 sec in steps of 0.05 sec > cfg.polyremoval = -1; > wr11_freq = ft_freqanalysis(cfg, data_clean); > > > cfg = []; > cfg.baseline = [-0.2 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.zlim = [-4e-29 1e-28]; > cfg.showlabels = 'yes'; > cfg.layout = 'CTF275.lay'; > cfg.colorbar= 'yes'; > cfg.interactive= 'yes'; > cfg.hotkeys = 'yes'; > figure > ft_multiplotTFR(cfg, wr11_freq); > > Please help! > Thank you in advance! > > Nenad > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Fri Oct 19 13:03:58 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 19 Oct 2012 13:03:58 +0200 Subject: [FieldTrip] problem with ft_freqanalysis Message-ID: Dear Jörn, Thank you very much! You solved my problem :) All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.schubert at uni-hamburg.de Fri Oct 19 13:23:09 2012 From: jonathan.schubert at uni-hamburg.de (Jonathan Schubert) Date: Fri, 19 Oct 2012 13:23:09 +0200 Subject: [FieldTrip] TFR with mtmconvol Message-ID: Dear all, I have a question regarding frequency analysis using the multitaper approach. I transformed my data using the following code: cfg = []; cfg.channel = 'all'; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 40:1:100; cfg.toi = -1.0:0.02:1.0; cfg.t_ftimwin = 7./cfg.foi; cfg.tapsmofrq = cfg.foi*0.4; cfg.pad = 'maxperlen'; cfg.keeptrials = 'no'; freq = ft_freqanalysis(cfg, data); When I plot the TFR it looks strange in a similiar way to what I found on the fieldtrip homepage: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange Following the help on the homepage did not improve the outcome. I attached an example of my TFR. What can I do to improve the outcome of the frequency analysis? Best, Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample_pic.jpg Type: image/jpeg Size: 38461 bytes Desc: not available URL: From r.vandermeij at donders.ru.nl Fri Oct 19 13:50:56 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 19 Oct 2012 13:50:56 +0200 Subject: [FieldTrip] TFR with mtmconvol In-Reply-To: References: Message-ID: Hi Jonathan, This indeed looks like a bleeding in of the 0Hz component. How did you exactly follow the help on the wiki? Could you post your entire analysis pipeline? (i.e. your call to ft_preprocessing, your call to ft_singleplotTFR, baselining that you do, etc.). That would help in diagnosing the problem. All the best, Roemer On Fri, Oct 19, 2012 at 1:23 PM, Jonathan Schubert < jonathan.schubert at uni-hamburg.de> wrote: > Dear all, > > I have a question regarding frequency analysis using the multitaper > approach. I transformed my data using the following code: > > cfg = []; > cfg.channel = 'all'; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.foi = 40:1:100; > cfg.toi = -1.0:0.02:1.0; > cfg.t_ftimwin = 7./cfg.foi; > cfg.tapsmofrq = cfg.foi*0.4; > cfg.pad = 'maxperlen'; > cfg.keeptrials = 'no'; > freq = ft_freqanalysis(cfg, data); > > When I plot the TFR it looks strange in a similiar way to what I found on > the fieldtrip homepage: > http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > Following the help on the homepage did not improve the outcome. I attached > an example of my TFR. > > What can I do to improve the outcome of the frequency analysis? > > Best, > Jonathan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.schubert at uni-hamburg.de Fri Oct 19 16:20:46 2012 From: jonathan.schubert at uni-hamburg.de (Jonathan Schubert) Date: Fri, 19 Oct 2012 16:20:46 +0200 Subject: [FieldTrip] TFR with mtmconvol In-Reply-To: References: Message-ID: Hi Roemer, I did the preprocessing with eeglab. I'm going to include the eeglab commands at the end of this mail. So first the fieldtrip commands only: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % reading in the data from eeglab [data]=eeglab2fieldtrip(EEG, 'preprocessing', 'none'); % This step is from the fieldtrip wiki cfg = []; cfg.demean = 'yes'; data = ft_preprocessing(cfg, data); % frequency analysis cfg = []; cfg.channel = 'all'; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 40:1:100; cfg.toi = -1.0:0.02:1.0; cfg.t_ftimwin = 7./cfg.foi; cfg.tapsmofrq = cfg.foi*0.4; cfg.pad = 'maxperlen'; cfg.keeptrials = 'no'; freq = ft_freqanalysis(cfg, data); % baseline correction -300 to -100 ms base = freq; bix = find(freq.time < -0.1 & freq.time >-0.3); totalbase = repmat(nanmean(freq.powspctrm(:,:,bix),3),[1,1,length(freq.time)]); freq.powspctrm = 100 * ((freq.powspctrm-totalbase)./totalbase); % plotting the results lay = ft_prepare_layout(freq); figure cfg = []; cfg.layout = lay; cfg.interactive = 'yes'; cfg.marker = 'labels'; cfg.channel = {'M_4'}; cfg.xparam = 'time'; cfg.yparam = 'freq'; cfg.zparam = 'powspctrm'; cfg.xlim = [-0.3 1.0]; cfg.zlim = 'maxabs' ; ft_singleplotTFR (cfg, freq); %%%%%%%%%%%%%%%%%%%%%%%%% % So here is what I did with eeglab, before calling the eeglab2fieldtrip % reading in data EEG = pop_loadset('filename',[setname, '.set'],'filepath', pathname); [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'setname', setname); % edit channels and reading in their locations and set reference EEG=pop_chanedit(EEG, 'load',{'E:\\E176_data\\TF_Matlab_scripts\\electrode_pos61.elp' 'filetype' 'autodetect'},'append',64,'changefield',{65 'labels' 'ref_right_ear'},'setref',{'1:64' 'ref_right_ear'}); [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); EEG = eeg_checkset( EEG ); % lowpass filter EEG = pop_eegfilt( EEG, 0, 110, [], [0]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % change sampling rate to 250Hz EEG = pop_resample( EEG, 250); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % highpass filter EEG = pop_eegfilt( EEG, 0.3, 0, [], [0]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % re-referencing to linked earlobe reference EEG = pop_reref( EEG, [],'refloc',struct('type',{''},'labels',{'ref_ear_right'},'radius',{0.65556},'sph_theta',{-90},'sph_phi',{-28},'theta',{90},'sph_radius',{1},'X',{5.4065e-017},'Y',{-0.88295},'Z',{-0.46947},'ref',{''},'urchan',{65})); EEG = pop_reref( EEG, [62 65] ); % run ICA EEG = pop_runica(EEG, 'extended',1,'chanind', [1:61],'stop',1e-007,'maxsteps',600); % Identification of components reflecting eyeblinks and -movements, % heartbeat, noise is done by hand % get rid of artifact components artcomp = sort([EEG.artifact.eyeblink, EEG.artifact.noise, EEG.artifact.heyem, EEG.artifact.ecg]); EEG = pop_subcomp(EEG, artcomp, 0); EEG = pop_saveset(EEG, savename, pathname); [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); %notch filter to take out the electrical %current at 50 HZ and 100 Hz EEG = pop_eegfilt( EEG, 49, 51, [], [1]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); EEG = pop_eegfilt( EEG, 99, 101, [], [1]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % epoching the data and removing thresh = 100; condition = {'111'}; for j=1:length(condition) EEG = pop_loadset('filename', savename,'filepath', pathname); EEG = pop_epoch( EEG, {condition{j}}, [-1.0 1.2], 'newname', ['L' subject{i},' resampled pruned with ICA epochs'], 'epochinfo', 'yes'); EEG = pop_rmbase( EEG, [-100 0]); [EEG, Ind1] = pop_eegthresh( EEG, 1, [1:61], -thresh, thresh, -0.5, 0.5, 0, 1); % get rid of artifacts end % re-referencing to avg reference: do not use EOG channels for average reference EEG = pop_select( EEG, 'nochannel',[62 63]); % re-reference to average reference EEG = pop_reref(EEG, []); Best, Jonathan 2012/10/19 Roemer van der Meij > Hi Jonathan, > > This indeed looks like a bleeding in of the 0Hz component. How did you > exactly follow the help on the wiki? Could you post your entire analysis > pipeline? (i.e. your call to ft_preprocessing, your call to > ft_singleplotTFR, baselining that you do, etc.). That would help in > diagnosing the problem. > > All the best, > Roemer > > > On Fri, Oct 19, 2012 at 1:23 PM, Jonathan Schubert < > jonathan.schubert at uni-hamburg.de> wrote: > >> Dear all, >> >> I have a question regarding frequency analysis using the multitaper >> approach. I transformed my data using the following code: >> >> cfg = []; >> cfg.channel = 'all'; >> cfg.output = 'pow'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 40:1:100; >> cfg.toi = -1.0:0.02:1.0; >> cfg.t_ftimwin = 7./cfg.foi; >> cfg.tapsmofrq = cfg.foi*0.4; >> cfg.pad = 'maxperlen'; >> cfg.keeptrials = 'no'; >> freq = ft_freqanalysis(cfg, data); >> >> When I plot the TFR it looks strange in a similiar way to what I found on >> the fieldtrip homepage: >> http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange >> Following the help on the homepage did not improve the outcome. I >> attached an example of my TFR. >> >> What can I do to improve the outcome of the frequency analysis? >> >> Best, >> Jonathan >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Roemer van der Meij M.Sc. > PhD Candidate > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3655932 > E-mail: r.vandermeij at donders.ru.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Jonathan Schubert University of Hamburg Biological Psychology and Neuropsychology Von-Melle-Park 11, Room 301 D-20146 Hamburg Germany - Phone: (49) 40 - 42838 7626 Fax: (49) 40 - 42838 6591 jonathan.schubert at uni-hamburg.de www.bpn.uni-hamburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Sat Oct 20 00:10:07 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 19 Oct 2012 18:10:07 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi, So I have followed Johanna and Stephan's advise to create template_grid and each subject's grid from MNI image, which is now 1cm spacing instead of .5cm. These steps seem to run, and I'm able to create a common spatial filter to run beamformer using DICS. However, I get an error when I apply the commom filter to each condition. I had to tweak a few things on example on the page http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid , since my data is EEG and electrode locations vary between subjects, such that: cfg = []; cfg.grid.xgrid = -20:1:20; cfg.grid.ygrid = -20:1:20; cfg.grid.zgrid = -20:1:20; cfg.grid.tight = 'yes'; cfg.inwardshift = -1.5; cfg.vol = template_vol; *cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add this (got error otherwise)* template_grid = ft_prepare_sourcemodel(cfg); then cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri_aligned; *cfg.elec = ft_data.elec; **% individual sub's electrode locations: had to add this (got error otherwise)* grid = ft_prepare_sourcemodel(cfg); These create grids in MNI space, both for template and individual fine. To create a common spatial filter, I run the following command, which runs: cfg = []; cfg.grid.pos = grid.pos; cfg.grid.dim = grid.dim; cfg.grid.inside = grid.inside; cfg.grid.outside = grid.outside; cfg.inwardshift = -1.5; cfg.vol = vol_cm; cfg.channel = {'all'}; cfg.frequency = 10.5; cfg.method = 'dics'; cfg.dics.projectnoise = 'yes'; cfg.dics.keepfilter = 'yes'; cfg.dics.feedback = 'no'; source_common = ft_sourceanalysis(cfg, freq_common); however, when I apply this spatial filter to a task condition, I get an error message cfg = []; cfg.elec = freq_common.elec; cfg.grid.pos = source_common.pos; cfg.grid.filter = source_common.avg.filter; cfg.inwardshift = -1.5; cfg.vol = vol_cm; cfg.channel = {'all'}; cfg.frequency = 10.5; cfg.method = 'dics'; cfg.dics.projectnoise = 'yes'; cfg.dics.keepfilter = 'yes'; cfg.dics.feedback = 'no'; source_itemL = ft_sourceanalysis(cfg, freq_itemL); source_itemL.unit = 'cm'; ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> beamformer_dics at 316 csd = filt * Cf * ctranspose(filt); % Gross eqn. 4 and 5 Error in ==> ft_sourceanalysis at 588 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot where exactly the error is originating from. Am I missing some steps when I create template grids that I feed into ft_sourceanalysis? Thank you in advance for your help! Akiko On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai wrote: > Hi Everyone, > > Thank you very much for your advise. I just came back from SfN, and just > found your replies, so I will test these options and report back what I > find. > > Thank you again! Akiko > > > On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Hi Akiko! >> >> Just to chime in - your source grid is very, very large indeed! ALthough >> I started with a very fine grid, at one point I also had to downside it >> (going to 5mm), and had to stop using interpolated source data for stats >> and the like. Johanna's suggestion will certainly do the trick and it will >> speed up your analysis enormously as well. You then only need to do >> interpolate for plotting purposes. >> >> all the best, >> Stephen >> >> >> On 8 October 2012 12:02, Johanna Zumer wrote: >> >>> Hi Akiko, >>> >>> In addition to Saskia's comment (which is very useful!) remember also >>> that if you create the subject's grid from the warped MNI template grid >>> (explained here >>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >>> then you can keep each subject's source data in a 'source' structure with >>> .pos field and still do group level statistics, without need to convert to >>> 'volume' structure which upsamples the spatial resolution perhaps >>> artificially too high. >>> >>> Cheers, >>> Johanna >>> >>> >>> 2012/10/7 Akiko Ikkai >>> >>>> Hi Saskia, >>>> >>>> Thank you for the quick advise! Removing cfg definitely works well. >>>> Each of the group data is now 1.3G (I also used "single" to convert >>>> everything into single precision), which is definitely manageable. >>>> Computation time has also been reduced to 3 times less now. >>>> >>>> Thanks! Akiko >>>> >>>> >>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >>>> >>>>> Hi Akiko, >>>>> >>>>> In my experience with grandavg source structs, sometimes the cfg >>>>> (that's attached to the data struct) becomes very large and can >>>>> consume a considerable amount of memory. I'm not sure if that's the >>>>> case/problem here, but might be worth checking and removing the cfg. >>>>> You could even use checkconfig to cleanup your cfg with: >>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>>> Hope this helps! >>>>> >>>>> Best, >>>>> Saskia >>>>> >>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>>> wrote: >>>>> > Dear Fieldtrip users, >>>>> > >>>>> > I've been trying to run group stats on my EEG source data, which >>>>> contains 14 >>>>> > subjects' normalized beamformer data, and having serious swap memory >>>>> issue >>>>> > (not Matlab memory issue, but OS swap memory). >>>>> > >>>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>>> subject's >>>>> > normalized beamformer data (1 condition) is >>>>> > >>>>> > source_lTMI_intNorm = >>>>> > >>>>> > anatomy: [181x217x181 double] >>>>> > >>>>> > inside: [181x217x181 logical] >>>>> > >>>>> > avg: [1x1 struct] >>>>> > >>>>> > transform: [4x4 double] >>>>> > >>>>> > dim: [181 217 181] >>>>> > >>>>> > cfg: [1x1 struct] >>>>> > >>>>> > >>>>> >>whos >>>>> > >>>>> > >>>>> > >>>>> > Name Size Bytes Class >>>>> Attributes >>>>> > >>>>> > source_lTMI_intNorm 1x1 520114791 struct >>>>> > >>>>> > >>>>> > therefore, when I open all subjects' data ("data1group" and >>>>> "data2group"), >>>>> > it's huge... >>>>> > >>>>> > Name Size Bytes Class Attributes >>>>> > >>>>> > data1group 1x14 5909429438 cell >>>>> > >>>>> > data2group 1x14 6705652782 cell >>>>> > >>>>> > >>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>>> Therefore, >>>>> > >>>>> >>data1group{1} >>>>> > >>>>> > anatomy: [181x217x181 double] >>>>> > >>>>> > inside: [181x217x181 logical] >>>>> > >>>>> > avg: [1x1 struct] >>>>> > >>>>> > transform: [4x4 double] >>>>> > >>>>> > dim: [181 217 181] >>>>> > >>>>> > cfg: [1x1 struct] >>>>> > >>>>> > So, when I try to run >>>>> > >>>>> > cfg=[]; >>>>> > >>>>> > cfg.dim = data1group{1}.dim; >>>>> > >>>>> > cfg.method = 'montecarlo'; >>>>> > >>>>> > cfg.statistic = 'depsamplesT'; >>>>> > >>>>> > cfg.parameter = 'avg.pow'; >>>>> > >>>>> > cfg.correctm = 'cluster'; >>>>> > >>>>> > cfg.numrandomization = 100; >>>>> > >>>>> > cfg.alpha = 0.05; >>>>> > >>>>> > cfg.tail = 0; >>>>> > >>>>> > nsubj=length(data1group); >>>>> > >>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>>> > >>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>>> > >>>>> > cfg.uvar = 1; >>>>> > >>>>> > cfg.ivar = 2; >>>>> > >>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>>> > >>>>> > stat.anatomy = data1group{1}.anatomy; >>>>> > >>>>> > >>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>>> > memory?), which forces me to quit Matlab. I'm running above >>>>> processes in a >>>>> > function, so I'm not running into Matlab memory error. >>>>> > >>>>> > Could someone help me how it could run more efficiently? I guess >>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>>> > eventually load 2 group data in Matlab workspace...? >>>>> > >>>>> > Thank you in advance! Akiko >>>>> > >>>>> > -- >>>>> > Akiko Ikkai, Ph.D. >>>>> > Postdoctoral Fellow >>>>> > Department of Psychological and Brain Sciences >>>>> > Johns Hopkins University >>>>> > Ames Hall, 3400 N. Charles St. >>>>> > Baltimore, MD 21218 >>>>> > >>>>> > >>>>> > >>>>> > _______________________________________________ >>>>> > 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Akiko Ikkai, Ph.D. >>>> Postdoctoral Fellow >>>> Department of Psychological and Brain Sciences >>>> Johns Hopkins University >>>> Ames Hall, 3400 N. Charles St. >>>> Baltimore, MD 21218 >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Oct 20 14:32:16 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 20 Oct 2012 14:32:16 +0200 Subject: [FieldTrip] help with dipole position and orientation In-Reply-To: References: Message-ID: <722AE19C-4347-4804-A9AE-3443C7FBBD9B@donders.ru.nl> Hi Fred, > In a paper by Osipova et al. (2008) I read that the position can > be chosen based on the sensor array of a CTF system with respect > to head coordinates. > In this paper the dipole position was chose to be r = [-5 0 1] which > should correspond to a dipole close to the hemispheric midline and > in the occipital cortex. > > Can anyone tell me based on which data / how these coordinates were > chosen? I have been searching the grad structure of my data > for comparable info, but did not find anything. Neither did I looking > at cfg.layout.pos. Why would you want to look into the grad structure, or in the layout.pos? I guess the most straightforward would be to ask one of the authors of said paper why they chose the parameters. Very generally, I think that the coordinates were chosen based on knowledge with respect to the coordinate system. Indeed, the negative x-axis points to the back, and a y-coordinate of 0 represents the midline. > My second question concerns the dipole moment. > Am I right in assuming the following: > > cfg.dip.mom = [1 0 0] % dipole points towards NAS > cfg.dip.mpm = [-1 0 0] % dipole points away from NAS > > cfg.dip.mom = [0 1 0] % dipole points towards LPA > cfg.dip.mom = [0 -1 0]% dipole points towards RPA > > cfg.dip.mom = [0 0 1]% dipole points towards vertex > cfg.dip.mon = [0 0 -1]% dipole points away from vertex > Yes, that's correct. Best, Jan-Mathijs > Any help or suggestions would be highly appreciated. > > Best, > Fred > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Sat Oct 20 23:06:41 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Sat, 20 Oct 2012 23:06:41 +0200 (CEST) Subject: [FieldTrip] help with dipole position and orientation In-Reply-To: <722AE19C-4347-4804-A9AE-3443C7FBBD9B@donders.ru.nl> Message-ID: <2ebb2c59-67fe-4796-ba11-fc3ce3ed65e6@thalamus_p> Dear Jan-Mathijs, thank you for your response. Why would you want to look into the grad structure, or in the layout.pos? As I wrote in my question: In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. I thought that I could get some info out of grad.pos or cfg.layout.pos that would correspond to the head position with respect to the sensor array. I just don't know any better where to find / access these data. I think that the coordinates were chosen based on knowledge with respect to the coordinate system. Indeed, the negative x-axis points to the back, and a y-coordinate of 0 represents the midline. Great, but which coordinate system is it? And where in my data can I find similar information? Best Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Sun Oct 21 17:32:37 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Sun, 21 Oct 2012 17:32:37 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, Can you type 'dbstop if error' before running the last step, so that it goes to debug mode when it crashes there? What are the sizes of 'filt' and 'Cf' for the 40th position? Another thing to try is, during your last call to ft_sourceanalysis, cfg = []; cfg.grid = grid; cfg.grid.filter = source_common.avg.filter; so that all the .inside and .outside information is transfered as well. A note to all users: you can skip the first step by loading the precomuted template grids in */fieldtrip/template/sourcemodel. Cheers, Johanna 2012/10/20 Akiko Ikkai : > Hi, > > So I have followed Johanna and Stephan's advise to create template_grid and > each subject's grid from MNI image, which is now 1cm spacing instead of > .5cm. These steps seem to run, and I'm able to create a common spatial > filter to run beamformer using DICS. However, I get an error when I apply > the commom filter to each condition. > > I had to tweak a few things on example on the page > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > , since my data is EEG and electrode locations vary between subjects, such > that: > > cfg = []; > cfg.grid.xgrid = -20:1:20; > cfg.grid.ygrid = -20:1:20; > cfg.grid.zgrid = -20:1:20; > cfg.grid.tight = 'yes'; > cfg.inwardshift = -1.5; > cfg.vol = template_vol; > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add > this (got error otherwise) > template_grid = ft_prepare_sourcemodel(cfg); > > then > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.mri = mri_aligned; > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add > this (got error otherwise) > grid = ft_prepare_sourcemodel(cfg); > > These create grids in MNI space, both for template and individual fine. To > create a common spatial filter, I run the following command, which runs: > cfg = []; > cfg.grid.pos = grid.pos; > cfg.grid.dim = grid.dim; > cfg.grid.inside = grid.inside; > cfg.grid.outside = grid.outside; > cfg.inwardshift = -1.5; > cfg.vol = vol_cm; > cfg.channel = {'all'}; > cfg.frequency = 10.5; > cfg.method = 'dics'; > cfg.dics.projectnoise = 'yes'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.feedback = 'no'; > source_common = ft_sourceanalysis(cfg, freq_common); > > however, when I apply this spatial filter to a task condition, I get an > error message > cfg = []; > cfg.elec = freq_common.elec; > cfg.grid.pos = source_common.pos; > cfg.grid.filter = source_common.avg.filter; > cfg.inwardshift = -1.5; > cfg.vol = vol_cm; > cfg.channel = {'all'}; > cfg.frequency = 10.5; > cfg.method = 'dics'; > cfg.dics.projectnoise = 'yes'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.feedback = 'no'; > source_itemL = ft_sourceanalysis(cfg, freq_itemL); > source_itemL.unit = 'cm'; > > ??? Error using ==> mtimes > Inner matrix dimensions must agree. > > Error in ==> beamformer_dics at 316 > csd = filt * Cf * ctranspose(filt); % Gross > eqn. 4 > and 5 > > Error in ==> ft_sourceanalysis at 588 > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot > where exactly the error is originating from. Am I missing some steps when I > create template grids that I feed into ft_sourceanalysis? > > Thank you in advance for your help! Akiko > > > On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai wrote: >> >> Hi Everyone, >> >> Thank you very much for your advise. I just came back from SfN, and just >> found your replies, so I will test these options and report back what I >> find. >> >> Thank you again! Akiko >> >> >> On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh >> wrote: >>> >>> Hi Akiko! >>> >>> Just to chime in - your source grid is very, very large indeed! ALthough >>> I started with a very fine grid, at one point I also had to downside it >>> (going to 5mm), and had to stop using interpolated source data for stats and >>> the like. Johanna's suggestion will certainly do the trick and it will speed >>> up your analysis enormously as well. You then only need to do interpolate >>> for plotting purposes. >>> >>> all the best, >>> Stephen >>> >>> >>> On 8 October 2012 12:02, Johanna Zumer >>> wrote: >>>> >>>> Hi Akiko, >>>> >>>> In addition to Saskia's comment (which is very useful!) remember also >>>> that if you create the subject's grid from the warped MNI template grid >>>> (explained here >>>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >>>> then you can keep each subject's source data in a 'source' structure with >>>> .pos field and still do group level statistics, without need to convert to >>>> 'volume' structure which upsamples the spatial resolution perhaps >>>> artificially too high. >>>> >>>> Cheers, >>>> Johanna >>>> >>>> >>>> 2012/10/7 Akiko Ikkai >>>>> >>>>> Hi Saskia, >>>>> >>>>> Thank you for the quick advise! Removing cfg definitely works well. >>>>> Each of the group data is now 1.3G (I also used "single" to convert >>>>> everything into single precision), which is definitely manageable. >>>>> Computation time has also been reduced to 3 times less now. >>>>> >>>>> Thanks! Akiko >>>>> >>>>> >>>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens >>>>> wrote: >>>>>> >>>>>> Hi Akiko, >>>>>> >>>>>> In my experience with grandavg source structs, sometimes the cfg >>>>>> (that's attached to the data struct) becomes very large and can >>>>>> consume a considerable amount of memory. I'm not sure if that's the >>>>>> case/problem here, but might be worth checking and removing the cfg. >>>>>> You could even use checkconfig to cleanup your cfg with: >>>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>>>> Hope this helps! >>>>>> >>>>>> Best, >>>>>> Saskia >>>>>> >>>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>>>> wrote: >>>>>> > Dear Fieldtrip users, >>>>>> > >>>>>> > I've been trying to run group stats on my EEG source data, which >>>>>> > contains 14 >>>>>> > subjects' normalized beamformer data, and having serious swap memory >>>>>> > issue >>>>>> > (not Matlab memory issue, but OS swap memory). >>>>>> > >>>>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>>>> > subject's >>>>>> > normalized beamformer data (1 condition) is >>>>>> > >>>>>> > source_lTMI_intNorm = >>>>>> > >>>>>> > anatomy: [181x217x181 double] >>>>>> > >>>>>> > inside: [181x217x181 logical] >>>>>> > >>>>>> > avg: [1x1 struct] >>>>>> > >>>>>> > transform: [4x4 double] >>>>>> > >>>>>> > dim: [181 217 181] >>>>>> > >>>>>> > cfg: [1x1 struct] >>>>>> > >>>>>> > >>>>>> >>whos >>>>>> > >>>>>> > >>>>>> > >>>>>> > Name Size Bytes Class >>>>>> > Attributes >>>>>> > >>>>>> > source_lTMI_intNorm 1x1 520114791 struct >>>>>> > >>>>>> > >>>>>> > therefore, when I open all subjects' data ("data1group" and >>>>>> > "data2group"), >>>>>> > it's huge... >>>>>> > >>>>>> > Name Size Bytes Class Attributes >>>>>> > >>>>>> > data1group 1x14 5909429438 cell >>>>>> > >>>>>> > data2group 1x14 6705652782 cell >>>>>> > >>>>>> > >>>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>>>> > Therefore, >>>>>> > >>>>>> >>data1group{1} >>>>>> > >>>>>> > anatomy: [181x217x181 double] >>>>>> > >>>>>> > inside: [181x217x181 logical] >>>>>> > >>>>>> > avg: [1x1 struct] >>>>>> > >>>>>> > transform: [4x4 double] >>>>>> > >>>>>> > dim: [181 217 181] >>>>>> > >>>>>> > cfg: [1x1 struct] >>>>>> > >>>>>> > So, when I try to run >>>>>> > >>>>>> > cfg=[]; >>>>>> > >>>>>> > cfg.dim = data1group{1}.dim; >>>>>> > >>>>>> > cfg.method = 'montecarlo'; >>>>>> > >>>>>> > cfg.statistic = 'depsamplesT'; >>>>>> > >>>>>> > cfg.parameter = 'avg.pow'; >>>>>> > >>>>>> > cfg.correctm = 'cluster'; >>>>>> > >>>>>> > cfg.numrandomization = 100; >>>>>> > >>>>>> > cfg.alpha = 0.05; >>>>>> > >>>>>> > cfg.tail = 0; >>>>>> > >>>>>> > nsubj=length(data1group); >>>>>> > >>>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>>>> > >>>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>>>> > >>>>>> > cfg.uvar = 1; >>>>>> > >>>>>> > cfg.ivar = 2; >>>>>> > >>>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>>>> > >>>>>> > stat.anatomy = data1group{1}.anatomy; >>>>>> > >>>>>> > >>>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>>>> > memory?), which forces me to quit Matlab. I'm running above >>>>>> > processes in a >>>>>> > function, so I'm not running into Matlab memory error. >>>>>> > >>>>>> > Could someone help me how it could run more efficiently? I guess >>>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>>>> > eventually load 2 group data in Matlab workspace...? >>>>>> > >>>>>> > Thank you in advance! Akiko >>>>>> > >>>>>> > -- >>>>>> > Akiko Ikkai, Ph.D. >>>>>> > Postdoctoral Fellow >>>>>> > Department of Psychological and Brain Sciences >>>>>> > Johns Hopkins University >>>>>> > Ames Hall, 3400 N. Charles St. >>>>>> > Baltimore, MD 21218 >>>>>> > >>>>>> > >>>>>> > >>>>>> > _______________________________________________ >>>>>> > 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 >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Akiko Ikkai, Ph.D. >>>>> Postdoctoral Fellow >>>>> Department of Psychological and Brain Sciences >>>>> Johns Hopkins University >>>>> Ames Hall, 3400 N. Charles St. >>>>> Baltimore, MD 21218 >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> >> >> -- >> Akiko Ikkai, Ph.D. >> Postdoctoral Fellow >> Department of Psychological and Brain Sciences >> Johns Hopkins University >> Ames Hall, 3400 N. Charles St. >> Baltimore, MD 21218 >> >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Maximilian.Bruchmann at uni-muenster.de Mon Oct 22 16:19:33 2012 From: Maximilian.Bruchmann at uni-muenster.de (Maximilian Bruchmann) Date: Mon, 22 Oct 2012 16:19:33 +0200 Subject: [FieldTrip] Problem with visualizing individual minimum source activity (ft_plot_mesh, ft_sourcemovie, ft_sourceplot) In-Reply-To: References: Message-ID: Dear all, I found the error in my code and I like to describe it in case someone else makes the same mistake: First of all, ft_plot_mesh and ft_sourcemovie are perfectly fine, and so is the minimum norm tutorial, as far as I can tell. My error was that I misinterpreted a part of the help section of ft_sourceanalysis, where it says: % Besides the source positions, you may also include previously computed % spatial filters and/or leadfields like this % cfg.grid.filter % cfg.grid.leadfield so I wrote cfg.grid.leadfield = leadfield; This is wrong. It has to be: cfg.grid = leadfield; just as described in the tutorial. Sorry for the false alarm! Best, Max Am 18.10.2012 um 15:55 schrieb Maximilian Bruchmann : > Dear FieldTrippers, > > there used to be a very convenient way to get a look at individual mne source reconstructions using either ft_plot_mesh or ft_sourcemovie, but both no longer seem to work. When I follow the minimum norm estimate tutorial up to the point of visualization the code that worked fine some weeks ago now produces the following errors: > > cfg=[]; > cfg.method = 'mne'; > cfg.grid.leadfield = leadfield; > cfg.vol = vol; > cfg.mne.lambda = 1e11; > myMne = ft_sourceanalysis(cfg,timeLock); > > bnd.pnt = sourcespace.pnt; > bnd.tri = sourcespace.tri; > m=myMne.avg.pow(:,450); > ft_plot_mesh(bnd, 'vertexcolor', m); > > produces the error: > Error using ft_plot_mesh (line 191) > Unknown color > > As it seems, 'vertexcolor' accepts only a single RGB triplet. In fact, none of the options of ft_plot_mesh seems to support the visualization of functional data anymore, am I right? > > The other way using ft_sourcemovie used to work fine like this: > > > figure > myMne.tri = sourcespace.tri; > cfg = []; > cfg.alim = [0 8e-14]; > cfg.zlim = [0 4e-13]; > cfg.maskparameter = 'avg.pow'; > ft_sourcemovie(cfg,myMne); > > > But now it produces the warning > Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering > and I get an empty figure window. > > I tried ft_sourceplot: > > cfg = []; > cfg.method = 'surface'; > cfg.funparameter = 'avg.pow'; > ft_sourceplot(cfg,myMne); > > but irrespective of the method I get > Error using ft_sourceplot (line 188) > the input data needs to be defined on a regular 3D grid > > Any help on how I can view my source reconstruction results as a colored source space model would be very appreciated! > Thanks in advance! > Best, > Max > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _____________________________________________________________ Dr. phil. Maximilian Bruchmann, Dipl. Psych. Institut für Biomagnetismus und Biosignalanalyse Universitätsklinikum Münster Adresse: Malmedyweg 15 48149 Münster Telefon: +49-(0)251-83-52547 E-Mail: Maximilian.Bruchmann at uni-muenster.de Internet: http://biomag.uni-muenster.de _____________________________________________________________ From akiko.ikkai at gmail.com Mon Oct 22 19:37:59 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Mon, 22 Oct 2012 13:37:59 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Johanna, you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis for each condition runs to the completion :) However, since my data is EEG and the electrode locations vary (hence the grid coordinates vary) between subjects, running stats across subjects without normalizing might be causing a problem. For example, the first 3 points in subject1's .pos are (after creating template grid etc.., and run ft_sourceanalysis using MNI grid): d1group{1}.pos(1:3,:) ans = -8.7000 -7.5000 -7.6000 -7.7000 -7.5000 -7.6000 -6.7000 -7.5000 -7.6000 and the same points for the subject2's are: d1group{2}.pos(1:3,:) ans = -8.3000 -7.6000 -8.2000 -7.3000 -7.6000 -8.2000 -6.3000 -7.6000 -8.2000 So when I try to run ft_sourcestatistics. I get an error message: ??? Error using ==> statistics_wrapper at 109 grid locations of the source reconstructions do not match, use NORMALISEVOLUME first Error in ==> ft_sourcestatistics at 100 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Perhaps I should interpolate and normalize each subject, and run group stats afterall? Thanks! Akiko On Sun, Oct 21, 2012 at 11:32 AM, Johanna Zumer wrote: > Hi Akiko, > > Can you type 'dbstop if error' before running the last step, so that > it goes to debug mode when it crashes there? What are the sizes of > 'filt' and 'Cf' for the 40th position? > > Another thing to try is, during your last call to ft_sourceanalysis, > cfg = []; > cfg.grid = grid; > cfg.grid.filter = source_common.avg.filter; > > so that all the .inside and .outside information is transfered as well. > > A note to all users: you can skip the first step by loading the > precomuted template grids in */fieldtrip/template/sourcemodel. > > Cheers, > Johanna > > > 2012/10/20 Akiko Ikkai : > > Hi, > > > > So I have followed Johanna and Stephan's advise to create template_grid > and > > each subject's grid from MNI image, which is now 1cm spacing instead of > > .5cm. These steps seem to run, and I'm able to create a common spatial > > filter to run beamformer using DICS. However, I get an error when I apply > > the commom filter to each condition. > > > > I had to tweak a few things on example on the page > > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > > , since my data is EEG and electrode locations vary between subjects, > such > > that: > > > > cfg = []; > > cfg.grid.xgrid = -20:1:20; > > cfg.grid.ygrid = -20:1:20; > > cfg.grid.zgrid = -20:1:20; > > cfg.grid.tight = 'yes'; > > cfg.inwardshift = -1.5; > > cfg.vol = template_vol; > > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to > add > > this (got error otherwise) > > template_grid = ft_prepare_sourcemodel(cfg); > > > > then > > cfg = []; > > cfg.grid.warpmni = 'yes'; > > cfg.grid.template = template_grid; > > cfg.grid.nonlinear = 'yes'; > > cfg.mri = mri_aligned; > > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to > add > > this (got error otherwise) > > grid = ft_prepare_sourcemodel(cfg); > > > > These create grids in MNI space, both for template and individual fine. > To > > create a common spatial filter, I run the following command, which runs: > > cfg = []; > > cfg.grid.pos = grid.pos; > > cfg.grid.dim = grid.dim; > > cfg.grid.inside = grid.inside; > > cfg.grid.outside = grid.outside; > > cfg.inwardshift = -1.5; > > cfg.vol = vol_cm; > > cfg.channel = {'all'}; > > cfg.frequency = 10.5; > > cfg.method = 'dics'; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.feedback = 'no'; > > source_common = ft_sourceanalysis(cfg, freq_common); > > > > however, when I apply this spatial filter to a task condition, I get an > > error message > > cfg = []; > > cfg.elec = freq_common.elec; > > cfg.grid.pos = source_common.pos; > > cfg.grid.filter = source_common.avg.filter; > > cfg.inwardshift = -1.5; > > cfg.vol = vol_cm; > > cfg.channel = {'all'}; > > cfg.frequency = 10.5; > > cfg.method = 'dics'; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.feedback = 'no'; > > source_itemL = ft_sourceanalysis(cfg, freq_itemL); > > source_itemL.unit = 'cm'; > > > > ??? Error using ==> mtimes > > Inner matrix dimensions must agree. > > > > Error in ==> beamformer_dics at 316 > > csd = filt * Cf * ctranspose(filt); % Gross > > eqn. 4 > > and 5 > > > > Error in ==> ft_sourceanalysis at 588 > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > > optarg{:}); > > > > The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot > > where exactly the error is originating from. Am I missing some steps > when I > > create template grids that I feed into ft_sourceanalysis? > > > > Thank you in advance for your help! Akiko > > > > > > On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai > wrote: > >> > >> Hi Everyone, > >> > >> Thank you very much for your advise. I just came back from SfN, and just > >> found your replies, so I will test these options and report back what I > >> find. > >> > >> Thank you again! Akiko > >> > >> > >> On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh > >> wrote: > >>> > >>> Hi Akiko! > >>> > >>> Just to chime in - your source grid is very, very large indeed! > ALthough > >>> I started with a very fine grid, at one point I also had to downside it > >>> (going to 5mm), and had to stop using interpolated source data for > stats and > >>> the like. Johanna's suggestion will certainly do the trick and it will > speed > >>> up your analysis enormously as well. You then only need to do > interpolate > >>> for plotting purposes. > >>> > >>> all the best, > >>> Stephen > >>> > >>> > >>> On 8 October 2012 12:02, Johanna Zumer > >>> wrote: > >>>> > >>>> Hi Akiko, > >>>> > >>>> In addition to Saskia's comment (which is very useful!) remember also > >>>> that if you create the subject's grid from the warped MNI template > grid > >>>> (explained here > >>>> > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > ) > >>>> then you can keep each subject's source data in a 'source' structure > with > >>>> .pos field and still do group level statistics, without need to > convert to > >>>> 'volume' structure which upsamples the spatial resolution perhaps > >>>> artificially too high. > >>>> > >>>> Cheers, > >>>> Johanna > >>>> > >>>> > >>>> 2012/10/7 Akiko Ikkai > >>>>> > >>>>> Hi Saskia, > >>>>> > >>>>> Thank you for the quick advise! Removing cfg definitely works well. > >>>>> Each of the group data is now 1.3G (I also used "single" to convert > >>>>> everything into single precision), which is definitely manageable. > >>>>> Computation time has also been reduced to 3 times less now. > >>>>> > >>>>> Thanks! Akiko > >>>>> > >>>>> > >>>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens > >>>>> wrote: > >>>>>> > >>>>>> Hi Akiko, > >>>>>> > >>>>>> In my experience with grandavg source structs, sometimes the cfg > >>>>>> (that's attached to the data struct) becomes very large and can > >>>>>> consume a considerable amount of memory. I'm not sure if that's the > >>>>>> case/problem here, but might be worth checking and removing the cfg. > >>>>>> You could even use checkconfig to cleanup your cfg with: > >>>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') > >>>>>> Hope this helps! > >>>>>> > >>>>>> Best, > >>>>>> Saskia > >>>>>> > >>>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai > > >>>>>> wrote: > >>>>>> > Dear Fieldtrip users, > >>>>>> > > >>>>>> > I've been trying to run group stats on my EEG source data, which > >>>>>> > contains 14 > >>>>>> > subjects' normalized beamformer data, and having serious swap > memory > >>>>>> > issue > >>>>>> > (not Matlab memory issue, but OS swap memory). > >>>>>> > > >>>>>> > I'm trying to contrast 2 conditions (within subject design). Each > >>>>>> > subject's > >>>>>> > normalized beamformer data (1 condition) is > >>>>>> > > >>>>>> > source_lTMI_intNorm = > >>>>>> > > >>>>>> > anatomy: [181x217x181 double] > >>>>>> > > >>>>>> > inside: [181x217x181 logical] > >>>>>> > > >>>>>> > avg: [1x1 struct] > >>>>>> > > >>>>>> > transform: [4x4 double] > >>>>>> > > >>>>>> > dim: [181 217 181] > >>>>>> > > >>>>>> > cfg: [1x1 struct] > >>>>>> > > >>>>>> > > >>>>>> >>whos > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > Name Size Bytes Class > >>>>>> > Attributes > >>>>>> > > >>>>>> > source_lTMI_intNorm 1x1 520114791 struct > >>>>>> > > >>>>>> > > >>>>>> > therefore, when I open all subjects' data ("data1group" and > >>>>>> > "data2group"), > >>>>>> > it's huge... > >>>>>> > > >>>>>> > Name Size Bytes Class Attributes > >>>>>> > > >>>>>> > data1group 1x14 5909429438 cell > >>>>>> > > >>>>>> > data2group 1x14 6705652782 cell > >>>>>> > > >>>>>> > > >>>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). > >>>>>> > Therefore, > >>>>>> > > >>>>>> >>data1group{1} > >>>>>> > > >>>>>> > anatomy: [181x217x181 double] > >>>>>> > > >>>>>> > inside: [181x217x181 logical] > >>>>>> > > >>>>>> > avg: [1x1 struct] > >>>>>> > > >>>>>> > transform: [4x4 double] > >>>>>> > > >>>>>> > dim: [181 217 181] > >>>>>> > > >>>>>> > cfg: [1x1 struct] > >>>>>> > > >>>>>> > So, when I try to run > >>>>>> > > >>>>>> > cfg=[]; > >>>>>> > > >>>>>> > cfg.dim = data1group{1}.dim; > >>>>>> > > >>>>>> > cfg.method = 'montecarlo'; > >>>>>> > > >>>>>> > cfg.statistic = 'depsamplesT'; > >>>>>> > > >>>>>> > cfg.parameter = 'avg.pow'; > >>>>>> > > >>>>>> > cfg.correctm = 'cluster'; > >>>>>> > > >>>>>> > cfg.numrandomization = 100; > >>>>>> > > >>>>>> > cfg.alpha = 0.05; > >>>>>> > > >>>>>> > cfg.tail = 0; > >>>>>> > > >>>>>> > nsubj=length(data1group); > >>>>>> > > >>>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; > >>>>>> > > >>>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > >>>>>> > > >>>>>> > cfg.uvar = 1; > >>>>>> > > >>>>>> > cfg.ivar = 2; > >>>>>> > > >>>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > >>>>>> > > >>>>>> > stat.anatomy = data1group{1}.anatomy; > >>>>>> > > >>>>>> > > >>>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory > (startup > >>>>>> > memory?), which forces me to quit Matlab. I'm running above > >>>>>> > processes in a > >>>>>> > function, so I'm not running into Matlab memory error. > >>>>>> > > >>>>>> > Could someone help me how it could run more efficiently? I guess > >>>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have > to > >>>>>> > eventually load 2 group data in Matlab workspace...? > >>>>>> > > >>>>>> > Thank you in advance! Akiko > >>>>>> > > >>>>>> > -- > >>>>>> > Akiko Ikkai, Ph.D. > >>>>>> > Postdoctoral Fellow > >>>>>> > Department of Psychological and Brain Sciences > >>>>>> > Johns Hopkins University > >>>>>> > Ames Hall, 3400 N. Charles St. > >>>>>> > Baltimore, MD 21218 > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > _______________________________________________ > >>>>>> > 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 > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Akiko Ikkai, Ph.D. > >>>>> Postdoctoral Fellow > >>>>> Department of Psychological and Brain Sciences > >>>>> Johns Hopkins University > >>>>> Ames Hall, 3400 N. Charles St. > >>>>> Baltimore, MD 21218 > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> 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 > >> > >> > >> > >> > >> -- > >> Akiko Ikkai, Ph.D. > >> Postdoctoral Fellow > >> Department of Psychological and Brain Sciences > >> Johns Hopkins University > >> Ames Hall, 3400 N. Charles St. > >> Baltimore, MD 21218 > >> > >> > > > > > > > > -- > > Akiko Ikkai, Ph.D. > > Postdoctoral Fellow > > Department of Psychological and Brain Sciences > > Johns Hopkins University > > Ames Hall, 3400 N. Charles St. > > Baltimore, MD 21218 > > > > > > > > _______________________________________________ > > 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Mon Oct 22 22:43:19 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 22 Oct 2012 20:43:19 +0000 Subject: [FieldTrip] Post Doc Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816F9E998@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to a research associate (Post Doc) job opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Research Associate (Post Doc)- Ref: 1288813 Closing Date: 22/11/2012 A research associate (Post Doc) position (starting salary £32,055 per annum Inclusive if London allowance) is available to work on a BBSRC funded project that will use psychophysics, eye tracking and MEG functional brain imaging to investigate the neural systems that support listeners ability to detect changes in acoustic scenes. You will be supervised by Dr Maria Chait. The post holder will be based at UCL Ear Institute and MEG scanning will be carried out at UCL's Wellcome Trust Centre for Neuroimaging. Initial funding for this post is available for 36 months. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. The Wellcome Trust Centre for Neuroimaging is a leading centre for brain imaging, bringing together clinicians and scientists who study higher cognitive function using neuroimaging techniques. Key Requirements Applicants should hold a PhD degree (or equivalent) in an engineering or Neuroscience-related subject and have substantial experience in digital signal processing and computer programming. Previous experience with auditory research and/or functional brain imaging is desirable. Further Details You should apply for this post (Ref #: 1288813) through UCL's online recruitment website, www.ucl.ac.uk/hr/jobs, where you can download a job description and person specifications. For an informal discussion please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue Oct 23 09:08:18 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 23 Oct 2012 09:08:18 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, The .pos entries are (as expected) different for every subject due to the different coregistration of that subject to the standard MNI. However, the grid positions all originate from the same original MNI-based positions, and are in the same order. Thus, d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so forth. You can substitue d1group{n}.pos=template_grid.pos for all subjects, and then call the stats function, and the results are now in the MNI template grid space. Cheers, Johanna 2012/10/22 Akiko Ikkai : > Hi Johanna, > > you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis > for each condition runs to the completion :) > > However, since my data is EEG and the electrode locations vary (hence the > grid coordinates vary) between subjects, running stats across subjects > without normalizing might be causing a problem. For example, the first 3 > points in subject1's .pos are (after creating template grid etc.., and run > ft_sourceanalysis using MNI grid): > > d1group{1}.pos(1:3,:) > ans = > -8.7000 -7.5000 -7.6000 > -7.7000 -7.5000 -7.6000 > -6.7000 -7.5000 -7.6000 > > and the same points for the subject2's are: > > d1group{2}.pos(1:3,:) > ans = > -8.3000 -7.6000 -8.2000 > -7.3000 -7.6000 -8.2000 > -6.3000 -7.6000 -8.2000 > > So when I try to run ft_sourcestatistics. I get an error message: > ??? Error using ==> statistics_wrapper at 109 > grid locations of the source reconstructions do not match, use > NORMALISEVOLUME > first > > Error in ==> ft_sourcestatistics at 100 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > Perhaps I should interpolate and normalize each subject, and run group stats > afterall? > > Thanks! Akiko > From stephen.whitmarsh at gmail.com Tue Oct 23 10:06:49 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 23 Oct 2012 10:06:49 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: yes, that's the beauty of it! On 23 October 2012 09:08, Johanna Zumer wrote: > Hi Akiko, > > The .pos entries are (as expected) different for every subject due to > the different coregistration of that subject to the standard MNI. > However, the grid positions all originate from the same original > MNI-based positions, and are in the same order. Thus, > d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so > forth. You can substitue d1group{n}.pos=template_grid.pos for all > subjects, and then call the stats function, and the results are now in > the MNI template grid space. > > Cheers, > Johanna > > 2012/10/22 Akiko Ikkai : > > Hi Johanna, > > > > you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis > > for each condition runs to the completion :) > > > > However, since my data is EEG and the electrode locations vary (hence the > > grid coordinates vary) between subjects, running stats across subjects > > without normalizing might be causing a problem. For example, the first 3 > > points in subject1's .pos are (after creating template grid etc.., and > run > > ft_sourceanalysis using MNI grid): > > > > d1group{1}.pos(1:3,:) > > ans = > > -8.7000 -7.5000 -7.6000 > > -7.7000 -7.5000 -7.6000 > > -6.7000 -7.5000 -7.6000 > > > > and the same points for the subject2's are: > > > > d1group{2}.pos(1:3,:) > > ans = > > -8.3000 -7.6000 -8.2000 > > -7.3000 -7.6000 -8.2000 > > -6.3000 -7.6000 -8.2000 > > > > So when I try to run ft_sourcestatistics. I get an error message: > > ??? Error using ==> statistics_wrapper at 109 > > grid locations of the source reconstructions do not match, use > > NORMALISEVOLUME > > first > > > > Error in ==> ft_sourcestatistics at 100 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > Perhaps I should interpolate and normalize each subject, and run group > stats > > afterall? > > > > Thanks! Akiko > > > _______________________________________________ > 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 hjpark05 at snu.ac.kr Tue Oct 23 16:06:10 2012 From: hjpark05 at snu.ac.kr (Hyojin Park) Date: Tue, 23 Oct 2012 23:06:10 +0900 Subject: [FieldTrip] lambda regularization using Neuromag data Message-ID: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> Dear all, I'm working on LCMV beamforming using Neuromag data applied with Maxfilter. I am using 204 gradiometer sensors. I have rank deficiency problem, maybe because of Maxfilter since it reduces the rank. When I checked the data, the rank is 60. I removed EOG and ECG components using ICA. 2 or 3 components in sum in most subjects. So for some, the rank is 58, for some, it's 57. When I tested with different lambda from 0% to 10%, (or above, even 100%), I got the same warning ('covariance matrix is rank deficient'). Does anyone have suggestions for which lambda is most appropriate in this case? Or any other useful advice/experience for how to apply beamforming in combination with Maxfilter? Thank you in advance. Hyojin Park -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue Oct 23 17:17:58 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 23 Oct 2012 17:17:58 +0200 Subject: [FieldTrip] lambda regularization using Neuromag data In-Reply-To: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> References: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> Message-ID: Dear Hyojin, If you look inside beamformer_lcmv.m, you will see that the warning you mention gets generated before the lambda regularization is applied (i.e. the warning applies to your input rank 57 covariance matrix, not the matrix that actually is inverted to generate InvCy which takes the lambda into account). Maybe someone else with experience with Maxfilter Neuromag data can comment as to what level of lambda is appropriate. But I would suggest looking at your results from lambda at around 10% and see if they are reasonable. At the extreme, the 100% lambda case should look similar to a min-norm result. Cheers, Johanna 2012/10/23 Hyojin Park : > Dear all, > > > > I’m working on LCMV beamforming using Neuromag data applied with Maxfilter. > > I am using 204 gradiometer sensors. > > > > I have rank deficiency problem, maybe because of Maxfilter since it reduces > the rank. > > When I checked the data, the rank is 60. > > I removed EOG and ECG components using ICA. > > 2 or 3 components in sum in most subjects. > > So for some, the rank is 58, for some, it’s 57… > > > > When I tested with different lambda from 0% to 10%, (or above, even 100%), I > got the same warning ('covariance matrix is rank deficient'). > > > > Does anyone have suggestions for which lambda is most appropriate in this > case? Or any other useful advice/experience for how to apply beamforming in > combination with Maxfilter? > > > > Thank you in advance. > > Hyojin Park > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From akiko.ikkai at gmail.com Wed Oct 24 00:04:43 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Tue, 23 Oct 2012 18:04:43 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Johanna & Stephen It turned out ft_prepare_sourcemodel in the version I was using (20120103) did not have cfg.grid.template options, so I was never using "template_grid" to create "grid" in MNI space for each subject. I downloaded the latest version, ran as you suggested... and victory! Thank you for your patience. The results look great :) Akiko On Tue, Oct 23, 2012 at 4:06 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > yes, that's the beauty of it! > > > On 23 October 2012 09:08, Johanna Zumer wrote: > >> Hi Akiko, >> >> The .pos entries are (as expected) different for every subject due to >> the different coregistration of that subject to the standard MNI. >> However, the grid positions all originate from the same original >> MNI-based positions, and are in the same order. Thus, >> d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so >> forth. You can substitue d1group{n}.pos=template_grid.pos for all >> subjects, and then call the stats function, and the results are now in >> the MNI template grid space. >> >> Cheers, >> Johanna >> >> 2012/10/22 Akiko Ikkai : >> > Hi Johanna, >> > >> > you are right! specifying cfg.grid = grid; was the key; >> ft_sourceanalysis >> > for each condition runs to the completion :) >> > >> > However, since my data is EEG and the electrode locations vary (hence >> the >> > grid coordinates vary) between subjects, running stats across subjects >> > without normalizing might be causing a problem. For example, the first 3 >> > points in subject1's .pos are (after creating template grid etc.., and >> run >> > ft_sourceanalysis using MNI grid): >> > >> > d1group{1}.pos(1:3,:) >> > ans = >> > -8.7000 -7.5000 -7.6000 >> > -7.7000 -7.5000 -7.6000 >> > -6.7000 -7.5000 -7.6000 >> > >> > and the same points for the subject2's are: >> > >> > d1group{2}.pos(1:3,:) >> > ans = >> > -8.3000 -7.6000 -8.2000 >> > -7.3000 -7.6000 -8.2000 >> > -6.3000 -7.6000 -8.2000 >> > >> > So when I try to run ft_sourcestatistics. I get an error message: >> > ??? Error using ==> statistics_wrapper at 109 >> > grid locations of the source reconstructions do not match, use >> > NORMALISEVOLUME >> > first >> > >> > Error in ==> ft_sourcestatistics at 100 >> > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> > >> > Perhaps I should interpolate and normalize each subject, and run group >> stats >> > afterall? >> > >> > Thanks! Akiko >> > >> _______________________________________________ >> 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Oct 25 18:00:13 2012 From: lihqih at gmail.com (qi li) Date: Thu, 25 Oct 2012 12:00:13 -0400 Subject: [FieldTrip] co registration of the mesh points to the atlas Message-ID: Hi, Is there any function to co-register the individual cortical mesh points(8196 in total) generate by fieldtrip to the standard brain. Thanks! Qi From mcgoiv0 at wfu.edu Thu Oct 25 20:33:57 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Thu, 25 Oct 2012 14:33:57 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis Message-ID: Hello, I would like to know if Signal Space Separation method for MEG data analysis is available in the FieldTrip toolbox. Thanks, -- Inna -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.N.Vardy at tudelft.nl Thu Oct 25 22:40:17 2012 From: A.N.Vardy at tudelft.nl (Alistair Vardy - 3ME) Date: Thu, 25 Oct 2012 20:40:17 +0000 Subject: [FieldTrip] LCMV beamformer source reconstruction Message-ID: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> Hi all, I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source. The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom: sourceDiff = dim: [17 13 14] time: [1x819 double] pos: [3094x3 double] inside: [1x1567 double] outside: [1x1527 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] sourceDiff.avg ans = pow: [1x3094 double] mom: {1x3094 cell} noise: [1x3094 double] filter: {1x3094 cell} The moment entries are sized 3 x 819, the filter 3 x 65. I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below. Kind regards, Alistair channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; cfg1 = []; cfg1.keeptrials = 'yes'; cfg1.covariance = 'yes'; cfg1.channel = channel; dataPre = ft_redefinetrial(cfg1, data1FIC); timelock1 = ft_timelockanalysis(cfg1, dataPre); cfg2 = []; cfg2.keeptrials = 'yes'; cfg2.covariance = 'yes'; cfg2.channel = channel; dataPost = ft_redefinetrial(cfg2, data2FIC); timelock2 = ft_timelockanalysis(cfg2, dataPost); %% Source analysis cfg = []; cfg.grid = grid; cfg.hdmfile = volname; cfg.elec = sens; cfg.vol = vol; cfg.method = 'lcmv'; cfg.channel = channel; cfg.lcmv.keeptrials = 'yes'; % cfg.lcmv.projectnoise = 'yes'; cfg.lmvc.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; [source1] = ft_sourceanalysis(cfg, timelock1); [source2] = ft_sourceanalysis(cfg, timelock2); sourceDiff = source2; sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow; -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Fri Oct 26 16:52:18 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 26 Oct 2012 10:52:18 -0400 Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: References: <1376177301.1612.1340961039830.JavaMail.root@zimbra> <1659120385.1619.1340961051346.JavaMail.root@zimbra> Message-ID: Hi, I know this is not a recent post, but please allow me to ask a follow-up question; can you use cfg.pad for ft_freqanalysis for the baseline in this case (assuming post-baseline period of interest is uniform length, say 1000ms)? Such as: % extract baseline (500ms) cfg = []; cfg.toilim = [-.7 -.2]; data_BL = ft_redefinetrial(cfg,ft_data); % pad to make it 1000ms and run ft_freqanalysis cfg = []; *cfg.pad = 1;* cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foi = foi; cfg.taper = 'dpss'; cfg.tapsmofrq = smooth; freq_BL = ft_freqanalysis(cfg,data_BL); Thanks! Akiko On Mon, Jul 2, 2012 at 4:07 PM, Johanna Zumer wrote: > Dear Anna, > > Ideally for the common filter, you want the same amount of data T(s) per > condition, where T = N x tw (and N is number of trials and tw is timewindow > length). In your case, if the baselines for each conditions can be > combined into one general baseline, and if you happen to have 100 trials > per condition, then T_baseline = 3 x 100 x 0.5s = 150s. If you then use > 1.5s length post-baseline, then T_each_condition = 100 x 1.5s = 150s, so > you now have equal T for each condition for the common filter. > > However, in order to have an equal effect of tapers and edge-effects on > the different conditions, you should use equal time window lengths in > freqanalysis. Thus it would be better to split your post-baseline data > into 3 segments of 500ms each before calling ft_freqanalysis, which again > gives T = 100 x 0.5 x 3 = 150s. > > Cheers, > Johanna > > 2012/6/29 Anna Wilsch > >> >> Dear Fieldtrippers, >> >> I'm trying to beamform my MEG data by building a common filter including >> three conditions and a baseline for each condition. The baseline intervals >> have a duration of 500 ms. I was wondering if it is ok if the post-baseline >> data are longer than that (1000 - 2000 ms). Does it have any negative >> impact on the cross-spectral-density matrix and/or the common filter? Would >> that still be a valid operation to do or is it necessary that baseline and >> post baseline data have the same length? >> Thank you for your comments. >> >> Cheers, >> Anna >> >> >> Anna Wilsch, Dipl.-Psych. >> Auditory Cognition Research Group >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstr. 1a - Leipzig, Germany >> (p) +49 (0)341 9940 2641 >> (e) wilsch at cbs.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dadair at NKI.RFMH.ORG Fri Oct 26 17:49:31 2012 From: dadair at NKI.RFMH.ORG (Adair, Devin) Date: Fri, 26 Oct 2012 11:49:31 -0400 Subject: [FieldTrip] Plotting use ft_multiplot Message-ID: <2586A1048152BE4D861E64A98700AD420BCED7E9@nki-mail.NKI.rfmh.org> Hello, I am currently designing my own n-way ANOVA script for time frequency data using a mixture of fieldtrip functions and my own scripting. I currently have a 2x2x4x10 design that I managed (after some effort) to output 25x24x17 (electrode x frequency x time) matrices with the p-values for each interaction. I know would like to plot this data using ft_multiplot by using the cfg.inputfile option that specifies a single *.mat file with a 'data' variable contained a cell array. My question is about the format of the cell array - does it need to come in a certain order? (frequency first, time second, etc) or by specifying the other configuration parameters will it automatically detect how my data is arranged? Thanks for the help, Devin Adair Research Assistant Brain Stimulation Program, Division of Experimental Therapeutics Department of Psychiatry, Columbia University Medical Center New York State Psychiatric Institute (p) 212-543-1339 Conserve Resources. Print only when necessary. IMPORTANT NOTICE: This e-mail is meant only for the use of the intended recipient. It may contain confidential information which is legally privilegedor otherwise protected by law. If you received this e-mail in error or from someone who is not authorized to send it to you, you are strictly prohibited from reviewing, using, disseminating, distributing or copying the e-mail. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND DELETE THIS MESSAGE FROM YOUR SYSTEM. Thank you for your cooperation. From polomacnenad at gmail.com Mon Oct 29 10:04:23 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 29 Oct 2012 10:04:23 +0100 Subject: [FieldTrip] ICA question Message-ID: Dear all, I have one question concerning ft_componentanalysis. I want to calculate ICA for my data in order to detect EOG artifacts and remove those ICA components. I have recorded EOG electrodes as well, but I am not sure where I should enter channels' label for them. I assume that ICA calculation will be more accurate if I provide data from EOG electrodes. So my question is how to inform ft_componentanalysis about EOG data? My configuration for the ICA analysis looks like this: cfg = []; cfg.method = 'runica'; cfg.runica.pca = 90; cfg.runica.maxsteps = 600; cfg.runica.stop = 1e-7; cfg.runica.extended = 1; ica_comp = ft_componentanalysis(cfg, data); Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Oct 29 10:27:14 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 29 Oct 2012 10:27:14 +0100 Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: References: <1376177301.1612.1340961039830.JavaMail.root@zimbra> <1659120385.1619.1340961051346.JavaMail.root@zimbra> Message-ID: <508E4BF2.9050203@donders.ru.nl> Hi Akiko, of course you can use it, but freqanalysis will pad zeros thereby increasing the spectral resolution but not add any data specifically. In the end, your result will be a more smoothed spectral estimate for the padded trials, which allows you to average across trials with different length (since they the spectral resolution is now equal across trials) or in this case contrast conditions of different lengths. I don't see much sense in doing that for the baseline, apart from tricking the algorithm, but from a more pragmatic point of view: if no reviewer complaints then it's fine ;) I bet there are some other consequences that I don't foresee; if someone knows, please let me/us know :) Best, Jörn On 10/26/2012 4:52 PM, Akiko Ikkai wrote: > Hi, > > I know this is not a recent post, but please allow me to ask a > follow-up question; can you use cfg.pad for ft_freqanalysis for the > baseline in this case (assuming post-baseline period of interest is > uniform length, say 1000ms)? > > Such as: > % extract baseline (500ms) > cfg = []; > cfg.toilim = [-.7 -.2]; > data_BL = ft_redefinetrial(cfg,ft_data); > > % pad to make it 1000ms and run ft_freqanalysis > cfg = []; > *cfg.pad = 1;* > cfg.method = 'mtmfft'; > cfg.output = 'powandcsd'; > cfg.foi = foi; > cfg.taper = 'dpss'; > cfg.tapsmofrq = smooth; > freq_BL = ft_freqanalysis(cfg,data_BL); > > Thanks! Akiko > > On Mon, Jul 2, 2012 at 4:07 PM, Johanna Zumer > > wrote: > > Dear Anna, > > Ideally for the common filter, you want the same amount of data > T(s) per condition, where T = N x tw (and N is number of trials > and tw is timewindow length). In your case, if the baselines for > each conditions can be combined into one general baseline, and if > you happen to have 100 trials per condition, then T_baseline = 3 x > 100 x 0.5s = 150s. If you then use 1.5s length post-baseline, > then T_each_condition = 100 x 1.5s = 150s, so you now have equal T > for each condition for the common filter. > > However, in order to have an equal effect of tapers and > edge-effects on the different conditions, you should use equal > time window lengths in freqanalysis. Thus it would be better to > split your post-baseline data into 3 segments of 500ms each before > calling ft_freqanalysis, which again gives T = 100 x 0.5 x 3 = 150s. > > Cheers, > Johanna > > 2012/6/29 Anna Wilsch > > > > Dear Fieldtrippers, > > I'm trying to beamform my MEG data by building a common filter > including three conditions and a baseline for each condition. > The baseline intervals have a duration of 500 ms. I was > wondering if it is ok if the post-baseline data are longer > than that (1000 - 2000 ms). Does it have any negative impact > on the cross-spectral-density matrix and/or the common filter? > Would that still be a valid operation to do or is it necessary > that baseline and post baseline data have the same length? > Thank you for your comments. > > Cheers, > Anna > > > Anna Wilsch, Dipl.-Psych. > Auditory Cognition Research Group > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstr. 1a - Leipzig, Germany > (p) +49 (0)341 9940 2641 > (e) wilsch at cbs.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Oct 29 10:49:12 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 29 Oct 2012 10:49:12 +0100 Subject: [FieldTrip] ICA question In-Reply-To: References: Message-ID: Dear Nenad, If you do not specify a cfg.channel in your call to ft_componentanalysis, it will default to 'all'. So, if your data structure contains EOG channels, they will be used in the decomposition with no further action required on your part. If your data is MEG, however, I don't know whether it is wise to attempt an ICA on the joint data set, including EOG. It is not standard practice here at the Donders, at least. One possibility to combine EOG and MEG/ICA data is to correlate your MEG component time courses with the EOG signal, and then inspect the most highly correlated components and (if inspection reveals them to be artifactual) remove them. This hybrid automatic/manual approach seems to be quite efficient in getting rid of eye artifacts. But perhaps you can combine them after all; if someone has a more informed opinion about this please let me know. (Another possibility is that the story is different for EEG and EOG combined.) Best, Eelke On 29 October 2012 10:04, Nenad Polomac wrote: > Dear all, > > I have one question concerning ft_componentanalysis. > > I want to calculate ICA for my data in order to detect EOG artifacts and > remove those ICA components. I have recorded EOG electrodes as well, but I > am not sure where I should enter channels' label for them. I assume that ICA > calculation will be more accurate if I provide data from EOG electrodes. > > So my question is how to inform ft_componentanalysis about EOG data? > > My configuration for the ICA analysis looks like this: > > cfg = []; > cfg.method = 'runica'; > cfg.runica.pca = 90; > cfg.runica.maxsteps = 600; > cfg.runica.stop = 1e-7; > cfg.runica.extended = 1; > ica_comp = ft_componentanalysis(cfg, data); > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Oct 30 10:03:24 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:03:24 +0100 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: References: Message-ID: <508F97DC.9080009@donders.ru.nl> Dear Qi, I guess this page might help: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=warp Best, Jörn On 10/25/2012 6:00 PM, qi li wrote: > Hi, > > Is there any function to co-register the individual cortical mesh > points(8196 in total) generate by fieldtrip to the standard brain. > Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Oct 30 10:07:48 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:07:48 +0100 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: Message-ID: <508F98E4.7010701@donders.ru.nl> Dear Inna, I'm not aware of any implementation in FieldTrip. For the CTF system we got the ft_denoise_synthetic function, but afaik SSS is something NeuroMag specific and (I might be wrong here, because...) since we do not have a NeuroMag system I would guess that no one bothered to implement it. If you want to do so, you're welcome and we would be most happy to help out on various ends with all our abilities ;) Best, Jörn On 10/25/2012 8:33 PM, McGowin, Inna wrote: > Hello, > I would like to know if Signal Space Separation method for MEG data > analysis is available in the FieldTrip toolbox. > > Thanks, > > -- > Inna > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Oct 30 10:21:26 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:21:26 +0100 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> Message-ID: <508F9C16.8040604@donders.ru.nl> Dear Alistair, I am not quite sure whether I understand your request correctly, but you are looking for help to get the maximum activity per trial in your source reconstructed data? I guess your confusion arises because of the different subfields, so here a short explanation: Every dipole has strengths in 3 directions (think of it as magnetic field strength in the x,y and z direction), this is stored in .mom In order to get it down to one number instead of three, there are different possibilities, but what's roughly happening by default is that an SVD is computed then the principal direction is taken, i.e. the strongest of these three vectors. This is what you find back in .pow. The filter matrix is the filter per grid position to get from your sensor data to the source data. Noise is an approximation of the noise level per trial. So, if you want to get the maximum activity, I would suggest to take [~, idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position of maximal power. If you are interested in the maximum over e.g. the posterior part of the brain, you should limit your search. You can best do that by using sourceDiff.pos and an atlas. If that does not answer your question, feel free to clarify your request ;) Best, Jörn On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: > > Hi all, > > I trying to reconstruct the activity in a source using the LCMV > beamformer with EEG data. My code follows several examples that stop > at the source localization. Unfortunately, I am unable to reconstruct > the source. > > The data is a series of 198 button presses, self-paced. The two time > locked data sets are pre- and post-event windows. The data is filtered > in the beta band (13-30 Hz). There are 128 EEG channels, three of > which are excluded due to excessive noise. The data was re-referenced > to the common average. The source that provides the normalized > difference in power between the two time windows has a field avg with > subfields, filter, noise, pow, and mom: > > sourceDiff = > > dim: [17 13 14] > > time: [1x819 double] > > pos: [3094x3 double] > > inside: [1x1567 double] > > outside: [1x1527 double] > > method: 'average' > > avg: [1x1 struct] > > cfg: [1x1 struct] > > sourceDiff.avg > > ans = > > pow: [1x3094 double] > > mom: {1x3094 cell} > > noise: [1x3094 double] > > filter: {1x3094 cell} > > The moment entries are sized 3 x 819, the filter 3 x 65. > > I hope someone can help me with the code required to reconstruct the > source at the voxel with the largest power during the entire duration > of each trial. The code used to determine the source is below. MRI, > head model and leadfield were computed as well but are not included in > the code below. > > Kind regards, > > Alistair > > channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; > > cfg1 = []; > > cfg1.keeptrials = 'yes'; > > cfg1.covariance = 'yes'; > > cfg1.channel = channel; > > dataPre = ft_redefinetrial(cfg1, data1FIC); > > timelock1 = ft_timelockanalysis(cfg1, dataPre); > > cfg2 = []; > > cfg2.keeptrials = 'yes'; > > cfg2.covariance = 'yes'; > > cfg2.channel = channel; > > dataPost = ft_redefinetrial(cfg2, data2FIC); > > timelock2 = ft_timelockanalysis(cfg2, dataPost); > > %% Source analysis > > cfg = []; > > cfg.grid = grid; > > cfg.hdmfile = volname; > > cfg.elec = sens; > > cfg.vol = vol; > > cfg.method = 'lcmv'; > > cfg.channel = channel; > > cfg.lcmv.keeptrials = 'yes'; > > % cfg.lcmv.projectnoise = 'yes'; > > cfg.lmvc.lambda = '5%'; > > cfg.lcmv.keepfilter = 'yes'; > > [source1] = ft_sourceanalysis(cfg, timelock1); > > [source2] = ft_sourceanalysis(cfg, timelock2); > > sourceDiff = source2; > > sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ > source1.avg.pow; > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Tue Oct 30 10:37:02 2012 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Tue, 30 Oct 2012 10:37:02 +0100 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: <508F9C16.8040604@donders.ru.nl> References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> <508F9C16.8040604@donders.ru.nl> Message-ID: Dear Alistair, In addition to the informative response from Jörn, I just wanted to add: One tiny thing I note is that you type cfg.lmvc.lambda which should be cfg.lcmv.lambda. Why is your filter of size 3x65? Shouldn't it be 3x125 (3 source orientations x 125 EEG channels)? Cheers, Johanna 2012/10/30 "Jörn M. Horschig" > Dear Alistair, > > I am not quite sure whether I understand your request correctly, but you > are looking for help to get the maximum activity per trial in your source > reconstructed data? I guess your confusion arises because of the different > subfields, so here a short explanation: > > Every dipole has strengths in 3 directions (think of it as magnetic field > strength in the x,y and z direction), this is stored in .mom > In order to get it down to one number instead of three, there are > different possibilities, but what's roughly happening by default is that an > SVD is computed then the principal direction is taken, i.e. the strongest > of these three vectors. This is what you find back in .pow. The filter > matrix is the filter per grid position to get from your sensor data to the > source data. Noise is an approximation of the noise level per trial. > > So, if you want to get the maximum activity, I would suggest to take [~, > idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position > of maximal power. If you are interested in the maximum over e.g. the > posterior part of the brain, you should limit your search. You can best do > that by using sourceDiff.pos and an atlas. > > If that does not answer your question, feel free to clarify your request ;) > > Best, > Jörn > > > On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: > > Hi all,**** > > ** ** > > I trying to reconstruct the activity in a source using the LCMV beamformer > with EEG data. My code follows several examples that stop at the source > localization. Unfortunately, I am unable to reconstruct the source. **** > > ** ** > > The data is a series of 198 button presses, self-paced. The two time > locked data sets are pre- and post-event windows. The data is filtered in > the beta band (13-30 Hz). There are 128 EEG channels, three of which are > excluded due to excessive noise. The data was re-referenced to the common > average. The source that provides the normalized difference in power > between the two time windows has a field avg with subfields, filter, noise, > pow, and mom:**** > > ** ** > > sourceDiff = **** > > ** ** > > dim: [17 13 14]**** > > time: [1x819 double]**** > > pos: [3094x3 double]**** > > inside: [1x1567 double]**** > > outside: [1x1527 double]**** > > method: 'average'**** > > avg: [1x1 struct]**** > > cfg: [1x1 struct]**** > > ** ** > > sourceDiff.avg**** > > ** ** > > ans = **** > > ** ** > > pow: [1x3094 double]**** > > mom: {1x3094 cell}**** > > noise: [1x3094 double]**** > > filter: {1x3094 cell}**** > > ** ** > > The moment entries are sized 3 x 819, the filter 3 x 65.**** > > ** ** > > I hope someone can help me with the code required to reconstruct the > source at the voxel with the largest power during the entire duration of > each trial. The code used to determine the source is below. MRI, head model > and leadfield were computed as well but are not included in the code below. > **** > > ** ** > > Kind regards,**** > > ** ** > > Alistair**** > > ** ** > > channel = {'EEG', '-AFF1', '-AFZ', '-AF1'};**** > > ** ** > > ** ** > > cfg1 = [];**** > > cfg1.keeptrials = 'yes';**** > > cfg1.covariance = 'yes';**** > > cfg1.channel = channel;**** > > dataPre = ft_redefinetrial(cfg1, data1FIC);**** > > timelock1 = ft_timelockanalysis(cfg1, dataPre);**** > > **** > > cfg2 = []; **** > > cfg2.keeptrials = 'yes';**** > > cfg2.covariance = 'yes';**** > > cfg2.channel = channel;**** > > dataPost = ft_redefinetrial(cfg2, data2FIC);**** > > timelock2 = ft_timelockanalysis(cfg2, dataPost);**** > > **** > > ** ** > > %% Source analysis**** > > cfg = [];**** > > cfg.grid = grid;**** > > cfg.hdmfile = volname;**** > > cfg.elec = sens;**** > > cfg.vol = vol;**** > > cfg.method = 'lcmv';**** > > cfg.channel = channel;**** > > cfg.lcmv.keeptrials = 'yes';**** > > % cfg.lcmv.projectnoise = 'yes';**** > > **** > > cfg.lmvc.lambda = '5%';**** > > cfg.lcmv.keepfilter = 'yes';**** > > [source1] = ft_sourceanalysis(cfg, timelock1);**** > > [source2] = ft_sourceanalysis(cfg, timelock2);**** > > ** ** > > sourceDiff = source2;**** > > sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ > source1.avg.pow;**** > > ** ** > > ** ** > > ** ** > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Tue Oct 30 14:20:25 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Tue, 30 Oct 2012 09:20:25 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: <508F98E4.7010701@donders.ru.nl> References: <508F98E4.7010701@donders.ru.nl> Message-ID: Thank you Jörn for the info. I was looking for SSS to perform a DC analysis of MEG data with no motion correction. We have MEG datasets that are collected from subjects with high magnetic noise such as dental work and/or brain surgery contamination. We wanted to remove the signal that comes from these areas. Do you work with such problems? Thanks, Inna On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Inna, > > I'm not aware of any implementation in FieldTrip. For the CTF system we > got the ft_denoise_synthetic function, but afaik SSS is something NeuroMag > specific and (I might be wrong here, because...) since we do not have a > NeuroMag system I would guess that no one bothered to implement it. If you > want to do so, you're welcome and we would be most happy to help out on > various ends with all our abilities ;) > > Best, > Jörn > > > On 10/25/2012 8:33 PM, McGowin, Inna wrote: > > Hello, > I would like to know if Signal Space Separation method for MEG data > analysis is available in the FieldTrip toolbox. > > Thanks, > > -- > Inna > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.N.Vardy at tudelft.nl Tue Oct 30 15:45:59 2012 From: A.N.Vardy at tudelft.nl (Alistair Vardy - 3ME) Date: Tue, 30 Oct 2012 14:45:59 +0000 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> <508F9C16.8040604@donders.ru.nl> Message-ID: <7E8E8A2DF53088489583543F38570D7A1F58F40C@SRV363.tudelft.net> Dear Jorn, Johanna, Thank you for your replies. I was making a couple of mistakes. I wasn't using the parameters correctly and now use cfg.lcmv. which works. The mismatch between the number of channels and the size of the filter was due to the strange situation that ASA channel labels sometimes uppercase letters (from the electrode file) and sometimes lowercase (from the header file). Fieldtrip does not understand AFZ but knows AFz for example. The routine ft_prepare_vol_sense.m thus discarded half of the channels. I found the voxel with the maximal power and reconstructing the dipole moment at that particular source for each trial using the following code which I found in an earlier post somewhere: trialN = size(timelock0.trial,1); for trial_tel = 1:trialN sourceDiff.trial(trial_tel).mom = sourceDiff.avg.filter{maxind}*data0FIC.trial{trial_tel}; end where maxind is the index of the voxel with maximum power. Timelock0 takes each trial with a window of [-0.5 0.5] s around each event. I will use a SVD to determine the power of the source for each trial separately. Thanks again for your help! Alistair From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: Tuesday, October 30, 2012 10:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV beamformer source reconstruction Dear Alistair, In addition to the informative response from Jörn, I just wanted to add: One tiny thing I note is that you type cfg.lmvc.lambda which should be cfg.lcmv.lambda. Why is your filter of size 3x65? Shouldn't it be 3x125 (3 source orientations x 125 EEG channels)? Cheers, Johanna 2012/10/30 "Jörn M. Horschig" > Dear Alistair, I am not quite sure whether I understand your request correctly, but you are looking for help to get the maximum activity per trial in your source reconstructed data? I guess your confusion arises because of the different subfields, so here a short explanation: Every dipole has strengths in 3 directions (think of it as magnetic field strength in the x,y and z direction), this is stored in .mom In order to get it down to one number instead of three, there are different possibilities, but what's roughly happening by default is that an SVD is computed then the principal direction is taken, i.e. the strongest of these three vectors. This is what you find back in .pow. The filter matrix is the filter per grid position to get from your sensor data to the source data. Noise is an approximation of the noise level per trial. So, if you want to get the maximum activity, I would suggest to take [~, idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position of maximal power. If you are interested in the maximum over e.g. the posterior part of the brain, you should limit your search. You can best do that by using sourceDiff.pos and an atlas. If that does not answer your question, feel free to clarify your request ;) Best, Jörn On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: Hi all, I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source. The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom: sourceDiff = dim: [17 13 14] time: [1x819 double] pos: [3094x3 double] inside: [1x1567 double] outside: [1x1527 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] sourceDiff.avg ans = pow: [1x3094 double] mom: {1x3094 cell} noise: [1x3094 double] filter: {1x3094 cell} The moment entries are sized 3 x 819, the filter 3 x 65. I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below. Kind regards, Alistair channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; cfg1 = []; cfg1.keeptrials = 'yes'; cfg1.covariance = 'yes'; cfg1.channel = channel; dataPre = ft_redefinetrial(cfg1, data1FIC); timelock1 = ft_timelockanalysis(cfg1, dataPre); cfg2 = []; cfg2.keeptrials = 'yes'; cfg2.covariance = 'yes'; cfg2.channel = channel; dataPost = ft_redefinetrial(cfg2, data2FIC); timelock2 = ft_timelockanalysis(cfg2, dataPost); %% Source analysis cfg = []; cfg.grid = grid; cfg.hdmfile = volname; cfg.elec = sens; cfg.vol = vol; cfg.method = 'lcmv'; cfg.channel = channel; cfg.lcmv.keeptrials = 'yes'; % cfg.lcmv.projectnoise = 'yes'; cfg.lmvc.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; [source1] = ft_sourceanalysis(cfg, timelock1); [source2] = ft_sourceanalysis(cfg, timelock2); sourceDiff = source2; sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow; _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Oct 30 17:58:34 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Tue, 30 Oct 2012 17:58:34 +0100 (CET) Subject: [FieldTrip] converting sensor coordinates to MNI coordinates Message-ID: <8a8a0a83-5383-45f1-b64e-a18c9a5c49c6@thalamus_p> Dear List members, this post is related to a question that I have been posting several times now, but for which I haven't found an answer yet. I have a set of coordinates [5,0,-1] which should correspond to a point in sensor space. Is it possible to compute the corresponding coordinates in MNI space using a transformation matrix or anything similar? Any help or suggestions would be highly appreciated. Fred From tomh at kurage.nimh.nih.gov Tue Oct 30 22:08:22 2012 From: tomh at kurage.nimh.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Tue, 30 Oct 2012 17:08:22 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> Message-ID: <509041C6.7020609@kurage.nimh.nih.gov> Just wanted to mention, the "SSS" method separates the signal into "inside" and "outside" the helmet (this is what MaxFilter does). So it is useless for removing dental artifacts. McGowin, Inna wrote: > Thank you Jörn for the info. > > I was looking for SSS to perform a DC analysis of MEG data with no > motion correction. > We have MEG datasets that are collected from subjects with high magnetic > noise such as dental work and/or brain surgery contamination. We wanted > to remove the signal that comes from these areas. Do you work with such > problems? > > Thanks, > Inna > > On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" > > wrote: > > Dear Inna, > > I'm not aware of any implementation in FieldTrip. For the CTF system > we got the ft_denoise_synthetic function, but afaik SSS is something > NeuroMag specific and (I might be wrong here, because...) since we > do not have a NeuroMag system I would guess that no one bothered to > implement it. If you want to do so, you're welcome and we would be > most happy to help out on various ends with all our abilities ;) > > Best, > Jörn > > > On 10/25/2012 8:33 PM, McGowin, Inna wrote: >> Hello, >> I would like to know if Signal Space Separation method for MEG >> data analysis is available in the FieldTrip toolbox. >> >> Thanks, >> >> -- >> Inna >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Inna McGowin > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- The white knight is talking backwards. From jan.schoffelen at donders.ru.nl Wed Oct 31 08:03:01 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 08:03:01 +0100 Subject: [FieldTrip] request for 4d users Message-ID: Dear community and 4d-users in particular, I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? Thanks for any input, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Wed Oct 31 13:07:44 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Wed, 31 Oct 2012 14:07:44 +0200 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: Dear Jan-Mathijs I don't have such data at the moment I think you can get to the information in the config. it is in user_data_block{1,12} here is how I get to it with pdf4D pdf=pdf4D('c2,rfDC'); header = get(pdf, 'Header'); chi=channel_index(pdf,'EEG'); config = get(pdf, 'config'); % chi(1) % chan_no = header.channel_data{chi(1)}.chan_no config.user_block_data{1,12}.hdr.type config.user_block_data{1,12}.reserved I may collect some data later today or in the next few days, I'll let you know if I do. here is the data for eeg with no digitization of eeg ans = b_eeg_elec_locs ans = Columns 1 through 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 23 through 32 0 0 0 0 0 0 0 0 0 0 On 31 October 2012 09:03, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio > module to deal with simultaneous MEG/EEG measurements using the > 4D-neuroimaging system. Specifically, I want to improve the reading of EEG > electrode positions, when these have been digitized using the Polhemus in > combination with the 4D acquisition software. This question has been raised > on this list over a year ago by Margit Schönherr (who kindly sent me a > dataset to work with: thanks Margit), but it would be really helpful if I > could benefit from your knowledge/input. At the moment FT can extract > electrode positions from the header, but it is based on reverse engineering > based on 1 dataset only. Therefore I would like to ask you whether you > could send me some (as small as possible) datasets, which contain digitized > electrode positions (in combination with the corresponding config and > hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in > combination with their labels according to the 10/20 convention. Does > anybody know whether information is stored in the file-header that links > the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Oct 31 13:09:35 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 31 Oct 2012 08:09:35 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: <509041C6.7020609@kurage.nimh.nih.gov> References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Tom, In theory SSS method allows to extract signal from the dental work (due to its magnetization) if correction of motion is implemented. MEG SQUIDS can only detect DC magnetic fields if the source is in motion but removing the motion from the raw signal with SSS allows to detected DC signals. I have a reference paper if you are interested. Thanks On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < tomh at kurage.nimh.nih.gov> wrote: > Just wanted to mention, the "SSS" method separates the signal into > "inside" and "outside" the helmet (this is what MaxFilter does). So it is > useless for removing dental artifacts. > > McGowin, Inna wrote: > >> Thank you Jörn for the info. >> >> I was looking for SSS to perform a DC analysis of MEG data with no motion >> correction. >> We have MEG datasets that are collected from subjects with high magnetic >> noise such as dental work and/or brain surgery contamination. We wanted to >> remove the signal that comes from these areas. Do you work with such >> problems? >> >> Thanks, >> Inna >> >> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >> jm.horschig at donders.ru.nl >> >> wrote: >> >> Dear Inna, >> >> I'm not aware of any implementation in FieldTrip. For the CTF system >> we got the ft_denoise_synthetic function, but afaik SSS is something >> NeuroMag specific and (I might be wrong here, because...) since we >> do not have a NeuroMag system I would guess that no one bothered to >> implement it. If you want to do so, you're welcome and we would be >> most happy to help out on various ends with all our abilities ;) >> >> Best, >> Jörn >> >> >> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >> >>> Hello, >>> I would like to know if Signal Space Separation method for MEG >>> data analysis is available in the FieldTrip toolbox. >>> >>> Thanks, >>> >>> -- Inna >>> >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> >> -- Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour Centre for >> Cognitive Neuroimaging >> Radboud University Nijmegen Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> > >> Tel: +31-(0)24-36-68493 >> >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> > >> >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Inna McGowin >> >> >> ------------------------------**------------------------------** >> ------------ >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > -- > The white knight is talking backwards. > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 31 14:12:57 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 14:12:57 +0100 Subject: [FieldTrip] converting sensor coordinates to MNI coordinates References: Message-ID: Hi Frederic, What is the question exactly? This is the first time that you mention the word 'MNI' so I am a bit puzzled what you're after (and with me perhaps the rest of us mortals as well, which could explain the lack of answers). What you refer to as 'sensor space' is a coordinate system that is defined based on the head of the participant, i.e. based on three anatomical landmarks: LPA, RPA, and Nasion. The transformation to MNI-space is not straightforward because this is generally based on a non-linear warp. If you are happy with an approximation, then you could use ft_volumenormalise to extract the linear transformation from individual head space into +/- MNI-space. This coordinate system is defined based on three other anatomical landmarks: AC, PC and a point defining the positive z-axis. You can do either of the following things: -Take an individual MRI (that is coregistered to the individual's head, i.e. it has a transform that defines the head coordinate system correctly). -Call ft_volumenormalise (with cfg.nonlinear = 'no') -The output volume (let's call this variable normalise) contains a transformation matrix in normalise.cfg.final, that transforms from head space into 'MNI-space'. -You can use warp_apply to transform between the different coordinate systems, using the transformation matrix (or its inverse) to toggle coordinates back and forth. -Take an individual MRI. -specify mri.transform = eye(4) (assuming that the MRI is 1mm isotropic). -call ft_volumerealign twice with cfg.interactive = 'yes'. -once you specify lpa, rpa and nasion interactively. -once you specify ac, pc and a z-point interactively. -these two calls result in two transformation matrices, the first defining how to interpret the MRI voxels in coordinate system 1, the other defining how to interpret the MRI voxels in coordinate system 2. -I leave it as an exercise to you how to combine these to in order to toggle from one coordinate system to the other directly. Good luck, Jan-Mathijs Schoffelen On Oct 30, 2012, at 5:58 PM, Frederic Roux wrote: > > Dear List members, > > this post is related to a question that I have > been posting several times now, but for which > I haven't found an answer yet. > > I have a set of coordinates [5,0,-1] which should > correspond to a point in sensor space. > > Is it possible to compute the corresponding coordinates > in MNI space using a transformation matrix or anything > similar? > > Any help or suggestions would be highly appreciated. > > Fred > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 31 14:16:03 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 14:16:03 +0100 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: <0ADACA7A-A5F9-455C-9F69-642D7279F920@donders.ru.nl> Dear Yuval, Thanks for the feedback. It would be awesome if you could digitize some 'electrodes' and send some data (obviously I am now not anymore working in a lab with a 4d-machine). At present FT's read_4d_hdr indeed tries to interpret the 'b_eeg_elec_locs' user-block. In addition to (what I expect) the digitized electrode positions, this block also contains the digitized coil positions in combination with the anatomical landmarks, yielding useful coregistration information. Cheers, JM On Oct 31, 2012, at 1:07 PM, Yuval Harpaz wrote: > Dear Jan-Mathijs > I don't have such data at the moment > I think you can get to the information in the config. > it is in user_data_block{1,12} > here is how I get to it with pdf4D > > > pdf=pdf4D('c2,rfDC'); > header = get(pdf, 'Header'); > chi=channel_index(pdf,'EEG'); > config = get(pdf, 'config'); > % chi(1) > % chan_no = header.channel_data{chi(1)}.chan_no > config.user_block_data{1,12}.hdr.type > config.user_block_data{1,12}.reserved > > > I may collect some data later today or in the next few days, I'll let you know if I do. > here is the data for eeg with no digitization of eeg > > ans = > > b_eeg_elec_locs > > > ans = > > Columns 1 through 22 > > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > Columns 23 through 32 > > 0 0 0 0 0 0 0 0 0 0 > > > > On 31 October 2012 09:03, jan-mathijs schoffelen wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > Dr .Harpaz > > BIU MEG lab > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed Oct 31 16:23:39 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 31 Oct 2012 16:23:39 +0100 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Dear Inna, Would you mind posting the citation of the reference paper you mention, for the whole list to benefit? Cheers, Johanna 2012/10/31 McGowin, Inna > Tom, > In theory SSS method allows to extract signal from the dental work (due to > its magnetization) if correction of motion is implemented. MEG SQUIDS can > only detect DC magnetic fields if the source is in motion but removing the > motion from the raw signal with SSS allows to detected DC signals. I have a > reference paper if you are interested. Thanks > > > On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < > tomh at kurage.nimh.nih.gov> wrote: > >> Just wanted to mention, the "SSS" method separates the signal into >> "inside" and "outside" the helmet (this is what MaxFilter does). So it is >> useless for removing dental artifacts. >> >> McGowin, Inna wrote: >> >>> Thank you Jörn for the info. >>> >>> I was looking for SSS to perform a DC analysis of MEG data with no >>> motion correction. >>> We have MEG datasets that are collected from subjects with high magnetic >>> noise such as dental work and/or brain surgery contamination. We wanted to >>> remove the signal that comes from these areas. Do you work with such >>> problems? >>> >>> Thanks, >>> Inna >>> >>> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >>> jm.horschig at donders.ru.nl >> >>> wrote: >>> >>> Dear Inna, >>> >>> I'm not aware of any implementation in FieldTrip. For the CTF system >>> we got the ft_denoise_synthetic function, but afaik SSS is something >>> NeuroMag specific and (I might be wrong here, because...) since we >>> do not have a NeuroMag system I would guess that no one bothered to >>> implement it. If you want to do so, you're welcome and we would be >>> most happy to help out on various ends with all our abilities ;) >>> >>> Best, >>> Jörn >>> >>> >>> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >>> >>>> Hello, >>>> I would like to know if Signal Space Separation method for MEG >>>> data analysis is available in the FieldTrip toolbox. >>>> >>>> Thanks, >>>> >>>> -- Inna >>>> >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> >>> -- Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour Centre for >>> Cognitive Neuroimaging >>> Radboud University Nijmegen Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >> ru.nl > >>> Tel: +31-(0)24-36-68493 >>> >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> -- >>> Inna McGowin >>> >>> >>> ------------------------------**------------------------------** >>> ------------ >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> -- >> The white knight is talking backwards. >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > > > -- > Inna McGowin > > > _______________________________________________ > 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 Don.Rojas at ucdenver.edu Wed Oct 31 16:14:35 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Wed, 31 Oct 2012 09:14:35 -0600 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: <5ED4573D-ED4E-4BD6-A9EE-ABFD01517BBA@ucdenver.edu> Dear Jan-Mathijs, We do not routinely digitize EEG electrodes, but I will look and see if we still have an old test dataset that we acquired to learn the process years ago. Like Yuval, we use Eugene Kronberg's pdf4D matlab object code. To get the labels (e.g., FP1), as opposed to the names (e.g., E1), we do something like this: pdf=pdf4D('c,rfhp0.1Hz') hdr=get(pdf,'header') idx=channel_index(pdf,'EEG','name') Variable idx holds the indices for the EEG channels. Then, for a specific channel label, if they are entered by the user, you can get it this way: hdr.channel_data{idx(1)}.chan_label In this case, that label is FP1 and the channel name is E1, in the dataset that I am looking at now. But, other than the index association, there is no standard convention for association of names and labels. The names are a 4d convention. The labels are user specified in the template configuration file used for acquisition. Or if looking for the indices of a specific EEG label, this way: idx=channel_index(pdf,'FP1','label') Don On Oct 31, 2012, at 1:03 AM, jan-mathijs schoffelen wrote: Dear community and 4d-users in particular, I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? Thanks for any input, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Oct 31 18:41:05 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 31 Oct 2012 13:41:05 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Johanna, no problem. "Presentation of electromagnetic multichannel data: The signal space separation method" by Samu Taulu and Matti Kajola. If anybody is interested in the SSS method implementation with FieldTrip it would be great. On Wed, Oct 31, 2012 at 11:23 AM, Johanna Zumer wrote: > Dear Inna, > > Would you mind posting the citation of the reference paper you mention, > for the whole list to benefit? > > Cheers, > Johanna > > 2012/10/31 McGowin, Inna > > Tom, >> In theory SSS method allows to extract signal from the dental work (due >> to its magnetization) if correction of motion is implemented. MEG SQUIDS >> can only detect DC magnetic fields if the source is in motion but removing >> the motion from the raw signal with SSS allows to detected DC signals. I >> have a reference paper if you are interested. Thanks >> >> >> On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < >> tomh at kurage.nimh.nih.gov> wrote: >> >>> Just wanted to mention, the "SSS" method separates the signal into >>> "inside" and "outside" the helmet (this is what MaxFilter does). So it is >>> useless for removing dental artifacts. >>> >>> McGowin, Inna wrote: >>> >>>> Thank you Jörn for the info. >>>> >>>> I was looking for SSS to perform a DC analysis of MEG data with no >>>> motion correction. >>>> We have MEG datasets that are collected from subjects with high >>>> magnetic noise such as dental work and/or brain surgery contamination. We >>>> wanted to remove the signal that comes from these areas. Do you work with >>>> such problems? >>>> >>>> Thanks, >>>> Inna >>>> >>>> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >>>> jm.horschig at donders.ru.nl >> >>>> wrote: >>>> >>>> Dear Inna, >>>> >>>> I'm not aware of any implementation in FieldTrip. For the CTF system >>>> we got the ft_denoise_synthetic function, but afaik SSS is something >>>> NeuroMag specific and (I might be wrong here, because...) since we >>>> do not have a NeuroMag system I would guess that no one bothered to >>>> implement it. If you want to do so, you're welcome and we would be >>>> most happy to help out on various ends with all our abilities ;) >>>> >>>> Best, >>>> Jörn >>>> >>>> >>>> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >>>> >>>>> Hello, >>>>> I would like to know if Signal Space Separation method for MEG >>>>> data analysis is available in the FieldTrip toolbox. >>>>> >>>>> Thanks, >>>>> >>>>> -- Inna >>>>> >>>>> >>>>> >>>>> ______________________________**_________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> > >>>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> -- Jörn M. Horschig >>>> PhD Student >>>> Donders Institute for Brain, Cognition and Behaviour Centre for >>>> Cognitive Neuroimaging >>>> Radboud University Nijmegen Neuronal Oscillations Group >>>> FieldTrip Development Team >>>> >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Contact: >>>> E-Mail: jm.horschig at donders.ru.nl >>> ru.nl > >>>> Tel: +31-(0)24-36-68493 >>>> >>>> Web: http://www.ru.nl/donders >>>> >>>> Visiting address: >>>> Trigon, room 2.30 >>>> Kapittelweg 29 >>>> NL-6525 EN Nijmegen >>>> The Netherlands >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> >>>> -- >>>> Inna McGowin >>>> >>>> >>>> ------------------------------**------------------------------** >>>> ------------ >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> -- >>> The white knight is talking backwards. >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Inna McGowin >> >> >> _______________________________________________ >> 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 > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Wed Oct 31 22:38:30 2012 From: lihqih at gmail.com (qi li) Date: Wed, 31 Oct 2012 17:38:30 -0400 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: <508F97DC.9080009@donders.ru.nl> References: <508F97DC.9080009@donders.ru.nl> Message-ID: Hi Jörn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "Jörn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > Jörn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mark.noordenbos at gmail.com Mon Oct 1 14:58:10 2012 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Mon, 1 Oct 2012 14:58:10 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 23, Issue 1 In-Reply-To: References: Message-ID: Hi Steve, Thank you for the answer. Kind regards, Mark 2012/10/1 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: cluster analysis (Stephen Politzer-Ahles) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 30 Sep 2012 08:46:09 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] cluster analysis > Message-ID: > < > CAJT2k_9cJCBFKnhkSBYL7Uf3c95uOrzXWh4wNqY-CfLb3kF_Ow at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Mark, > > The Fieldtrip wiki has examples of published papers that report cluster > analyses. In what I've seen, usually just the *p* is reported (if even > that), along with the latency and topography of the cluster. See e.g. > Pijnacker et al. (2011, *Journal of Cognitive Neuroscience*) and Meltzer & > Braun (2011, *Frontiers in Human Neuroscience*). There may be others in > http://fieldtrip.fcdonders.nl/publications > > As for your second question, my understanding is that the test statistic > doesn't matter (one of the points of the cluster test is that it works no > matter which test statistic you use (Maris & Oostenveld, 2007)). Also, to > the best of my knowledge, there are no degrees of freedom for the cluster > test, since it's non-parametric (it's not based on the distribution of a > test statistic, it's based on Monte Carlo estimation). > > Best, > Steve > > > Message: 1 > > Date: Sun, 30 Sep 2012 11:30:35 +0200 > > From: Mark Noordenbos > > To: fieldtrip at science.ru.nl > > Subject: [FieldTrip] cluster analysis > > Message-ID: > > > 7qVRZp7goj3AhoE7xaq8tqTPsg at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Dear Fieldtrippers, > > > > I was wondering how you report the results of the cluster analysis in > your > > papers. I have seen different types of how the results are reported. > > For example, some report only the p-value of the cluster whereas others > > report clusters as T(degrees of freedom) = [clusterstat value], p-value. > > > > Is T (multivariate t) the correct test statisic for the cluster analysis > > (like F for anova)? > > Where can I find (or calculate) the degrees of freedom of the clusterstat > > value? > > > > Thanks > > > > Best, > > Mark > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120930/fe6908ab/attachment-0001.html > > > > > > > ------------------------------ > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120930/d5471f2a/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 23, Issue 1 > **************************************** > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Wed Oct 3 12:59:11 2012 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Wed, 3 Oct 2012 11:59:11 +0100 (BST) Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: References: Message-ID: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> Dear all, I need to repair a couple of channels of my EEG (edf format). I'm in trouble reading the reference, because I don't understand how I have to prepare cfg for electrode position. for example  elec.elecpos and elec.channelpos : wich argument must I provide? Furthermore, in ft_channelselection I read  " 'gui' a graphical user interface will pop up to select the channels" How does it works? How can I make a gui pops up ? Ivano -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Oct 3 14:47:52 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 03 Oct 2012 14:47:52 +0200 Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> References: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> Message-ID: <506C33F8.6010006@donders.ru.nl> Dear Ivano, There is a template directory in FieldTrip, which contains a subfolder called elec. If you do not have any electrode positions, you can load a template from there. Alternatively, you can load a file from there and see how to set the structure up. For channelselection, I think you misunderstood something/someone. I never heard of the fact that there should be a gui, where do you got that information from? Since I'm in the dev team, I would be rather surprised if there would be a gui given that I never heard anything about that ;) I'm afraid you have to specify the channel names manually. You can try to use ft_prepare_layout with cfg.feedback = 'yes' for information about channelpositions, given that you provide an elec structure (or use a layout-template) Best, Jörn On 10/3/2012 12:59 PM, Ivano Triggiani wrote: > Dear all, > > I need to repair a couple of channels of my EEG (edf format). I'm in > trouble reading the reference, because I don't understand how I have > to prepare cfg for electrode position. for example elec.elecpos and > elec.channelpos : wich argument must I provide? > Furthermore, in ft_channelselection I read " 'gui' a graphical user > interface will pop up to select the channels" How does it works? How > can I make a gui pops up ? > > Ivano > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Wed Oct 3 15:14:12 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Wed, 3 Oct 2012 15:14:12 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Dear Fieldtrippers, I am trying to locate the source of an oscillatory effect at the frequency of 30Hz in a time window of interest. Before running the ft_sourceanalysis function, I run a ft_freqanalysis with a frequency smoothing of 8 (cfg.tapsmofrq =8). My question is whether there is any rule of thumb by which I could reliably determine the extent of the smoothing? I found out that even small changes in the 'tapsmofrq' value, significantly alter the spatial localization of the resulting sources. For instance, a tapsmofreq value of 8 would point to an effect in the frontal lobe, whereas a value of 10 would point to an effect in the parietal lobe. Any advice would be appreciated. Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Oct 3 15:42:22 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 3 Oct 2012 15:42:22 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni! The extend of the smoothing, I would say, is under normal circumstances simply what you request as a smoothing paramater (given the dpss characteristics), so I don't understand that formulation exactly. If different smoothings give drastically different result you might be sampling frequencies that behave differently from your frequency of interest. In your case, e.g. perhaps you are adding alpha in your estimate that might behave differently in your paradigm? I would therefor try to first figure out if your effect is, in fact, frequency specific and try to not to smooth more than necessary to capture that effect. So starting with no (extra) smoothing and looking at the TFR for instance. A simple FFT would give you a frequency smoothing of +/- 1/datalength already (e.g. half a second would be +/- 2 Hz). Simply averaging over frequencies (estimated with a Hanning taper) instead of using the slepian tapers might be a better option. Then again, you are limited in frequency specificity by the length of the data on which you calculate them. If that is too short you might have suboptimal and unexpected effects. In the case of slepian filters make sure you have at least a minimum of 3 tapers (which is shown in the output of freqanalysis). There is a lot more to say about tapers, smoothing etc, but I hope this helps. All the best, Stephen On 3 October 2012 15:14, Yoni Levy wrote: > Dear Fieldtrippers, > > I am trying to locate the source of an oscillatory effect at the frequency > of 30Hz in a time window of interest. > Before running the ft_sourceanalysis function, I run a ft_freqanalysis > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > My question is whether there is any rule of thumb by which I could > reliably determine the extent of the smoothing? > I found out that even small changes in the 'tapsmofrq' value, > significantly alter the spatial localization of the resulting sources. > For instance, a tapsmofreq value of 8 would point to an effect in the > frontal lobe, whereas a value of 10 would point to an effect in the > parietal lobe. > > Any advice would be appreciated. > > Yoni > > _______________________________________________ > 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 Lilla.Magyari at mpi.nl Wed Oct 3 15:55:00 2012 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Wed, 3 Oct 2012 15:55:00 +0200 (CEST) Subject: [FieldTrip] electrodes, neighbours et al. In-Reply-To: <506C33F8.6010006@donders.ru.nl> References: <1349261951.74223.YahooMailNeo@web133105.mail.ir2.yahoo.com> <506C33F8.6010006@donders.ru.nl> Message-ID: <50904.131.174.45.70.1349272500.squirrel@131.174.45.70> hi Ivano, I have also checked the issue with the structure which defines the electrode positions. It worked fine for me when I defined the electrode positions with the following fields: elec.label = MX1 cell-array with strings (the labels of the electrodes) elec.chanpos=MX3 matrix with electrode positions When I used elecpos instead of chanpos, it did not work (I have already filed a bug about it because .elecpos is defined indeed in the reference of ft_datatype_sens). And the gui worked for me when I specified cfg.channel = 'gui' and called the ft_topoplotER function. But otherwise, you can just do it manually as Jorn described it. Best, Lilla > Dear Ivano, > > There is a template directory in FieldTrip, which contains a subfolder > called elec. If you do not have any electrode positions, you can load a > template from there. Alternatively, you can load a file from there and > see how to set the structure up. > > For channelselection, I think you misunderstood something/someone. I > never heard of the fact that there should be a gui, where do you got > that information from? Since I'm in the dev team, I would be rather > surprised if there would be a gui given that I never heard anything > about that ;) I'm afraid you have to specify the channel names manually. > You can try to use ft_prepare_layout with cfg.feedback = 'yes' for > information about channelpositions, given that you provide an elec > structure (or use a layout-template) > > Best, > Jörn > > On 10/3/2012 12:59 PM, Ivano Triggiani wrote: >> Dear all, >> >> I need to repair a couple of channels of my EEG (edf format). I'm in >> trouble reading the reference, because I don't understand how I have >> to prepare cfg for electrode position. for example elec.elecpos and >> elec.channelpos : wich argument must I provide? >> Furthermore, in ft_channelselection I read " 'gui' a graphical user >> interface will pop up to select the channels" How does it works? How >> can I make a gui pops up ? >> >> Ivano >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Wed Oct 3 17:14:47 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 3 Oct 2012 17:14:47 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni, Just to chime in quickly, please keep in mind that a tapsmofrq of 8 Hz actually indicates a smoothing window of 16Hz. I.e. cfg.tapsmofrq specifies the half-width of your smoothing window. So a tapsmofrq of 8 would mean that, for 30Hz, you are looking at signal coming from 22Hz to 38Hz. Also, the efficacy of the smoothing is largely dependent on the number of tapers (the more tapers, the closer your smoothing is to a 'box'). All the best, Roemer On Wed, Oct 3, 2012 at 3:42 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Yoni! > > The extend of the smoothing, I would say, is under normal circumstances > simply what you > request as a smoothing paramater (given the dpss characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you might be > sampling > frequencies that behave differently from your frequency of interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might behave > differently in your > paradigm? > > I would therefor try to first figure out if your effect is, in fact, > frequency specific > and try to not to smooth more than necessary to capture that effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the length of the > data on which > you calculate them. If that is too short you might have suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy wrote: > >> Dear Fieldtrippers, >> >> I am trying to locate the source of an oscillatory effect at the >> frequency of 30Hz in a time window of interest. >> Before running the ft_sourceanalysis function, I run a ft_freqanalysis >> with a frequency smoothing of 8 (cfg.tapsmofrq =8). >> My question is whether there is any rule of thumb by which I could >> reliably determine the extent of the smoothing? >> I found out that even small changes in the 'tapsmofrq' value, >> significantly alter the spatial localization of the resulting sources. >> For instance, a tapsmofreq value of 8 would point to an effect in the >> frontal lobe, whereas a value of 10 would point to an effect in the >> parietal lobe. >> >> Any advice would be appreciated. >> >> Yoni >> >> _______________________________________________ >> 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 > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From veganathlete at ymail.com Wed Oct 3 18:20:00 2012 From: veganathlete at ymail.com (Steph) Date: Wed, 03 Oct 2012 18:20:00 +0200 Subject: [FieldTrip] one EEG channel as trigger channel In-Reply-To: References: Message-ID: <506C65B0.5090409@ymail.com> Dear all, I'm new to Fieldtrip and I've been reading through the tutorial and reference pages, but still not able to solve my problem: there's raw EEG data, and one of the channels contains the trigger codes, i.e. it's not a trigger channel per se, so it can't be adressed via cfg.trialdef.eventtype. I want to get through the preprocessing, but simply don't know how to properly define the event. maybe writing my own trialfunction similar to http://fieldtrip.fcdonders.nl/example/detect_the_muscle_activity_in_an_emg_channel_and_use_that_as_trial_definition might be the solution? I don't get the last few lines of the example script, though. Hope you can help me make this work! Best wishes From yoniilevy at gmail.com Thu Oct 4 11:56:46 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 4 Oct 2012 11:56:46 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Hi Stephen! Thanks for your reply. My FOI is 29-31Hz; Since my time window is of 300ms, then my freq smoothing should now be of +/-3.33Hz. If I use a hanning taper, the parameters that i use for the freqanal (for further on doing beamformer-statistics) are: cfg.method ='mtmfft'; cfg.output ='fourier'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.taper = 'hanning'; cfg.foilim = [29 31]; However, if I get it right, multitapering should also be an option as 30Hz is not a relatively very low frequency. In that case, i remove the hanning and instead include a cfg.tapsmofrq =8, so that the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? Also, about the time window which is theoretically 300ms, but i think this depends on the length of every trial; for instance, before freqanal, when i redefine the trial, i input cfg.minlength = 'maxperlen'. So if i alter that, the freq smoothing should be different as well, correct? Ye, anyway, I wonder how to optimize all those parameters for my source localization statistics. Thanks in advance, Yoni On Wed, Oct 3, 2012 at 3:55 PM, wrote: > > Hi Yoni! > > The extend of the smoothing, I would say, is under normal circumstances > simply what you > request as a smoothing paramater (given the dpss characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you might be > sampling > frequencies that behave differently from your frequency of interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might behave differently > in your > paradigm? > > I would therefor try to first figure out if your effect is, in fact, > frequency specific > and try to not to smooth more than necessary to capture that effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the length of the > data on which > you calculate them. If that is too short you might have suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy wrote: > > > Dear Fieldtrippers, > > > > I am trying to locate the source of an oscillatory effect at the > frequency > > of 30Hz in a time window of interest. > > Before running the ft_sourceanalysis function, I run a ft_freqanalysis > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > My question is whether there is any rule of thumb by which I could > > reliably determine the extent of the smoothing? > > I found out that even small changes in the 'tapsmofrq' value, > > significantly alter the spatial localization of the resulting sources. > > For instance, a tapsmofreq value of 8 would point to an effect in the > > frontal lobe, whereas a value of 10 would point to an effect in the > > parietal lobe. > > > > Any advice would be appreciated. > > > > Yoni > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Oct 4 12:55:30 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 4 Oct 2012 12:55:30 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming (Roemer van der Meij) Message-ID: Hi Roemer, Sure, thanks. I am just noting that even tiny differences in both the values of 'tapsmofrq' that i feed in freqanalysis, and in 'cfg.minlength' that i feed in the redefinetrial function (just before running the freqanalysis) -- significantly alter the localization of sources that beamformer is (or is not) outputting. Best, Yoni On Thu, Oct 4, 2012 at 12:00 PM, wrote: > > > Hi Yoni, > > Just to chime in quickly, please keep in mind that a tapsmofrq of 8 Hz > actually indicates a smoothing window of 16Hz. I.e. cfg.tapsmofrq specifies > the half-width of your smoothing window. So a tapsmofrq of 8 would mean > that, for 30Hz, you are looking at signal coming from 22Hz to 38Hz. Also, > the efficacy of the smoothing is largely dependent on the number of tapers > (the more tapers, the closer your smoothing is to a 'box'). > > All the best, > Roemer > > > > On Wed, Oct 3, 2012 at 3:42 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > > > Hi Yoni! > > > > The extend of the smoothing, I would say, is under normal circumstances > > simply what you > > request as a smoothing paramater (given the dpss characteristics), so I > > don't understand > > that formulation exactly. > > > > If different smoothings give drastically different result you might be > > sampling > > frequencies that behave differently from your frequency of interest. In > > your case, e.g. > > perhaps you are adding alpha in your estimate that might behave > > differently in your > > paradigm? > > > > I would therefor try to first figure out if your effect is, in fact, > > frequency specific > > and try to not to smooth more than necessary to capture that effect. So > > starting with no > > (extra) smoothing and looking at the TFR for instance. A simple FFT would > > give you a > > frequency smoothing of +/- 1/datalength already (e.g. half a second would > > be +/- 2 Hz). > > Simply averaging over frequencies (estimated with a Hanning taper) > instead > > of using the > > slepian tapers might be a better option. > > > > Then again, you are limited in frequency specificity by the length of the > > data on which > > you calculate them. If that is too short you might have suboptimal and > > unexpected > > effects. In the case of slepian filters make sure you have at least a > > minimum of 3 tapers > > (which is shown in the output of freqanalysis). > > > > There is a lot more to say about tapers, smoothing etc, but I hope this > > helps. > > > > All the best, > > Stephen > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Thu Oct 4 14:13:35 2012 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Thu, 4 Oct 2012 14:13:35 +0200 Subject: [FieldTrip] PhD/postdoc positions for project on hippocampus oscillations (MEG+intracranial EEG) Message-ID: <5C1FBC99-9D3E-4585-817F-F8D82894ABBF@uni-konstanz.de> A new research group on neural oscillations, led by Dr. Sarang Dalal at the University of Konstanz (Germany), is searching for postdoctoral fellows and/or PhD students for a project involving MEG and intracranial EEG. This project will investigate the role of hippocampus oscillations in navigation- and memory-related networks using magnetoencephalography (MEG) and intracranial electroencephalography (iEEG), both separately and simultaneously. Group members will be trained in MEG/iEEG data acquisition and analysis, including quantification of oscillatory power/coupling and source localization. The project will involve substantial collaboration with the University Hospital Erlangen (Dr. Stefan Rampp & Prof. Hajo Hamer). The working language of the laboratory and most department meetings is English. The ideal applicant will have a background in cognitive neuroscience or neural signal processing. PhD positions are funded for 3 years (usual PhD duration in Germany), and postdoc positions for 2 years with a possibility for extension to 3 years. The starting date can be between December 2012 and April 2013. Interested applicants may send a CV and a brief letter of interest by e-mail to sarang.dalal -at- uni-konstanz.de, preferably by November 1, 2012. Dr. Dalal will be present at the Society for Neuroscience meeting in New Orleans and would be happy to meet with anybody interested to apply. ---------------------------------------------------- Sarang S. Dalal, Ph.D. Zukunftskolleg / Dept. of Psychology University of Konstanz http://nutmeg.berkeley.edu/sarang/ tel: +49 7531 88 5706 From stephen.whitmarsh at gmail.com Thu Oct 4 15:47:21 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 4 Oct 2012 15:47:21 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: Hi Yoni, Indeed, a simple hanning taper will already give you a frequency smoothing of +/- 3Hz. Adding tapers can only increase this, and I don't see why you would beamform 22 to 38 Hz if you are interested between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper = 'hanning', giving you a measure of power between of about 27 and 33? You're right that having different trial lenghts will indeed give you a different frequency resolution per trial. If this is a problem is hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial would indeed make sure they are all of the same length (i.e. the maximal length) - but if that is different between subjects/conditions that might not be enough. Best, Stephen On 4 October 2012 11:56, Yoni Levy wrote: > Hi Stephen! > Thanks for your reply. > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > smoothing should now be of +/-3.33Hz. If I use a hanning taper, the > parameters that i use for the freqanal (for further on doing > beamformer-statistics) are: > cfg.method ='mtmfft'; > cfg.output ='fourier'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.taper = 'hanning'; > cfg.foilim = [29 31]; > However, if I get it right, multitapering should also be an option as 30Hz > is not a relatively very low frequency. In that case, i remove the hanning > and instead include a cfg.tapsmofrq =8, so that the number of tapers > results in 8*0.3*2-1= 3 (I think?). Is it so? > > Also, about the time window which is theoretically 300ms, but i think this > depends on the length of every trial; for instance, before freqanal, when i > redefine the trial, i input cfg.minlength = 'maxperlen'. So if i alter > that, the freq smoothing should be different as well, correct? Ye, anyway, > I wonder how to optimize all those parameters for my source localization > statistics. > > Thanks in advance, > > Yoni > > > On Wed, Oct 3, 2012 at 3:55 PM, wrote: > >> >> Hi Yoni! >> >> The extend of the smoothing, I would say, is under normal circumstances >> simply what you >> request as a smoothing paramater (given the dpss characteristics), so I >> don't understand >> that formulation exactly. >> >> If different smoothings give drastically different result you might be >> sampling >> frequencies that behave differently from your frequency of interest. In >> your case, e.g. >> perhaps you are adding alpha in your estimate that might behave >> differently >> in your >> paradigm? >> >> I would therefor try to first figure out if your effect is, in fact, >> frequency specific >> and try to not to smooth more than necessary to capture that effect. So >> starting with no >> (extra) smoothing and looking at the TFR for instance. A simple FFT would >> give you a >> frequency smoothing of +/- 1/datalength already (e.g. half a second would >> be +/- 2 Hz). >> Simply averaging over frequencies (estimated with a Hanning taper) instead >> of using the >> slepian tapers might be a better option. >> >> Then again, you are limited in frequency specificity by the length of the >> data on which >> you calculate them. If that is too short you might have suboptimal and >> unexpected >> effects. In the case of slepian filters make sure you have at least a >> minimum of 3 tapers >> (which is shown in the output of freqanalysis). >> >> There is a lot more to say about tapers, smoothing etc, but I hope this >> helps. >> >> All the best, >> Stephen >> >> On 3 October 2012 15:14, Yoni Levy wrote: >> >> > Dear Fieldtrippers, >> > >> > I am trying to locate the source of an oscillatory effect at the >> frequency >> > of 30Hz in a time window of interest. >> > Before running the ft_sourceanalysis function, I run a ft_freqanalysis >> > with a frequency smoothing of 8 (cfg.tapsmofrq =8). >> > My question is whether there is any rule of thumb by which I could >> > reliably determine the extent of the smoothing? >> > I found out that even small changes in the 'tapsmofrq' value, >> > significantly alter the spatial localization of the resulting sources. >> > For instance, a tapsmofreq value of 8 would point to an effect in the >> > frontal lobe, whereas a value of 10 would point to an effect in the >> > parietal lobe. >> > >> > Any advice would be appreciated. >> > >> > Yoni >> > >> > > _______________________________________________ > 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 jose.herrero66 at gmail.com Thu Oct 4 23:40:44 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Thu, 4 Oct 2012 17:40:44 -0400 Subject: [FieldTrip] query on Analysis of corticomuscular coherence Message-ID: Hey, just starting using fieldtrip today ... but did not get very far: I tried to do the example Analysis of corticomuscular coherence but got the error: >> clear matlabroot = c:\data_fieldtrip\ evaluating trialfunction 'trialfun_left' Warning: adding c:\data_fieldtrip\fieldtrip-20120530\external\ctf toolbox to your Matlab path readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 696768000 bytes (from res4 file) ??? Index exceeds matrix dimensions. Error in ==> getCTFdata at 280 if trials(kt)<=meg4Trial(openFile) | trials(kt)>meg4Trial(openFile+1) Error in ==> ft_read_data at 479 dat = getCTFdata(hdr.orig, [begtrial:endtrial], chanindx, 'T', 'double'); Error in ==> read_trigger at 69 dat = ft_read_data(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', 0); Error in ==> ft_read_event at 481 trigger = read_trigger(filename, 'header', hdr, 'begsample', flt_minsample, 'endsample', flt_maxsample, 'chanindx', trigchanindx, 'dataformat', dataformat, 'detectflank', detectflank, 'trigshif Error in ==> trialfun_left at 7 event = ft_read_event(cfg.dataset); Error in ==> ft_definetrial at 170 trl = feval(cfg.trialfun, cfg); Error in ==> ex_corticomuscle at 5 cfg = ft_definetrial(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Oct 5 08:56:27 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 05 Oct 2012 08:56:27 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming In-Reply-To: References: Message-ID: <506E849B.7050602@donders.ru.nl> Hey Yoni, Stephen is right, and just to make this really clear, a Hanning taper will always give you a smoothing of your Raleigh frequency (which in your case is 3.33Hz). Any taper can only (effectively) smooth in terms of your frequency resolution or Raleigh frequency, thus a Hann taper gives you the minimal smoothing (apart from a boxcar). Then, the problem with different trial becomes more apparent, because since the frequency resolution changes, also the smoothing of the Hanning taper changes accordingly. I also think that making the trials having equal length is the best approach. Having unequal trial lengths also constitutes a problem for multitapering, cause you will end up with different tapers and different number of tapers per trial. And also your frequency smoothing should be a multiple of the Raleigh frequency. You can ask for other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you will see the smoothing at 6.66 or 9.99Hz (depending on where you define the end of smoothing) - it's just because you sample in 3.33Hz steps. Here you can maybe also see, that having different trial lengths might constitute a problem, because you will effectively get different smoothing per trial, depending on your Raleigh frequency. The computation of the tapers was however correct, so with 8Hz smoothing and a 0.3s time window you get 3 tapers ;) Btw, I once played around with it and realized that the 3 tapers you obtain are not always the same for different parameters, e.g. for 8Hz and 0.25s window you will also get 8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you get with a 0.3s time window. So even that can cause a problem. Btw, I never heard that different frequency smoothing ends up in different part of the brain when beaming. The only reason I can see is what Stephen already pointed out, that other frequency bands with different functional characteristics smear into your power spectrum. Best, Jörn On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote: > Hi Yoni, > > Indeed, a simple hanning taper will already give you a frequency > smoothing of +/- 3Hz. Adding tapers can only increase this, and I > don't see why you would beamform 22 to 38 Hz if you are interested > between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper > = 'hanning', giving you a measure of power between of about 27 and 33? > > You're right that having different trial lenghts will indeed give you > a different frequency resolution per trial. If this is a problem is > hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial > would indeed make sure they are all of the same length (i.e. the > maximal length) - but if that is different between subjects/conditions > that might not be enough. > > Best, > Stephen > > > > On 4 October 2012 11:56, Yoni Levy > wrote: > > Hi Stephen! > Thanks for your reply. > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > smoothing should now be of +/-3.33Hz. If I use a hanning taper, > the parameters that i use for the freqanal (for further on doing > beamformer-statistics) are: > cfg.method ='mtmfft'; > cfg.output ='fourier'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.taper = 'hanning'; > cfg.foilim = [29 31]; > However, if I get it right, multitapering should also be an option > as 30Hz is not a relatively very low frequency. In that case, i > remove the hanning and instead include a cfg.tapsmofrq =8, so that > the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? > > Also, about the time window which is theoretically 300ms, but i > think this depends on the length of every trial; for instance, > before freqanal, when i redefine the trial, i input cfg.minlength > = 'maxperlen'. So if i alter that, the freq smoothing should be > different as well, correct? Ye, anyway, I wonder how to optimize > all those parameters for my source localization statistics. > > Thanks in advance, > > Yoni > > > On Wed, Oct 3, 2012 at 3:55 PM, > wrote: > > > Hi Yoni! > > The extend of the smoothing, I would say, is under normal > circumstances > simply what you > request as a smoothing paramater (given the dpss > characteristics), so I > don't understand > that formulation exactly. > > If different smoothings give drastically different result you > might be > sampling > frequencies that behave differently from your frequency of > interest. In > your case, e.g. > perhaps you are adding alpha in your estimate that might > behave differently > in your > paradigm? > > I would therefor try to first figure out if your effect is, in > fact, > frequency specific > and try to not to smooth more than necessary to capture that > effect. So > starting with no > (extra) smoothing and looking at the TFR for instance. A > simple FFT would > give you a > frequency smoothing of +/- 1/datalength already (e.g. half a > second would > be +/- 2 Hz). > Simply averaging over frequencies (estimated with a Hanning > taper) instead > of using the > slepian tapers might be a better option. > > Then again, you are limited in frequency specificity by the > length of the > data on which > you calculate them. If that is too short you might have > suboptimal and > unexpected > effects. In the case of slepian filters make sure you have at > least a > minimum of 3 tapers > (which is shown in the output of freqanalysis). > > There is a lot more to say about tapers, smoothing etc, but I > hope this > helps. > > All the best, > Stephen > > On 3 October 2012 15:14, Yoni Levy > wrote: > > > Dear Fieldtrippers, > > > > I am trying to locate the source of an oscillatory effect at > the frequency > > of 30Hz in a time window of interest. > > Before running the ft_sourceanalysis function, I run a > ft_freqanalysis > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > My question is whether there is any rule of thumb by which I > could > > reliably determine the extent of the smoothing? > > I found out that even small changes in the 'tapsmofrq' value, > > significantly alter the spatial localization of the > resulting sources. > > For instance, a tapsmofreq value of 8 would point to an > effect in the > > frontal lobe, whereas a value of 10 would point to an effect > in the > > parietal lobe. > > > > Any advice would be appreciated. > > > > Yoni > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Fri Oct 5 17:10:31 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Fri, 5 Oct 2012 17:10:31 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies Message-ID: Dear fieldtrippers, does anyone know how I can find the peak maximum of an erp? And how to calculate the latency until the maximum? Timelockanalysis and the grand average of all erps are already done. Best, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From vale.niccolai at gmail.com Fri Oct 5 18:30:02 2012 From: vale.niccolai at gmail.com (Valentina Niccolai) Date: Fri, 5 Oct 2012 18:30:02 +0200 Subject: [FieldTrip] problem with ICA Message-ID: Hallo. I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. I am thankful for any help. Valentina Niccolai cfg.method = 'runica'; cfg.channel = {'all','-EOG','-EMG'}; comp = ft_componentanalysis(cfg, rej_vis_res); The result of my component analysis looks like this: comp = fsample: 600 time: {1x237 cell} trial: {1x237 cell} topo: [306x2 double] unmixing: [2x306 double] label: {2x1 cell} topolabel: {306x1 cell} grad: [1x1 struct] trialinfo: [237x1 double] cfg: [1x1 struct] and in comp.trial I get imaginary numbers: >> comp.trial{1} ans = 1.0e-18 * Columns 1 through 6 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ica.jpg Type: image/jpeg Size: 39895 bytes Desc: not available URL: From politzerahless at gmail.com Fri Oct 5 18:45:00 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 5 Oct 2012 11:45:00 -0500 Subject: [FieldTrip] Calculate amplitudes and latencies Message-ID: Hi Daria, I'm not aware of a built-in FieldTrip function that does these things, but since it involves basic math you can do it with MATLAB functions (e.g., max() to find the maximum amplitude, and find() to get the latency of that point). However, see Steve Luck's (2005) *An Introduction to the Event-Related Potential Technique* for a discussion of why peak latency and peak amplitude measures are often not good. I would recommend using mean amplitude (there is an example of how to do it in FieldTrip at http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics#t-test_with_fieldtrip_function, although it's also straightforward to do just in MATLAB) and fractional area latency as your measures. Or, better yet, you could just do a cluster test, which will tell you where and when significant clusters are without your having to try and measure latencies ( http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock). Best, Steve Message: 1 > Date: Fri, 5 Oct 2012 17:10:31 +0200 > From: Daria Laptinskaya > To: FieldTrip discussion list > Subject: [FieldTrip] Calculate amplitudes and latencies > Message-ID: > < > CADcxnnNwXEo3MJuYRrkUfzOq-+bgDj-qmMHiFbytjMRX6_vt9A at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear fieldtrippers, > > does anyone know how I can find the peak maximum of an erp? > And how to calculate the latency until the maximum? > > Timelockanalysis and the grand average of all erps are already done. > > Best, > Daria > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Oct 5 18:48:20 2012 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 5 Oct 2012 18:48:20 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi Daria, you can either use the function "min" or "max" to find the minima and maxima in your data, or you can use the "peakdetect2"-function that can be found in the "private" folder of field trip. Another function, that is quite similar to the field trip-function is the "findpeaks"-function, in which you can even set parameters how exactly you want to define your peaks. Fo the latency: all the above functions can give you the index (i.e. sample point) of your peak, if you then compare this to your time-vector, you can get the latency until the maximum. Good Luck, Julian Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > Dear fieldtrippers, > > does anyone know how I can find the peak maximum of an erp? > And how to calculate the latency until the maximum? > > Timelockanalysis and the grand average of all erps are already done. > > Best, > Daria > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Fri Oct 5 20:34:05 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Fri, 5 Oct 2012 14:34:05 -0400 Subject: [FieldTrip] time-resolved psd/csd Message-ID: Hey, I like very much the tuto in http://fieldtrip.fcdonders.nl/tutorial/fourier where the power-spectral densities (psd) and cross-spectral densities (csd) calculations are exemplified. do you know if there is a similar example showing a time-resolved psd and csd (e.g. where you can see power/coherence changes across time). thanks Jose Herrero -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Fri Oct 5 20:39:31 2012 From: jdien07 at mac.com (Joseph Dien) Date: Fri, 05 Oct 2012 14:39:31 -0400 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: One typically gets the complex numbers from ICA when the data have less than full rank. For example, if there is a channel that is a flat line (maybe a bad channel or a reference) or when two channels are perfectly correlated (as when the data is mean mastoid referenced and one has included both mastoid channels as they will have a perfect -1 correlation). Cheers! Joe On Oct 5, 2012, at 12:30 PM, Valentina Niccolai wrote: > Hallo. > > I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. > > Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. > > I am thankful for any help. > > > Valentina Niccolai > > > cfg.method = 'runica'; > > cfg.channel = {'all','-EOG','-EMG'}; > > comp = ft_componentanalysis(cfg, rej_vis_res); > > > > The result of my component analysis looks like this: > > comp = > > > fsample: 600 > > time: {1x237 cell} > > trial: {1x237 cell} > > topo: [306x2 double] > > unmixing: [2x306 double] > > label: {2x1 cell} > > topolabel: {306x1 cell} > > grad: [1x1 struct] > > trialinfo: [237x1 double] > > cfg: [1x1 struct] > > > and in comp.trial I get imaginary numbers: > > > >> comp.trial{1} > > ans = > > 1.0e-18 * > > Columns 1 through 6 > > 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i > > -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Fri Oct 5 20:39:31 2012 From: jdien07 at mac.com (Joseph Dien) Date: Fri, 05 Oct 2012 14:39:31 -0400 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: One typically gets the complex numbers from ICA when the data have less than full rank. For example, if there is a channel that is a flat line (maybe a bad channel or a reference) or when two channels are perfectly correlated (as when the data is mean mastoid referenced and one has included both mastoid channels as they will have a perfect -1 correlation). Cheers! Joe On Oct 5, 2012, at 12:30 PM, Valentina Niccolai wrote: > Hallo. > > I have a problem with the ICA, which I did not have before with the same dataset. It seems not to work properly because it gives complex numbers. The problem occurs also if I use older ft versions. I give in the ICA the output of ft_rejectvisual (already preprocessed data), which looks normal to me. > > Here below is the output of ft_componentanalysis and in attachment the strange output when calling ft_databrowser: some or all the components are “dead” and the head views as well as the component number on the top disappear. > > I am thankful for any help. > > > Valentina Niccolai > > > cfg.method = 'runica'; > > cfg.channel = {'all','-EOG','-EMG'}; > > comp = ft_componentanalysis(cfg, rej_vis_res); > > > > The result of my component analysis looks like this: > > comp = > > > fsample: 600 > > time: {1x237 cell} > > trial: {1x237 cell} > > topo: [306x2 double] > > unmixing: [2x306 double] > > label: {2x1 cell} > > topolabel: {306x1 cell} > > grad: [1x1 struct] > > trialinfo: [237x1 double] > > cfg: [1x1 struct] > > > and in comp.trial I get imaginary numbers: > > > >> comp.trial{1} > > ans = > > 1.0e-18 * > > Columns 1 through 6 > > 0.0127 - 0.0000i -0.0339 + 0.0000i -0.0203 + 0.0000i -0.0269 - 0.0000i 0.0176 + 0.0000i -0.0538 + 0.0000i > > -0.0069 - 0.0000i 0.0075 - 0.0000i 0.0097 - 0.0000i 0.0033 - 0.0000i 0.0214 - 0.0001i -0.0031 - 0.0001i > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat Oct 6 07:39:32 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 6 Oct 2012 08:39:32 +0300 Subject: [FieldTrip] Fisher classifier Message-ID: Hello, Does anyone know how can I classfy my data using Fisher classifier? (Is there such function in the Fieldtrip list?) Thanks for help. Best, -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Sat Oct 6 12:18:54 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sat, 6 Oct 2012 12:18:54 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Many thanks-I will try to do! Best, Daria 2012/10/5 Julian Keil > Hi Daria, > > you can either use the function "min" or "max" to find the minima and > maxima in your data, or you can use the "peakdetect2"-function that can be > found in the "private" folder of field trip. > Another function, that is quite similar to the field trip-function is the > "findpeaks"-function, in which you can even set parameters how exactly you > want to define your peaks. > Fo the latency: all the above functions can give you the index (i.e. > sample point) of your peak, if you then compare this to your time-vector, > you can get the latency until the maximum. > > Good Luck, > > Julian > > Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > > > Dear fieldtrippers, > > > > does anyone know how I can find the peak maximum of an erp? > > And how to calculate the latency until the maximum? > > > > Timelockanalysis and the grand average of all erps are already done. > > > > Best, > > Daria > > > > > > _______________________________________________ > > 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 veganathlete at ymail.com Sat Oct 6 17:37:58 2012 From: veganathlete at ymail.com (Steph) Date: Sat, 06 Oct 2012 17:37:58 +0200 Subject: [FieldTrip] correct use of ft_read_data Message-ID: <50705056.6050709@ymail.com> Dear Fieldtrippers, could you help me make ft_read_data work? the data is a <34x48128 double>. the header looks like this: h = nChans: 34 nSamples: 48128 nSamplesPre: 0 nTrials: 1 Fs: 512 label: {34x1 cell} orig: [1x1 struct] chantype: {34x1 cell} chanunit: {34x1 cell} I want to read one channel to define the trials in my trialfunction. t=ft_read_data(cfg.dataset,'header',h,'chanindx',17) Attempted to access dat(17,:); index out of bounds because size(dat)=[1,48128]. Error in ft_read_data (line 294) dat(i,:) = dat(i,:).* parameters.SourceChGain.NumericValue(i) + parameters.SourceChOffset.NumericValue(i); Best Steph From jose.herrero66 at gmail.com Sat Oct 6 22:02:53 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Sat, 6 Oct 2012 16:02:53 -0400 Subject: [FieldTrip] query Message-ID: hi, I have posted several questions to fieldtrip at science.ru.nl but I am not able to see them e-mail to me.did you receive them? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Sun Oct 7 00:01:06 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 6 Oct 2012 18:01:06 -0400 Subject: [FieldTrip] Fisher classifier In-Reply-To: References: Message-ID: If you have access to Matlab Statistics toolbox It has LDA (Fisher classifier) among all standard classifiers. http://www.mathworks.com/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html I personally prefer scikit-learn(Python), which is much more complete package. http://scikit-learn.org/dev/auto_examples/plot_lda_qda.html Sheraz Khan Martinos Center On Sat, Oct 6, 2012 at 1:39 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > Does anyone know how can I classfy my data using Fisher classifier? > (Is there such function in the Fieldtrip list?) > > Thanks for help. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sun Oct 7 02:01:47 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 7 Oct 2012 03:01:47 +0300 Subject: [FieldTrip] Fisher classifier In-Reply-To: References: Message-ID: Thank you Sheraz, Yes, and there is also fisher classifier function under prtools. But the people in Fieldtrip made a function for classification called ft_timelockstatistics, I thought I can play with its parameters so that the kind of classifier can be changed. I don't know whether people use fieldtrip functions just for preprocessing and then use the classifiers from other libraries? Hamza On Sun, Oct 7, 2012 at 1:01 AM, Sheraz Khan wrote: > If you have access to Matlab Statistics toolbox It has LDA (Fisher > classifier) among all standard classifiers. > > http://www.mathworks.com/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html > > I personally prefer scikit-learn(Python), which is much more complete > package. > > http://scikit-learn.org/dev/auto_examples/plot_lda_qda.html > > Sheraz Khan > Martinos Center > > On Sat, Oct 6, 2012 at 1:39 AM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Hello, >> >> Does anyone know how can I classfy my data using Fisher classifier? >> (Is there such function in the Fieldtrip list?) >> >> Thanks for help. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Sun Oct 7 11:34:31 2012 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Sun, 7 Oct 2012 11:34:31 +0200 Subject: [FieldTrip] Brain imaging PhD projects available Message-ID: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> Dear all, Please find below three PhD projects I am posting on behalf of my group leader. Cheers, Diederick ------------- Three brain imaging PhD projects are available at the Sleep & Cognition group of the Netherlands Institute for Neuroscience in Amsterdam, The Netherlands. Projects are in collaboration with one or more partners in Freiburg, Basel or Strasbourg. Project 8: Individual differences in the spatiotemporal profile of brain activity during wake and sleep The project aims to elucidate how spatiotemporal profiles of brain activity develop from wakefulness to deep sleep. Assessments in good and poor sleepers will be done using the EGI MR-compatible 256-channel high density EEG-system in the quietest 3T MRI system presently available, a Toshiba Vantage Titan 3T with the Pianissimo technology. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam, Freiburg and Basel. Project 6: Spatiotemporal patterns of cortical oscillations that determine subjective wake time during sleep The project aims to elucidate the neural correlates of the loss of consciousness during sleep. Spatiotemporal profiles of brain activity in good and poor sleepers will be obtained using the EGI 256-channel high density EEG-system, both during unperturbed sleep and in response to sensory stimulation. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam and Freiburg. Project 4: Reward effects of light: phototherapy as a treatment for pathologies with motivational deficits The project aims to elucidate the involvement of brain regions regulating reward and motivation in the mood-improving effects of bright light. 3T MRI assessments will be done in good and poor sleepers. Assessments of behavior, circadian genes, proteins, neurotransmitters and hormones will be done in transgenic animals. Human studies will be performed in Amsterdam, animal studies in Strasbourg. Projects are open to students with a (pending) master (or equivalent) degree in Physics, Mathematics, Biology, Psychology, Neuroscience or Engineering or comparable. Experience with brain imaging, EEG, or sleep is an advantage for all projects. Experience with animal studies is an advantage for project 4. Especially students with some affinity with and/or background in mathematics and/or scientific programming are also encouraged to apply. A proficient level of familiarity with large datasets and programming is commendable, e.g. using Matlab. Mastery of the English language is essential for writing papers and a thesis; mastery of the local languages will facilitate recordings. If you're interested, please read additional information on http://www.neurotime-erasmus.org/ and contact e.van.someren at nin.knaw.nl. Thank you for your interest! Prof. dr. Eus J.W. Van Someren http://www.nin.knaw.nl/research_groups/van_someren_group/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Sun Oct 7 11:40:51 2012 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Sun, 7 Oct 2012 11:40:51 +0200 Subject: [FieldTrip] Brain imaging PhD projects available In-Reply-To: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> References: <5C965334-C41B-4368-84B1-D76B4E4AF502@gmail.com> Message-ID: <33CC1C48-5922-4C31-94EA-69B5EB5920ED@gmail.com> Dear all, Relevant keywords for these projects are: sleep - consciousness - mood - combined high-density EEG + silent fMRI - network analysis Cheers, Diederick On 7 okt. 2012, at 11:34, Diederick Stoffers wrote: > Dear all, > > Please find below three PhD projects I am posting on behalf of my group leader. > > Cheers, > > Diederick > > ------------- > > Three brain imaging PhD projects are available at the Sleep & Cognition group of the Netherlands Institute for Neuroscience in Amsterdam, The Netherlands. Projects are in collaboration with one or more partners in Freiburg, Basel or Strasbourg. > > > > > Project 8: Individual differences in the spatiotemporal profile of brain activity during wake and sleep > > The project aims to elucidate how spatiotemporal profiles of brain activity develop from wakefulness to deep sleep. Assessments in good and poor sleepers will be done using the EGI MR-compatible 256-channel high density EEG-system in the quietest 3T MRI system presently available, a Toshiba Vantage Titan 3T with the Pianissimo technology. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam, Freiburg and Basel. > > > > Project 6: Spatiotemporal patterns of cortical oscillations that determine subjective wake time during sleep > > The project aims to elucidate the neural correlates of the loss of consciousness during sleep. Spatiotemporal profiles of brain activity in good and poor sleepers will be obtained using the EGI 256-channel high density EEG-system, both during unperturbed sleep and in response to sensory stimulation. Analyses include graph theoretical and network complexity measures. Assessments will be made in Amsterdam, analyses both in Amsterdam and Freiburg. > > > > Project 4: Reward effects of light: phototherapy as a treatment for pathologies with motivational deficits > > The project aims to elucidate the involvement of brain regions regulating reward and motivation in the mood-improving effects of bright light. 3T MRI assessments will be done in good and poor sleepers. Assessments of behavior, circadian genes, proteins, neurotransmitters and hormones will be done in transgenic animals. Human studies will be performed in Amsterdam, animal studies in Strasbourg. > > > > Projects are open to students with a (pending) master (or equivalent) degree in Physics, Mathematics, Biology, Psychology, Neuroscience or Engineering or comparable. Experience with brain imaging, EEG, or sleep is an advantage for all projects. Experience with animal studies is an advantage for project 4. Especially students with some affinity with and/or background in mathematics and/or scientific programming are also encouraged to apply. A proficient level of familiarity with large datasets and programming is commendable, e.g. using Matlab. Mastery of the English language is essential for writing papers and a thesis; mastery of the local languages will facilitate recordings. > > > If you're interested, please read additional information on http://www.neurotime-erasmus.org/ and contact e.van.someren at nin.knaw.nl. > > > Thank you for your interest! > > Prof. dr. Eus J.W. Van Someren > > > http://www.nin.knaw.nl/research_groups/van_someren_group/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobrobbrown at googlemail.com Sun Oct 7 12:52:52 2012 From: bobrobbrown at googlemail.com (Robert Brown) Date: Sun, 7 Oct 2012 13:52:52 +0300 Subject: [FieldTrip] query In-Reply-To: References: Message-ID: hi man, everybody sees your posts but you should think first, try first, try even harder, try for a week, before you post a question here - respect the time of others! your first two questions were really really basic that you would figure out yourself in a few hours or days. cheers, Bob 2012/10/6 Jose Herrero > > hi, I have posted several questions to fieldtrip at science.ru.nl but I am > not able to see them e-mail to me.did you receive them? > > > _______________________________________________ > 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 daria.laptinskaya at googlemail.com Sun Oct 7 13:23:27 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sun, 7 Oct 2012 13:23:27 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi Julian, by using the peakdetect2- or the findpeaks-function I get an error: ??? Undefined function or method 'peakdetect2' for input arguments of type 'double' (I use EGI-data with 149 channels and 113 timepoints). Do you have any idea, what the problem could be? Daria 2012/10/6 Daria Laptinskaya > Many thanks-I will try to do! > > Best, > Daria > > > > 2012/10/5 Julian Keil > >> Hi Daria, >> >> you can either use the function "min" or "max" to find the minima and >> maxima in your data, or you can use the "peakdetect2"-function that can be >> found in the "private" folder of field trip. >> Another function, that is quite similar to the field trip-function is the >> "findpeaks"-function, in which you can even set parameters how exactly you >> want to define your peaks. >> Fo the latency: all the above functions can give you the index (i.e. >> sample point) of your peak, if you then compare this to your time-vector, >> you can get the latency until the maximum. >> >> Good Luck, >> >> Julian >> >> Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: >> >> > Dear fieldtrippers, >> > >> > does anyone know how I can find the peak maximum of an erp? >> > And how to calculate the latency until the maximum? >> > >> > Timelockanalysis and the grand average of all erps are already done. >> > >> > Best, >> > Daria >> > >> > >> > _______________________________________________ >> > 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 julian.keil at gmail.com Sun Oct 7 15:24:02 2012 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 7 Oct 2012 15:24:02 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Hi, I suppose your "peakdetect2" is located in the "private" folder. Matlab by default does not include private folders in the path. You can either rename it (e.g. to "notprivate") or manually copy the function to another folder. The "findpeaks" should actually be a built-in function, but maybe you have to check the math works file exchange. As usual, if you are not sure, if you have the respective function in your matlab path, check with "which". Best, Julian Am 07.10.2012 um 13:23 schrieb Daria Laptinskaya: > Hi Julian, > > by using the peakdetect2- or the findpeaks-function I get an error: > ??? Undefined function or method 'peakdetect2' for input arguments of type 'double' > (I use EGI-data with 149 channels and 113 timepoints). > > Do you have any idea, what the problem could be? > > Daria > > > > > > > 2012/10/6 Daria Laptinskaya > Many thanks-I will try to do! > > Best, > Daria > > > > 2012/10/5 Julian Keil > Hi Daria, > > you can either use the function "min" or "max" to find the minima and maxima in your data, or you can use the "peakdetect2"-function that can be found in the "private" folder of field trip. > Another function, that is quite similar to the field trip-function is the "findpeaks"-function, in which you can even set parameters how exactly you want to define your peaks. > Fo the latency: all the above functions can give you the index (i.e. sample point) of your peak, if you then compare this to your time-vector, you can get the latency until the maximum. > > Good Luck, > > Julian > > Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: > > > Dear fieldtrippers, > > > > does anyone know how I can find the peak maximum of an erp? > > And how to calculate the latency until the maximum? > > > > Timelockanalysis and the grand average of all erps are already done. > > > > Best, > > Daria > > > > > > _______________________________________________ > > 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 akiko.ikkai at gmail.com Sun Oct 7 17:36:50 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Sun, 7 Oct 2012 11:36:50 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem Message-ID: Dear Fieldtrip users, I've been trying to run group stats on my EEG source data, which contains 14 subjects' normalized beamformer data, and having serious swap memory issue (not Matlab memory issue, but OS swap memory). I'm trying to contrast 2 conditions (within subject design). Each subject's normalized beamformer data (1 condition) is source_lTMI_intNorm = anatomy: [181x217x181 double] inside: [181x217x181 logical] avg: [1x1 struct] transform: [4x4 double] dim: [181 217 181] cfg: [1x1 struct] >whos Name Size Bytes Class Attributes source_lTMI_intNorm 1x1 520114791 struct therefore, when I open all subjects' data ("data1group" and "data2group"), it's huge... Name Size Bytes Class Attributes data1group 1x14 5909429438 cell data2group 1x14 6705652782 cell data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, >data1group{1} anatomy: [181x217x181 double] inside: [181x217x181 logical] avg: [1x1 struct] transform: [4x4 double] dim: [181 217 181] cfg: [1x1 struct] So, when I try to run cfg=[]; cfg.dim = data1group{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 100; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(data1group); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); stat.anatomy = data1group{1}.anatomy; my computer (os 10.6.8, 6G memory) runs out of swap memory (startup memory?), which forces me to quit Matlab. I'm running above processes in a function, so I'm not running into Matlab memory error. Could someone help me how it could run more efficiently? I guess cfg.inputfile is not available for ft_sourcestatistics, so I have to eventually load 2 group data in Matlab workspace...? Thank you in advance! Akiko -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bibi.raquel at gmail.com Sun Oct 7 19:31:48 2012 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Sun, 7 Oct 2012 13:31:48 -0400 Subject: [FieldTrip] correct use of ft_read_data In-Reply-To: <50705056.6050709@ymail.com> References: <50705056.6050709@ymail.com> Message-ID: <1471CFF1-771E-486C-A6E3-C8C287531936@gmail.com> Have you tried to use ft_read_event? Take a look at trialfun_general it will help you understand how to read in your events. Best, Raquel Sent from my iPhone On Oct 6, 2012, at 11:37 AM, Steph wrote: > Dear Fieldtrippers, > > could you help me make ft_read_data work? > > the data is a <34x48128 double>. > > the header looks like this: > > h = > nChans: 34 > nSamples: 48128 > nSamplesPre: 0 > nTrials: 1 > Fs: 512 > label: {34x1 cell} > orig: [1x1 struct] > chantype: {34x1 cell} > chanunit: {34x1 cell} > > I want to read one channel to define the trials in my trialfunction. > > t=ft_read_data(cfg.dataset,'header',h,'chanindx',17) > > Attempted to access dat(17,:); index out of bounds > because size(dat)=[1,48128]. > > Error in ft_read_data (line 294) > dat(i,:) = dat(i,:).* > parameters.SourceChGain.NumericValue(i) + > parameters.SourceChOffset.NumericValue(i); > > Best > Steph > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From shaegens at gmail.com Sun Oct 7 20:16:28 2012 From: shaegens at gmail.com (Saskia Haegens) Date: Sun, 7 Oct 2012 14:16:28 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, In my experience with grandavg source structs, sometimes the cfg (that's attached to the data struct) becomes very large and can consume a considerable amount of memory. I'm not sure if that's the case/problem here, but might be worth checking and removing the cfg. You could even use checkconfig to cleanup your cfg with: data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') Hope this helps! Best, Saskia On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai wrote: > Dear Fieldtrip users, > > I've been trying to run group stats on my EEG source data, which contains 14 > subjects' normalized beamformer data, and having serious swap memory issue > (not Matlab memory issue, but OS swap memory). > > I'm trying to contrast 2 conditions (within subject design). Each subject's > normalized beamformer data (1 condition) is > > source_lTMI_intNorm = > > anatomy: [181x217x181 double] > > inside: [181x217x181 logical] > > avg: [1x1 struct] > > transform: [4x4 double] > > dim: [181 217 181] > > cfg: [1x1 struct] > > >>whos > > > > Name Size Bytes Class Attributes > > source_lTMI_intNorm 1x1 520114791 struct > > > therefore, when I open all subjects' data ("data1group" and "data2group"), > it's huge... > > Name Size Bytes Class Attributes > > data1group 1x14 5909429438 cell > > data2group 1x14 6705652782 cell > > > data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, > >>data1group{1} > > anatomy: [181x217x181 double] > > inside: [181x217x181 logical] > > avg: [1x1 struct] > > transform: [4x4 double] > > dim: [181 217 181] > > cfg: [1x1 struct] > > So, when I try to run > > cfg=[]; > > cfg.dim = data1group{1}.dim; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'depsamplesT'; > > cfg.parameter = 'avg.pow'; > > cfg.correctm = 'cluster'; > > cfg.numrandomization = 100; > > cfg.alpha = 0.05; > > cfg.tail = 0; > > nsubj=length(data1group); > > cfg.design(1,:) = [1:nsubj 1:nsubj]; > > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > > cfg.uvar = 1; > > cfg.ivar = 2; > > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > > stat.anatomy = data1group{1}.anatomy; > > > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup > memory?), which forces me to quit Matlab. I'm running above processes in a > function, so I'm not running into Matlab memory error. > > Could someone help me how it could run more efficiently? I guess > cfg.inputfile is not available for ft_sourcestatistics, so I have to > eventually load 2 group data in Matlab workspace...? > > Thank you in advance! Akiko > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Elena.Orekhova at neuro.gu.se Sun Oct 7 20:17:19 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 7 Oct 2012 18:17:19 +0000 Subject: [FieldTrip] EGI .ses import Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> Dear FieldTrippers, I try to read EGI .ses file using hdr = ft_read_header('myfile.ses'), or hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') but get an error message: 'unsupported header format (unknown)' It is stated that FT reads EGI .ses files. Have anybody tried or have some tips? Elena From matt.mollison at gmail.com Sun Oct 7 20:33:55 2012 From: matt.mollison at gmail.com (Matt Mollison) Date: Sun, 7 Oct 2012 12:33:55 -0600 Subject: [FieldTrip] EGI .ses import In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> Message-ID: Elena, The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. Best, Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova wrote: > Dear FieldTrippers, > > I try to read EGI .ses file using > > hdr = ft_read_header('myfile.ses'), or > hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') > > but get an error message: > > 'unsupported header format (unknown)' > > It is stated that FT reads EGI .ses files. > > Have anybody tried or have some tips? > > > Elena > _______________________________________________ > 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 akiko.ikkai at gmail.com Sun Oct 7 22:20:29 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Sun, 7 Oct 2012 16:20:29 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Saskia, Thank you for the quick advise! Removing cfg definitely works well. Each of the group data is now 1.3G (I also used "single" to convert everything into single precision), which is definitely manageable. Computation time has also been reduced to 3 times less now. Thanks! Akiko On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: > Hi Akiko, > > In my experience with grandavg source structs, sometimes the cfg > (that's attached to the data struct) becomes very large and can > consume a considerable amount of memory. I'm not sure if that's the > case/problem here, but might be worth checking and removing the cfg. > You could even use checkconfig to cleanup your cfg with: > data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') > Hope this helps! > > Best, > Saskia > > On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai > wrote: > > Dear Fieldtrip users, > > > > I've been trying to run group stats on my EEG source data, which > contains 14 > > subjects' normalized beamformer data, and having serious swap memory > issue > > (not Matlab memory issue, but OS swap memory). > > > > I'm trying to contrast 2 conditions (within subject design). Each > subject's > > normalized beamformer data (1 condition) is > > > > source_lTMI_intNorm = > > > > anatomy: [181x217x181 double] > > > > inside: [181x217x181 logical] > > > > avg: [1x1 struct] > > > > transform: [4x4 double] > > > > dim: [181 217 181] > > > > cfg: [1x1 struct] > > > > > >>whos > > > > > > > > Name Size Bytes Class Attributes > > > > source_lTMI_intNorm 1x1 520114791 struct > > > > > > therefore, when I open all subjects' data ("data1group" and > "data2group"), > > it's huge... > > > > Name Size Bytes Class Attributes > > > > data1group 1x14 5909429438 cell > > > > data2group 1x14 6705652782 cell > > > > > > data1group & data2group are both 1x14 struct (1 cell/subject). Therefore, > > > >>data1group{1} > > > > anatomy: [181x217x181 double] > > > > inside: [181x217x181 logical] > > > > avg: [1x1 struct] > > > > transform: [4x4 double] > > > > dim: [181 217 181] > > > > cfg: [1x1 struct] > > > > So, when I try to run > > > > cfg=[]; > > > > cfg.dim = data1group{1}.dim; > > > > cfg.method = 'montecarlo'; > > > > cfg.statistic = 'depsamplesT'; > > > > cfg.parameter = 'avg.pow'; > > > > cfg.correctm = 'cluster'; > > > > cfg.numrandomization = 100; > > > > cfg.alpha = 0.05; > > > > cfg.tail = 0; > > > > nsubj=length(data1group); > > > > cfg.design(1,:) = [1:nsubj 1:nsubj]; > > > > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > > > > cfg.uvar = 1; > > > > cfg.ivar = 2; > > > > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > > > > stat.anatomy = data1group{1}.anatomy; > > > > > > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup > > memory?), which forces me to quit Matlab. I'm running above processes in > a > > function, so I'm not running into Matlab memory error. > > > > Could someone help me how it could run more efficiently? I guess > > cfg.inputfile is not available for ft_sourcestatistics, so I have to > > eventually load 2 group data in Matlab workspace...? > > > > Thank you in advance! Akiko > > > > -- > > Akiko Ikkai, Ph.D. > > Postdoctoral Fellow > > Department of Psychological and Brain Sciences > > Johns Hopkins University > > Ames Hall, 3400 N. Charles St. > > Baltimore, MD 21218 > > > > > > > > _______________________________________________ > > 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Mon Oct 8 00:15:13 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 7 Oct 2012 22:15:13 +0000 Subject: [FieldTrip] EGI .ses import In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> Matt, Thank you for the explanations. Just in case you know, do .egs or .sbin contain information about real time/date? Elena ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Matt Mollison [matt.mollison at gmail.com] Sent: Sunday, October 07, 2012 8:33 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EGI .ses import Elena, The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. Best, Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova > wrote: Dear FieldTrippers, I try to read EGI .ses file using hdr = ft_read_header('myfile.ses'), or hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') but get an error message: 'unsupported header format (unknown)' It is stated that FT reads EGI .ses files. Have anybody tried or have some tips? Elena _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Mon Oct 8 02:37:15 2012 From: jdien07 at mac.com (Joseph Dien) Date: Sun, 07 Oct 2012 20:37:15 -0400 Subject: [FieldTrip] EGI .ses import In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253BB599@exchccr1.neuro.gu.se> <32CC77C0C8A7AD4B9410934642608E1F253BB5D7@exchccr1.neuro.gu.se> Message-ID: The problem is that there is some ambiguity about file naming conventions. The egis file format has historically gone with different suffixes including .egis, .ses, .ave, and .raw. Likewise the simple binary format has likewise gone with different suffixes including .sbin and .raw. It started on the Mac where suffix standardization is not as important as on the PC, where suffixes are used by the operating system to tell different file types apart (Macs have historically relied on a separate metadata file, although they are now shifting to more reliance on suffixes, which I think is a mistake). Anyway, the question for you is what you mean by an EGI .ses file? It could refer to a number of things. If you mean the native NetStation file format, only NetStation can read them since the file format relies on some 3rd party software and other folks haven't wanted to pay the license fees. By real time/date, do you mean when the session was recorded (as opposed to event time stamps)? If so, the answer is yes to both. Cheers! Joe On Oct 7, 2012, at 6:15 PM, Elena Orekhova wrote: > Matt, > > Thank you for the explanations. > Just in case you know, do .egs or .sbin contain information about real time/date? > > Elena > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Matt Mollison [matt.mollison at gmail.com] > Sent: Sunday, October 07, 2012 8:33 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] EGI .ses import > > Elena, > > The FieldTrip wiki says that there is support for .egis, .sbin, .ses, .ave, and .gave , but it doesn't seem that the last three are actually supported. If you look in the fieldtrip-DATE/fileio/ft_read_header.m function, the only EGI formats supported seem to be the first two I mentioned (egis and simple binary), plus the new metafile format. You'll need to export your .ses file to one of these supported formats. I've had luck with egis and sbin (tip: I've found that egis is faster to read). I'll update the wiki. > > Best, > Matt > > -- > Univ. of Colorado at Boulder > Dept. of Psychology and Neuroscience > matthew.mollison at colorado.edu > http://psych.colorado.edu/~mollison/ > > On Sun, Oct 7, 2012 at 12:17 PM, Elena Orekhova wrote: > Dear FieldTrippers, > > I try to read EGI .ses file using > > hdr = ft_read_header('myfile.ses'), or > hdr = ft_read_header('ttt.ses, 'headerformat', 'egi_ses') > > but get an error message: > > 'unsupported header format (unknown)' > > It is stated that FT reads EGI .ses files. > > Have anybody tried or have some tips? > > > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From daria.laptinskaya at googlemail.com Mon Oct 8 10:21:10 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Mon, 8 Oct 2012 10:21:10 +0200 Subject: [FieldTrip] Calculate amplitudes and latencies In-Reply-To: References: Message-ID: Thanks :-)!! 2012/10/7 Julian Keil > Hi, > > I suppose your "peakdetect2" is located in the "private" folder. Matlab by > default does not include private folders in the path. You can either rename > it (e.g. to "notprivate") or manually copy the function to another folder. > The "findpeaks" should actually be a built-in function, but maybe you have > to check the math works file exchange. > > As usual, if you are not sure, if you have the respective function in your > matlab path, check with "which". > > Best, > > Julian > > Am 07.10.2012 um 13:23 schrieb Daria Laptinskaya: > > Hi Julian, > > by using the peakdetect2- or the findpeaks-function I get an error: > ??? Undefined function or method 'peakdetect2' for input arguments of type > 'double' > (I use EGI-data with 149 channels and 113 timepoints). > > Do you have any idea, what the problem could be? > > Daria > > > > > > > 2012/10/6 Daria Laptinskaya > >> Many thanks-I will try to do! >> >> Best, >> Daria >> >> >> >> 2012/10/5 Julian Keil >> >>> Hi Daria, >>> >>> you can either use the function "min" or "max" to find the minima and >>> maxima in your data, or you can use the "peakdetect2"-function that can be >>> found in the "private" folder of field trip. >>> Another function, that is quite similar to the field trip-function is >>> the "findpeaks"-function, in which you can even set parameters how exactly >>> you want to define your peaks. >>> Fo the latency: all the above functions can give you the index (i.e. >>> sample point) of your peak, if you then compare this to your time-vector, >>> you can get the latency until the maximum. >>> >>> Good Luck, >>> >>> Julian >>> >>> Am 05.10.2012 um 17:10 schrieb Daria Laptinskaya: >>> >>> > Dear fieldtrippers, >>> > >>> > does anyone know how I can find the peak maximum of an erp? >>> > And how to calculate the latency until the maximum? >>> > >>> > Timelockanalysis and the grand average of all erps are already done. >>> > >>> > Best, >>> > Daria >>> > >>> > >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Mon Oct 8 12:02:32 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Mon, 8 Oct 2012 12:02:32 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, In addition to Saskia's comment (which is very useful!) remember also that if you create the subject's grid from the warped MNI template grid (explained here http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) then you can keep each subject's source data in a 'source' structure with .pos field and still do group level statistics, without need to convert to 'volume' structure which upsamples the spatial resolution perhaps artificially too high. Cheers, Johanna 2012/10/7 Akiko Ikkai > Hi Saskia, > > Thank you for the quick advise! Removing cfg definitely works well. Each > of the group data is now 1.3G (I also used "single" to convert everything > into single precision), which is definitely manageable. Computation time > has also been reduced to 3 times less now. > > Thanks! Akiko > > > On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: > >> Hi Akiko, >> >> In my experience with grandavg source structs, sometimes the cfg >> (that's attached to the data struct) becomes very large and can >> consume a considerable amount of memory. I'm not sure if that's the >> case/problem here, but might be worth checking and removing the cfg. >> You could even use checkconfig to cleanup your cfg with: >> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >> Hope this helps! >> >> Best, >> Saskia >> >> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >> wrote: >> > Dear Fieldtrip users, >> > >> > I've been trying to run group stats on my EEG source data, which >> contains 14 >> > subjects' normalized beamformer data, and having serious swap memory >> issue >> > (not Matlab memory issue, but OS swap memory). >> > >> > I'm trying to contrast 2 conditions (within subject design). Each >> subject's >> > normalized beamformer data (1 condition) is >> > >> > source_lTMI_intNorm = >> > >> > anatomy: [181x217x181 double] >> > >> > inside: [181x217x181 logical] >> > >> > avg: [1x1 struct] >> > >> > transform: [4x4 double] >> > >> > dim: [181 217 181] >> > >> > cfg: [1x1 struct] >> > >> > >> >>whos >> > >> > >> > >> > Name Size Bytes Class Attributes >> > >> > source_lTMI_intNorm 1x1 520114791 struct >> > >> > >> > therefore, when I open all subjects' data ("data1group" and >> "data2group"), >> > it's huge... >> > >> > Name Size Bytes Class Attributes >> > >> > data1group 1x14 5909429438 cell >> > >> > data2group 1x14 6705652782 cell >> > >> > >> > data1group & data2group are both 1x14 struct (1 cell/subject). >> Therefore, >> > >> >>data1group{1} >> > >> > anatomy: [181x217x181 double] >> > >> > inside: [181x217x181 logical] >> > >> > avg: [1x1 struct] >> > >> > transform: [4x4 double] >> > >> > dim: [181 217 181] >> > >> > cfg: [1x1 struct] >> > >> > So, when I try to run >> > >> > cfg=[]; >> > >> > cfg.dim = data1group{1}.dim; >> > >> > cfg.method = 'montecarlo'; >> > >> > cfg.statistic = 'depsamplesT'; >> > >> > cfg.parameter = 'avg.pow'; >> > >> > cfg.correctm = 'cluster'; >> > >> > cfg.numrandomization = 100; >> > >> > cfg.alpha = 0.05; >> > >> > cfg.tail = 0; >> > >> > nsubj=length(data1group); >> > >> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >> > >> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >> > >> > cfg.uvar = 1; >> > >> > cfg.ivar = 2; >> > >> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >> > >> > stat.anatomy = data1group{1}.anatomy; >> > >> > >> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >> > memory?), which forces me to quit Matlab. I'm running above processes >> in a >> > function, so I'm not running into Matlab memory error. >> > >> > Could someone help me how it could run more efficiently? I guess >> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >> > eventually load 2 group data in Matlab workspace...? >> > >> > Thank you in advance! Akiko >> > >> > -- >> > Akiko Ikkai, Ph.D. >> > Postdoctoral Fellow >> > Department of Psychological and Brain Sciences >> > Johns Hopkins University >> > Ames Hall, 3400 N. Charles St. >> > Baltimore, MD 21218 >> > >> > >> > >> > _______________________________________________ >> > 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 >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > 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 gmail.com Mon Oct 8 12:14:09 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 8 Oct 2012 12:14:09 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko! Just to chime in - your source grid is very, very large indeed! ALthough I started with a very fine grid, at one point I also had to downside it (going to 5mm), and had to stop using interpolated source data for stats and the like. Johanna's suggestion will certainly do the trick and it will speed up your analysis enormously as well. You then only need to do interpolate for plotting purposes. all the best, Stephen On 8 October 2012 12:02, Johanna Zumer wrote: > Hi Akiko, > > In addition to Saskia's comment (which is very useful!) remember also that > if you create the subject's grid from the warped MNI template grid > (explained here > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) > then you can keep each subject's source data in a 'source' structure with > .pos field and still do group level statistics, without need to convert to > 'volume' structure which upsamples the spatial resolution perhaps > artificially too high. > > Cheers, > Johanna > > > 2012/10/7 Akiko Ikkai > >> Hi Saskia, >> >> Thank you for the quick advise! Removing cfg definitely works well. Each >> of the group data is now 1.3G (I also used "single" to convert everything >> into single precision), which is definitely manageable. Computation time >> has also been reduced to 3 times less now. >> >> Thanks! Akiko >> >> >> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >> >>> Hi Akiko, >>> >>> In my experience with grandavg source structs, sometimes the cfg >>> (that's attached to the data struct) becomes very large and can >>> consume a considerable amount of memory. I'm not sure if that's the >>> case/problem here, but might be worth checking and removing the cfg. >>> You could even use checkconfig to cleanup your cfg with: >>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>> Hope this helps! >>> >>> Best, >>> Saskia >>> >>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>> wrote: >>> > Dear Fieldtrip users, >>> > >>> > I've been trying to run group stats on my EEG source data, which >>> contains 14 >>> > subjects' normalized beamformer data, and having serious swap memory >>> issue >>> > (not Matlab memory issue, but OS swap memory). >>> > >>> > I'm trying to contrast 2 conditions (within subject design). Each >>> subject's >>> > normalized beamformer data (1 condition) is >>> > >>> > source_lTMI_intNorm = >>> > >>> > anatomy: [181x217x181 double] >>> > >>> > inside: [181x217x181 logical] >>> > >>> > avg: [1x1 struct] >>> > >>> > transform: [4x4 double] >>> > >>> > dim: [181 217 181] >>> > >>> > cfg: [1x1 struct] >>> > >>> > >>> >>whos >>> > >>> > >>> > >>> > Name Size Bytes Class >>> Attributes >>> > >>> > source_lTMI_intNorm 1x1 520114791 struct >>> > >>> > >>> > therefore, when I open all subjects' data ("data1group" and >>> "data2group"), >>> > it's huge... >>> > >>> > Name Size Bytes Class Attributes >>> > >>> > data1group 1x14 5909429438 cell >>> > >>> > data2group 1x14 6705652782 cell >>> > >>> > >>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>> Therefore, >>> > >>> >>data1group{1} >>> > >>> > anatomy: [181x217x181 double] >>> > >>> > inside: [181x217x181 logical] >>> > >>> > avg: [1x1 struct] >>> > >>> > transform: [4x4 double] >>> > >>> > dim: [181 217 181] >>> > >>> > cfg: [1x1 struct] >>> > >>> > So, when I try to run >>> > >>> > cfg=[]; >>> > >>> > cfg.dim = data1group{1}.dim; >>> > >>> > cfg.method = 'montecarlo'; >>> > >>> > cfg.statistic = 'depsamplesT'; >>> > >>> > cfg.parameter = 'avg.pow'; >>> > >>> > cfg.correctm = 'cluster'; >>> > >>> > cfg.numrandomization = 100; >>> > >>> > cfg.alpha = 0.05; >>> > >>> > cfg.tail = 0; >>> > >>> > nsubj=length(data1group); >>> > >>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>> > >>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>> > >>> > cfg.uvar = 1; >>> > >>> > cfg.ivar = 2; >>> > >>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>> > >>> > stat.anatomy = data1group{1}.anatomy; >>> > >>> > >>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>> > memory?), which forces me to quit Matlab. I'm running above processes >>> in a >>> > function, so I'm not running into Matlab memory error. >>> > >>> > Could someone help me how it could run more efficiently? I guess >>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>> > eventually load 2 group data in Matlab workspace...? >>> > >>> > Thank you in advance! Akiko >>> > >>> > -- >>> > Akiko Ikkai, Ph.D. >>> > Postdoctoral Fellow >>> > Department of Psychological and Brain Sciences >>> > Johns Hopkins University >>> > Ames Hall, 3400 N. Charles St. >>> > Baltimore, MD 21218 >>> > >>> > >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> >> >> -- >> Akiko Ikkai, Ph.D. >> Postdoctoral Fellow >> Department of Psychological and Brain Sciences >> Johns Hopkins University >> Ames Hall, 3400 N. Charles St. >> Baltimore, MD 21218 >> >> >> >> _______________________________________________ >> 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 karl.doron at gmail.com Tue Oct 9 00:54:25 2012 From: karl.doron at gmail.com (Karl Doron) Date: Mon, 8 Oct 2012 15:54:25 -0700 Subject: [FieldTrip] diff_itc design matrix error Message-ID: <06DCC434-3BCE-4C6A-8F0F-5F6498BCE918@gmail.com> Hello, I'm getting a design matrix error when running ft_freqstatistics method='diff_itc'. Error using ft_freqstatistics (line 265) the number of observations in the design does not match the number of observations in the data However, the same data and design matrix do work when output='pow' and method='indepsamplesT' I've pasted the design matrix and configuration below. % Make design matrix design=zeros(1,size(freqCor.fourierspctrm,1)+ size(freqInc.fourierspctrm,1)); design(1,1:size(freqCor.fourierspctrm,1))=1; design(1,(size(freqCor.fourierspctrm,1)+1):size(freqCor.fourierspctrm,1)+size(freqInc.fourierspctrm,1))=2; imagesc(design) % Freqstats configuration cfg = [ ]; cfg.statistic ='diff_itc'; cfg.method ='montecarlo'; cfg.parameter ='fourierspctrm'; cfg.complex ='absdiff'; cfg.design ='design'; cfg.ivar = 1; cfg.numrandomization = 500; [ITC_diff]=ft_freqstatistics(cfg, freqCor, freqInc); Thanks for any help, karl Karl Doron, Ph.D. UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.herrero66 at gmail.com Tue Oct 9 01:43:39 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Mon, 8 Oct 2012 19:43:39 -0400 Subject: [FieldTrip] import .cnt file Message-ID: Dear FTrip users, matlab crashes when trying to import a .cnt data file using cfg=ft_definetrial(cfg). my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so this is not the problem cfg=[]; cfg.dataset='ab001002012.cnt' error in loadcnt.m (line 551) because nevents=0.125 such that ev2(nevents).stimtype=[] cannot exist! in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 because r.ldnsamples=1....why? other question is about the type of file cfg.dataset gets. I only have one raw data file (e.g. 'ab001002012.cnt') while the others have already been filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a similar error. any ideas? Jose H. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 9 16:06:56 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 9 Oct 2012 09:06:56 -0500 Subject: [FieldTrip] import .cnt file Message-ID: Hi Jose, Can you show the code you are using (i.e., the whole cfg that you set up before using ft_definetrial() ? It should look something like the example at http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials Best, Steve Politzer-Ahles Message: 2 > Date: Mon, 8 Oct 2012 19:43:39 -0400 > From: Jose Herrero > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] import .cnt file > Message-ID: > GZCDZSWdgDciYFm0vKEg at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FTrip users, > > matlab crashes when trying to import a .cnt data file using > cfg=ft_definetrial(cfg). > > my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so > this is not the problem > > cfg=[]; > cfg.dataset='ab001002012.cnt' > error in loadcnt.m (line 551) because nevents=0.125 such that > ev2(nevents).stimtype=[] cannot exist! > in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 > because r.ldnsamples=1....why? > > other question is about the type of file cfg.dataset gets. I only have one > raw data file (e.g. 'ab001002012.cnt') while the others have already been > filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua > and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a > similar error. > > any ideas? > Jose H. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121008/4c49ba3a/attachment-0001.html > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Tue Oct 9 17:58:16 2012 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Tue, 09 Oct 2012 16:58:16 +0100 Subject: [FieldTrip] ft_volumerealign Message-ID: <7540f0d221800.507457a8@uni-duesseldorf.de> Dear list when running ft_volumerealign with the spm template MRI in the interactive mode, I get something like:  ============================================================================ voxel 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 80.000000 -52.000000] lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 -20.000000 -52.000000] rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 -20.000000 -52.000000] xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 -20.000000 96.000000] the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB Now I would like to rerun it in the fiducial mode, using the above information. According to help, I need to do this: For realigning to the fiducials, you should specify the position of the fiducials in voxel indices.     cfg.fiducial.nas  = [i j k], position of nasion     cfg.fiducial.lpa  = [i j k], position of LPA     cfg.fiducial.rpa  = [i j k], position of RPA I used the voxel indices (code below), but ended up with the MRI upside-down (see attached picture). Trying the landmark mode was also without success. Am I doing something silly here? Thanks in advance Markus % Load SPM8 T1 template   template     = '/Documents/MATLAB/spm8/templates/T1.nii';  template_mri = ft_read_mri(template);  disp(template_mri)    % 2. Realign the coordinate system  cfg                = [];   cfg.method         = 'fiducial'; % 'interactive';  cfg.fiducial.nas   = [46 104 11];  cfg.fiducial.lpa   = [5 54 11];  cfg.fiducial.rpa   = [85 54 12];  cfg.fiducial.zpoint= [46 54 85];  cfg.coordsys       = 'ctf';  template_mri_realigned  = ft_volumerealign(cfg, template_mri);    % 3. Check the coordinate system  cfg                     = [];  cfg.interactive         = 'yes';  template_mri_checked    = ft_determine_coordsys(template_mri_realigned); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: upsidedown.jpg Type: image/jpeg Size: 16088 bytes Desc: not available URL: From Lilla.Magyari at mpi.nl Tue Oct 9 19:39:44 2012 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Tue, 9 Oct 2012 19:39:44 +0200 (CEST) Subject: [FieldTrip] ft_volumerealign In-Reply-To: <7540f0d221800.507457a8@uni-duesseldorf.de> References: <7540f0d221800.507457a8@uni-duesseldorf.de> Message-ID: <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> hi Markus, When you use the ft_volumerealign function it doesn't necessarily will show the right side of the brain on the right side of the image. Orientation of the image depends on the coordinate system of the mri you read in. I tried also align the template mri to the fiducials, and I got the same problem as you (z+ going to inferior in the aligned volume), but when I switched the lpa with the rpa the orientation was fine. So, my conclusion is that the right side shows up on the left of the image when you use ft_volumerealign. Therefore, you have to mark the lpa on the right side of the image and the rpa on the left side of the image. But there is also another option implemented exactly because of this left/right flipping: You can determine also a "z-point" (by pressing z in the image) that can be anywhere at the top of the head. Then, the function will give you the right alignment even if you did not determine the lpa and rpa on the right side of the brain. For this, you just have to do this: cfg.fiducial.zpoint = [i j k], position of zpoint when you also determine the positions for the nasion, lpa and rpa. And one more remark: I do not know if you have realized this yourself, and I have just misunderstood your email: When you call ft_volumerealign in interactive mode like this: cfg=[]; cfg.method='interactive'; mri_realigned=ft_volumerealign(cfg,mri); And you press the keys r/l/n/z at the right places in the volume (and quit with q), the output (mri_realigned) will be the already aligned volume, you do not need to call ft_volumerealign again with method 'fiducials'. Best, Lilla > Dear list > > when running ft_volumerealign with the spm template MRI in the interactive > mode, I get something like:  > > > ===========================================================================voxel > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 > 80.000000 -52.000000] > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 > -20.000000 -52.000000] > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 > -20.000000 -52.000000] > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 > -20.000000 96.000000] > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB > > > Now I would like to rerun it in the fiducial mode, using the above > information. > According to help, I need to do this: > > > For realigning to the fiducials, you should specify the position of > the fiducials in voxel indices. >     cfg.fiducial.nas  = [i j k], position of nasion >     cfg.fiducial.lpa  = [i j k], position of LPA >     cfg.fiducial.rpa  = [i j k], position of RPA > > > > I used the voxel indices (code below), but ended up with the MRI > upside-down (see attached picture). > Trying the landmark mode was also without success. > > > Am I doing something silly here? > > > > Thanks in advance > Markus > > > > > % Load SPM8 T1 template  > > >  template     = '/Documents/MATLAB/spm8/templates/T1.nii'; > > >  template_mri = ft_read_mri(template); > > >  disp(template_mri) > > >   > > >  % 2. Realign the coordinate system > > >  cfg                = [];  > > >  cfg.method         = 'fiducial'; % 'interactive'; > > >  cfg.fiducial.nas   = [46 104 11]; > > >  cfg.fiducial.lpa   = [5 54 11]; > > >  cfg.fiducial.rpa   = [85 54 12]; > > >  cfg.fiducial.zpoint= [46 54 85]; > > >  cfg.coordsys       = 'ctf'; > > >  template_mri_realigned  = ft_volumerealign(cfg, template_mri); > > > > > > >   > > >  % 3. Check the coordinate system > > >  cfg                     = []; > > >  cfg.interactive         = 'yes'; > > >  template_mri_checked    = ft_determine_coordsys(template_mri_realigned); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Tue Oct 9 19:45:29 2012 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Tue, 9 Oct 2012 13:45:29 -0400 Subject: [FieldTrip] import .cnt file In-Reply-To: References: Message-ID: Hi Steve, the problem is before using ft_definetrial() I'd like to read the .cnt data from file as one long continuous segment without any additional filtering...so this is all the code cfg=[]; cfg.dataset ='ab001002012.cnt' data_org = ft_preprocessing(cfg) error in loadcnt.m (line 551) because nevents=0.125 such that ev2(nevents).stimtype=[] cannot exist! % On Tue, Oct 9, 2012 at 10:06 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Hi Jose, > > Can you show the code you are using (i.e., the whole cfg that you set up > before using ft_definetrial() ? It should look something like the example > at > http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials > > Best, > Steve Politzer-Ahles > > > Message: 2 >> Date: Mon, 8 Oct 2012 19:43:39 -0400 >> From: Jose Herrero >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] import .cnt file >> Message-ID: >> > GZCDZSWdgDciYFm0vKEg at mail.gmail.com> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> Dear FTrip users, >> >> matlab crashes when trying to import a .cnt data file using >> cfg=ft_definetrial(cfg). >> >> my system is 16 bits (at least loadcnt.m returns r.dataformat=='int16') so >> this is not the problem >> >> cfg=[]; >> cfg.dataset='ab001002012.cnt' >> error in loadcnt.m (line 551) because nevents=0.125 such that >> ev2(nevents).stimtype=[] cannot exist! >> in line 464 the variable dat (50chan*14455000samples) reshapes to 50*1 >> because r.ldnsamples=1....why? >> >> other question is about the type of file cfg.dataset gets. I only have one >> raw data file (e.g. 'ab001002012.cnt') while the others have already been >> filtered with eeglab (e.g. 'ab002002012 at m.cnt' for mua >> and 'ab001002012 at e.cnt' for lfp). however imputing these files gives me a >> similar error. >> >> any ideas? >> Jose H. >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121008/4c49ba3a/attachment-0001.html >> > >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Jose L Herrero, PhD Department of Psychiatry Columbia University College of Physicians and Surgeons Cognitive Neuroscience and Schizophrenia Program Nathan S. Kline Institute for Psychiatric Research -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregory.Perry at govirtual.tv Wed Oct 10 01:00:56 2012 From: Gregory.Perry at govirtual.tv (Gregory Perry) Date: Tue, 9 Oct 2012 23:00:56 +0000 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> References: <718DFA7882181D45B8BD18F31C46D554215A0639@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0702@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0723@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0759@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0843@MBX204.domain.local>, <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> Message-ID: <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> Something of interest for the list members; I've been working on this photic stimulation system for about a year now, to facilitate EEG-research and experimentation using an alternative to conventional visual cortex-based photic stimulation systems. This method involves only the ear canal: http://www.indiegogo.com/GoVirtualCognition?a=1579195 http://www.quirky.com/ideations/320242 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Oct 10 09:01:33 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 10 Oct 2012 09:01:33 +0200 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> References: <718DFA7882181D45B8BD18F31C46D554215A0639@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0702@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0723@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0759@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0843@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A0930@MBX204.domain.local> <718DFA7882181D45B8BD18F31C46D554215A099E@MBX204.domain.local> Message-ID: Dear Gregory, Thank you for this mightily interesting invention, which has the potential to revolutionize EEG research. However, I am still a bit puzzled as to the mechanism of action. By what route do you imagine the stimulators would entrain brain activity? Any references describing photoreceptors in the ear canal would be very helpful. All the best, Eelke Spaak On 10 October 2012 01:00, Gregory Perry wrote: > Something of interest for the list members; I've been working on this photic > stimulation system for about a year now, to facilitate EEG-research and > experimentation using an alternative to conventional visual cortex-based > photic stimulation systems. This method involves only the ear canal: > > http://www.indiegogo.com/GoVirtualCognition?a=1579195 > http://www.quirky.com/ideations/320242 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Markus.Butz at uni-duesseldorf.de Wed Oct 10 11:04:48 2012 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Wed, 10 Oct 2012 10:04:48 +0100 Subject: [FieldTrip] ft_volumerealign In-Reply-To: <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> References: <7540f0d221800.507457a8@uni-duesseldorf.de> <1173.80.101.124.103.1349804384.squirrel@80.101.124.103> Message-ID: <75e0a7de4b08.50754840@uni-duesseldorf.de> Dear Lilla thank you very much for your response. Swapping lpa and rpa does the trick. Now my brain looks much better. ;-) The extra zpoint does not really help and I had it already implemented in my initial code. All the best Markus Am 09.10.12, schrieb Lilla.Magyari at mpi.nl: > > hi Markus, > > When you use the ft_volumerealign function it doesn't necessarily will > show the right side of the brain on the right side of the image. > Orientation of the image depends on the coordinate system of the mri you > read in. > > I tried also align the template mri to the fiducials, and I got the same > problem as you (z+ going to inferior in the aligned volume), but when I > switched the lpa with the rpa the orientation was fine. So, my conclusion > is that the right side shows up on the left of the image when you use > ft_volumerealign. Therefore, you have to mark the lpa on the right side > of the image and the rpa on the left side of the image. But there is also > another option implemented exactly because of this left/right flipping: > You can determine also a "z-point" (by pressing z in the image) that can > be anywhere at the top of the head. Then, the function will give you the > right alignment even if you did not determine the lpa and rpa on the > right side of the brain. > For this, you just have to do this: > cfg.fiducial.zpoint = [i j k], position of zpoint > when you also determine the positions for the nasion, lpa and rpa. > > And one more remark: I do not know if you have realized this yourself, and > I have just misunderstood your email: When you call ft_volumerealign in > interactive mode like this: > > cfg=[]; > cfg.method='interactive'; > mri_realigned=ft_volumerealign(cfg,mri); > > And you press the keys r/l/n/z at the right places in the volume (and quit > with q), the output (mri_realigned) will be the already aligned volume, > you do not need to call ft_volumerealign again with method 'fiducials'. > > Best, > Lilla > > > Dear list > > > > when running ft_volumerealign with the spm template MRI in the interactive > > mode, I get something like: > > > > > > ===========================================================================voxel > > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm > > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000 > > 80.000000 -52.000000] > > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000 > > -20.000000 -52.000000] > > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000 > > -20.000000 -52.000000] > > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000 > > -20.000000 96.000000] > > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB > > > > > > Now I would like to rerun it in the fiducial mode, using the above > > information. > > According to help, I need to do this: > > > > > > For realigning to the fiducials, you should specify the position of > > the fiducials in voxel indices. > > cfg.fiducial.nas = [i j k], position of nasion > > cfg.fiducial.lpa = [i j k], position of LPA > > cfg.fiducial.rpa = [i j k], position of RPA > > > > > > > > I used the voxel indices (code below), but ended up with the MRI > > upside-down (see attached picture). > > Trying the landmark mode was also without success. > > > > > > Am I doing something silly here? > > > > > > > > Thanks in advance > > Markus > > > > > > > > > > % Load SPM8 T1 template > > > > > > template = '/Documents/MATLAB/spm8/templates/T1.nii'; > > > > > > template_mri = ft_read_mri(template); > > > > > > disp(template_mri) > > > > > > > > > > > > % 2. Realign the coordinate system > > > > > > cfg = []; > > > > > > cfg.method = 'fiducial'; % 'interactive'; > > > > > > cfg.fiducial.nas = [46 104 11]; > > > > > > cfg.fiducial.lpa = [5 54 11]; > > > > > > cfg.fiducial.rpa = [85 54 12]; > > > > > > cfg.fiducial.zpoint= [46 54 85]; > > > > > > cfg.coordsys = 'ctf'; > > > > > > template_mri_realigned = ft_volumerealign(cfg, template_mri); > > > > > > > > > > > > > > > > > > > > % 3. Check the coordinate system > > > > > > cfg = []; > > > > > > cfg.interactive = 'yes'; > > > > > > template_mri_checked = ft_determine_coordsys(template_mri_realigned); > > > > > > _______________________________________________ > > 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 Gregory.Perry at govirtual.tv Wed Oct 10 15:42:34 2012 From: Gregory.Perry at govirtual.tv (Gregory Perry) Date: Wed, 10 Oct 2012 13:42:34 +0000 Subject: [FieldTrip] Eyes-open EEG stimulation via the ear canals In-Reply-To: Message-ID: <718DFA7882181D45B8BD18F31C46D554215A0F5A@MBX204.domain.local> I am not aware of any photoreceptors in the ear canal, and I am not quite sure exactly why this method works the way it does. Different wavelengths at varying intensities focused into the ear canal evoke different brainwave responses, and the effects are quite dramatic - insert a light source into the ear and an immediate response is seen on the EEG FFT analysis and charting output, remove the pulsing light source and it immediately does away. I do not currently have access to an fMRI setup so I cannot say with any level of accuracy which major cortexes are directly implicated beyond associating the 10/20 region/scalp electrode that is reporting back strong FFT activity. The light sources are optically coupled with light pipes so I believe electromagnetic interference with the scalp electrodes can be safely ruled out. The light pipes are insulated with 1mm black jackets and with only about 2mm of light pipe exposed inside the ear canal, so I think that side channel light from the ear receptacles themselves can be safely ruled out as influencing the EEG charting via the visual cortex as well. So far my best guestimate is that light projected through the inner ear is close enough to the brain to permeate through any obstructing tissue, depending on the intensity and wavelength of light being used. Green and blue seem to be the dominant wavelengths in terms of the measured EEG responses I've observed so far. More testing is needed from a diverse user base, hence the Indiegogo crowdsourced funding project to develop an open source experimentation platform for widespread community participation in testing of this method of brainwave stimulation. I will be posting more detailed screencasts illustrating the EEG FFT results in the upcoming days; the strongest responses so far are in the delta band which is strange as well. ----- Original Message ----- From: Eelke Spaak [mailto:eelke.spaak at donders.ru.nl] Sent: Wednesday, October 10, 2012 03:01 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Eyes-open EEG stimulation via the ear canals Dear Gregory, Thank you for this mightily interesting invention, which has the potential to revolutionize EEG research. However, I am still a bit puzzled as to the mechanism of action. By what route do you imagine the stimulators would entrain brain activity? Any references describing photoreceptors in the ear canal would be very helpful. All the best, Eelke Spaak On 10 October 2012 01:00, Gregory Perry wrote: > Something of interest for the list members; I've been working on this photic > stimulation system for about a year now, to facilitate EEG-research and > experimentation using an alternative to conventional visual cortex-based > photic stimulation systems. This method involves only the ear canal: > > http://www.indiegogo.com/GoVirtualCognition?a=1579195 > http://www.quirky.com/ideations/320242 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Wed Oct 10 19:26:07 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Wed, 10 Oct 2012 19:26:07 +0200 (CEST) Subject: [FieldTrip] dipole position and moment Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From yoniilevy at gmail.com Thu Oct 11 16:55:06 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 11 Oct 2012 16:55:06 +0200 Subject: [FieldTrip] Frequency smoothing for beamforming Message-ID: Hi All, I am trying to locate a source using beamforming to a short lasting (during 100ms) oscillatory (frequency=28Hz) effect that I find at the sensor level. The thing is that because of the short time window, the frequency smoothing is bound to be high, whereas I would like to limit it as much as possible; not to mention that because trial length varies across subjects and trials, 100ms is the maximal window, but in truth segments are shorter. Any idea of how I could beamform on such short time window? Thanks in advance for any ideas, Yoni On Fri, Oct 5, 2012 at 12:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Frequency smoothing for beamforming (J?rn M. Horschig) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 05 Oct 2012 08:56:27 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Frequency smoothing for beamforming > Message-ID: <506E849B.7050602 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Yoni, > > Stephen is right, and just to make this really clear, a Hanning taper > will always give you a smoothing of your Raleigh frequency (which in > your case is 3.33Hz). Any taper can only (effectively) smooth in terms > of your frequency resolution or Raleigh frequency, thus a Hann taper > gives you the minimal smoothing (apart from a boxcar). Then, the problem > with different trial becomes more apparent, because since the frequency > resolution changes, also the smoothing of the Hanning taper changes > accordingly. I also think that making the trials having equal length is > the best approach. Having unequal trial lengths also constitutes a > problem for multitapering, cause you will end up with different tapers > and different number of tapers per trial. And also your frequency > smoothing should be a multiple of the Raleigh frequency. You can ask for > other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you > will see the smoothing at 6.66 or 9.99Hz (depending on where you define > the end of smoothing) - it's just because you sample in 3.33Hz steps. > Here you can maybe also see, that having different trial lengths might > constitute a problem, because you will effectively get different > smoothing per trial, depending on your Raleigh frequency. The > computation of the tapers was however correct, so with 8Hz smoothing and > a 0.3s time window you get 3 tapers ;) Btw, I once played around with it > and realized that the 3 tapers you obtain are not always the same for > different parameters, e.g. for 8Hz and 0.25s window you will also get > 8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you > get with a 0.3s time window. So even that can cause a problem. > > Btw, I never heard that different frequency smoothing ends up in > different part of the brain when beaming. The only reason I can see is > what Stephen already pointed out, that other frequency bands with > different functional characteristics smear into your power spectrum. > > Best, > J?rn > > > > > On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote: > > Hi Yoni, > > > > Indeed, a simple hanning taper will already give you a frequency > > smoothing of +/- 3Hz. Adding tapers can only increase this, and I > > don't see why you would beamform 22 to 38 Hz if you are interested > > between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper > > = 'hanning', giving you a measure of power between of about 27 and 33? > > > > You're right that having different trial lenghts will indeed give you > > a different frequency resolution per trial. If this is a problem is > > hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial > > would indeed make sure they are all of the same length (i.e. the > > maximal length) - but if that is different between subjects/conditions > > that might not be enough. > > > > Best, > > Stephen > > > > > > > > On 4 October 2012 11:56, Yoni Levy > > wrote: > > > > Hi Stephen! > > Thanks for your reply. > > > > My FOI is 29-31Hz; Since my time window is of 300ms, then my freq > > smoothing should now be of +/-3.33Hz. If I use a hanning taper, > > the parameters that i use for the freqanal (for further on doing > > beamformer-statistics) are: > > cfg.method ='mtmfft'; > > cfg.output ='fourier'; > > cfg.keeptrials = 'yes'; > > cfg.keeptapers = 'yes'; > > cfg.taper = 'hanning'; > > cfg.foilim = [29 31]; > > However, if I get it right, multitapering should also be an option > > as 30Hz is not a relatively very low frequency. In that case, i > > remove the hanning and instead include a cfg.tapsmofrq =8, so that > > the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so? > > > > Also, about the time window which is theoretically 300ms, but i > > think this depends on the length of every trial; for instance, > > before freqanal, when i redefine the trial, i input cfg.minlength > > = 'maxperlen'. So if i alter that, the freq smoothing should be > > different as well, correct? Ye, anyway, I wonder how to optimize > > all those parameters for my source localization statistics. > > > > Thanks in advance, > > > > Yoni > > > > > > On Wed, Oct 3, 2012 at 3:55 PM, > > wrote: > > > > > > Hi Yoni! > > > > The extend of the smoothing, I would say, is under normal > > circumstances > > simply what you > > request as a smoothing paramater (given the dpss > > characteristics), so I > > don't understand > > that formulation exactly. > > > > If different smoothings give drastically different result you > > might be > > sampling > > frequencies that behave differently from your frequency of > > interest. In > > your case, e.g. > > perhaps you are adding alpha in your estimate that might > > behave differently > > in your > > paradigm? > > > > I would therefor try to first figure out if your effect is, in > > fact, > > frequency specific > > and try to not to smooth more than necessary to capture that > > effect. So > > starting with no > > (extra) smoothing and looking at the TFR for instance. A > > simple FFT would > > give you a > > frequency smoothing of +/- 1/datalength already (e.g. half a > > second would > > be +/- 2 Hz). > > Simply averaging over frequencies (estimated with a Hanning > > taper) instead > > of using the > > slepian tapers might be a better option. > > > > Then again, you are limited in frequency specificity by the > > length of the > > data on which > > you calculate them. If that is too short you might have > > suboptimal and > > unexpected > > effects. In the case of slepian filters make sure you have at > > least a > > minimum of 3 tapers > > (which is shown in the output of freqanalysis). > > > > There is a lot more to say about tapers, smoothing etc, but I > > hope this > > helps. > > > > All the best, > > Stephen > > > > On 3 October 2012 15:14, Yoni Levy > > wrote: > > > > > Dear Fieldtrippers, > > > > > > I am trying to locate the source of an oscillatory effect at > > the frequency > > > of 30Hz in a time window of interest. > > > Before running the ft_sourceanalysis function, I run a > > ft_freqanalysis > > > with a frequency smoothing of 8 (cfg.tapsmofrq =8). > > > My question is whether there is any rule of thumb by which I > > could > > > reliably determine the extent of the smoothing? > > > I found out that even small changes in the 'tapsmofrq' value, > > > significantly alter the spatial localization of the > > resulting sources. > > > For instance, a tapsmofreq value of 8 would point to an > > effect in the > > > frontal lobe, whereas a value of 10 would point to an effect > > in the > > > parietal lobe. > > > > > > Any advice would be appreciated. > > > > > > Yoni > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121005/aed5f036/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 23, Issue 6 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Oct 12 09:23:44 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Fri, 12 Oct 2012 09:23:44 +0200 (CEST) Subject: [FieldTrip] help with dipole position and dipole moment Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From f.roux at bcbl.eu Wed Oct 17 15:17:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Wed, 17 Oct 2012 15:17:24 +0200 (CEST) Subject: [FieldTrip] help with dipole position and orientation Message-ID: Dear list members, I am working on CTF based MEG data and would like to run a dipole simulation with two dipoles in the occipital cortex. However, I am not sure how to chose the right parameters regarding dipole position and moment. So the first question I have is how to chose the coordinates for the dipole position. cfg.dip.pos = [x y z] In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. In this paper the dipole position was chose to be r = [-5 0 1] which should correspond to a dipole close to the hemispheric midline and in the occipital cortex. Can anyone tell me based on which data / how these coordinates were chosen? I have been searching the grad structure of my data for comparable info, but did not find anything. Neither did I looking at cfg.layout.pos. My second question concerns the dipole moment. Am I right in assuming the following: cfg.dip.mom = [1 0 0] % dipole points towards NAS cfg.dip.mpm = [-1 0 0] % dipole points away from NAS cfg.dip.mom = [0 1 0] % dipole points towards LPA cfg.dip.mom = [0 -1 0]% dipole points towards RPA cfg.dip.mom = [0 0 1]% dipole points towards vertex cfg.dip.mon = [0 0 -1]% dipole points away from vertex Any help or suggestions would be highly appreciated. Best, Fred From Maximilian.Bruchmann at uni-muenster.de Thu Oct 18 15:55:53 2012 From: Maximilian.Bruchmann at uni-muenster.de (Maximilian Bruchmann) Date: Thu, 18 Oct 2012 15:55:53 +0200 Subject: [FieldTrip] Problem with visualizing individual minimum source activity (ft_plot_mesh, ft_sourcemovie, ft_sourceplot) Message-ID: Dear FieldTrippers, there used to be a very convenient way to get a look at individual mne source reconstructions using either ft_plot_mesh or ft_sourcemovie, but both no longer seem to work. When I follow the minimum norm estimate tutorial up to the point of visualization the code that worked fine some weeks ago now produces the following errors: cfg=[]; cfg.method = 'mne'; cfg.grid.leadfield = leadfield; cfg.vol = vol; cfg.mne.lambda = 1e11; myMne = ft_sourceanalysis(cfg,timeLock); bnd.pnt = sourcespace.pnt; bnd.tri = sourcespace.tri; m=myMne.avg.pow(:,450); ft_plot_mesh(bnd, 'vertexcolor', m); produces the error: Error using ft_plot_mesh (line 191) Unknown color As it seems, 'vertexcolor' accepts only a single RGB triplet. In fact, none of the options of ft_plot_mesh seems to support the visualization of functional data anymore, am I right? The other way using ft_sourcemovie used to work fine like this: figure myMne.tri = sourcespace.tri; cfg = []; cfg.alim = [0 8e-14]; cfg.zlim = [0 4e-13]; cfg.maskparameter = 'avg.pow'; ft_sourcemovie(cfg,myMne); But now it produces the warning Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering and I get an empty figure window. I tried ft_sourceplot: cfg = []; cfg.method = 'surface'; cfg.funparameter = 'avg.pow'; ft_sourceplot(cfg,myMne); but irrespective of the method I get Error using ft_sourceplot (line 188) the input data needs to be defined on a regular 3D grid Any help on how I can view my source reconstruction results as a colored source space model would be very appreciated! Thanks in advance! Best, Max From akiko.ikkai at gmail.com Thu Oct 18 22:29:37 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 18 Oct 2012 16:29:37 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Everyone, Thank you very much for your advise. I just came back from SfN, and just found your replies, so I will test these options and report back what I find. Thank you again! Akiko On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Akiko! > > Just to chime in - your source grid is very, very large indeed! ALthough I > started with a very fine grid, at one point I also had to downside it > (going to 5mm), and had to stop using interpolated source data for stats > and the like. Johanna's suggestion will certainly do the trick and it will > speed up your analysis enormously as well. You then only need to do > interpolate for plotting purposes. > > all the best, > Stephen > > > On 8 October 2012 12:02, Johanna Zumer wrote: > >> Hi Akiko, >> >> In addition to Saskia's comment (which is very useful!) remember also >> that if you create the subject's grid from the warped MNI template grid >> (explained here >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >> then you can keep each subject's source data in a 'source' structure with >> .pos field and still do group level statistics, without need to convert to >> 'volume' structure which upsamples the spatial resolution perhaps >> artificially too high. >> >> Cheers, >> Johanna >> >> >> 2012/10/7 Akiko Ikkai >> >>> Hi Saskia, >>> >>> Thank you for the quick advise! Removing cfg definitely works well. Each >>> of the group data is now 1.3G (I also used "single" to convert everything >>> into single precision), which is definitely manageable. Computation time >>> has also been reduced to 3 times less now. >>> >>> Thanks! Akiko >>> >>> >>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >>> >>>> Hi Akiko, >>>> >>>> In my experience with grandavg source structs, sometimes the cfg >>>> (that's attached to the data struct) becomes very large and can >>>> consume a considerable amount of memory. I'm not sure if that's the >>>> case/problem here, but might be worth checking and removing the cfg. >>>> You could even use checkconfig to cleanup your cfg with: >>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>> Hope this helps! >>>> >>>> Best, >>>> Saskia >>>> >>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>> wrote: >>>> > Dear Fieldtrip users, >>>> > >>>> > I've been trying to run group stats on my EEG source data, which >>>> contains 14 >>>> > subjects' normalized beamformer data, and having serious swap memory >>>> issue >>>> > (not Matlab memory issue, but OS swap memory). >>>> > >>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>> subject's >>>> > normalized beamformer data (1 condition) is >>>> > >>>> > source_lTMI_intNorm = >>>> > >>>> > anatomy: [181x217x181 double] >>>> > >>>> > inside: [181x217x181 logical] >>>> > >>>> > avg: [1x1 struct] >>>> > >>>> > transform: [4x4 double] >>>> > >>>> > dim: [181 217 181] >>>> > >>>> > cfg: [1x1 struct] >>>> > >>>> > >>>> >>whos >>>> > >>>> > >>>> > >>>> > Name Size Bytes Class >>>> Attributes >>>> > >>>> > source_lTMI_intNorm 1x1 520114791 struct >>>> > >>>> > >>>> > therefore, when I open all subjects' data ("data1group" and >>>> "data2group"), >>>> > it's huge... >>>> > >>>> > Name Size Bytes Class Attributes >>>> > >>>> > data1group 1x14 5909429438 cell >>>> > >>>> > data2group 1x14 6705652782 cell >>>> > >>>> > >>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>> Therefore, >>>> > >>>> >>data1group{1} >>>> > >>>> > anatomy: [181x217x181 double] >>>> > >>>> > inside: [181x217x181 logical] >>>> > >>>> > avg: [1x1 struct] >>>> > >>>> > transform: [4x4 double] >>>> > >>>> > dim: [181 217 181] >>>> > >>>> > cfg: [1x1 struct] >>>> > >>>> > So, when I try to run >>>> > >>>> > cfg=[]; >>>> > >>>> > cfg.dim = data1group{1}.dim; >>>> > >>>> > cfg.method = 'montecarlo'; >>>> > >>>> > cfg.statistic = 'depsamplesT'; >>>> > >>>> > cfg.parameter = 'avg.pow'; >>>> > >>>> > cfg.correctm = 'cluster'; >>>> > >>>> > cfg.numrandomization = 100; >>>> > >>>> > cfg.alpha = 0.05; >>>> > >>>> > cfg.tail = 0; >>>> > >>>> > nsubj=length(data1group); >>>> > >>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>> > >>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>> > >>>> > cfg.uvar = 1; >>>> > >>>> > cfg.ivar = 2; >>>> > >>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>> > >>>> > stat.anatomy = data1group{1}.anatomy; >>>> > >>>> > >>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>> > memory?), which forces me to quit Matlab. I'm running above processes >>>> in a >>>> > function, so I'm not running into Matlab memory error. >>>> > >>>> > Could someone help me how it could run more efficiently? I guess >>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>> > eventually load 2 group data in Matlab workspace...? >>>> > >>>> > Thank you in advance! Akiko >>>> > >>>> > -- >>>> > Akiko Ikkai, Ph.D. >>>> > Postdoctoral Fellow >>>> > Department of Psychological and Brain Sciences >>>> > Johns Hopkins University >>>> > Ames Hall, 3400 N. Charles St. >>>> > Baltimore, MD 21218 >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>>> >>> >>> >>> >>> -- >>> Akiko Ikkai, Ph.D. >>> Postdoctoral Fellow >>> Department of Psychological and Brain Sciences >>> Johns Hopkins University >>> Ames Hall, 3400 N. Charles St. >>> Baltimore, MD 21218 >>> >>> >>> >>> _______________________________________________ >>> 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Fri Oct 19 11:46:34 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 19 Oct 2012 11:46:34 +0200 Subject: [FieldTrip] problem with ft_freqanalysis Message-ID: Dear all, I have one problem with the ft_freqanalysis. When I calculate time-frequency analysis with the Hanning taper everything works ok, but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I get empty plots. You can check that in the attached image. However, when I calculate time-frequency with the multitapers plot looks fine. Here is my problematic code: %Hanning taper cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.toi = -0.5:0.05:1.5; % time window "slides" from -0.5 to 1.5 sec in steps of 0.05 sec cfg.polyremoval = -1; wr11_freq = ft_freqanalysis(cfg, data_clean); cfg = []; cfg.baseline = [-0.2 -0.1]; cfg.baselinetype = 'absolute'; cfg.zlim = [-4e-29 1e-28]; cfg.showlabels = 'yes'; cfg.layout = 'CTF275.lay'; cfg.colorbar= 'yes'; cfg.interactive= 'yes'; cfg.hotkeys = 'yes'; figure ft_multiplotTFR(cfg, wr11_freq); Please help! Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: empty.jpg Type: image/jpeg Size: 124582 bytes Desc: not available URL: From jm.horschig at donders.ru.nl Fri Oct 19 12:13:32 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 19 Oct 2012 12:13:32 +0200 Subject: [FieldTrip] problem with ft_freqanalysis In-Reply-To: References: Message-ID: <508127CC.7000002@donders.ru.nl> Hey Nenad, the problem is simply that in the beginning of your TFR there are nans and you are using that part as a baseline. You cannot have a 0.5s timewindow at t=-0.5s up until t=0s when your preprocessed data starts at t=-0.5s, you would need preprocessed starting at -1s. When plotting, you chose to use a baseline which starts within the nan area, so all your data will be substracted with nans resulting in nans itself. Three solution possible: 1) Use a baseline outside the nan area (for you t>=0) 2) Re-do your processing starting at t=-1s or 3) Use shorter time windows for your freq analysis of only 300ms (because then your baseline starting at 200ms would work, since 500-300 = 200) I'd recommend the second one - always use data padding when doing analysis. Best regards, Jörn On 10/19/2012 11:46 AM, Nenad Polomac wrote: > Dear all, > > I have one problem with the ft_freqanalysis. When I calculate > time-frequency analysis with the Hanning taper everything works ok, > but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I > get empty plots. You can check that in the attached image. However, > when I calculate time-frequency with the multitapers plot looks fine. > Here is my problematic code: > > > %Hanning taper > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time > window = 0.5 sec > cfg.toi = -0.5:0.05:1.5; % time window > "slides" from -0.5 to 1.5 sec in steps of 0.05 sec > cfg.polyremoval = -1; > wr11_freq = ft_freqanalysis(cfg, data_clean); > > > cfg = []; > cfg.baseline = [-0.2 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.zlim = [-4e-29 1e-28]; > cfg.showlabels = 'yes'; > cfg.layout = 'CTF275.lay'; > cfg.colorbar= 'yes'; > cfg.interactive= 'yes'; > cfg.hotkeys = 'yes'; > figure > ft_multiplotTFR(cfg, wr11_freq); > > Please help! > Thank you in advance! > > Nenad > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Fri Oct 19 13:03:58 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 19 Oct 2012 13:03:58 +0200 Subject: [FieldTrip] problem with ft_freqanalysis Message-ID: Dear Jörn, Thank you very much! You solved my problem :) All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.schubert at uni-hamburg.de Fri Oct 19 13:23:09 2012 From: jonathan.schubert at uni-hamburg.de (Jonathan Schubert) Date: Fri, 19 Oct 2012 13:23:09 +0200 Subject: [FieldTrip] TFR with mtmconvol Message-ID: Dear all, I have a question regarding frequency analysis using the multitaper approach. I transformed my data using the following code: cfg = []; cfg.channel = 'all'; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 40:1:100; cfg.toi = -1.0:0.02:1.0; cfg.t_ftimwin = 7./cfg.foi; cfg.tapsmofrq = cfg.foi*0.4; cfg.pad = 'maxperlen'; cfg.keeptrials = 'no'; freq = ft_freqanalysis(cfg, data); When I plot the TFR it looks strange in a similiar way to what I found on the fieldtrip homepage: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange Following the help on the homepage did not improve the outcome. I attached an example of my TFR. What can I do to improve the outcome of the frequency analysis? Best, Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample_pic.jpg Type: image/jpeg Size: 38461 bytes Desc: not available URL: From r.vandermeij at donders.ru.nl Fri Oct 19 13:50:56 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 19 Oct 2012 13:50:56 +0200 Subject: [FieldTrip] TFR with mtmconvol In-Reply-To: References: Message-ID: Hi Jonathan, This indeed looks like a bleeding in of the 0Hz component. How did you exactly follow the help on the wiki? Could you post your entire analysis pipeline? (i.e. your call to ft_preprocessing, your call to ft_singleplotTFR, baselining that you do, etc.). That would help in diagnosing the problem. All the best, Roemer On Fri, Oct 19, 2012 at 1:23 PM, Jonathan Schubert < jonathan.schubert at uni-hamburg.de> wrote: > Dear all, > > I have a question regarding frequency analysis using the multitaper > approach. I transformed my data using the following code: > > cfg = []; > cfg.channel = 'all'; > cfg.output = 'pow'; > cfg.method = 'mtmconvol'; > cfg.foi = 40:1:100; > cfg.toi = -1.0:0.02:1.0; > cfg.t_ftimwin = 7./cfg.foi; > cfg.tapsmofrq = cfg.foi*0.4; > cfg.pad = 'maxperlen'; > cfg.keeptrials = 'no'; > freq = ft_freqanalysis(cfg, data); > > When I plot the TFR it looks strange in a similiar way to what I found on > the fieldtrip homepage: > http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange > Following the help on the homepage did not improve the outcome. I attached > an example of my TFR. > > What can I do to improve the outcome of the frequency analysis? > > Best, > Jonathan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.schubert at uni-hamburg.de Fri Oct 19 16:20:46 2012 From: jonathan.schubert at uni-hamburg.de (Jonathan Schubert) Date: Fri, 19 Oct 2012 16:20:46 +0200 Subject: [FieldTrip] TFR with mtmconvol In-Reply-To: References: Message-ID: Hi Roemer, I did the preprocessing with eeglab. I'm going to include the eeglab commands at the end of this mail. So first the fieldtrip commands only: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % reading in the data from eeglab [data]=eeglab2fieldtrip(EEG, 'preprocessing', 'none'); % This step is from the fieldtrip wiki cfg = []; cfg.demean = 'yes'; data = ft_preprocessing(cfg, data); % frequency analysis cfg = []; cfg.channel = 'all'; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 40:1:100; cfg.toi = -1.0:0.02:1.0; cfg.t_ftimwin = 7./cfg.foi; cfg.tapsmofrq = cfg.foi*0.4; cfg.pad = 'maxperlen'; cfg.keeptrials = 'no'; freq = ft_freqanalysis(cfg, data); % baseline correction -300 to -100 ms base = freq; bix = find(freq.time < -0.1 & freq.time >-0.3); totalbase = repmat(nanmean(freq.powspctrm(:,:,bix),3),[1,1,length(freq.time)]); freq.powspctrm = 100 * ((freq.powspctrm-totalbase)./totalbase); % plotting the results lay = ft_prepare_layout(freq); figure cfg = []; cfg.layout = lay; cfg.interactive = 'yes'; cfg.marker = 'labels'; cfg.channel = {'M_4'}; cfg.xparam = 'time'; cfg.yparam = 'freq'; cfg.zparam = 'powspctrm'; cfg.xlim = [-0.3 1.0]; cfg.zlim = 'maxabs' ; ft_singleplotTFR (cfg, freq); %%%%%%%%%%%%%%%%%%%%%%%%% % So here is what I did with eeglab, before calling the eeglab2fieldtrip % reading in data EEG = pop_loadset('filename',[setname, '.set'],'filepath', pathname); [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'setname', setname); % edit channels and reading in their locations and set reference EEG=pop_chanedit(EEG, 'load',{'E:\\E176_data\\TF_Matlab_scripts\\electrode_pos61.elp' 'filetype' 'autodetect'},'append',64,'changefield',{65 'labels' 'ref_right_ear'},'setref',{'1:64' 'ref_right_ear'}); [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); EEG = eeg_checkset( EEG ); % lowpass filter EEG = pop_eegfilt( EEG, 0, 110, [], [0]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % change sampling rate to 250Hz EEG = pop_resample( EEG, 250); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % highpass filter EEG = pop_eegfilt( EEG, 0.3, 0, [], [0]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % re-referencing to linked earlobe reference EEG = pop_reref( EEG, [],'refloc',struct('type',{''},'labels',{'ref_ear_right'},'radius',{0.65556},'sph_theta',{-90},'sph_phi',{-28},'theta',{90},'sph_radius',{1},'X',{5.4065e-017},'Y',{-0.88295},'Z',{-0.46947},'ref',{''},'urchan',{65})); EEG = pop_reref( EEG, [62 65] ); % run ICA EEG = pop_runica(EEG, 'extended',1,'chanind', [1:61],'stop',1e-007,'maxsteps',600); % Identification of components reflecting eyeblinks and -movements, % heartbeat, noise is done by hand % get rid of artifact components artcomp = sort([EEG.artifact.eyeblink, EEG.artifact.noise, EEG.artifact.heyem, EEG.artifact.ecg]); EEG = pop_subcomp(EEG, artcomp, 0); EEG = pop_saveset(EEG, savename, pathname); [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); %notch filter to take out the electrical %current at 50 HZ and 100 Hz EEG = pop_eegfilt( EEG, 49, 51, [], [1]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); EEG = pop_eegfilt( EEG, 99, 101, [], [1]); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); % epoching the data and removing thresh = 100; condition = {'111'}; for j=1:length(condition) EEG = pop_loadset('filename', savename,'filepath', pathname); EEG = pop_epoch( EEG, {condition{j}}, [-1.0 1.2], 'newname', ['L' subject{i},' resampled pruned with ICA epochs'], 'epochinfo', 'yes'); EEG = pop_rmbase( EEG, [-100 0]); [EEG, Ind1] = pop_eegthresh( EEG, 1, [1:61], -thresh, thresh, -0.5, 0.5, 0, 1); % get rid of artifacts end % re-referencing to avg reference: do not use EOG channels for average reference EEG = pop_select( EEG, 'nochannel',[62 63]); % re-reference to average reference EEG = pop_reref(EEG, []); Best, Jonathan 2012/10/19 Roemer van der Meij > Hi Jonathan, > > This indeed looks like a bleeding in of the 0Hz component. How did you > exactly follow the help on the wiki? Could you post your entire analysis > pipeline? (i.e. your call to ft_preprocessing, your call to > ft_singleplotTFR, baselining that you do, etc.). That would help in > diagnosing the problem. > > All the best, > Roemer > > > On Fri, Oct 19, 2012 at 1:23 PM, Jonathan Schubert < > jonathan.schubert at uni-hamburg.de> wrote: > >> Dear all, >> >> I have a question regarding frequency analysis using the multitaper >> approach. I transformed my data using the following code: >> >> cfg = []; >> cfg.channel = 'all'; >> cfg.output = 'pow'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 40:1:100; >> cfg.toi = -1.0:0.02:1.0; >> cfg.t_ftimwin = 7./cfg.foi; >> cfg.tapsmofrq = cfg.foi*0.4; >> cfg.pad = 'maxperlen'; >> cfg.keeptrials = 'no'; >> freq = ft_freqanalysis(cfg, data); >> >> When I plot the TFR it looks strange in a similiar way to what I found on >> the fieldtrip homepage: >> http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange >> Following the help on the homepage did not improve the outcome. I >> attached an example of my TFR. >> >> What can I do to improve the outcome of the frequency analysis? >> >> Best, >> Jonathan >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Roemer van der Meij M.Sc. > PhD Candidate > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3655932 > E-mail: r.vandermeij at donders.ru.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Jonathan Schubert University of Hamburg Biological Psychology and Neuropsychology Von-Melle-Park 11, Room 301 D-20146 Hamburg Germany - Phone: (49) 40 - 42838 7626 Fax: (49) 40 - 42838 6591 jonathan.schubert at uni-hamburg.de www.bpn.uni-hamburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Sat Oct 20 00:10:07 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 19 Oct 2012 18:10:07 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi, So I have followed Johanna and Stephan's advise to create template_grid and each subject's grid from MNI image, which is now 1cm spacing instead of .5cm. These steps seem to run, and I'm able to create a common spatial filter to run beamformer using DICS. However, I get an error when I apply the commom filter to each condition. I had to tweak a few things on example on the page http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid , since my data is EEG and electrode locations vary between subjects, such that: cfg = []; cfg.grid.xgrid = -20:1:20; cfg.grid.ygrid = -20:1:20; cfg.grid.zgrid = -20:1:20; cfg.grid.tight = 'yes'; cfg.inwardshift = -1.5; cfg.vol = template_vol; *cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add this (got error otherwise)* template_grid = ft_prepare_sourcemodel(cfg); then cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri_aligned; *cfg.elec = ft_data.elec; **% individual sub's electrode locations: had to add this (got error otherwise)* grid = ft_prepare_sourcemodel(cfg); These create grids in MNI space, both for template and individual fine. To create a common spatial filter, I run the following command, which runs: cfg = []; cfg.grid.pos = grid.pos; cfg.grid.dim = grid.dim; cfg.grid.inside = grid.inside; cfg.grid.outside = grid.outside; cfg.inwardshift = -1.5; cfg.vol = vol_cm; cfg.channel = {'all'}; cfg.frequency = 10.5; cfg.method = 'dics'; cfg.dics.projectnoise = 'yes'; cfg.dics.keepfilter = 'yes'; cfg.dics.feedback = 'no'; source_common = ft_sourceanalysis(cfg, freq_common); however, when I apply this spatial filter to a task condition, I get an error message cfg = []; cfg.elec = freq_common.elec; cfg.grid.pos = source_common.pos; cfg.grid.filter = source_common.avg.filter; cfg.inwardshift = -1.5; cfg.vol = vol_cm; cfg.channel = {'all'}; cfg.frequency = 10.5; cfg.method = 'dics'; cfg.dics.projectnoise = 'yes'; cfg.dics.keepfilter = 'yes'; cfg.dics.feedback = 'no'; source_itemL = ft_sourceanalysis(cfg, freq_itemL); source_itemL.unit = 'cm'; ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> beamformer_dics at 316 csd = filt * Cf * ctranspose(filt); % Gross eqn. 4 and 5 Error in ==> ft_sourceanalysis at 588 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot where exactly the error is originating from. Am I missing some steps when I create template grids that I feed into ft_sourceanalysis? Thank you in advance for your help! Akiko On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai wrote: > Hi Everyone, > > Thank you very much for your advise. I just came back from SfN, and just > found your replies, so I will test these options and report back what I > find. > > Thank you again! Akiko > > > On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Hi Akiko! >> >> Just to chime in - your source grid is very, very large indeed! ALthough >> I started with a very fine grid, at one point I also had to downside it >> (going to 5mm), and had to stop using interpolated source data for stats >> and the like. Johanna's suggestion will certainly do the trick and it will >> speed up your analysis enormously as well. You then only need to do >> interpolate for plotting purposes. >> >> all the best, >> Stephen >> >> >> On 8 October 2012 12:02, Johanna Zumer wrote: >> >>> Hi Akiko, >>> >>> In addition to Saskia's comment (which is very useful!) remember also >>> that if you create the subject's grid from the warped MNI template grid >>> (explained here >>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >>> then you can keep each subject's source data in a 'source' structure with >>> .pos field and still do group level statistics, without need to convert to >>> 'volume' structure which upsamples the spatial resolution perhaps >>> artificially too high. >>> >>> Cheers, >>> Johanna >>> >>> >>> 2012/10/7 Akiko Ikkai >>> >>>> Hi Saskia, >>>> >>>> Thank you for the quick advise! Removing cfg definitely works well. >>>> Each of the group data is now 1.3G (I also used "single" to convert >>>> everything into single precision), which is definitely manageable. >>>> Computation time has also been reduced to 3 times less now. >>>> >>>> Thanks! Akiko >>>> >>>> >>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens wrote: >>>> >>>>> Hi Akiko, >>>>> >>>>> In my experience with grandavg source structs, sometimes the cfg >>>>> (that's attached to the data struct) becomes very large and can >>>>> consume a considerable amount of memory. I'm not sure if that's the >>>>> case/problem here, but might be worth checking and removing the cfg. >>>>> You could even use checkconfig to cleanup your cfg with: >>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>>> Hope this helps! >>>>> >>>>> Best, >>>>> Saskia >>>>> >>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>>> wrote: >>>>> > Dear Fieldtrip users, >>>>> > >>>>> > I've been trying to run group stats on my EEG source data, which >>>>> contains 14 >>>>> > subjects' normalized beamformer data, and having serious swap memory >>>>> issue >>>>> > (not Matlab memory issue, but OS swap memory). >>>>> > >>>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>>> subject's >>>>> > normalized beamformer data (1 condition) is >>>>> > >>>>> > source_lTMI_intNorm = >>>>> > >>>>> > anatomy: [181x217x181 double] >>>>> > >>>>> > inside: [181x217x181 logical] >>>>> > >>>>> > avg: [1x1 struct] >>>>> > >>>>> > transform: [4x4 double] >>>>> > >>>>> > dim: [181 217 181] >>>>> > >>>>> > cfg: [1x1 struct] >>>>> > >>>>> > >>>>> >>whos >>>>> > >>>>> > >>>>> > >>>>> > Name Size Bytes Class >>>>> Attributes >>>>> > >>>>> > source_lTMI_intNorm 1x1 520114791 struct >>>>> > >>>>> > >>>>> > therefore, when I open all subjects' data ("data1group" and >>>>> "data2group"), >>>>> > it's huge... >>>>> > >>>>> > Name Size Bytes Class Attributes >>>>> > >>>>> > data1group 1x14 5909429438 cell >>>>> > >>>>> > data2group 1x14 6705652782 cell >>>>> > >>>>> > >>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>>> Therefore, >>>>> > >>>>> >>data1group{1} >>>>> > >>>>> > anatomy: [181x217x181 double] >>>>> > >>>>> > inside: [181x217x181 logical] >>>>> > >>>>> > avg: [1x1 struct] >>>>> > >>>>> > transform: [4x4 double] >>>>> > >>>>> > dim: [181 217 181] >>>>> > >>>>> > cfg: [1x1 struct] >>>>> > >>>>> > So, when I try to run >>>>> > >>>>> > cfg=[]; >>>>> > >>>>> > cfg.dim = data1group{1}.dim; >>>>> > >>>>> > cfg.method = 'montecarlo'; >>>>> > >>>>> > cfg.statistic = 'depsamplesT'; >>>>> > >>>>> > cfg.parameter = 'avg.pow'; >>>>> > >>>>> > cfg.correctm = 'cluster'; >>>>> > >>>>> > cfg.numrandomization = 100; >>>>> > >>>>> > cfg.alpha = 0.05; >>>>> > >>>>> > cfg.tail = 0; >>>>> > >>>>> > nsubj=length(data1group); >>>>> > >>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>>> > >>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>>> > >>>>> > cfg.uvar = 1; >>>>> > >>>>> > cfg.ivar = 2; >>>>> > >>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>>> > >>>>> > stat.anatomy = data1group{1}.anatomy; >>>>> > >>>>> > >>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>>> > memory?), which forces me to quit Matlab. I'm running above >>>>> processes in a >>>>> > function, so I'm not running into Matlab memory error. >>>>> > >>>>> > Could someone help me how it could run more efficiently? I guess >>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>>> > eventually load 2 group data in Matlab workspace...? >>>>> > >>>>> > Thank you in advance! Akiko >>>>> > >>>>> > -- >>>>> > Akiko Ikkai, Ph.D. >>>>> > Postdoctoral Fellow >>>>> > Department of Psychological and Brain Sciences >>>>> > Johns Hopkins University >>>>> > Ames Hall, 3400 N. Charles St. >>>>> > Baltimore, MD 21218 >>>>> > >>>>> > >>>>> > >>>>> > _______________________________________________ >>>>> > 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Akiko Ikkai, Ph.D. >>>> Postdoctoral Fellow >>>> Department of Psychological and Brain Sciences >>>> Johns Hopkins University >>>> Ames Hall, 3400 N. Charles St. >>>> Baltimore, MD 21218 >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Oct 20 14:32:16 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 20 Oct 2012 14:32:16 +0200 Subject: [FieldTrip] help with dipole position and orientation In-Reply-To: References: Message-ID: <722AE19C-4347-4804-A9AE-3443C7FBBD9B@donders.ru.nl> Hi Fred, > In a paper by Osipova et al. (2008) I read that the position can > be chosen based on the sensor array of a CTF system with respect > to head coordinates. > In this paper the dipole position was chose to be r = [-5 0 1] which > should correspond to a dipole close to the hemispheric midline and > in the occipital cortex. > > Can anyone tell me based on which data / how these coordinates were > chosen? I have been searching the grad structure of my data > for comparable info, but did not find anything. Neither did I looking > at cfg.layout.pos. Why would you want to look into the grad structure, or in the layout.pos? I guess the most straightforward would be to ask one of the authors of said paper why they chose the parameters. Very generally, I think that the coordinates were chosen based on knowledge with respect to the coordinate system. Indeed, the negative x-axis points to the back, and a y-coordinate of 0 represents the midline. > My second question concerns the dipole moment. > Am I right in assuming the following: > > cfg.dip.mom = [1 0 0] % dipole points towards NAS > cfg.dip.mpm = [-1 0 0] % dipole points away from NAS > > cfg.dip.mom = [0 1 0] % dipole points towards LPA > cfg.dip.mom = [0 -1 0]% dipole points towards RPA > > cfg.dip.mom = [0 0 1]% dipole points towards vertex > cfg.dip.mon = [0 0 -1]% dipole points away from vertex > Yes, that's correct. Best, Jan-Mathijs > Any help or suggestions would be highly appreciated. > > Best, > Fred > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Sat Oct 20 23:06:41 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Sat, 20 Oct 2012 23:06:41 +0200 (CEST) Subject: [FieldTrip] help with dipole position and orientation In-Reply-To: <722AE19C-4347-4804-A9AE-3443C7FBBD9B@donders.ru.nl> Message-ID: <2ebb2c59-67fe-4796-ba11-fc3ce3ed65e6@thalamus_p> Dear Jan-Mathijs, thank you for your response. Why would you want to look into the grad structure, or in the layout.pos? As I wrote in my question: In a paper by Osipova et al. (2008) I read that the position can be chosen based on the sensor array of a CTF system with respect to head coordinates. I thought that I could get some info out of grad.pos or cfg.layout.pos that would correspond to the head position with respect to the sensor array. I just don't know any better where to find / access these data. I think that the coordinates were chosen based on knowledge with respect to the coordinate system. Indeed, the negative x-axis points to the back, and a y-coordinate of 0 represents the midline. Great, but which coordinate system is it? And where in my data can I find similar information? Best Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Sun Oct 21 17:32:37 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Sun, 21 Oct 2012 17:32:37 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, Can you type 'dbstop if error' before running the last step, so that it goes to debug mode when it crashes there? What are the sizes of 'filt' and 'Cf' for the 40th position? Another thing to try is, during your last call to ft_sourceanalysis, cfg = []; cfg.grid = grid; cfg.grid.filter = source_common.avg.filter; so that all the .inside and .outside information is transfered as well. A note to all users: you can skip the first step by loading the precomuted template grids in */fieldtrip/template/sourcemodel. Cheers, Johanna 2012/10/20 Akiko Ikkai : > Hi, > > So I have followed Johanna and Stephan's advise to create template_grid and > each subject's grid from MNI image, which is now 1cm spacing instead of > .5cm. These steps seem to run, and I'm able to create a common spatial > filter to run beamformer using DICS. However, I get an error when I apply > the commom filter to each condition. > > I had to tweak a few things on example on the page > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > , since my data is EEG and electrode locations vary between subjects, such > that: > > cfg = []; > cfg.grid.xgrid = -20:1:20; > cfg.grid.ygrid = -20:1:20; > cfg.grid.zgrid = -20:1:20; > cfg.grid.tight = 'yes'; > cfg.inwardshift = -1.5; > cfg.vol = template_vol; > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add > this (got error otherwise) > template_grid = ft_prepare_sourcemodel(cfg); > > then > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.mri = mri_aligned; > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to add > this (got error otherwise) > grid = ft_prepare_sourcemodel(cfg); > > These create grids in MNI space, both for template and individual fine. To > create a common spatial filter, I run the following command, which runs: > cfg = []; > cfg.grid.pos = grid.pos; > cfg.grid.dim = grid.dim; > cfg.grid.inside = grid.inside; > cfg.grid.outside = grid.outside; > cfg.inwardshift = -1.5; > cfg.vol = vol_cm; > cfg.channel = {'all'}; > cfg.frequency = 10.5; > cfg.method = 'dics'; > cfg.dics.projectnoise = 'yes'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.feedback = 'no'; > source_common = ft_sourceanalysis(cfg, freq_common); > > however, when I apply this spatial filter to a task condition, I get an > error message > cfg = []; > cfg.elec = freq_common.elec; > cfg.grid.pos = source_common.pos; > cfg.grid.filter = source_common.avg.filter; > cfg.inwardshift = -1.5; > cfg.vol = vol_cm; > cfg.channel = {'all'}; > cfg.frequency = 10.5; > cfg.method = 'dics'; > cfg.dics.projectnoise = 'yes'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.feedback = 'no'; > source_itemL = ft_sourceanalysis(cfg, freq_itemL); > source_itemL.unit = 'cm'; > > ??? Error using ==> mtimes > Inner matrix dimensions must agree. > > Error in ==> beamformer_dics at 316 > csd = filt * Cf * ctranspose(filt); % Gross > eqn. 4 > and 5 > > Error in ==> ft_sourceanalysis at 588 > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:}); > > The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot > where exactly the error is originating from. Am I missing some steps when I > create template grids that I feed into ft_sourceanalysis? > > Thank you in advance for your help! Akiko > > > On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai wrote: >> >> Hi Everyone, >> >> Thank you very much for your advise. I just came back from SfN, and just >> found your replies, so I will test these options and report back what I >> find. >> >> Thank you again! Akiko >> >> >> On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh >> wrote: >>> >>> Hi Akiko! >>> >>> Just to chime in - your source grid is very, very large indeed! ALthough >>> I started with a very fine grid, at one point I also had to downside it >>> (going to 5mm), and had to stop using interpolated source data for stats and >>> the like. Johanna's suggestion will certainly do the trick and it will speed >>> up your analysis enormously as well. You then only need to do interpolate >>> for plotting purposes. >>> >>> all the best, >>> Stephen >>> >>> >>> On 8 October 2012 12:02, Johanna Zumer >>> wrote: >>>> >>>> Hi Akiko, >>>> >>>> In addition to Saskia's comment (which is very useful!) remember also >>>> that if you create the subject's grid from the warped MNI template grid >>>> (explained here >>>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid) >>>> then you can keep each subject's source data in a 'source' structure with >>>> .pos field and still do group level statistics, without need to convert to >>>> 'volume' structure which upsamples the spatial resolution perhaps >>>> artificially too high. >>>> >>>> Cheers, >>>> Johanna >>>> >>>> >>>> 2012/10/7 Akiko Ikkai >>>>> >>>>> Hi Saskia, >>>>> >>>>> Thank you for the quick advise! Removing cfg definitely works well. >>>>> Each of the group data is now 1.3G (I also used "single" to convert >>>>> everything into single precision), which is definitely manageable. >>>>> Computation time has also been reduced to 3 times less now. >>>>> >>>>> Thanks! Akiko >>>>> >>>>> >>>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens >>>>> wrote: >>>>>> >>>>>> Hi Akiko, >>>>>> >>>>>> In my experience with grandavg source structs, sometimes the cfg >>>>>> (that's attached to the data struct) becomes very large and can >>>>>> consume a considerable amount of memory. I'm not sure if that's the >>>>>> case/problem here, but might be worth checking and removing the cfg. >>>>>> You could even use checkconfig to cleanup your cfg with: >>>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') >>>>>> Hope this helps! >>>>>> >>>>>> Best, >>>>>> Saskia >>>>>> >>>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai >>>>>> wrote: >>>>>> > Dear Fieldtrip users, >>>>>> > >>>>>> > I've been trying to run group stats on my EEG source data, which >>>>>> > contains 14 >>>>>> > subjects' normalized beamformer data, and having serious swap memory >>>>>> > issue >>>>>> > (not Matlab memory issue, but OS swap memory). >>>>>> > >>>>>> > I'm trying to contrast 2 conditions (within subject design). Each >>>>>> > subject's >>>>>> > normalized beamformer data (1 condition) is >>>>>> > >>>>>> > source_lTMI_intNorm = >>>>>> > >>>>>> > anatomy: [181x217x181 double] >>>>>> > >>>>>> > inside: [181x217x181 logical] >>>>>> > >>>>>> > avg: [1x1 struct] >>>>>> > >>>>>> > transform: [4x4 double] >>>>>> > >>>>>> > dim: [181 217 181] >>>>>> > >>>>>> > cfg: [1x1 struct] >>>>>> > >>>>>> > >>>>>> >>whos >>>>>> > >>>>>> > >>>>>> > >>>>>> > Name Size Bytes Class >>>>>> > Attributes >>>>>> > >>>>>> > source_lTMI_intNorm 1x1 520114791 struct >>>>>> > >>>>>> > >>>>>> > therefore, when I open all subjects' data ("data1group" and >>>>>> > "data2group"), >>>>>> > it's huge... >>>>>> > >>>>>> > Name Size Bytes Class Attributes >>>>>> > >>>>>> > data1group 1x14 5909429438 cell >>>>>> > >>>>>> > data2group 1x14 6705652782 cell >>>>>> > >>>>>> > >>>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). >>>>>> > Therefore, >>>>>> > >>>>>> >>data1group{1} >>>>>> > >>>>>> > anatomy: [181x217x181 double] >>>>>> > >>>>>> > inside: [181x217x181 logical] >>>>>> > >>>>>> > avg: [1x1 struct] >>>>>> > >>>>>> > transform: [4x4 double] >>>>>> > >>>>>> > dim: [181 217 181] >>>>>> > >>>>>> > cfg: [1x1 struct] >>>>>> > >>>>>> > So, when I try to run >>>>>> > >>>>>> > cfg=[]; >>>>>> > >>>>>> > cfg.dim = data1group{1}.dim; >>>>>> > >>>>>> > cfg.method = 'montecarlo'; >>>>>> > >>>>>> > cfg.statistic = 'depsamplesT'; >>>>>> > >>>>>> > cfg.parameter = 'avg.pow'; >>>>>> > >>>>>> > cfg.correctm = 'cluster'; >>>>>> > >>>>>> > cfg.numrandomization = 100; >>>>>> > >>>>>> > cfg.alpha = 0.05; >>>>>> > >>>>>> > cfg.tail = 0; >>>>>> > >>>>>> > nsubj=length(data1group); >>>>>> > >>>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>>>> > >>>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>>>> > >>>>>> > cfg.uvar = 1; >>>>>> > >>>>>> > cfg.ivar = 2; >>>>>> > >>>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); >>>>>> > >>>>>> > stat.anatomy = data1group{1}.anatomy; >>>>>> > >>>>>> > >>>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory (startup >>>>>> > memory?), which forces me to quit Matlab. I'm running above >>>>>> > processes in a >>>>>> > function, so I'm not running into Matlab memory error. >>>>>> > >>>>>> > Could someone help me how it could run more efficiently? I guess >>>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have to >>>>>> > eventually load 2 group data in Matlab workspace...? >>>>>> > >>>>>> > Thank you in advance! Akiko >>>>>> > >>>>>> > -- >>>>>> > Akiko Ikkai, Ph.D. >>>>>> > Postdoctoral Fellow >>>>>> > Department of Psychological and Brain Sciences >>>>>> > Johns Hopkins University >>>>>> > Ames Hall, 3400 N. Charles St. >>>>>> > Baltimore, MD 21218 >>>>>> > >>>>>> > >>>>>> > >>>>>> > _______________________________________________ >>>>>> > 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 >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Akiko Ikkai, Ph.D. >>>>> Postdoctoral Fellow >>>>> Department of Psychological and Brain Sciences >>>>> Johns Hopkins University >>>>> Ames Hall, 3400 N. Charles St. >>>>> Baltimore, MD 21218 >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> >> >> -- >> Akiko Ikkai, Ph.D. >> Postdoctoral Fellow >> Department of Psychological and Brain Sciences >> Johns Hopkins University >> Ames Hall, 3400 N. Charles St. >> Baltimore, MD 21218 >> >> > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Maximilian.Bruchmann at uni-muenster.de Mon Oct 22 16:19:33 2012 From: Maximilian.Bruchmann at uni-muenster.de (Maximilian Bruchmann) Date: Mon, 22 Oct 2012 16:19:33 +0200 Subject: [FieldTrip] Problem with visualizing individual minimum source activity (ft_plot_mesh, ft_sourcemovie, ft_sourceplot) In-Reply-To: References: Message-ID: Dear all, I found the error in my code and I like to describe it in case someone else makes the same mistake: First of all, ft_plot_mesh and ft_sourcemovie are perfectly fine, and so is the minimum norm tutorial, as far as I can tell. My error was that I misinterpreted a part of the help section of ft_sourceanalysis, where it says: % Besides the source positions, you may also include previously computed % spatial filters and/or leadfields like this % cfg.grid.filter % cfg.grid.leadfield so I wrote cfg.grid.leadfield = leadfield; This is wrong. It has to be: cfg.grid = leadfield; just as described in the tutorial. Sorry for the false alarm! Best, Max Am 18.10.2012 um 15:55 schrieb Maximilian Bruchmann : > Dear FieldTrippers, > > there used to be a very convenient way to get a look at individual mne source reconstructions using either ft_plot_mesh or ft_sourcemovie, but both no longer seem to work. When I follow the minimum norm estimate tutorial up to the point of visualization the code that worked fine some weeks ago now produces the following errors: > > cfg=[]; > cfg.method = 'mne'; > cfg.grid.leadfield = leadfield; > cfg.vol = vol; > cfg.mne.lambda = 1e11; > myMne = ft_sourceanalysis(cfg,timeLock); > > bnd.pnt = sourcespace.pnt; > bnd.tri = sourcespace.tri; > m=myMne.avg.pow(:,450); > ft_plot_mesh(bnd, 'vertexcolor', m); > > produces the error: > Error using ft_plot_mesh (line 191) > Unknown color > > As it seems, 'vertexcolor' accepts only a single RGB triplet. In fact, none of the options of ft_plot_mesh seems to support the visualization of functional data anymore, am I right? > > The other way using ft_sourcemovie used to work fine like this: > > > figure > myMne.tri = sourcespace.tri; > cfg = []; > cfg.alim = [0 8e-14]; > cfg.zlim = [0 4e-13]; > cfg.maskparameter = 'avg.pow'; > ft_sourcemovie(cfg,myMne); > > > But now it produces the warning > Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering > and I get an empty figure window. > > I tried ft_sourceplot: > > cfg = []; > cfg.method = 'surface'; > cfg.funparameter = 'avg.pow'; > ft_sourceplot(cfg,myMne); > > but irrespective of the method I get > Error using ft_sourceplot (line 188) > the input data needs to be defined on a regular 3D grid > > Any help on how I can view my source reconstruction results as a colored source space model would be very appreciated! > Thanks in advance! > Best, > Max > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _____________________________________________________________ Dr. phil. Maximilian Bruchmann, Dipl. Psych. Institut für Biomagnetismus und Biosignalanalyse Universitätsklinikum Münster Adresse: Malmedyweg 15 48149 Münster Telefon: +49-(0)251-83-52547 E-Mail: Maximilian.Bruchmann at uni-muenster.de Internet: http://biomag.uni-muenster.de _____________________________________________________________ From akiko.ikkai at gmail.com Mon Oct 22 19:37:59 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Mon, 22 Oct 2012 13:37:59 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Johanna, you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis for each condition runs to the completion :) However, since my data is EEG and the electrode locations vary (hence the grid coordinates vary) between subjects, running stats across subjects without normalizing might be causing a problem. For example, the first 3 points in subject1's .pos are (after creating template grid etc.., and run ft_sourceanalysis using MNI grid): d1group{1}.pos(1:3,:) ans = -8.7000 -7.5000 -7.6000 -7.7000 -7.5000 -7.6000 -6.7000 -7.5000 -7.6000 and the same points for the subject2's are: d1group{2}.pos(1:3,:) ans = -8.3000 -7.6000 -8.2000 -7.3000 -7.6000 -8.2000 -6.3000 -7.6000 -8.2000 So when I try to run ft_sourcestatistics. I get an error message: ??? Error using ==> statistics_wrapper at 109 grid locations of the source reconstructions do not match, use NORMALISEVOLUME first Error in ==> ft_sourcestatistics at 100 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Perhaps I should interpolate and normalize each subject, and run group stats afterall? Thanks! Akiko On Sun, Oct 21, 2012 at 11:32 AM, Johanna Zumer wrote: > Hi Akiko, > > Can you type 'dbstop if error' before running the last step, so that > it goes to debug mode when it crashes there? What are the sizes of > 'filt' and 'Cf' for the 40th position? > > Another thing to try is, during your last call to ft_sourceanalysis, > cfg = []; > cfg.grid = grid; > cfg.grid.filter = source_common.avg.filter; > > so that all the .inside and .outside information is transfered as well. > > A note to all users: you can skip the first step by loading the > precomuted template grids in */fieldtrip/template/sourcemodel. > > Cheers, > Johanna > > > 2012/10/20 Akiko Ikkai : > > Hi, > > > > So I have followed Johanna and Stephan's advise to create template_grid > and > > each subject's grid from MNI image, which is now 1cm spacing instead of > > .5cm. These steps seem to run, and I'm able to create a common spatial > > filter to run beamformer using DICS. However, I get an error when I apply > > the commom filter to each condition. > > > > I had to tweak a few things on example on the page > > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > > , since my data is EEG and electrode locations vary between subjects, > such > > that: > > > > cfg = []; > > cfg.grid.xgrid = -20:1:20; > > cfg.grid.ygrid = -20:1:20; > > cfg.grid.zgrid = -20:1:20; > > cfg.grid.tight = 'yes'; > > cfg.inwardshift = -1.5; > > cfg.vol = template_vol; > > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to > add > > this (got error otherwise) > > template_grid = ft_prepare_sourcemodel(cfg); > > > > then > > cfg = []; > > cfg.grid.warpmni = 'yes'; > > cfg.grid.template = template_grid; > > cfg.grid.nonlinear = 'yes'; > > cfg.mri = mri_aligned; > > cfg.elec = ft_data.elec; % individual sub's electrode locations: had to > add > > this (got error otherwise) > > grid = ft_prepare_sourcemodel(cfg); > > > > These create grids in MNI space, both for template and individual fine. > To > > create a common spatial filter, I run the following command, which runs: > > cfg = []; > > cfg.grid.pos = grid.pos; > > cfg.grid.dim = grid.dim; > > cfg.grid.inside = grid.inside; > > cfg.grid.outside = grid.outside; > > cfg.inwardshift = -1.5; > > cfg.vol = vol_cm; > > cfg.channel = {'all'}; > > cfg.frequency = 10.5; > > cfg.method = 'dics'; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.feedback = 'no'; > > source_common = ft_sourceanalysis(cfg, freq_common); > > > > however, when I apply this spatial filter to a task condition, I get an > > error message > > cfg = []; > > cfg.elec = freq_common.elec; > > cfg.grid.pos = source_common.pos; > > cfg.grid.filter = source_common.avg.filter; > > cfg.inwardshift = -1.5; > > cfg.vol = vol_cm; > > cfg.channel = {'all'}; > > cfg.frequency = 10.5; > > cfg.method = 'dics'; > > cfg.dics.projectnoise = 'yes'; > > cfg.dics.keepfilter = 'yes'; > > cfg.dics.feedback = 'no'; > > source_itemL = ft_sourceanalysis(cfg, freq_itemL); > > source_itemL.unit = 'cm'; > > > > ??? Error using ==> mtimes > > Inner matrix dimensions must agree. > > > > Error in ==> beamformer_dics at 316 > > csd = filt * Cf * ctranspose(filt); % Gross > > eqn. 4 > > and 5 > > > > Error in ==> ft_sourceanalysis at 588 > > dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > > optarg{:}); > > > > The error occurs when dip.pos = 40 (i.e. it runs fine 1-39). I can't spot > > where exactly the error is originating from. Am I missing some steps > when I > > create template grids that I feed into ft_sourceanalysis? > > > > Thank you in advance for your help! Akiko > > > > > > On Thu, Oct 18, 2012 at 4:29 PM, Akiko Ikkai > wrote: > >> > >> Hi Everyone, > >> > >> Thank you very much for your advise. I just came back from SfN, and just > >> found your replies, so I will test these options and report back what I > >> find. > >> > >> Thank you again! Akiko > >> > >> > >> On Mon, Oct 8, 2012 at 6:14 AM, Stephen Whitmarsh > >> wrote: > >>> > >>> Hi Akiko! > >>> > >>> Just to chime in - your source grid is very, very large indeed! > ALthough > >>> I started with a very fine grid, at one point I also had to downside it > >>> (going to 5mm), and had to stop using interpolated source data for > stats and > >>> the like. Johanna's suggestion will certainly do the trick and it will > speed > >>> up your analysis enormously as well. You then only need to do > interpolate > >>> for plotting purposes. > >>> > >>> all the best, > >>> Stephen > >>> > >>> > >>> On 8 October 2012 12:02, Johanna Zumer > >>> wrote: > >>>> > >>>> Hi Akiko, > >>>> > >>>> In addition to Saskia's comment (which is very useful!) remember also > >>>> that if you create the subject's grid from the warped MNI template > grid > >>>> (explained here > >>>> > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=template&s[]=grid > ) > >>>> then you can keep each subject's source data in a 'source' structure > with > >>>> .pos field and still do group level statistics, without need to > convert to > >>>> 'volume' structure which upsamples the spatial resolution perhaps > >>>> artificially too high. > >>>> > >>>> Cheers, > >>>> Johanna > >>>> > >>>> > >>>> 2012/10/7 Akiko Ikkai > >>>>> > >>>>> Hi Saskia, > >>>>> > >>>>> Thank you for the quick advise! Removing cfg definitely works well. > >>>>> Each of the group data is now 1.3G (I also used "single" to convert > >>>>> everything into single precision), which is definitely manageable. > >>>>> Computation time has also been reduced to 3 times less now. > >>>>> > >>>>> Thanks! Akiko > >>>>> > >>>>> > >>>>> On Sun, Oct 7, 2012 at 2:16 PM, Saskia Haegens > >>>>> wrote: > >>>>>> > >>>>>> Hi Akiko, > >>>>>> > >>>>>> In my experience with grandavg source structs, sometimes the cfg > >>>>>> (that's attached to the data struct) becomes very large and can > >>>>>> consume a considerable amount of memory. I'm not sure if that's the > >>>>>> case/problem here, but might be worth checking and removing the cfg. > >>>>>> You could even use checkconfig to cleanup your cfg with: > >>>>>> data.cfg = ft_checkconfig(data.cfg, 'checksize', 'yes') > >>>>>> Hope this helps! > >>>>>> > >>>>>> Best, > >>>>>> Saskia > >>>>>> > >>>>>> On Sun, Oct 7, 2012 at 11:36 AM, Akiko Ikkai > > >>>>>> wrote: > >>>>>> > Dear Fieldtrip users, > >>>>>> > > >>>>>> > I've been trying to run group stats on my EEG source data, which > >>>>>> > contains 14 > >>>>>> > subjects' normalized beamformer data, and having serious swap > memory > >>>>>> > issue > >>>>>> > (not Matlab memory issue, but OS swap memory). > >>>>>> > > >>>>>> > I'm trying to contrast 2 conditions (within subject design). Each > >>>>>> > subject's > >>>>>> > normalized beamformer data (1 condition) is > >>>>>> > > >>>>>> > source_lTMI_intNorm = > >>>>>> > > >>>>>> > anatomy: [181x217x181 double] > >>>>>> > > >>>>>> > inside: [181x217x181 logical] > >>>>>> > > >>>>>> > avg: [1x1 struct] > >>>>>> > > >>>>>> > transform: [4x4 double] > >>>>>> > > >>>>>> > dim: [181 217 181] > >>>>>> > > >>>>>> > cfg: [1x1 struct] > >>>>>> > > >>>>>> > > >>>>>> >>whos > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > Name Size Bytes Class > >>>>>> > Attributes > >>>>>> > > >>>>>> > source_lTMI_intNorm 1x1 520114791 struct > >>>>>> > > >>>>>> > > >>>>>> > therefore, when I open all subjects' data ("data1group" and > >>>>>> > "data2group"), > >>>>>> > it's huge... > >>>>>> > > >>>>>> > Name Size Bytes Class Attributes > >>>>>> > > >>>>>> > data1group 1x14 5909429438 cell > >>>>>> > > >>>>>> > data2group 1x14 6705652782 cell > >>>>>> > > >>>>>> > > >>>>>> > data1group & data2group are both 1x14 struct (1 cell/subject). > >>>>>> > Therefore, > >>>>>> > > >>>>>> >>data1group{1} > >>>>>> > > >>>>>> > anatomy: [181x217x181 double] > >>>>>> > > >>>>>> > inside: [181x217x181 logical] > >>>>>> > > >>>>>> > avg: [1x1 struct] > >>>>>> > > >>>>>> > transform: [4x4 double] > >>>>>> > > >>>>>> > dim: [181 217 181] > >>>>>> > > >>>>>> > cfg: [1x1 struct] > >>>>>> > > >>>>>> > So, when I try to run > >>>>>> > > >>>>>> > cfg=[]; > >>>>>> > > >>>>>> > cfg.dim = data1group{1}.dim; > >>>>>> > > >>>>>> > cfg.method = 'montecarlo'; > >>>>>> > > >>>>>> > cfg.statistic = 'depsamplesT'; > >>>>>> > > >>>>>> > cfg.parameter = 'avg.pow'; > >>>>>> > > >>>>>> > cfg.correctm = 'cluster'; > >>>>>> > > >>>>>> > cfg.numrandomization = 100; > >>>>>> > > >>>>>> > cfg.alpha = 0.05; > >>>>>> > > >>>>>> > cfg.tail = 0; > >>>>>> > > >>>>>> > nsubj=length(data1group); > >>>>>> > > >>>>>> > cfg.design(1,:) = [1:nsubj 1:nsubj]; > >>>>>> > > >>>>>> > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > >>>>>> > > >>>>>> > cfg.uvar = 1; > >>>>>> > > >>>>>> > cfg.ivar = 2; > >>>>>> > > >>>>>> > stat = ft_sourcestatistics(cfg, data1group{:}, data2group{:}); > >>>>>> > > >>>>>> > stat.anatomy = data1group{1}.anatomy; > >>>>>> > > >>>>>> > > >>>>>> > my computer (os 10.6.8, 6G memory) runs out of swap memory > (startup > >>>>>> > memory?), which forces me to quit Matlab. I'm running above > >>>>>> > processes in a > >>>>>> > function, so I'm not running into Matlab memory error. > >>>>>> > > >>>>>> > Could someone help me how it could run more efficiently? I guess > >>>>>> > cfg.inputfile is not available for ft_sourcestatistics, so I have > to > >>>>>> > eventually load 2 group data in Matlab workspace...? > >>>>>> > > >>>>>> > Thank you in advance! Akiko > >>>>>> > > >>>>>> > -- > >>>>>> > Akiko Ikkai, Ph.D. > >>>>>> > Postdoctoral Fellow > >>>>>> > Department of Psychological and Brain Sciences > >>>>>> > Johns Hopkins University > >>>>>> > Ames Hall, 3400 N. Charles St. > >>>>>> > Baltimore, MD 21218 > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > _______________________________________________ > >>>>>> > 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 > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Akiko Ikkai, Ph.D. > >>>>> Postdoctoral Fellow > >>>>> Department of Psychological and Brain Sciences > >>>>> Johns Hopkins University > >>>>> Ames Hall, 3400 N. Charles St. > >>>>> Baltimore, MD 21218 > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> 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 > >> > >> > >> > >> > >> -- > >> Akiko Ikkai, Ph.D. > >> Postdoctoral Fellow > >> Department of Psychological and Brain Sciences > >> Johns Hopkins University > >> Ames Hall, 3400 N. Charles St. > >> Baltimore, MD 21218 > >> > >> > > > > > > > > -- > > Akiko Ikkai, Ph.D. > > Postdoctoral Fellow > > Department of Psychological and Brain Sciences > > Johns Hopkins University > > Ames Hall, 3400 N. Charles St. > > Baltimore, MD 21218 > > > > > > > > _______________________________________________ > > 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Mon Oct 22 22:43:19 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 22 Oct 2012 20:43:19 +0000 Subject: [FieldTrip] Post Doc Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816F9E998@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to a research associate (Post Doc) job opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Research Associate (Post Doc)- Ref: 1288813 Closing Date: 22/11/2012 A research associate (Post Doc) position (starting salary £32,055 per annum Inclusive if London allowance) is available to work on a BBSRC funded project that will use psychophysics, eye tracking and MEG functional brain imaging to investigate the neural systems that support listeners ability to detect changes in acoustic scenes. You will be supervised by Dr Maria Chait. The post holder will be based at UCL Ear Institute and MEG scanning will be carried out at UCL's Wellcome Trust Centre for Neuroimaging. Initial funding for this post is available for 36 months. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. The Wellcome Trust Centre for Neuroimaging is a leading centre for brain imaging, bringing together clinicians and scientists who study higher cognitive function using neuroimaging techniques. Key Requirements Applicants should hold a PhD degree (or equivalent) in an engineering or Neuroscience-related subject and have substantial experience in digital signal processing and computer programming. Previous experience with auditory research and/or functional brain imaging is desirable. Further Details You should apply for this post (Ref #: 1288813) through UCL's online recruitment website, www.ucl.ac.uk/hr/jobs, where you can download a job description and person specifications. For an informal discussion please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue Oct 23 09:08:18 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 23 Oct 2012 09:08:18 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Akiko, The .pos entries are (as expected) different for every subject due to the different coregistration of that subject to the standard MNI. However, the grid positions all originate from the same original MNI-based positions, and are in the same order. Thus, d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so forth. You can substitue d1group{n}.pos=template_grid.pos for all subjects, and then call the stats function, and the results are now in the MNI template grid space. Cheers, Johanna 2012/10/22 Akiko Ikkai : > Hi Johanna, > > you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis > for each condition runs to the completion :) > > However, since my data is EEG and the electrode locations vary (hence the > grid coordinates vary) between subjects, running stats across subjects > without normalizing might be causing a problem. For example, the first 3 > points in subject1's .pos are (after creating template grid etc.., and run > ft_sourceanalysis using MNI grid): > > d1group{1}.pos(1:3,:) > ans = > -8.7000 -7.5000 -7.6000 > -7.7000 -7.5000 -7.6000 > -6.7000 -7.5000 -7.6000 > > and the same points for the subject2's are: > > d1group{2}.pos(1:3,:) > ans = > -8.3000 -7.6000 -8.2000 > -7.3000 -7.6000 -8.2000 > -6.3000 -7.6000 -8.2000 > > So when I try to run ft_sourcestatistics. I get an error message: > ??? Error using ==> statistics_wrapper at 109 > grid locations of the source reconstructions do not match, use > NORMALISEVOLUME > first > > Error in ==> ft_sourcestatistics at 100 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > Perhaps I should interpolate and normalize each subject, and run group stats > afterall? > > Thanks! Akiko > From stephen.whitmarsh at gmail.com Tue Oct 23 10:06:49 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 23 Oct 2012 10:06:49 +0200 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: yes, that's the beauty of it! On 23 October 2012 09:08, Johanna Zumer wrote: > Hi Akiko, > > The .pos entries are (as expected) different for every subject due to > the different coregistration of that subject to the standard MNI. > However, the grid positions all originate from the same original > MNI-based positions, and are in the same order. Thus, > d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so > forth. You can substitue d1group{n}.pos=template_grid.pos for all > subjects, and then call the stats function, and the results are now in > the MNI template grid space. > > Cheers, > Johanna > > 2012/10/22 Akiko Ikkai : > > Hi Johanna, > > > > you are right! specifying cfg.grid = grid; was the key; ft_sourceanalysis > > for each condition runs to the completion :) > > > > However, since my data is EEG and the electrode locations vary (hence the > > grid coordinates vary) between subjects, running stats across subjects > > without normalizing might be causing a problem. For example, the first 3 > > points in subject1's .pos are (after creating template grid etc.., and > run > > ft_sourceanalysis using MNI grid): > > > > d1group{1}.pos(1:3,:) > > ans = > > -8.7000 -7.5000 -7.6000 > > -7.7000 -7.5000 -7.6000 > > -6.7000 -7.5000 -7.6000 > > > > and the same points for the subject2's are: > > > > d1group{2}.pos(1:3,:) > > ans = > > -8.3000 -7.6000 -8.2000 > > -7.3000 -7.6000 -8.2000 > > -6.3000 -7.6000 -8.2000 > > > > So when I try to run ft_sourcestatistics. I get an error message: > > ??? Error using ==> statistics_wrapper at 109 > > grid locations of the source reconstructions do not match, use > > NORMALISEVOLUME > > first > > > > Error in ==> ft_sourcestatistics at 100 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > Perhaps I should interpolate and normalize each subject, and run group > stats > > afterall? > > > > Thanks! Akiko > > > _______________________________________________ > 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 hjpark05 at snu.ac.kr Tue Oct 23 16:06:10 2012 From: hjpark05 at snu.ac.kr (Hyojin Park) Date: Tue, 23 Oct 2012 23:06:10 +0900 Subject: [FieldTrip] lambda regularization using Neuromag data Message-ID: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> Dear all, I'm working on LCMV beamforming using Neuromag data applied with Maxfilter. I am using 204 gradiometer sensors. I have rank deficiency problem, maybe because of Maxfilter since it reduces the rank. When I checked the data, the rank is 60. I removed EOG and ECG components using ICA. 2 or 3 components in sum in most subjects. So for some, the rank is 58, for some, it's 57. When I tested with different lambda from 0% to 10%, (or above, even 100%), I got the same warning ('covariance matrix is rank deficient'). Does anyone have suggestions for which lambda is most appropriate in this case? Or any other useful advice/experience for how to apply beamforming in combination with Maxfilter? Thank you in advance. Hyojin Park -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue Oct 23 17:17:58 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 23 Oct 2012 17:17:58 +0200 Subject: [FieldTrip] lambda regularization using Neuromag data In-Reply-To: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> References: <016401cdb127$8e63f9d0$ab2bed70$@snu.ac.kr> Message-ID: Dear Hyojin, If you look inside beamformer_lcmv.m, you will see that the warning you mention gets generated before the lambda regularization is applied (i.e. the warning applies to your input rank 57 covariance matrix, not the matrix that actually is inverted to generate InvCy which takes the lambda into account). Maybe someone else with experience with Maxfilter Neuromag data can comment as to what level of lambda is appropriate. But I would suggest looking at your results from lambda at around 10% and see if they are reasonable. At the extreme, the 100% lambda case should look similar to a min-norm result. Cheers, Johanna 2012/10/23 Hyojin Park : > Dear all, > > > > I’m working on LCMV beamforming using Neuromag data applied with Maxfilter. > > I am using 204 gradiometer sensors. > > > > I have rank deficiency problem, maybe because of Maxfilter since it reduces > the rank. > > When I checked the data, the rank is 60. > > I removed EOG and ECG components using ICA. > > 2 or 3 components in sum in most subjects. > > So for some, the rank is 58, for some, it’s 57… > > > > When I tested with different lambda from 0% to 10%, (or above, even 100%), I > got the same warning ('covariance matrix is rank deficient'). > > > > Does anyone have suggestions for which lambda is most appropriate in this > case? Or any other useful advice/experience for how to apply beamforming in > combination with Maxfilter? > > > > Thank you in advance. > > Hyojin Park > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From akiko.ikkai at gmail.com Wed Oct 24 00:04:43 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Tue, 23 Oct 2012 18:04:43 -0400 Subject: [FieldTrip] ft_sourcestatistics startup memory problem In-Reply-To: References: Message-ID: Hi Johanna & Stephen It turned out ft_prepare_sourcemodel in the version I was using (20120103) did not have cfg.grid.template options, so I was never using "template_grid" to create "grid" in MNI space for each subject. I downloaded the latest version, ran as you suggested... and victory! Thank you for your patience. The results look great :) Akiko On Tue, Oct 23, 2012 at 4:06 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > yes, that's the beauty of it! > > > On 23 October 2012 09:08, Johanna Zumer wrote: > >> Hi Akiko, >> >> The .pos entries are (as expected) different for every subject due to >> the different coregistration of that subject to the standard MNI. >> However, the grid positions all originate from the same original >> MNI-based positions, and are in the same order. Thus, >> d1group{1}.pos(1,:) corresponds to the template_grid.pos(1,:) and so >> forth. You can substitue d1group{n}.pos=template_grid.pos for all >> subjects, and then call the stats function, and the results are now in >> the MNI template grid space. >> >> Cheers, >> Johanna >> >> 2012/10/22 Akiko Ikkai : >> > Hi Johanna, >> > >> > you are right! specifying cfg.grid = grid; was the key; >> ft_sourceanalysis >> > for each condition runs to the completion :) >> > >> > However, since my data is EEG and the electrode locations vary (hence >> the >> > grid coordinates vary) between subjects, running stats across subjects >> > without normalizing might be causing a problem. For example, the first 3 >> > points in subject1's .pos are (after creating template grid etc.., and >> run >> > ft_sourceanalysis using MNI grid): >> > >> > d1group{1}.pos(1:3,:) >> > ans = >> > -8.7000 -7.5000 -7.6000 >> > -7.7000 -7.5000 -7.6000 >> > -6.7000 -7.5000 -7.6000 >> > >> > and the same points for the subject2's are: >> > >> > d1group{2}.pos(1:3,:) >> > ans = >> > -8.3000 -7.6000 -8.2000 >> > -7.3000 -7.6000 -8.2000 >> > -6.3000 -7.6000 -8.2000 >> > >> > So when I try to run ft_sourcestatistics. I get an error message: >> > ??? Error using ==> statistics_wrapper at 109 >> > grid locations of the source reconstructions do not match, use >> > NORMALISEVOLUME >> > first >> > >> > Error in ==> ft_sourcestatistics at 100 >> > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> > >> > Perhaps I should interpolate and normalize each subject, and run group >> stats >> > afterall? >> > >> > Thanks! Akiko >> > >> _______________________________________________ >> 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 > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Oct 25 18:00:13 2012 From: lihqih at gmail.com (qi li) Date: Thu, 25 Oct 2012 12:00:13 -0400 Subject: [FieldTrip] co registration of the mesh points to the atlas Message-ID: Hi, Is there any function to co-register the individual cortical mesh points(8196 in total) generate by fieldtrip to the standard brain. Thanks! Qi From mcgoiv0 at wfu.edu Thu Oct 25 20:33:57 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Thu, 25 Oct 2012 14:33:57 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis Message-ID: Hello, I would like to know if Signal Space Separation method for MEG data analysis is available in the FieldTrip toolbox. Thanks, -- Inna -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.N.Vardy at tudelft.nl Thu Oct 25 22:40:17 2012 From: A.N.Vardy at tudelft.nl (Alistair Vardy - 3ME) Date: Thu, 25 Oct 2012 20:40:17 +0000 Subject: [FieldTrip] LCMV beamformer source reconstruction Message-ID: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> Hi all, I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source. The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom: sourceDiff = dim: [17 13 14] time: [1x819 double] pos: [3094x3 double] inside: [1x1567 double] outside: [1x1527 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] sourceDiff.avg ans = pow: [1x3094 double] mom: {1x3094 cell} noise: [1x3094 double] filter: {1x3094 cell} The moment entries are sized 3 x 819, the filter 3 x 65. I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below. Kind regards, Alistair channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; cfg1 = []; cfg1.keeptrials = 'yes'; cfg1.covariance = 'yes'; cfg1.channel = channel; dataPre = ft_redefinetrial(cfg1, data1FIC); timelock1 = ft_timelockanalysis(cfg1, dataPre); cfg2 = []; cfg2.keeptrials = 'yes'; cfg2.covariance = 'yes'; cfg2.channel = channel; dataPost = ft_redefinetrial(cfg2, data2FIC); timelock2 = ft_timelockanalysis(cfg2, dataPost); %% Source analysis cfg = []; cfg.grid = grid; cfg.hdmfile = volname; cfg.elec = sens; cfg.vol = vol; cfg.method = 'lcmv'; cfg.channel = channel; cfg.lcmv.keeptrials = 'yes'; % cfg.lcmv.projectnoise = 'yes'; cfg.lmvc.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; [source1] = ft_sourceanalysis(cfg, timelock1); [source2] = ft_sourceanalysis(cfg, timelock2); sourceDiff = source2; sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow; -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Fri Oct 26 16:52:18 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 26 Oct 2012 10:52:18 -0400 Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: References: <1376177301.1612.1340961039830.JavaMail.root@zimbra> <1659120385.1619.1340961051346.JavaMail.root@zimbra> Message-ID: Hi, I know this is not a recent post, but please allow me to ask a follow-up question; can you use cfg.pad for ft_freqanalysis for the baseline in this case (assuming post-baseline period of interest is uniform length, say 1000ms)? Such as: % extract baseline (500ms) cfg = []; cfg.toilim = [-.7 -.2]; data_BL = ft_redefinetrial(cfg,ft_data); % pad to make it 1000ms and run ft_freqanalysis cfg = []; *cfg.pad = 1;* cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.foi = foi; cfg.taper = 'dpss'; cfg.tapsmofrq = smooth; freq_BL = ft_freqanalysis(cfg,data_BL); Thanks! Akiko On Mon, Jul 2, 2012 at 4:07 PM, Johanna Zumer wrote: > Dear Anna, > > Ideally for the common filter, you want the same amount of data T(s) per > condition, where T = N x tw (and N is number of trials and tw is timewindow > length). In your case, if the baselines for each conditions can be > combined into one general baseline, and if you happen to have 100 trials > per condition, then T_baseline = 3 x 100 x 0.5s = 150s. If you then use > 1.5s length post-baseline, then T_each_condition = 100 x 1.5s = 150s, so > you now have equal T for each condition for the common filter. > > However, in order to have an equal effect of tapers and edge-effects on > the different conditions, you should use equal time window lengths in > freqanalysis. Thus it would be better to split your post-baseline data > into 3 segments of 500ms each before calling ft_freqanalysis, which again > gives T = 100 x 0.5 x 3 = 150s. > > Cheers, > Johanna > > 2012/6/29 Anna Wilsch > >> >> Dear Fieldtrippers, >> >> I'm trying to beamform my MEG data by building a common filter including >> three conditions and a baseline for each condition. The baseline intervals >> have a duration of 500 ms. I was wondering if it is ok if the post-baseline >> data are longer than that (1000 - 2000 ms). Does it have any negative >> impact on the cross-spectral-density matrix and/or the common filter? Would >> that still be a valid operation to do or is it necessary that baseline and >> post baseline data have the same length? >> Thank you for your comments. >> >> Cheers, >> Anna >> >> >> Anna Wilsch, Dipl.-Psych. >> Auditory Cognition Research Group >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstr. 1a - Leipzig, Germany >> (p) +49 (0)341 9940 2641 >> (e) wilsch at cbs.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dadair at NKI.RFMH.ORG Fri Oct 26 17:49:31 2012 From: dadair at NKI.RFMH.ORG (Adair, Devin) Date: Fri, 26 Oct 2012 11:49:31 -0400 Subject: [FieldTrip] Plotting use ft_multiplot Message-ID: <2586A1048152BE4D861E64A98700AD420BCED7E9@nki-mail.NKI.rfmh.org> Hello, I am currently designing my own n-way ANOVA script for time frequency data using a mixture of fieldtrip functions and my own scripting. I currently have a 2x2x4x10 design that I managed (after some effort) to output 25x24x17 (electrode x frequency x time) matrices with the p-values for each interaction. I know would like to plot this data using ft_multiplot by using the cfg.inputfile option that specifies a single *.mat file with a 'data' variable contained a cell array. My question is about the format of the cell array - does it need to come in a certain order? (frequency first, time second, etc) or by specifying the other configuration parameters will it automatically detect how my data is arranged? Thanks for the help, Devin Adair Research Assistant Brain Stimulation Program, Division of Experimental Therapeutics Department of Psychiatry, Columbia University Medical Center New York State Psychiatric Institute (p) 212-543-1339 Conserve Resources. Print only when necessary. IMPORTANT NOTICE: This e-mail is meant only for the use of the intended recipient. It may contain confidential information which is legally privilegedor otherwise protected by law. If you received this e-mail in error or from someone who is not authorized to send it to you, you are strictly prohibited from reviewing, using, disseminating, distributing or copying the e-mail. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND DELETE THIS MESSAGE FROM YOUR SYSTEM. Thank you for your cooperation. From polomacnenad at gmail.com Mon Oct 29 10:04:23 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 29 Oct 2012 10:04:23 +0100 Subject: [FieldTrip] ICA question Message-ID: Dear all, I have one question concerning ft_componentanalysis. I want to calculate ICA for my data in order to detect EOG artifacts and remove those ICA components. I have recorded EOG electrodes as well, but I am not sure where I should enter channels' label for them. I assume that ICA calculation will be more accurate if I provide data from EOG electrodes. So my question is how to inform ft_componentanalysis about EOG data? My configuration for the ICA analysis looks like this: cfg = []; cfg.method = 'runica'; cfg.runica.pca = 90; cfg.runica.maxsteps = 600; cfg.runica.stop = 1e-7; cfg.runica.extended = 1; ica_comp = ft_componentanalysis(cfg, data); Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Oct 29 10:27:14 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 29 Oct 2012 10:27:14 +0100 Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: References: <1376177301.1612.1340961039830.JavaMail.root@zimbra> <1659120385.1619.1340961051346.JavaMail.root@zimbra> Message-ID: <508E4BF2.9050203@donders.ru.nl> Hi Akiko, of course you can use it, but freqanalysis will pad zeros thereby increasing the spectral resolution but not add any data specifically. In the end, your result will be a more smoothed spectral estimate for the padded trials, which allows you to average across trials with different length (since they the spectral resolution is now equal across trials) or in this case contrast conditions of different lengths. I don't see much sense in doing that for the baseline, apart from tricking the algorithm, but from a more pragmatic point of view: if no reviewer complaints then it's fine ;) I bet there are some other consequences that I don't foresee; if someone knows, please let me/us know :) Best, Jörn On 10/26/2012 4:52 PM, Akiko Ikkai wrote: > Hi, > > I know this is not a recent post, but please allow me to ask a > follow-up question; can you use cfg.pad for ft_freqanalysis for the > baseline in this case (assuming post-baseline period of interest is > uniform length, say 1000ms)? > > Such as: > % extract baseline (500ms) > cfg = []; > cfg.toilim = [-.7 -.2]; > data_BL = ft_redefinetrial(cfg,ft_data); > > % pad to make it 1000ms and run ft_freqanalysis > cfg = []; > *cfg.pad = 1;* > cfg.method = 'mtmfft'; > cfg.output = 'powandcsd'; > cfg.foi = foi; > cfg.taper = 'dpss'; > cfg.tapsmofrq = smooth; > freq_BL = ft_freqanalysis(cfg,data_BL); > > Thanks! Akiko > > On Mon, Jul 2, 2012 at 4:07 PM, Johanna Zumer > > wrote: > > Dear Anna, > > Ideally for the common filter, you want the same amount of data > T(s) per condition, where T = N x tw (and N is number of trials > and tw is timewindow length). In your case, if the baselines for > each conditions can be combined into one general baseline, and if > you happen to have 100 trials per condition, then T_baseline = 3 x > 100 x 0.5s = 150s. If you then use 1.5s length post-baseline, > then T_each_condition = 100 x 1.5s = 150s, so you now have equal T > for each condition for the common filter. > > However, in order to have an equal effect of tapers and > edge-effects on the different conditions, you should use equal > time window lengths in freqanalysis. Thus it would be better to > split your post-baseline data into 3 segments of 500ms each before > calling ft_freqanalysis, which again gives T = 100 x 0.5 x 3 = 150s. > > Cheers, > Johanna > > 2012/6/29 Anna Wilsch > > > > Dear Fieldtrippers, > > I'm trying to beamform my MEG data by building a common filter > including three conditions and a baseline for each condition. > The baseline intervals have a duration of 500 ms. I was > wondering if it is ok if the post-baseline data are longer > than that (1000 - 2000 ms). Does it have any negative impact > on the cross-spectral-density matrix and/or the common filter? > Would that still be a valid operation to do or is it necessary > that baseline and post baseline data have the same length? > Thank you for your comments. > > Cheers, > Anna > > > Anna Wilsch, Dipl.-Psych. > Auditory Cognition Research Group > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstr. 1a - Leipzig, Germany > (p) +49 (0)341 9940 2641 > (e) wilsch at cbs.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Oct 29 10:49:12 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 29 Oct 2012 10:49:12 +0100 Subject: [FieldTrip] ICA question In-Reply-To: References: Message-ID: Dear Nenad, If you do not specify a cfg.channel in your call to ft_componentanalysis, it will default to 'all'. So, if your data structure contains EOG channels, they will be used in the decomposition with no further action required on your part. If your data is MEG, however, I don't know whether it is wise to attempt an ICA on the joint data set, including EOG. It is not standard practice here at the Donders, at least. One possibility to combine EOG and MEG/ICA data is to correlate your MEG component time courses with the EOG signal, and then inspect the most highly correlated components and (if inspection reveals them to be artifactual) remove them. This hybrid automatic/manual approach seems to be quite efficient in getting rid of eye artifacts. But perhaps you can combine them after all; if someone has a more informed opinion about this please let me know. (Another possibility is that the story is different for EEG and EOG combined.) Best, Eelke On 29 October 2012 10:04, Nenad Polomac wrote: > Dear all, > > I have one question concerning ft_componentanalysis. > > I want to calculate ICA for my data in order to detect EOG artifacts and > remove those ICA components. I have recorded EOG electrodes as well, but I > am not sure where I should enter channels' label for them. I assume that ICA > calculation will be more accurate if I provide data from EOG electrodes. > > So my question is how to inform ft_componentanalysis about EOG data? > > My configuration for the ICA analysis looks like this: > > cfg = []; > cfg.method = 'runica'; > cfg.runica.pca = 90; > cfg.runica.maxsteps = 600; > cfg.runica.stop = 1e-7; > cfg.runica.extended = 1; > ica_comp = ft_componentanalysis(cfg, data); > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Oct 30 10:03:24 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:03:24 +0100 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: References: Message-ID: <508F97DC.9080009@donders.ru.nl> Dear Qi, I guess this page might help: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=warp Best, Jörn On 10/25/2012 6:00 PM, qi li wrote: > Hi, > > Is there any function to co-register the individual cortical mesh > points(8196 in total) generate by fieldtrip to the standard brain. > Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Oct 30 10:07:48 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:07:48 +0100 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: Message-ID: <508F98E4.7010701@donders.ru.nl> Dear Inna, I'm not aware of any implementation in FieldTrip. For the CTF system we got the ft_denoise_synthetic function, but afaik SSS is something NeuroMag specific and (I might be wrong here, because...) since we do not have a NeuroMag system I would guess that no one bothered to implement it. If you want to do so, you're welcome and we would be most happy to help out on various ends with all our abilities ;) Best, Jörn On 10/25/2012 8:33 PM, McGowin, Inna wrote: > Hello, > I would like to know if Signal Space Separation method for MEG data > analysis is available in the FieldTrip toolbox. > > Thanks, > > -- > Inna > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Oct 30 10:21:26 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 30 Oct 2012 10:21:26 +0100 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> Message-ID: <508F9C16.8040604@donders.ru.nl> Dear Alistair, I am not quite sure whether I understand your request correctly, but you are looking for help to get the maximum activity per trial in your source reconstructed data? I guess your confusion arises because of the different subfields, so here a short explanation: Every dipole has strengths in 3 directions (think of it as magnetic field strength in the x,y and z direction), this is stored in .mom In order to get it down to one number instead of three, there are different possibilities, but what's roughly happening by default is that an SVD is computed then the principal direction is taken, i.e. the strongest of these three vectors. This is what you find back in .pow. The filter matrix is the filter per grid position to get from your sensor data to the source data. Noise is an approximation of the noise level per trial. So, if you want to get the maximum activity, I would suggest to take [~, idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position of maximal power. If you are interested in the maximum over e.g. the posterior part of the brain, you should limit your search. You can best do that by using sourceDiff.pos and an atlas. If that does not answer your question, feel free to clarify your request ;) Best, Jörn On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: > > Hi all, > > I trying to reconstruct the activity in a source using the LCMV > beamformer with EEG data. My code follows several examples that stop > at the source localization. Unfortunately, I am unable to reconstruct > the source. > > The data is a series of 198 button presses, self-paced. The two time > locked data sets are pre- and post-event windows. The data is filtered > in the beta band (13-30 Hz). There are 128 EEG channels, three of > which are excluded due to excessive noise. The data was re-referenced > to the common average. The source that provides the normalized > difference in power between the two time windows has a field avg with > subfields, filter, noise, pow, and mom: > > sourceDiff = > > dim: [17 13 14] > > time: [1x819 double] > > pos: [3094x3 double] > > inside: [1x1567 double] > > outside: [1x1527 double] > > method: 'average' > > avg: [1x1 struct] > > cfg: [1x1 struct] > > sourceDiff.avg > > ans = > > pow: [1x3094 double] > > mom: {1x3094 cell} > > noise: [1x3094 double] > > filter: {1x3094 cell} > > The moment entries are sized 3 x 819, the filter 3 x 65. > > I hope someone can help me with the code required to reconstruct the > source at the voxel with the largest power during the entire duration > of each trial. The code used to determine the source is below. MRI, > head model and leadfield were computed as well but are not included in > the code below. > > Kind regards, > > Alistair > > channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; > > cfg1 = []; > > cfg1.keeptrials = 'yes'; > > cfg1.covariance = 'yes'; > > cfg1.channel = channel; > > dataPre = ft_redefinetrial(cfg1, data1FIC); > > timelock1 = ft_timelockanalysis(cfg1, dataPre); > > cfg2 = []; > > cfg2.keeptrials = 'yes'; > > cfg2.covariance = 'yes'; > > cfg2.channel = channel; > > dataPost = ft_redefinetrial(cfg2, data2FIC); > > timelock2 = ft_timelockanalysis(cfg2, dataPost); > > %% Source analysis > > cfg = []; > > cfg.grid = grid; > > cfg.hdmfile = volname; > > cfg.elec = sens; > > cfg.vol = vol; > > cfg.method = 'lcmv'; > > cfg.channel = channel; > > cfg.lcmv.keeptrials = 'yes'; > > % cfg.lcmv.projectnoise = 'yes'; > > cfg.lmvc.lambda = '5%'; > > cfg.lcmv.keepfilter = 'yes'; > > [source1] = ft_sourceanalysis(cfg, timelock1); > > [source2] = ft_sourceanalysis(cfg, timelock2); > > sourceDiff = source2; > > sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ > source1.avg.pow; > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Tue Oct 30 10:37:02 2012 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Tue, 30 Oct 2012 10:37:02 +0100 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: <508F9C16.8040604@donders.ru.nl> References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> <508F9C16.8040604@donders.ru.nl> Message-ID: Dear Alistair, In addition to the informative response from Jörn, I just wanted to add: One tiny thing I note is that you type cfg.lmvc.lambda which should be cfg.lcmv.lambda. Why is your filter of size 3x65? Shouldn't it be 3x125 (3 source orientations x 125 EEG channels)? Cheers, Johanna 2012/10/30 "Jörn M. Horschig" > Dear Alistair, > > I am not quite sure whether I understand your request correctly, but you > are looking for help to get the maximum activity per trial in your source > reconstructed data? I guess your confusion arises because of the different > subfields, so here a short explanation: > > Every dipole has strengths in 3 directions (think of it as magnetic field > strength in the x,y and z direction), this is stored in .mom > In order to get it down to one number instead of three, there are > different possibilities, but what's roughly happening by default is that an > SVD is computed then the principal direction is taken, i.e. the strongest > of these three vectors. This is what you find back in .pow. The filter > matrix is the filter per grid position to get from your sensor data to the > source data. Noise is an approximation of the noise level per trial. > > So, if you want to get the maximum activity, I would suggest to take [~, > idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position > of maximal power. If you are interested in the maximum over e.g. the > posterior part of the brain, you should limit your search. You can best do > that by using sourceDiff.pos and an atlas. > > If that does not answer your question, feel free to clarify your request ;) > > Best, > Jörn > > > On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: > > Hi all,**** > > ** ** > > I trying to reconstruct the activity in a source using the LCMV beamformer > with EEG data. My code follows several examples that stop at the source > localization. Unfortunately, I am unable to reconstruct the source. **** > > ** ** > > The data is a series of 198 button presses, self-paced. The two time > locked data sets are pre- and post-event windows. The data is filtered in > the beta band (13-30 Hz). There are 128 EEG channels, three of which are > excluded due to excessive noise. The data was re-referenced to the common > average. The source that provides the normalized difference in power > between the two time windows has a field avg with subfields, filter, noise, > pow, and mom:**** > > ** ** > > sourceDiff = **** > > ** ** > > dim: [17 13 14]**** > > time: [1x819 double]**** > > pos: [3094x3 double]**** > > inside: [1x1567 double]**** > > outside: [1x1527 double]**** > > method: 'average'**** > > avg: [1x1 struct]**** > > cfg: [1x1 struct]**** > > ** ** > > sourceDiff.avg**** > > ** ** > > ans = **** > > ** ** > > pow: [1x3094 double]**** > > mom: {1x3094 cell}**** > > noise: [1x3094 double]**** > > filter: {1x3094 cell}**** > > ** ** > > The moment entries are sized 3 x 819, the filter 3 x 65.**** > > ** ** > > I hope someone can help me with the code required to reconstruct the > source at the voxel with the largest power during the entire duration of > each trial. The code used to determine the source is below. MRI, head model > and leadfield were computed as well but are not included in the code below. > **** > > ** ** > > Kind regards,**** > > ** ** > > Alistair**** > > ** ** > > channel = {'EEG', '-AFF1', '-AFZ', '-AF1'};**** > > ** ** > > ** ** > > cfg1 = [];**** > > cfg1.keeptrials = 'yes';**** > > cfg1.covariance = 'yes';**** > > cfg1.channel = channel;**** > > dataPre = ft_redefinetrial(cfg1, data1FIC);**** > > timelock1 = ft_timelockanalysis(cfg1, dataPre);**** > > **** > > cfg2 = []; **** > > cfg2.keeptrials = 'yes';**** > > cfg2.covariance = 'yes';**** > > cfg2.channel = channel;**** > > dataPost = ft_redefinetrial(cfg2, data2FIC);**** > > timelock2 = ft_timelockanalysis(cfg2, dataPost);**** > > **** > > ** ** > > %% Source analysis**** > > cfg = [];**** > > cfg.grid = grid;**** > > cfg.hdmfile = volname;**** > > cfg.elec = sens;**** > > cfg.vol = vol;**** > > cfg.method = 'lcmv';**** > > cfg.channel = channel;**** > > cfg.lcmv.keeptrials = 'yes';**** > > % cfg.lcmv.projectnoise = 'yes';**** > > **** > > cfg.lmvc.lambda = '5%';**** > > cfg.lcmv.keepfilter = 'yes';**** > > [source1] = ft_sourceanalysis(cfg, timelock1);**** > > [source2] = ft_sourceanalysis(cfg, timelock2);**** > > ** ** > > sourceDiff = source2;**** > > sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ > source1.avg.pow;**** > > ** ** > > ** ** > > ** ** > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Tue Oct 30 14:20:25 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Tue, 30 Oct 2012 09:20:25 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: <508F98E4.7010701@donders.ru.nl> References: <508F98E4.7010701@donders.ru.nl> Message-ID: Thank you Jörn for the info. I was looking for SSS to perform a DC analysis of MEG data with no motion correction. We have MEG datasets that are collected from subjects with high magnetic noise such as dental work and/or brain surgery contamination. We wanted to remove the signal that comes from these areas. Do you work with such problems? Thanks, Inna On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Inna, > > I'm not aware of any implementation in FieldTrip. For the CTF system we > got the ft_denoise_synthetic function, but afaik SSS is something NeuroMag > specific and (I might be wrong here, because...) since we do not have a > NeuroMag system I would guess that no one bothered to implement it. If you > want to do so, you're welcome and we would be most happy to help out on > various ends with all our abilities ;) > > Best, > Jörn > > > On 10/25/2012 8:33 PM, McGowin, Inna wrote: > > Hello, > I would like to know if Signal Space Separation method for MEG data > analysis is available in the FieldTrip toolbox. > > Thanks, > > -- > Inna > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.N.Vardy at tudelft.nl Tue Oct 30 15:45:59 2012 From: A.N.Vardy at tudelft.nl (Alistair Vardy - 3ME) Date: Tue, 30 Oct 2012 14:45:59 +0000 Subject: [FieldTrip] LCMV beamformer source reconstruction In-Reply-To: References: <7E8E8A2DF53088489583543F38570D7A1EBDBF7F@SRV362.tudelft.net> <508F9C16.8040604@donders.ru.nl> Message-ID: <7E8E8A2DF53088489583543F38570D7A1F58F40C@SRV363.tudelft.net> Dear Jorn, Johanna, Thank you for your replies. I was making a couple of mistakes. I wasn't using the parameters correctly and now use cfg.lcmv. which works. The mismatch between the number of channels and the size of the filter was due to the strange situation that ASA channel labels sometimes uppercase letters (from the electrode file) and sometimes lowercase (from the header file). Fieldtrip does not understand AFZ but knows AFz for example. The routine ft_prepare_vol_sense.m thus discarded half of the channels. I found the voxel with the maximal power and reconstructing the dipole moment at that particular source for each trial using the following code which I found in an earlier post somewhere: trialN = size(timelock0.trial,1); for trial_tel = 1:trialN sourceDiff.trial(trial_tel).mom = sourceDiff.avg.filter{maxind}*data0FIC.trial{trial_tel}; end where maxind is the index of the voxel with maximum power. Timelock0 takes each trial with a window of [-0.5 0.5] s around each event. I will use a SVD to determine the power of the source for each trial separately. Thanks again for your help! Alistair From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Johanna Zumer Sent: Tuesday, October 30, 2012 10:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV beamformer source reconstruction Dear Alistair, In addition to the informative response from Jörn, I just wanted to add: One tiny thing I note is that you type cfg.lmvc.lambda which should be cfg.lcmv.lambda. Why is your filter of size 3x65? Shouldn't it be 3x125 (3 source orientations x 125 EEG channels)? Cheers, Johanna 2012/10/30 "Jörn M. Horschig" > Dear Alistair, I am not quite sure whether I understand your request correctly, but you are looking for help to get the maximum activity per trial in your source reconstructed data? I guess your confusion arises because of the different subfields, so here a short explanation: Every dipole has strengths in 3 directions (think of it as magnetic field strength in the x,y and z direction), this is stored in .mom In order to get it down to one number instead of three, there are different possibilities, but what's roughly happening by default is that an SVD is computed then the principal direction is taken, i.e. the strongest of these three vectors. This is what you find back in .pow. The filter matrix is the filter per grid position to get from your sensor data to the source data. Noise is an approximation of the noise level per trial. So, if you want to get the maximum activity, I would suggest to take [~, idx] = max(sourceDiff.avg.pow{i}), where idx then is the the grid position of maximal power. If you are interested in the maximum over e.g. the posterior part of the brain, you should limit your search. You can best do that by using sourceDiff.pos and an atlas. If that does not answer your question, feel free to clarify your request ;) Best, Jörn On 10/25/2012 10:40 PM, Alistair Vardy - 3ME wrote: Hi all, I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source. The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom: sourceDiff = dim: [17 13 14] time: [1x819 double] pos: [3094x3 double] inside: [1x1567 double] outside: [1x1527 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] sourceDiff.avg ans = pow: [1x3094 double] mom: {1x3094 cell} noise: [1x3094 double] filter: {1x3094 cell} The moment entries are sized 3 x 819, the filter 3 x 65. I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below. Kind regards, Alistair channel = {'EEG', '-AFF1', '-AFZ', '-AF1'}; cfg1 = []; cfg1.keeptrials = 'yes'; cfg1.covariance = 'yes'; cfg1.channel = channel; dataPre = ft_redefinetrial(cfg1, data1FIC); timelock1 = ft_timelockanalysis(cfg1, dataPre); cfg2 = []; cfg2.keeptrials = 'yes'; cfg2.covariance = 'yes'; cfg2.channel = channel; dataPost = ft_redefinetrial(cfg2, data2FIC); timelock2 = ft_timelockanalysis(cfg2, dataPost); %% Source analysis cfg = []; cfg.grid = grid; cfg.hdmfile = volname; cfg.elec = sens; cfg.vol = vol; cfg.method = 'lcmv'; cfg.channel = channel; cfg.lcmv.keeptrials = 'yes'; % cfg.lcmv.projectnoise = 'yes'; cfg.lmvc.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; [source1] = ft_sourceanalysis(cfg, timelock1); [source2] = ft_sourceanalysis(cfg, timelock2); sourceDiff = source2; sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow; _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Oct 30 17:58:34 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Tue, 30 Oct 2012 17:58:34 +0100 (CET) Subject: [FieldTrip] converting sensor coordinates to MNI coordinates Message-ID: <8a8a0a83-5383-45f1-b64e-a18c9a5c49c6@thalamus_p> Dear List members, this post is related to a question that I have been posting several times now, but for which I haven't found an answer yet. I have a set of coordinates [5,0,-1] which should correspond to a point in sensor space. Is it possible to compute the corresponding coordinates in MNI space using a transformation matrix or anything similar? Any help or suggestions would be highly appreciated. Fred From tomh at kurage.nimh.nih.gov Tue Oct 30 22:08:22 2012 From: tomh at kurage.nimh.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Tue, 30 Oct 2012 17:08:22 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> Message-ID: <509041C6.7020609@kurage.nimh.nih.gov> Just wanted to mention, the "SSS" method separates the signal into "inside" and "outside" the helmet (this is what MaxFilter does). So it is useless for removing dental artifacts. McGowin, Inna wrote: > Thank you Jörn for the info. > > I was looking for SSS to perform a DC analysis of MEG data with no > motion correction. > We have MEG datasets that are collected from subjects with high magnetic > noise such as dental work and/or brain surgery contamination. We wanted > to remove the signal that comes from these areas. Do you work with such > problems? > > Thanks, > Inna > > On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" > > wrote: > > Dear Inna, > > I'm not aware of any implementation in FieldTrip. For the CTF system > we got the ft_denoise_synthetic function, but afaik SSS is something > NeuroMag specific and (I might be wrong here, because...) since we > do not have a NeuroMag system I would guess that no one bothered to > implement it. If you want to do so, you're welcome and we would be > most happy to help out on various ends with all our abilities ;) > > Best, > Jörn > > > On 10/25/2012 8:33 PM, McGowin, Inna wrote: >> Hello, >> I would like to know if Signal Space Separation method for MEG >> data analysis is available in the FieldTrip toolbox. >> >> Thanks, >> >> -- >> Inna >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Inna McGowin > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- The white knight is talking backwards. From jan.schoffelen at donders.ru.nl Wed Oct 31 08:03:01 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 08:03:01 +0100 Subject: [FieldTrip] request for 4d users Message-ID: Dear community and 4d-users in particular, I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? Thanks for any input, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Wed Oct 31 13:07:44 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Wed, 31 Oct 2012 14:07:44 +0200 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: Dear Jan-Mathijs I don't have such data at the moment I think you can get to the information in the config. it is in user_data_block{1,12} here is how I get to it with pdf4D pdf=pdf4D('c2,rfDC'); header = get(pdf, 'Header'); chi=channel_index(pdf,'EEG'); config = get(pdf, 'config'); % chi(1) % chan_no = header.channel_data{chi(1)}.chan_no config.user_block_data{1,12}.hdr.type config.user_block_data{1,12}.reserved I may collect some data later today or in the next few days, I'll let you know if I do. here is the data for eeg with no digitization of eeg ans = b_eeg_elec_locs ans = Columns 1 through 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 23 through 32 0 0 0 0 0 0 0 0 0 0 On 31 October 2012 09:03, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio > module to deal with simultaneous MEG/EEG measurements using the > 4D-neuroimaging system. Specifically, I want to improve the reading of EEG > electrode positions, when these have been digitized using the Polhemus in > combination with the 4D acquisition software. This question has been raised > on this list over a year ago by Margit Schönherr (who kindly sent me a > dataset to work with: thanks Margit), but it would be really helpful if I > could benefit from your knowledge/input. At the moment FT can extract > electrode positions from the header, but it is based on reverse engineering > based on 1 dataset only. Therefore I would like to ask you whether you > could send me some (as small as possible) datasets, which contain digitized > electrode positions (in combination with the corresponding config and > hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in > combination with their labels according to the 10/20 convention. Does > anybody know whether information is stored in the file-header that links > the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Oct 31 13:09:35 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 31 Oct 2012 08:09:35 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: <509041C6.7020609@kurage.nimh.nih.gov> References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Tom, In theory SSS method allows to extract signal from the dental work (due to its magnetization) if correction of motion is implemented. MEG SQUIDS can only detect DC magnetic fields if the source is in motion but removing the motion from the raw signal with SSS allows to detected DC signals. I have a reference paper if you are interested. Thanks On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < tomh at kurage.nimh.nih.gov> wrote: > Just wanted to mention, the "SSS" method separates the signal into > "inside" and "outside" the helmet (this is what MaxFilter does). So it is > useless for removing dental artifacts. > > McGowin, Inna wrote: > >> Thank you Jörn for the info. >> >> I was looking for SSS to perform a DC analysis of MEG data with no motion >> correction. >> We have MEG datasets that are collected from subjects with high magnetic >> noise such as dental work and/or brain surgery contamination. We wanted to >> remove the signal that comes from these areas. Do you work with such >> problems? >> >> Thanks, >> Inna >> >> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >> jm.horschig at donders.ru.nl >> >> wrote: >> >> Dear Inna, >> >> I'm not aware of any implementation in FieldTrip. For the CTF system >> we got the ft_denoise_synthetic function, but afaik SSS is something >> NeuroMag specific and (I might be wrong here, because...) since we >> do not have a NeuroMag system I would guess that no one bothered to >> implement it. If you want to do so, you're welcome and we would be >> most happy to help out on various ends with all our abilities ;) >> >> Best, >> Jörn >> >> >> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >> >>> Hello, >>> I would like to know if Signal Space Separation method for MEG >>> data analysis is available in the FieldTrip toolbox. >>> >>> Thanks, >>> >>> -- Inna >>> >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> >> -- Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour Centre for >> Cognitive Neuroimaging >> Radboud University Nijmegen Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> > >> Tel: +31-(0)24-36-68493 >> >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> > >> >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Inna McGowin >> >> >> ------------------------------**------------------------------** >> ------------ >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > -- > The white knight is talking backwards. > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 31 14:12:57 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 14:12:57 +0100 Subject: [FieldTrip] converting sensor coordinates to MNI coordinates References: Message-ID: Hi Frederic, What is the question exactly? This is the first time that you mention the word 'MNI' so I am a bit puzzled what you're after (and with me perhaps the rest of us mortals as well, which could explain the lack of answers). What you refer to as 'sensor space' is a coordinate system that is defined based on the head of the participant, i.e. based on three anatomical landmarks: LPA, RPA, and Nasion. The transformation to MNI-space is not straightforward because this is generally based on a non-linear warp. If you are happy with an approximation, then you could use ft_volumenormalise to extract the linear transformation from individual head space into +/- MNI-space. This coordinate system is defined based on three other anatomical landmarks: AC, PC and a point defining the positive z-axis. You can do either of the following things: -Take an individual MRI (that is coregistered to the individual's head, i.e. it has a transform that defines the head coordinate system correctly). -Call ft_volumenormalise (with cfg.nonlinear = 'no') -The output volume (let's call this variable normalise) contains a transformation matrix in normalise.cfg.final, that transforms from head space into 'MNI-space'. -You can use warp_apply to transform between the different coordinate systems, using the transformation matrix (or its inverse) to toggle coordinates back and forth. -Take an individual MRI. -specify mri.transform = eye(4) (assuming that the MRI is 1mm isotropic). -call ft_volumerealign twice with cfg.interactive = 'yes'. -once you specify lpa, rpa and nasion interactively. -once you specify ac, pc and a z-point interactively. -these two calls result in two transformation matrices, the first defining how to interpret the MRI voxels in coordinate system 1, the other defining how to interpret the MRI voxels in coordinate system 2. -I leave it as an exercise to you how to combine these to in order to toggle from one coordinate system to the other directly. Good luck, Jan-Mathijs Schoffelen On Oct 30, 2012, at 5:58 PM, Frederic Roux wrote: > > Dear List members, > > this post is related to a question that I have > been posting several times now, but for which > I haven't found an answer yet. > > I have a set of coordinates [5,0,-1] which should > correspond to a point in sensor space. > > Is it possible to compute the corresponding coordinates > in MNI space using a transformation matrix or anything > similar? > > Any help or suggestions would be highly appreciated. > > Fred > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 31 14:16:03 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 31 Oct 2012 14:16:03 +0100 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: <0ADACA7A-A5F9-455C-9F69-642D7279F920@donders.ru.nl> Dear Yuval, Thanks for the feedback. It would be awesome if you could digitize some 'electrodes' and send some data (obviously I am now not anymore working in a lab with a 4d-machine). At present FT's read_4d_hdr indeed tries to interpret the 'b_eeg_elec_locs' user-block. In addition to (what I expect) the digitized electrode positions, this block also contains the digitized coil positions in combination with the anatomical landmarks, yielding useful coregistration information. Cheers, JM On Oct 31, 2012, at 1:07 PM, Yuval Harpaz wrote: > Dear Jan-Mathijs > I don't have such data at the moment > I think you can get to the information in the config. > it is in user_data_block{1,12} > here is how I get to it with pdf4D > > > pdf=pdf4D('c2,rfDC'); > header = get(pdf, 'Header'); > chi=channel_index(pdf,'EEG'); > config = get(pdf, 'config'); > % chi(1) > % chan_no = header.channel_data{chi(1)}.chan_no > config.user_block_data{1,12}.hdr.type > config.user_block_data{1,12}.reserved > > > I may collect some data later today or in the next few days, I'll let you know if I do. > here is the data for eeg with no digitization of eeg > > ans = > > b_eeg_elec_locs > > > ans = > > Columns 1 through 22 > > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > Columns 23 through 32 > > 0 0 0 0 0 0 0 0 0 0 > > > > On 31 October 2012 09:03, jan-mathijs schoffelen wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > Dr .Harpaz > > BIU MEG lab > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed Oct 31 16:23:39 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 31 Oct 2012 16:23:39 +0100 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Dear Inna, Would you mind posting the citation of the reference paper you mention, for the whole list to benefit? Cheers, Johanna 2012/10/31 McGowin, Inna > Tom, > In theory SSS method allows to extract signal from the dental work (due to > its magnetization) if correction of motion is implemented. MEG SQUIDS can > only detect DC magnetic fields if the source is in motion but removing the > motion from the raw signal with SSS allows to detected DC signals. I have a > reference paper if you are interested. Thanks > > > On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < > tomh at kurage.nimh.nih.gov> wrote: > >> Just wanted to mention, the "SSS" method separates the signal into >> "inside" and "outside" the helmet (this is what MaxFilter does). So it is >> useless for removing dental artifacts. >> >> McGowin, Inna wrote: >> >>> Thank you Jörn for the info. >>> >>> I was looking for SSS to perform a DC analysis of MEG data with no >>> motion correction. >>> We have MEG datasets that are collected from subjects with high magnetic >>> noise such as dental work and/or brain surgery contamination. We wanted to >>> remove the signal that comes from these areas. Do you work with such >>> problems? >>> >>> Thanks, >>> Inna >>> >>> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >>> jm.horschig at donders.ru.nl >> >>> wrote: >>> >>> Dear Inna, >>> >>> I'm not aware of any implementation in FieldTrip. For the CTF system >>> we got the ft_denoise_synthetic function, but afaik SSS is something >>> NeuroMag specific and (I might be wrong here, because...) since we >>> do not have a NeuroMag system I would guess that no one bothered to >>> implement it. If you want to do so, you're welcome and we would be >>> most happy to help out on various ends with all our abilities ;) >>> >>> Best, >>> Jörn >>> >>> >>> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >>> >>>> Hello, >>>> I would like to know if Signal Space Separation method for MEG >>>> data analysis is available in the FieldTrip toolbox. >>>> >>>> Thanks, >>>> >>>> -- Inna >>>> >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> >>> -- Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour Centre for >>> Cognitive Neuroimaging >>> Radboud University Nijmegen Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail: jm.horschig at donders.ru.nl >> ru.nl > >>> Tel: +31-(0)24-36-68493 >>> >>> Web: http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> -- >>> Inna McGowin >>> >>> >>> ------------------------------**------------------------------** >>> ------------ >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> -- >> The white knight is talking backwards. >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > > > -- > Inna McGowin > > > _______________________________________________ > 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 Don.Rojas at ucdenver.edu Wed Oct 31 16:14:35 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Wed, 31 Oct 2012 09:14:35 -0600 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: <5ED4573D-ED4E-4BD6-A9EE-ABFD01517BBA@ucdenver.edu> Dear Jan-Mathijs, We do not routinely digitize EEG electrodes, but I will look and see if we still have an old test dataset that we acquired to learn the process years ago. Like Yuval, we use Eugene Kronberg's pdf4D matlab object code. To get the labels (e.g., FP1), as opposed to the names (e.g., E1), we do something like this: pdf=pdf4D('c,rfhp0.1Hz') hdr=get(pdf,'header') idx=channel_index(pdf,'EEG','name') Variable idx holds the indices for the EEG channels. Then, for a specific channel label, if they are entered by the user, you can get it this way: hdr.channel_data{idx(1)}.chan_label In this case, that label is FP1 and the channel name is E1, in the dataset that I am looking at now. But, other than the index association, there is no standard convention for association of names and labels. The names are a 4d convention. The labels are user specified in the template configuration file used for acquisition. Or if looking for the indices of a specific EEG label, this way: idx=channel_index(pdf,'FP1','label') Don On Oct 31, 2012, at 1:03 AM, jan-mathijs schoffelen wrote: Dear community and 4d-users in particular, I am in the process of implementing more robust support in the fileio module to deal with simultaneous MEG/EEG measurements using the 4D-neuroimaging system. Specifically, I want to improve the reading of EEG electrode positions, when these have been digitized using the Polhemus in combination with the 4D acquisition software. This question has been raised on this list over a year ago by Margit Schönherr (who kindly sent me a dataset to work with: thanks Margit), but it would be really helpful if I could benefit from your knowledge/input. At the moment FT can extract electrode positions from the header, but it is based on reverse engineering based on 1 dataset only. Therefore I would like to ask you whether you could send me some (as small as possible) datasets, which contain digitized electrode positions (in combination with the corresponding config and hs_file). This would be much appreciated. On a related note, Margit's dataset contained electrode positions in combination with their labels according to the 10/20 convention. Does anybody know whether information is stored in the file-header that links the named electrodes to the generic naming scheme 'E1'...'Ex'? Thanks for any input, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Oct 31 18:41:05 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 31 Oct 2012 13:41:05 -0400 Subject: [FieldTrip] Signal Space Separation method for MEG data analysis In-Reply-To: References: <508F98E4.7010701@donders.ru.nl> <509041C6.7020609@kurage.nimh.nih.gov> Message-ID: Johanna, no problem. "Presentation of electromagnetic multichannel data: The signal space separation method" by Samu Taulu and Matti Kajola. If anybody is interested in the SSS method implementation with FieldTrip it would be great. On Wed, Oct 31, 2012 at 11:23 AM, Johanna Zumer wrote: > Dear Inna, > > Would you mind posting the citation of the reference paper you mention, > for the whole list to benefit? > > Cheers, > Johanna > > 2012/10/31 McGowin, Inna > > Tom, >> In theory SSS method allows to extract signal from the dental work (due >> to its magnetization) if correction of motion is implemented. MEG SQUIDS >> can only detect DC magnetic fields if the source is in motion but removing >> the motion from the raw signal with SSS allows to detected DC signals. I >> have a reference paper if you are interested. Thanks >> >> >> On Tue, Oct 30, 2012 at 5:08 PM, Tom Holroyd (NIH/NIMH) [E] < >> tomh at kurage.nimh.nih.gov> wrote: >> >>> Just wanted to mention, the "SSS" method separates the signal into >>> "inside" and "outside" the helmet (this is what MaxFilter does). So it is >>> useless for removing dental artifacts. >>> >>> McGowin, Inna wrote: >>> >>>> Thank you Jörn for the info. >>>> >>>> I was looking for SSS to perform a DC analysis of MEG data with no >>>> motion correction. >>>> We have MEG datasets that are collected from subjects with high >>>> magnetic noise such as dental work and/or brain surgery contamination. We >>>> wanted to remove the signal that comes from these areas. Do you work with >>>> such problems? >>>> >>>> Thanks, >>>> Inna >>>> >>>> On Tue, Oct 30, 2012 at 5:07 AM, "Jörn M. Horschig" < >>>> jm.horschig at donders.ru.nl >> >>>> wrote: >>>> >>>> Dear Inna, >>>> >>>> I'm not aware of any implementation in FieldTrip. For the CTF system >>>> we got the ft_denoise_synthetic function, but afaik SSS is something >>>> NeuroMag specific and (I might be wrong here, because...) since we >>>> do not have a NeuroMag system I would guess that no one bothered to >>>> implement it. If you want to do so, you're welcome and we would be >>>> most happy to help out on various ends with all our abilities ;) >>>> >>>> Best, >>>> Jörn >>>> >>>> >>>> On 10/25/2012 8:33 PM, McGowin, Inna wrote: >>>> >>>>> Hello, >>>>> I would like to know if Signal Space Separation method for MEG >>>>> data analysis is available in the FieldTrip toolbox. >>>>> >>>>> Thanks, >>>>> >>>>> -- Inna >>>>> >>>>> >>>>> >>>>> ______________________________**_________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> > >>>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> -- Jörn M. Horschig >>>> PhD Student >>>> Donders Institute for Brain, Cognition and Behaviour Centre for >>>> Cognitive Neuroimaging >>>> Radboud University Nijmegen Neuronal Oscillations Group >>>> FieldTrip Development Team >>>> >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Contact: >>>> E-Mail: jm.horschig at donders.ru.nl >>> ru.nl > >>>> Tel: +31-(0)24-36-68493 >>>> >>>> Web: http://www.ru.nl/donders >>>> >>>> Visiting address: >>>> Trigon, room 2.30 >>>> Kapittelweg 29 >>>> NL-6525 EN Nijmegen >>>> The Netherlands >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> >>>> -- >>>> Inna McGowin >>>> >>>> >>>> ------------------------------**------------------------------** >>>> ------------ >>>> >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> -- >>> The white knight is talking backwards. >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Inna McGowin >> >> >> _______________________________________________ >> 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 > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Wed Oct 31 22:38:30 2012 From: lihqih at gmail.com (qi li) Date: Wed, 31 Oct 2012 17:38:30 -0400 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: <508F97DC.9080009@donders.ru.nl> References: <508F97DC.9080009@donders.ru.nl> Message-ID: Hi Jörn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "Jörn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > Jörn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip